Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

PS-Remoting: Extract password from xml credential file do not work

$
0
0

Hello,

I execute during an unattended computer installation the following script (Part):

$CredFromFile = Import-Clixml "Cred.xml"
$CredPass = $CredFromFile.Password | ConvertTo-SecureString
$CredUser = $CredFromFile.username
$Cred=New-Object system.Management.Automation.PSCredential($CredUser, $CredPass)
$PSSession = New-PSsession -ComputerName $SRVDC -Credential $cred

The logged value for the $CredPass is:
@{UserName=t-s\SA_SCCM; Password=01000000d08c9ddf0115d1118c7a00c04fc297eb010000008b6510f0887c194dbf2b4b27283f534c0000000002000000000003660000c000000010000000b120125cf038a20d979958579dd631fb0000000004800000a000000010000000fc9c8ae6ad891b3c713b7b518a3f32d218000000f15629db59a5a69622eda04e6b48e97b58396eb77d803217140000004bdea2b85206f4bd902d540502b6b8d422658eb4}.password

It comes up an credentails dailog...

When I run the script from my computer all works.

Does anybody have an idea?

Frank


Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>