Tag Archives: PowerShell

Operating system versions from AD

A small PowerShell one-liner for creating a list of computers with their operating system version:

Get-ADComputer -Filter * -Property * | Select-Object Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion | Export-CSV ComputersAndOS.csv -NoTypeInformation -Encoding UTF8

WSUS and “Cannot save configuration because the server is still processing a previous configuration change”?

For future reference…

If WSUS starts responding with the message: “Cannot save configuration because the server is still processing a previous configuration change”, run this SQL command:

UPDATE tbSingletonData SET ResetStateMachineNeeded = 0

And in the long term, consider this:

https://community.spiceworks.com/scripts/show_download/2998-wsus-automated-maintenance-formerly-adamj-clean-wsus

Autologon…

Whenever I wanted to configure autologon for an account with a password, I used registry entries or a script. And here comes a surprise… it can be done from the GUI.

All you need to do:

1. Click Start, type netplwiz, and then press Enter.
2. In the User Accounts dialog box, click the account you want to automatically log on to. If it is available, clear the Users Must Enter A User Name And Password To Use This Computer check box.
3. Click OK.
4. In the Automatically Log On dialog box, enter the user?s password twice and click OK.

The next time you restart the computer, it will automatically log on with the local user account you selected. Configuring automatic logon stores the user?s password in the registry unencrypted, where someone might be able to retrieve it.

…you learn something new your whole life…

More: https://technet.microsoft.com/en-us/library/ee872306.aspx