I have an issue with powershell 4.0 where start-process converts my credentials from a type of System.Management.Automation.PSCredential to System.String. Use the following lines to replicate this:
$Credentials = Get-Credential
get-member -InputObject $Credentials
start-process C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ArgumentList "Get-Member -inputobject $Credentials | out-file C:\results.txt"
If you look at the results of the 1st get-member command, the type is System.Management.Automation.PSCredential. If you look at the results of the 2nd get-member command, the type is System.String. Does anyone know if this is intended behavior? Is there a way around it?