I swear Server 2008 is the new 2003 … I cringe when I see it now.
Anyway, I’m automating some processes for a client and their company has standardized on … ugh … 2008/PSv2. When writing a function under this version I noticed a curious behavior:
If I try to define a parameter of type [PSCredential] it simply “doesn’t work”: The parameter seems to ever load, won’t tab complete, etc. That said, if I prompt for credentials in the script directly with somehting like: [PSCredential]$creds = Get-Credential then everythgin is fine.
Is it a known limitation that PSv2 can’t accept PSCredentials as parameters? Or is my syntax just wrong? Do I have to request seperate username and password as securestring?
Looking for advice in “dealing with” PSv2 (aside from telling them to upgrade).