Active Directory Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail
How Long For Me
<< Back To All Blogs
Using Remote Powershell
Saturday, November 8th, 2014
Powershell provides a number of great features, one of which is remote powershell connections. This is a particularly interesting feature for a Linux/Windows conversion for those used to using SSH to connect directly to a remote server without remoting into a desktop environment.
Enabling and using remote powershell connections requires configuration on both the client machine and the remote machine.
For this example we'll use 192.168.1.100 as the client, and 192.168.1.200 as the server.
On the server machine, open a powershell prompt (with run as administrator) and enter the following command:
Set-Item wsman:localhostclienttrustedhosts 192.168.1.100
This will enable Powershell remoting and will allow connections from the client 192.168.1.100. You could also use a * for all hosts, subnet ranges, or hostnames instead of a direct IP address.
On the client machine:
Set-Item wsman:localhostclienttrustedhosts 192.168.1.200
This will enable remote powershell on the client machine and add the remote machine as a trusted host.
To connect to the remote host from the local client:
#Give the user a remote credential prompt
$cred = get-credential
Enter-PSSession –ComputerName 192.168.1.200 –Credential $cred
Remote Powershellin' Tom Out.
Determine Forest and Domain Functional Levels in Powershell
Customizing PowerShell for faster development with a default profile
Current file path in custom PowerShell Cmdlet
Recursively removing SVN bindings with PowerShell
Uninstalling PowerShell V1.0 from Windows Server 2003
Currently no comments.
Add A Comment
Email Address: (not public, used to send notifications on further comments)
Enter the text above, except for the 1st and last character: