Hi, i just thought i share this tiny bit of code.
Explanation: RDM cmdlets do NOT load in 64 bit Powershell.
I use this to run my New-Session script from standard 64 bit Powershell environment.
supports all Parameters
Explanation: RDM cmdlets do NOT load in 64 bit Powershell.
I use this to run my New-Session script from standard 64 bit Powershell environment.
supports all Parameters
if ([Environment]::Is64BitProcess) {
$Myself = $Myinvocation.line
Write-Host ".Running in 64 Bit, Restarting in 32 bit '$Myself'"
& $env:windir\syswow64\WindowsPowerShell\v1.0\powershell.exe $Myself
return 0
}
$RDMSnapin = Get-PSSnapin -Name *Remote.Desktop* -Registered -ErrorAction SilentlyContinue | sort version -Descending | select -First 1
Add-PSSnapin $RDMSnapin -ErrorAction SilentlyContinue
$AddRC = (Get-Command *rdm*).count
Write-Host ".Adding RDM Snapin: $($RDMSnapin.Name), Loaded cmdlets: $AddRC"
[/CODE]