I have followed the following guide to create a SecureString password. Now, I need to log on to a foreign Domain Controller with the dsquery options -s (server) -u (user) and -p (password).
dsquery group -name $group -s $rmSrv -u $user -p $pass | dsget group -members -expand -c -s $rmSrv -u $user -p $pass | dsget user -samid -c -s $rmSrv -u $user -p $pass > $filename
When I enter the password in plaintext, I get authenticated. Once using the SecureString object, I can not authenticate. I have tried a few options, but could not get it running.
Do you have ideas?