{"id":16501,"date":"2010-11-15T00:01:00","date_gmt":"2010-11-15T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2010\/11\/15\/use-powershell-cmdlets-to-administer-windows-remotely\/"},"modified":"2010-11-15T00:01:00","modified_gmt":"2010-11-15T00:01:00","slug":"use-powershell-cmdlets-to-administer-windows-remotely","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/use-powershell-cmdlets-to-administer-windows-remotely\/","title":{"rendered":"Use PowerShell Cmdlets to Administer Windows Remotely"},"content":{"rendered":"<p><span style=\"font-size: 10pt\"><br \/><\/span><\/p>\n<p><b><span style=\"font-size: 10pt\">Summary:<\/span><\/b><span style=\"font-size: 10pt\"> Microsoft Scripting Guy Ed Wilson shows how to use Windows PowerShell cmdlets to administer remote computers.<\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Question\" border=\"0\" title=\"Hey, Scripting Guy! Question\" \/>Hey, Scripting Guy! I need to be able to work with remote computers. Is there a good way to do this with Windows PowerShell?<\/span><\/p>\n<p><span style=\"font-size: 10pt\">&#8212; DN<\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Answer\" border=\"0\" title=\"Hey, Scripting Guy! Answer\" \/>Hello DN, Microsoft Scripting Guy Ed Wilson here. I was recently reading Shakespeare&rsquo;s <a href=\"http:\/\/en.wikipedia.org\/wiki\/Hamlet\"><i><span style=\"font-size: 10pt\">The Tragedy of Hamlet, Prince of Denmark<\/span><\/i><\/a> <span>&nbsp;<\/span>again when I ran across his famous soliloquy. One reason for reading Shakespeare, for me, is to try to expand my horizons beyond geekdom; unfortunately, it is not working. I am a geek at heart. As my eyes scanned across the pages of <a href=\"http:\/\/www.amazon.com\/Complete-Works-Shakespeare-David-Bevington\/dp\/0205606288\/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1289316922&amp;sr=1-1\"><span style=\"font-size: 10pt\">Bevington<\/span><\/a> drawing me deeper and deeper into the world of intrigue, revenge, and scandal, I still could not still my inner geek. I could not help myself; I began to translate Hamlet into Windows PowerShell. Here is the tragic Hamlet&rsquo;s soliloquy. <\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt; $2b = &#8220;hamlet&#8221;<br \/>PS C:\\&gt; $question = ($2b -OR !($2b))<br \/>PS C:\\&gt; $question<br \/>True<br \/>PS C:\\&gt;<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">One thing to be aware of, the parentheses around the question are not required. In addition to using parentheses for grouping, I also like to use them to make code easier to read. Easier to read, is of course, sometimes a matter of personal preference. The question, without parentheses appears here.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">$question = $2b -OR !$2b<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Speaking of Denmark, the following figure is a picture I took of the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Copenhagen_Opera_House\"><span style=\"font-size: 10pt\">Copenhagen Opera House<\/span><\/a>. I was able to attend the ballet there one night while I was in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Copenhagen\"><span style=\"font-size: 10pt\">Copenhagen, Denmark<\/span><\/a> teaching a Windows PowerShell class. <\/span><\/p>\n<p class=\"Fig-Graphic\"><span style=\"font-size: 10pt\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3005.hsg-11-15-10-01.jpg\" border=\"0\" \/><\/span><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\">The cool thing about the Copenhagen Opera House is that it is on an island, and I had to take a water taxi to access it. The Royal Danish Theatre is in the central part of Copenhagen. The new opera house is more remote.<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Speaking of remote, DN, <a href=\"http:\/\/support.microsoft.com\/kb\/968929\"><span style=\"font-size: 10pt\">Windows PowerShell 2.0<\/span><\/a> incorporates a strong <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/tags\/windows+powershell\/getting+started\/remoting\/\"><span style=\"font-size: 10pt\">remoting<\/span><\/a> solution that lets you work remotely. The problem is that remoting will not work with the default configuration of Windows. There are basically two kinds of remoting included with Windows PowerShell 2.0.<\/span><\/p>\n<p><span style=\"font-size: 10pt\">The first kind of remoting, uses the <i>computername<\/i> parameter. In Windows PowerShell 1.0 only one cmdlet contained a <i>computername <\/i>parameter; that cmdlet was the <b><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2009\/03\/02\/how-can-i-use-wmi-with-windows-powershell.aspx\"><span style=\"font-size: 10pt\">Get-WmiObject<\/span><\/a><\/b> cmdlet. The remoting capability that is exposed with the <b>Get-WmiObject<\/b> cmdlet is the same remoting capability that is native in Windows Management Instrumentation (<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa394582(VS.85).aspx\"><span style=\"font-size: 10pt\">WMI<\/span><\/a>). It relies on DCOM, and in order to use it, you have to open ports in the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa366453(v=VS.85).aspx\"><span style=\"font-size: 10pt\">Windows Firewall<\/span><\/a>. In addition, you must be a member of the <b>Local Administrators<\/b> group on the remote computer (although it is possible to change the security permissions for WMI to enable a non-admin access). <\/span><\/p>\n<p><span style=\"font-size: 10pt\">To find the Windows PowerShell cmdlets that natively support remoting I only have to use the <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/dd347639.aspx\"><span style=\"color: #0000ff\"><span style=\"font-family: Times New Roman\"><b>Get-Help<\/b> cmdlet<\/span><\/span><\/a>. By specifying a value of <i>computername<\/i> for the <i>parameter <\/i>parameter of the <b>Get-Help<\/b> Windows PowerShell cmdlet I can find all the cmdlets that have a parameter named <i>computername<\/i>. The command and associated output is here.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt; Get-Help * -Parameter computername | Format-Table name, synopsis -AutoSize -Wrap<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Synopsis<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8211;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-WinEvent<span>&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>Gets events from event logs and event tracing log files on loca<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>l and remote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-Counter<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets performance counter data from local and remote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Test-WSMan<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Tests whether the WinRM service is running on a local or remote<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Invoke-WSManAction<span>&nbsp;&nbsp; <\/span>Invokes an action on the object that is specified by the Resour<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ce URI and by the selectors.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Connect-WSMan<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Connects to the WinRM service on a remote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Disconnect-WSMan<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Disconnects the client from the WinRM service on a remote compu<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ter.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-WSManInstance<span>&nbsp;&nbsp;&nbsp; <\/span>Displays management information for a resource instance specifi<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ed by a Resource URI.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Set-WSManInstance<span>&nbsp;&nbsp;&nbsp; <\/span>Modifies the management information that is related to a resour<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ce.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Remove-WSManInstance Deletes a management resource instance.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">New-WSManInstance<span>&nbsp;&nbsp;&nbsp; <\/span>Creates a new instance of a management resource.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Invoke-Command<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Runs commands on local and remote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">New-PSSession<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Creates a persistent connection to a local or remote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-PSSession<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the Windows PowerShell sessions (PSSessions) in the curren<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>t session.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Remove-PSSession<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Closes one or more Windows PowerShell sessions (PSSessions).<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Receive-Job<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the results of the Windows PowerShell background jobs in t<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>he current session.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Enter-PSSession<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Starts an interactive session with a remote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the events in an event log, or a list of the event logs, o<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>n the local or remote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Clear-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Deletes all entries from specified event logs on the local or r<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>emote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Write-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Writes an event to an event log.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Limit-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Sets the event log properties that limit the size of the event<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>log and the age of its entries.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Show-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Displays the event logs of the local or a remote computer in Ev<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ent Viewer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">New-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Creates a new event log and a new event source on a local or re<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>mote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Remove-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Deletes an event log or unregisters an event source.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-WmiObject<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets instances of Windows Management Instrumentation (WMI) clas<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ses or information about the available classes.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Invoke-WmiMethod<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Calls Windows Management Instrumentation (WMI) methods.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-Process<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the processes that are running on the local computer or a<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>remote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Remove-WmiObject<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Deletes an instance of an existing Windows Management Instrumen<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>tation (WMI) class.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Register-WmiEvent<span>&nbsp;&nbsp;&nbsp; <\/span>Subscribes to a Windows Management Instrumentation (WMI) event.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-Service<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the services on a local or remote computer.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Set-Service<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Starts, stops, and suspends a service, and changes its properti<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>es.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Set-WmiInstance<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Creates or updates an instance of an existing Windows Managemen<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>t Instrumentation (WMI) class.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Get-HotFix<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Gets the hotfixes that have been applied to the local and remot<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>e computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Test-Connection<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Sends ICMP echo request packets (&#8220;pings&#8221;) to one or more comput<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Restart-Computer<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Restarts (&#8220;reboots&#8221;) the operating system on local and remote c<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>omputers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Stop-Computer<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Stops (shuts down) local and remote computers.<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt;<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">As you can see, many of the Windows PowerShell cmdlets that have a <i>computername<\/i> parameter are related to either <b>wsman<\/b>, or to working with Windows PowerShell sessions. If I remove those cmdlets from the output, a more streamlined list results. The command I used to do this is shown here where I used the question mark alias (?) for the <b>Where-Object<\/b> cmdlet.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt; Get-Help * -Parameter computername | ? { $_.name -notmatch &#8220;WSMan&#8221; -AND $_.Na<br \/>me -notmatch &#8220;PSSession&#8221;}<\/p>\n<p>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Category<span>&nbsp; <\/span>Synopsis<br \/>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8211;<span>&nbsp; <\/span>&#8212;&#8212;&#8211;<br \/>Get-WinEvent<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets events from event logs and event&#8230;<br \/>Get-Counter<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets performance counter data from lo&#8230;<br \/>Invoke-Command<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Runs commands on local and remote com&#8230;<br \/>Receive-Job<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets the results of the Windows Power&#8230;<br \/>Get-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets the events in an event log, or a&#8230;<br \/>Clear-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Deletes all entries from specified ev&#8230;<br \/>Write-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Writes an event to an event log.<br \/>Limit-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Sets the event log properties that li&#8230;<br \/>Show-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Displays the event logs of the local &#8230;<br \/>New-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Creates a new event log and a new eve&#8230;<br \/>Remove-EventLog<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Deletes an event log or unregisters a&#8230;<br \/>Get-WmiObject<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets instances of Windows Management &#8230;<br \/>Invoke-WmiMethod<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Calls Windows Management Instrumentat&#8230;<br \/>Get-Process<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets the processes that are running o&#8230;<br \/>Remove-WmiObject<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Deletes an instance of an existing Wi&#8230;<br \/>Register-WmiEvent<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Subscribes to a Windows Management In&#8230;<br \/>Get-Service<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets the services on a local or remot&#8230;<br \/>Set-Service<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Starts, stops, and suspends a service&#8230;<br \/>Set-WmiInstance<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Creates or updates an instance of an &#8230;<br \/>Get-HotFix<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Gets the hotfixes that have been appl&#8230;<br \/>Test-Connection<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Sends ICMP echo request packets (&#8220;pin&#8230;<br \/>Restart-Computer<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Restarts (&#8220;reboots&#8221;) the operating sy&#8230;<br \/>Stop-Computer<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Cmdlet<span>&nbsp;&nbsp;&nbsp; <\/span>Stops (shuts down) local and remote c&#8230;<\/p>\n<p>PS C:\\&gt;<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">Some cmdlets let you specify credentials. This enables you to use a different user account than the one that is currently logged on. This is seen here.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt; Get-WinEvent -LogName application -MaxEvents 1 -ComputerName ex1 -Credential<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">nwtraders\\administrator<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">TimeCreated<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ProviderName<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Id Message<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&#8212;&#8212;&#8212;&#8211;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8212; &#8212;&#8212;-<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">11\/9\/2010 11:54:14 AM MSExchange ADAccess<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>2080 Process MAD.EXE (&#8230;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt;<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">When the command runs, a dialog box is displayed to enable me to type the credentials. The dialog box is seen in the following figure.<\/span><\/p>\n<p class=\"Num-Caption\"><span style=\"font-size: 10pt\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/3073.hsg-11-15-10-02.jpg\" border=\"0\" \/><\/span><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\">Other cmdlets, such as <b>Get-Service<\/b> or <b>Get-Process<\/b> do not have a <i>credential<\/i> parameter. Therefore, the command impersonates the user who is logged on. This is illustrated here.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt; Get-Service -ComputerName hyperv -Name bits<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Status<span>&nbsp;&nbsp; <\/span>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>DisplayName<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&#8212;&#8212;<span>&nbsp;&nbsp; <\/span>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;&#8211;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">Running<span>&nbsp; <\/span>bits<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Background Intelligent Transfer Ser&#8230;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size: 10pt\"><span style=\"font-family: Lucida Sans Typewriter\">PS C:\\&gt;<\/span><\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\">However, by holding down the <b>Shift Key<\/b> and right-clicking on the <b>Windows PowerShell icon<\/b>, I bring up an action menu that enables me to run the program as a different user. This menu is seen in the following figure.<\/span><\/p>\n<p class=\"Num-Caption\"><span style=\"font-size: 10pt\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/0842.HSG-11-15-10-03.jpg\" border=\"0\" \/><\/span><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\">The credential dialog box, as seen in the following figure, appears.<\/span><\/p>\n<p class=\"Num-Caption\"><span style=\"font-size: 10pt\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8053.HSG-11-15-10-04.jpg\" border=\"0\" \/><\/span><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\"><\/span><\/p>\n<p><span style=\"font-size: 10pt\">By using the <b>Run As Different User<\/b> dialog box, alternative credentials can be used for Windows PowerShell cmdlets that do not support the <i>credential<\/i> parameter. <\/p>\n<p><\/span><\/p>\n<p><span style=\"font-size: 10pt\">DN, that is all there is to using the Windows PowerShell cmdlets that support remoting. Remoting week will continue tomorrow when I will talk about how to use Windows PowerShell remoting. <\/span><\/p>\n<p><span style=\"font-size: 10pt\">I invite you to follow me on <a target=\"_blank\" href=\"http:\/\/bit.ly\/scriptingguystwitter\"><span style=\"font-size: 10pt\">Twitter<\/span><\/a> or <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\"><span style=\"font-size: 10pt\">Facebook<\/span><\/a>. If you have any questions, send email to me at <a target=\"_blank\" href=\"mailto:scripter@microsoft.com\"><span style=\"font-size: 10pt\">scripter@microsoft.com<\/span><\/a> or post them on the <a href=\"http:\/\/social.technet.microsoft.com\/Forums\/en\/ITCG\/threads\/\"><span style=\"font-size: 10pt\">Official Scripting Guys Forum.<\/span><\/a>. See you tomorrow. Until then, peace.<\/span><\/p>\n<p><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p><b><span style=\"font-size: 10pt\">Ed Wilson, Microsoft Scripting Guy<\/span><\/b><span style=\"font-size: 10pt\">&nbsp;<\/span><\/p>\n<p>&nbsp;<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy Ed Wilson shows how to use Windows PowerShell cmdlets to administer remote computers. &nbsp; Hey, Scripting Guy! I need to be able to work with remote computers. Is there a good way to do this with Windows PowerShell? &#8212; DN &nbsp; Hello DN, Microsoft Scripting Guy Ed Wilson here. I was [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[51,57,3,4,45],"class_list":["post-16501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-getting-started","tag-remoting","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy Ed Wilson shows how to use Windows PowerShell cmdlets to administer remote computers. &nbsp; Hey, Scripting Guy! I need to be able to work with remote computers. Is there a good way to do this with Windows PowerShell? &#8212; DN &nbsp; Hello DN, Microsoft Scripting Guy Ed Wilson here. I was [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/16501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=16501"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/16501\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=16501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=16501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=16501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}