37. PowerShell remoting Not all remoting is the same Get-Process, Get-Service, and others use .NET Framework methods Not all cmdlets have –ComputerName parameter Remoting requirements: Windows PowerShell 2.0 Microsoft .NET Framework 2.0 or later Windows Remote Management 2.0 To configure PowerShell remoting: start PowerShell as admin Use Enable-PSRemoting
38. Remoting Methods Supports both fan-in and fan-out remoting Invoke-Command Can be used for both 1-1 and 1-many remoting Interactive remoting Similar to a telnet session Enter-PSSession Implicit remoting Import a remote session into local session Import-PSSession
39. INDIA │ 9-11 February 2011 virtual techdays DEMO: PowerShell remoting
40. WMI Event monitoring Events generated by operating system and several other components Use Register-WMIEvent cmdlet Create temporary consumer to trigger an action based on an event Requires knowledge of WMI Query Language Unregister-Event to delete the consumer
41. INDIA │ 9-11 February 2011 virtual techdays DEMO: WMI Event monitoring
42. Software Inventory Use Get-WMIObject cmdlet For remote systems use –ComputerName parameter Query Win32_Product WMI class For software installed via MSI Install & Uninstall software remotely Query Windows registry for a list of all other software
43. INDIA │ 9-11 February 2011 virtual techdays DEMO: Software Inventory
44.
45. Layman’s guide to PowerShell remoting: http://www.ravichaganti.com/blog/?p=1780