Enable Remote PowerShell 3.0

For the connection to the remote computers to work, powershell remote connection is required.
It can be done by folowing the next steps:
– Run the following procedure on all machines(local and remote):
* Run PowerShell as Administrator -> right-click on PowerShell shortcut and select “Run as Administrator”.
* Execute “Get-Service WinRM”. The value of the Status property in the output should be “Running”. If not, then execute “Start-Service WinRM”.
* To configure Windows PowerShell for remoting, type the following command: Enable-PSRemoting –force
– If the local and remote computers aren’t in the same domain, run the following steps on local computer:
* Execute “Set-Item wsman:\localhost\client\trustedhosts -concatenate” and press “Y” when asked, where can be the name or the IP address of the remote
computer. The usage of the name is recommanded : avatar(mostly and easier to use) or avatar.storage.usca.ibm.com
* Execute Restart-Service WinRM
– To view what computers are already added as trusthosts run: “winrm get winrm/config/client”
– To test if the configuration was correctly made, run:
* Invoke-Command -ComputerName -ScriptBlock { COMMAND } -credential USERNAME. The password will inserted in a window that will appear after the
command is executed.
Example: Invoke-Command -ComputerName avatar -ScriptBlock { Get-ChildItem C:\ } -credential avatar0\administrator. As a result all the directories and files from C:
drive of avatar machine will be displayed. If not, something went wrong.

Advertisements
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s