To enable PowerShell remoting (from one computer to another that are in the same domain), following steps 1 and 2:
1: Install PowerShell and WinRM
This comes as standard on Windows Server 2008 and Windows 7. If you need to install this on Windows Server 2003 for example, then downloaded and install the free Windows Management Framework Core Package (http://support.microsoft.com/kb/968930) from Microsoft.
2: Enable-PSRemoting
Run PowerShell as an Administrator (Start > Programs > Accessories > Windows PowerShell and right-click on Windows Powershell), then type in:
ps> Enable-PSRemoting
As follows (I have already run it so get a slightly different message than what you will get if you haven't already run it):
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator.DOMAIN> Enable-PSRemoting
WinRM Quick Configuration
Running command "Set-WSManQuickConfig" to enable this machine for remote management through WinRM service.
This includes:
1. Starting or restarting (if already started) the WinRM service
2. Setting the WinRM service type to auto start
3. Creating a listener to accept requests on any IP address
4. Enabling firewall exception for WS-Management traffic (for http only).
Do you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
WinRM already is set up to receive requests on this machine.
WinRM has been updated for remote management.
Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.
Confirm
Are you sure you want to perform this action?
Performing operation "Registering session configuration" on Target "Session configuration "Microsoft.PowerShell32" is
not found. Running command "Register-PSSessionConfiguration Microsoft.PowerShell32 -processorarchitecture x86 -force"
to create "Microsoft.PowerShell32" session configuration. This will restart WinRM service.".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
PS C:\Users\Administrator.DOMAIN>
On the controller, I can now run:
PS C:\Users\Administrator.DOMAIN> Enter-PSSession TARGET_MACHINE
[TARGET_MACHINE]: PS C:\Users\Administrator.DOMAIN\Documents>
And you can exit the session, by doing:
ps> Exit-PSSession
NB If you try and do it using IP address, then you will see:
Enter-PSSession: Connecting to remote server failed with the following error message : The WinRM client cannot proces
s
the request. Default authentication may be used with an IP address
under the following conditions: the transport is HTTPS or the
destination is in the TrustedHosts list, and explicit credentials are
provided. Use winrm.cmd to configure TrustedHosts.
Note that computers in the TrustedHosts list might not be
authenticated. For more information on how to set TrustedHosts run the
following command: winrm help config. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:16
+ Enter-PSSession <<<< 192.168.88.133
+ CategoryInfo : InvalidArgument: (192.168.88.133:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
(even if you add it to the trusted hosts it seems)
3: Enable Trusted Host (if not in domain)
I haven't tested this, but if you need to allow PowerShell remoting to a non-Domain member, then you will also need to add the remote computer to the local computer trusted hosts:
ps> set-item wsman:\localhost\Client\TrustedHosts -value <RemoteComputerName>
NB Only members of the Administrators group on the computer have permission to change the list of trusted hosts on the computer. If you need to add a number of computers to this list, you first need to use get-item, set it to a parameter, then add to that - see reference link. You can confirm the computer is listed by doing:
ps> get-item wsman:\localhost\Client\TrustedHosts
Also note:
# You need to set a password on the remote computer.
# You need to use the Credential parameter in all remote commands.
# Confirm that the ports are open between the machines (80/443 depending on what you have enabled) on the machines and any firewalls.
To see if unencrypted traffic is enabled, run:
ps> cd WSMan:\localhost\Client
ps> dir
Name Value
---- -----
NetworkDelayms 5000
URLPrefix wsman
AllowUnencrypted false
Auth
DefaultPorts
TrustedHosts
To set "AllowUnencrypted" (i.e. you want to run on port 80), run:
ps> set-item -force WSMan:\localhost\Service\AllowUnencrypted $true
This probably needs to be done on both the remote computer and the controlling machine. You may also need to set the DefaultPorts:
ps> set-item -force WSMan:\localhost\Service\DefaultPorts -value <port>
You may also want to enable Digest Authorization:
ps> set-item -force WSMan:\localhost\Service\Auth\Digest $true
References:
about_Remote_FAQ
http://technet.microsoft.com/en-us/library/dd315359.aspx
|
|
||||||||
|
This Month
Month Archive
About Me
Login
|
Enable PowerShell Remoting
Comments
Re: Enable PowerShell Remoting
Edit: Added a link to Windows Management Framework Core Package.
Re: Enable PowerShell Remoting
by
williyamberry
on Wed 09 Nov 2011 05:48 GMT | Profile | Permanent Link
Our <a href="http://www.seoindiacompany.com/" rel="dofollow">SEO Company India</a>, Profit By Search create client-specific and customized SEO campaigns based on the client's specific goals and budget. Our team of expert online marketeers build the best strategies to help your business flourish and have a strong hold in the internet domain.
Re: Re: Enable PowerShell Remoting
Search Engine Optimization is the hottest and latest method for an organization who wants to launch or introduce their services in the online market. Today, the <a href="http://www.spiderswatch.com" rel="dofollow">SEO services</a> offer services like they first understand the needs and requirements of an organization successfully.
FM TRANSMITTER
IPod purpose expands not possessing restrict - the brand new HLLY <a href="http://www.fmheroes.org/25mw-fm-transmitter_3_1.htm">25mW FM TRANSMITTER</a> which specifically produced for IPod in your car. HLLY producer consists of an exclusive location amid the fm transmitter field, some type like Belkin. I employed to possess three fm transmitters which were totally produced by HLLY. Three kinds have completely different energy and functions, range.
Today, with the developing of the technology, more and more people have their own car, and every car does charge a music system. There are abounding means in which one can fit in acceptable music system. The latest trend in this area is of a car mp3 radio <a href="http://www.fmheroes.org/20w-fm-transmitter_4_1.htm">20W FM TRANSMITTER</a>.To apperceive what is pll fm transmitter you actually should apperceive what is PLL. Able-bodied the PLL is basically short for Phase-Locked Loop. Re: Enable PowerShell Remoting
Great post. this power sharing post rally solve my problem. thumbs up for your information.
|
Search
Recent Articles
Favourite blogs
|
||||||
|
||||||||
