>NULL: 2021

Wednesday 3 November 2021

Stop Windows from sleeping via cmd.exe

To set the PC sleep time-out for AC power use the following.
powercfg /change standby-timeout-ac 0


For monitors use the following.
powercfg /change monitor-timeout-ac 0



Tuesday 26 October 2021

Office click-to-run 365, VL etc will not let you add an app if already run with excludes in the XML

 If you have previously excluded Office apps from your install you may find that re-running without them excluded does not install them.


It seems Office click-to-run keeps a record of the initial excluded apps in the registry.

Use regedit.exe to take a look in the following path for the 'O365<edition name>.ExcludedApps' key.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

Remove any excluded apps and rerun the install.

Monday 13 September 2021

Find the Recovery Model of all databases in MS SQL

 Run the following script to list the Recovery Model setting for all DBs in MSSQL


SELECT Name, DATABASEPROPERTYEX(Name,'RECOVERY') AS [Recovery Model] FROM master.dbo.sysdatabases

Friday 11 June 2021

An odd one. Hyper-V cannot update the Integration Services Setup Disk image

 Datto reporting:

A Microsoft-Windows-Hyper-V-VMMS-Admin - Hyper-V-VMMS monitor in policy Windows: Role - Hyper-V Server was automatically disabled due to rate limiting.


Hunting this down in the event log (Admin log in Hyper-V-VMMS in Apps&Services logs/Microsoft/Windows) gives me:

The description for Event ID 19510 from source Microsoft-Windows-Hyper-V-VMMS cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

%%2147942480

0x80070050

The locale specific resource for the desired message is not present



Eject the integration services ISO from all your VMs.

And the Event log gives you:

The Integration Services Setup Disk image was successfully updated.

Wednesday 2 June 2021

List users in a domain group using CMD

 A nice simple one, to find the membership of a domain group use the following on a domain controller.

net group "groupname"



Friday 28 May 2021

AAD Connect fails with crazy long error that makes no sense.

 AAD Connect stops syncing.

The error is as follows:

Start-ADSyncSyncCycle : System.Management.Automation.CmdletInvocationException: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.


This situation occurs after enabling Security Defaults on an Azure AD Tennent.

Despite the claims about Security Defaults you can disable MFA on a per user basis. Just go to 365 MFA user settings  (https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx) with your admin creds and disable MFA for the account that runs the AAD updates (it will have a username starting with 'Sync_').

Run a normal sync a couple of times and AAD Connect will sort itself out.



Thursday 29 April 2021

WiFi section of Windows 10 Settings app not showing on Surface Laptop 2

 After some updates the WiFi section under Network & Internet in the Windows 10 Settings app disappears.

Go to Network adapters in Device Manager and uninstall the Marvell Wifi adapter.

Right-click the computer name in Device Manager and Scan for hardware changes.

You should see the device repopulate.

Rebooted and you should be able to connect to Wifi.

If you have a VPN which then will not connect see my previous blog post.


Wednesday 28 April 2021

Windows 10 built-in VPN does not connect does not error (VPN Error 720 when using RASDIAL)

Windows 10 built-in VPN does not connect does not error.

RRAS showed connection for a few seconds then no connection.


  1. Open Device Manager
  2. Expand Network Adapters
  3. Right-click and Uninstall WAN Miniport (IP), WAN Miniport(IPv6) and WAN Miniport (SSTP).
  4. Right-Click the Computer name and pick Scan for hardware changes
  5. The adapters you just uninstalled should come back
  6. Try connecting again

Installing .net 4 without Server Manager or PowerShell

 A software consultant uninstalled .net 4 breaking the Datto agent.

I instinctively go to open Server Manager, oh wait, it has no icon.

I go to PowerShell, it flashes a window and closes.


I go to CMD and run 
Dism /online /Enable-Feature /FeatureName:NetFx4 /All

Reboot

Server Manager is still missing so I run 
dism /online /enable-feature /all /featurename:server-gui-mgmt

I had to unpin and re-pin Server Manager to Start to get the icon back.

All is good.

Monday 8 March 2021

The Disk is Offline Because of Policy Set by an Administrator

 

1. Open Powershell as administrator

2. Enter get-disk

3. Note the number of the drive (2 in the example above)

4. Enter set-disk number -isoffline $false 

5. Enter get-disk again to check the status.

6. If the drive shows read-only follow this guide.

https://docs.microsoft.com/en-gb/archive/blogs/askcore/my-disk-is-read-only-help