Sunday, October 15, 2023

Azure Arc Setup

q: Customer called because they had a new Azure Arc Setup utility in their system tray.
a: This is apparently a server feature to be removed through Server Manager.  Uncheck the box & don't forget to reboot when it finishes. 


C:\Windows\AzureArcSetup\ArcSetup\AzureArcSetup.exe
C:\Windows\AzureArcSetup\Systray\AzureArcSysTray.exe


Friday, October 13, 2023

HOW TO - Curl from Task Scheduler in Windows

q: A customer requested to run a curl command on a regular schedule from a windows computer.

a: Within Windows, create a Scheduled Task that runs as system, using Powershell and Invoke-WebRequest

General tab: Use the following user account: SYSTEM
Trigger tab: At system startup - After triggered, repeat every 5min
Action tab: Start a program - C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe 
Add Arguments:  "Invoke-WebRequest -uri '"https://www.google.com/"' -usebasicparsing"

notes:
a) running an invoke-webrequest as system fails without the trailing switch -usebasicparsing
b) we ended up putting the entire argument within double quotes and then the URL nested within double quotes inside single quotes - single quote, double quote, URL, double quote, single quote.

HOW TO - Scrape an old htm / html website

q: Customer called requesting a method to download their htm based website to their local computer.

a: We recommended HTTrack - We tried a few different applications and none of them got every single site file. Some missed image files because they were configured as background images.  HTTrack got every single file and folder.  Download here: https://www.httrack.com/page/2/en/index.html
notes:
The application will rewrite an .htm site to all .html renaming files and updating hyperlinks.
The application will inject a line into each .html at the top and bottom of the file explaining that it was downloaded by httrack from the original URL.

Wikipedia: HTTrack is a free and open-source Web crawler and offline browser, developed by Xavier Roche and licensed under the GNU General Public License Version 3. HTTrack allows users to download World Wide Web sites from the Internet to a local computer.

Thursday, October 5, 2023

OneDrive 0x80070422 Something went wrong

 q: Customer tried to sign into OneDrive and got a pop-up error. 
Something went wrong
Please try again later
0x80070422
Send feedback

We got this error within Microsoft Word as well.

a: We discovered the Microsoft Account Sign-in Assistant service was stopped & disabled.
We set it to automatic, started it, tried again & were prompted for the PIN associated with the account.  

Friday, March 3, 2023

HOW TO - Search Windows Explorer for Folder Name

 q: If you put a value in the search window it returns folders and files.  How do you limit the results to ONLY folder names?

a: use this parameter in the Windows Explorer Search field to search for folders named testing:

kind:folder testing

Tuesday, October 25, 2022

Easy File Retention Enforcement

  1. you have a folder d:\files, it has files in the root and in sub-folders
  2. the first line will move all files over 90 days to d:\files\temp
  3. the second line will delete d:\files\temp

ROBOCOPY D:\files\ D:\files\temp /s /move /minage:90 

RD /S /Q D:\files\Temp


Wednesday, January 13, 2021

HOW TO - Audit MS SQL Sysadmin users

q: how can I query a Microsoft SQL Server to identify accounts granted the system level sysadmin role?


a: try this script:

USE master
GO

SELECT p.name AS [loginname] ,
p.type ,
p.type_desc ,
p.is_disabled,
CONVERT(VARCHAR(10),p.create_date ,101) AS [created],
CONVERT(VARCHAR(10),p.modify_date , 101) AS [update]
FROM sys.server_principals p
JOIN sys.syslogins s ON p.sid = s.sid
WHERE p.type_desc IN ('SQL_LOGIN', 'WINDOWS_LOGIN', 'WINDOWS_GROUP')
-- Logins that are not process logins
AND p.name NOT LIKE '##%'
-- Logins that are sysadmins
AND s.sysadmin = 1
GO