Tool: Visual Studio Code, PSScriptPad, PowerShell Module Version: v5.29.4
Suddenly getting errors on parts of my code that were not recently changed.
Cursors.Default : The term ‘Cursors.Default’ 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 C:\BitBucket\ts_security\anti-phishing\TabbedForm.ps1:284 char:18
$Form1.Cursor = Cursors.Default;
- CategoryInfo : ObjectNotFound: (Cursors.Default:String) , CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
New-Object : Cannot find an overload for “PSCredential” and the argument count: “2”.
At C:\BitBucket\ts_security\anti-phishing\TabbedForm.ps1:297 char:34
- … l:CredIDA = New-Object System.Management.Automation.PSCredential ($KP …
- CategoryInfo : InvalidOperation: ( [New-Object], MethodException
- FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
Confirmed this with the user of my app and then on my own system as well. PCs were recently patched so I suspect this is due to that but not sure what to look for or change.