Hi,
I put the ps1 file into C:|temp and ran the first line. It errored (also the "path\to" one errored similarly):
PS C:\temp> $h = Get-WUAHistory
Get-WUAHistory : The term 'Get-WUAHistory' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:6
+ $h = Get-WUAHistory
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-WUAHistory:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
What did I do wrong?
Cheers.