|
Guy recommends: This CG will put you in charge of controlling changes to network routers and other SNMP devices. Download your free Config Generator |
Windows PowerShell WinRm and WSManWindows PowerShell WinRm and WSManTo get PowerShell's remoting capability working fully, you need an extra 'shell', which is supplied by the WinRm. Even after the WinRm service install completes successfully, you need to tweak its config settings before the remote sessions become operational. Remoting in Microsoft PowerShell with WinRm and WSMan
♣ Preliminary Discussion of WinRmWinRm is the underlying engine or resource for PowerShell remoting; it is also the name of the additional executable that you need to download from the Microsoft Connect site. Once installed, you can access WinRm directly from the 'DOS' command line, or better still, check and amend settings with PowerShell's own WSMan: provider. WinRm Problem - WSMan SolutionPowerShell has handy commands to create remote sessions such as # PowerShell v 2.0 Problem the above command does not work because an WinRm settings called TrustedHosts needs configuring. To achieve this goal we need to enter what PowerShell calls the WSMan namespace. (The other alternative is to use cmd and call for WinRm -?) Use PowerShell Itself to Control TrustedHosts
Preamble: If you need a refresher on 'cd'
(Change directory) try this at the PowerShell command line, for example: WSMan Example Which Connects to the 'Client' Sub-folderRather than a succession of short steps, we could use one longish path statement. Dir displays the TrustedHosts settings stored in the client sub-folder. # PowerShell v 2.0 However, if the above does not work then try this alternative line-by-line method: cd wsman: Please note: cd wsman fails, we need that colon. cd wsman: (Succeeds now we can access the wsman 'area', 'namespace' or 'drive'.) TrustedHosts Goal: To set, or change TrustedHosts so that any machine can connect remotely. set-Item TrustedHosts * A more restrictive approach would be to set the value for TrustedHosts to a named machine. Set-Item TrustedHosts BigServer
Guy Recommends: SolarWinds Engineer's Toolset v10
|
|||||
Download my ebook:
|
*
|
|
|
|
Home Copyright © 1999-2010 Computer Performance LTD All rights reserved Please report a broken link, or an error. | |