views:

62

answers:

2

How do i use a function in my profile on the remote machine when using Enter-PSSession on my local machine to open a remote powershell session.

A: 

You can't. When starting a remote interactive session with enter-pssession, a remote profile is loaded. Additionally, only the machine-level profile in $pshome is loaded. If you want remote functions available you'll have to initialize them in the startup script of the remote session configuration. Have a look at get/set-pssessionconfiguration on the remote server.

x0n
A: 

take a look at this

http://jrich523.wordpress.com/2010/07/08/creating-a-profile-for-a-remote-session/

its a work around for creating a remote profile.

Justin