Tag: Powershell

Scan, fix and troubleshoot disks with Powershell

Scan, fix and troubleshoot disks with Powershell

I still see the old good chkdsk command everywhere in blog posts. However, since Windows 8 and Windows 2012 Server you have now the Repair-Volume which is doing the same work. Like for the chkdsk tool, you have the scan, spotfix and the OfflineScanAndFix parameters. In addition, here are some other useful tools cmdlets: - … Continue reading Scan, fix and troubleshoot disks with Powershell

Get-WUInstall with the WindowsUpdate or MicrosoftUpdate parameter

Get-WUInstall with the WindowsUpdate or MicrosoftUpdate parameter

You probably know the very good and very popular module of Michal GADJA named PSWindowsUpdate. At the time of this writing, the latest version is 1.6.1.1 and can be downloaded from the Powershell Gallery here I just wanted to add an undocumented behavior of the Get-WUInstall cmdlet. If your computer is not configured to install … Continue reading Get-WUInstall with the WindowsUpdate or MicrosoftUpdate parameter

How to change advanced audit settings with Powershell

How to change advanced audit settings with Powershell

Disclaimer This is for advanced users only. If Microsoft has hidden this registry key and removed permissions for administrators, it's probably for a good reason. Thus, the following script is provided as is. Don't use it or modify it if you don't understand what you are doing, or if you are not aware of the … Continue reading How to change advanced audit settings with Powershell

[Solved] AmbiguousParameterSet error

So you decided to use the ParameterSet statement in your script or cmdlet. But you get now the following error: CategoryInfo          : InvalidArgument: (:) [<CmdletName|ScriptName>], ParameterBindingException FullyQualifiedErrorId : AmbiguousParameterSet,<CmdletName|ScriptName> The reason You have this error in two situations: Your command-line doesn't use any of the parameters members of a parameter set. Your command-line uses simultaneously … Continue reading [Solved] AmbiguousParameterSet error

How to view/add an SPN with Powershell

No need to bother with the syntax of SetSPN anymore (despite it still works). There is now a native function built into the Get-Computer and Set-Computer cmdlets. View all SPN for a given computer Use the Get-ADComputer cmdlet and specify the ServicePrincipalNames parameter. It returns an array of values you can easily expand with the … Continue reading How to view/add an SPN with Powershell