I need to know more/better understand what you are trying to do. Give us a desire command flow.
From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Daniel Ratliff Sent: Tuesday, September 30, 2014 2:34 PM To: powershell@lists.myitforum.com Subject: [powershell] Pipe a command to Enter-PSSession? 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 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1