Jonathan Medd's Blog
Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
-
PowerShell 2.0: One Cmdlet at a Time #31 Enter-PSSession
Posted on January 7th, 2010 1 commentContinuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Enter-PSSession cmdlet.
What can I do with it?
Open an interactive PowerShell session with a computer which has been enabled for PowerShell remoting.
Example:
Open a session with the server Test01 and see which services begin with the letter T.
Enter-PSSession -ComputerName Test01 Get-Service | Where-Object {$_.name -like 'T*'}
You will notice that the prompt has changed to
[test01]: PS C:\>
which helpfully shows you which server you are running the remote session on.
How could I have done this in PowerShell 1.0?
Remoting did not exist in PowerShell 1.0, you would have needed to use Remote Desktop to run an interactive session on a remote server.
1 Trackbacks / Pingbacks
-
[...] Jonathan Medd hasĀ a tip about Enter-PSSession [...]
Leave a reply
-







Episode 97 – Clint Huffman and His PAL Project « PowerScripting Podcast January 11th, 2010 at 05:57