Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Need help passing credentials between 64bit and 32bit powershell sessions...

$
0
0

Hello,

Is there a way to pass the variable containing credentials between the sessions?

 

ex:

----------------------------------------------------------------

# This is default 64-bit  powershell

$ADMCred = Get-Credential

set-alias ps64 "$env:windir\sysnative\WindowsPowerShell\v1.0\powershell.exe" 

set-alias ps32 "$env:windir\syswow64\WindowsPowerShell\v1.0\powershell.exe"

 

ps32 {

Connect-VIServer ServerName -Credential $ADMCred 

}

------------------------------------------------------------

There are a few steps that i need to perform using 32-bit powershell specifically within my script and i dont want to prompt the people who will eventually run it to be asked for credencials multiple times...

 

 

Thank you

Russ

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles