New Object PSCredential not working - using Unicode punctuation syntactically
I'm trying to accept username and password as params to a Powershell script but the new-Object $UserID="Name" $SecurePassword=convertto-securestring -AsPlainText -Force -String $Password New-object –TypeName System.Management.Automation.PSCredential –ArgumentList ($UserID,$SecurePassword) Gives an error New-object : Cannot find type [â€TypeName System.Management.Automation.PSCredential â€ArgumentList]: verify that the as sembly containing this type is loaded. At C:\ps\login.ps1:14 char:17 + ... rCredential=New-object –TypeName System.Management.Automation.PSCre ... + ~~~~~~~~~~~~~~~~~~~~~~~~