Hi Community,
it's been a while since I've had to script SCCM so please bear with me.
From back in the day I know about using TSEnvironment to access and manipulate TS variables. I am also still aware of the 32-/64-bit problems we used to have back then. Now I am trying to access some variables from PowerShell and here's what I am seeing (on MECM 2103, TS is being run in Windows rather than in OSD):
- via VBS (Action: Run batch, cscript dump-tsvars.vbs): works as expected
- via PowerShell (Action: Run PowerShell, code pasted into the TS Step): does not throw any errors but does not dump any variables either
- via PowerShell (Action: Run batch, c:\windows**system32**...\powershell.exe -ExecutionPolicy Bypass -File Dump-TSVars.ps1): does not throw any errors but does not dump any variables either
- via PowerShell (Action: Run batch, c:\windows**sysWoW64**...\powershell.exe -ExecutionPolicy Bypass -File Dump-TSVars.ps1): throws error that the class is not registered
So basically, while the environment as such is only visible in 64-Bit PowerShell, the variables within the environment are not.
Can anybody please shed some light here?
1000 Thanks in advance
Evgenij