Today I was struggling to get a Command Prompt box, sent by Altiris, to run a PowerShell command with a space in it. Finally I got it fixed.

The command is:

1)

powershell.exe -command “& New-Item -path Registry::’HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppSrv'”

 

2)

powershell.exe -command “& New-ItemProperty Registry::’HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppSrv’ -Name “TSMSI” -Value 0 -PropertyType “DWord””

 

Can’t get the solution to work? Contact me and let me do the trick.

 

 

 

Categories:

Tags:

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 4 =