Remote Executing on a machine without Powershell

rated by 0 users
This post has 2 Replies | 2 Followers

Top 10 Contributor
Posts 4,504
ps2 Posted: 09-19-2011 8:06 AM

My computer is Windows 7 and has powershell running, I'd like to execute commands to pull back information (specifically netstat) from a bunch of other ...

Read More

Top 500 Contributor
Posts 7

On the machines that dont have Powershell you can open dos and run:

winrm quickconfig

and answer: y , y to the two questions

this does the same thing as if you were to run Enable-PSRemoting from powershell. I was under the impression that you had to have powershell on both computers but I have been experimenting and I am not sure that that is true.

Top 25 Contributor
Posts 509
Microsoft MVP
Top Contributor

Enable-PSRemoting cmdlet does more than "winrm quickconfig". The Set-WSManQuickConfig cmdlet is similar to "winrm quickconfig". As you can see from this excerpt taken from Enable-PSRemoting help topic, Set-WSManQuickConfig runs behind the scenes when you execute Enable-PSRemoting: 

The Enable-PSRemoting cmdlet performs the following operations:

-- Runs the Set-WSManQuickConfig cmdlet, which performs the following tasks:

----- Starts the WinRM service.

----- Sets the startup type on the WinRM service to Automatic.

----- Creates a listener to accept requests on any IP address.

----- Enables a firewall exception for WS-Management communications.

-- Enables all registered Windows PowerShell session configurations to receive instructions from a remote computer.

----- Registers the "Microsoft.PowerShell" session configuration, if it is not already registered.

----- Registers the "Microsoft.PowerShell32" session configuration on 64-bit computers, if it is not already registered.

----- Removes the "Deny Everyone" setting from the security descriptor for all the registered session configurations.

----- Restarts the WinRM service to make the preceding changes effective.

 

-aleksandar

Page 1 of 1 (3 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.