Trying to do some remote work inside a ConfigMgr task sequence, using Run 
Command Line.

Powershell.exe -ExecutionPolicy Bypass -command "& {enter-pssession 
-computername SERVER01}"

I need to be able to feed commands into the session. Here is the catch, we 
can't use invoke-command -session $session because we need to add the 
XenDesktop cmdlets, and invoke-command does not create the XdHyp psdrive.

Does anyone know a way to pass commands to a PSSession in a single line?

Daniel Ratliff


The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.

================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to