diff --git a/reference/5.1/Microsoft.WSMan.Management/About/about_WSMan_Provider.md b/reference/5.1/Microsoft.WSMan.Management/About/about_WSMan_Provider.md index 967fef212b32..f66deeb2b848 100644 --- a/reference/5.1/Microsoft.WSMan.Management/About/about_WSMan_Provider.md +++ b/reference/5.1/Microsoft.WSMan.Management/About/about_WSMan_Provider.md @@ -99,7 +99,7 @@ WSMan:\localhost --------- InitializationParameters --------- Resources ------------ Security ------- Microsoft.Powershell +------ Microsoft.PowerShell --------- InitializationParameters --------- Resources ------------ Security @@ -151,35 +151,35 @@ Set-Location -Path WSMan:\SERVER01 ## Displaying the Contents of the WSMan: Drive -This command uses the `Get-Childitem` cmdlet to display the WS-Management stores +This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the Localhost store location. ```powershell -Get-ChildItem -path WSMan:\Localhost +Get-ChildItem -Path WSMan:\Localhost ``` If you are in the `WSMan:` drive, you can omit the drive name. -This command uses the `Get-Childitem` cmdlet to display the WS-Management +This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the remote computer "SERVER01" store location. ```powershell -Get-ChildItem -path WSMan:\SERVER01 +Get-ChildItem -Path WSMan:\SERVER01 ``` > [!NOTE] > The above command assume that a connection to the remote system already > exists. -## Setting the value of items in the WSMAN: drive +## Setting the value of items in the WSMan: drive You can use the `Set-Item` cmdlet to change configuration settings in the -`WSMAN` drive. The following example sets the **TrustedHosts** value to +`WSMan:` drive. The following example sets the **TrustedHosts** value to accept all hosts with the suffix "contoso.com". ```powershell # You do not need to specify the -Path parameter name when using Set-Item. -PS WSMAN:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" +PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that @@ -187,21 +187,21 @@ appends a value instead of changing it. The following example will append a new value "*.domain2.com" to the old value stored in `TrustedHost:` ```powershell -Set-Item WSMAN:\localhost\Client\TrustedHosts *.domain2.com -Concatenate +Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ``` -## Creating items in the WSMAN: drive +## Creating items in the WSMan: drive ### Creating a new listener The `New-Item` cmdlet creates items within a provider drive. Each provider -has different item types that you can create. In the `WSMAN:` drive, you can +has different item types that you can create. In the `WSMan:` drive, you can create *Listeners* which you configure to receive and respond to remote requests. The following command creates a new HTTP listener using the `New-Item` cmdlet. ```powershell -New-Item -Path WSMan:\localhost\Listener -Address * -Transport HTTP -force +New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force ``` ### Creating a new plug-in @@ -211,7 +211,7 @@ This command creates (registers) a plug-in for the WS-Management service. ```powershell New-Item -Path WSMan:\localhost\Plugin ` -Plugin TestPlugin ` - -FileName %systemroot%\system32\WsmWmiPl.dll ` + -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` -SDKVersion 1 ` -Capability "Get","Put","Invoke","Enumerate" ` @@ -255,7 +255,7 @@ certificate. $cred = Get-Credential New-Item -Path WSMan:\localhost\ClientCertificate ` -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -URI wmicimv2/* ` + -Uri wmicimv2/* ` -Credential $cred; ``` @@ -513,7 +513,7 @@ Specifies the entity that is identified by the certificate. ### Transport \ Specifies the transport to use to send and receive WS-Management protocol -requests and responses. The value must be either HTTP or HTTPS. +requests and responses. The value must be either **http** or **https**. Note: The Transport value is set when creating a Listener. @@ -590,7 +590,7 @@ Get-Help Get-ChildItem ``` ```powershell -Get-Help Get-ChildItem -Path wsman: +Get-Help Get-ChildItem -Path WSMan: ``` ## See also diff --git a/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md index b1142b9365dc..ca62ce26fe3e 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md @@ -51,7 +51,7 @@ For information about how to disconnect from the WinRM service on a remote compu ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -77,7 +77,7 @@ the **ComputerName** list. ```powershell PS C:\> $cred = Get-Credential Administrator PS C:\> Connect-WSMan -ComputerName "server01" -Credential $cred -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -106,7 +106,7 @@ Administrator credentials. ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -Port 80 -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -126,7 +126,7 @@ This command creates a connection to the remote server01 computer over port 80. ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md index 94c06b97a5d3..ca1aa2dc2a17 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -36,7 +36,7 @@ For more information about how to connect to the WinRM service on a remote compu ### Example 1: Delete a connection to a remote computer ```powershell -PS C:\> Disconnect-WSMan -computer server01 +PS C:\> Disconnect-WSMan -Computer server01 PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md index d07ec68d5ffb..96f3a6c1a006 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -48,7 +48,7 @@ This cmdlet uses the WS-Management connection/transport layer to retrieve inform ### Example 1: Get all information from WMI ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="winrm"} -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="winrm"} -ComputerName "Server01" ``` This command returns all of the information that Windows Management Instrumentation (WMI) exposes @@ -57,7 +57,7 @@ about the **WinRM** service on the remote server01 computer. ### Example 2: Get the status of the Spooler service ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" ``` This command returns only the status of the **Spooler** service on the remote server01 computer. @@ -65,7 +65,7 @@ This command returns only the status of the **Spooler** service on the remote se ### Example 3: Get endpoint references for all services ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/win32_service -ReturnType EPR +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/Win32_Service -ReturnType EPR ``` This command returns endpoint references that correspond to all the services on the local computer. @@ -73,7 +73,7 @@ This command returns endpoint references that correspond to all the services on ### Example 4: Get services that meet specified criteria ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from win32_service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from Win32_Service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" ``` This command lists all of the services that meet the following criteria on the remote Server01 @@ -103,7 +103,7 @@ listener that matches the criteria in the selector set. ### Example 7: Get associated instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets the associated instances that are related to the specified instance (winrm). @@ -113,7 +113,7 @@ You must enclose the filter in quotation marks, as shown in the example. ### Example 8: Get association instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets association instances that are related to the specified instance (winrm). Because diff --git a/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md index 7a51cf485b70..4ddcda57327c 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -45,7 +45,7 @@ This cmdlet uses the WSMan connection/transport layer to run the action. ### Example 1: Invoke a method ```powershell -Invoke-WSManAction -Action startservice -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Authentication Default ``` ```Output @@ -56,8 +56,8 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -65,7 +65,7 @@ indicates success. A return value of 5 indicates that the service is already sta ### Example 2: Invoke a method ```powershell -Invoke-WSManAction -Action stopservice -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication default +Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication Default ``` ```Output @@ -86,7 +86,7 @@ indicates success. A return value of 5 indicates that the service is already sta ### Example 3: Invoke a method with specified parameter values ```powershell -Invoke-WSManAction -Action create -ResourceURI wmicimv2/win32_process -ValueSet @{commandline="notepad.exe";currentdirectory="C:\"} +Invoke-WSManAction -Action Create -ResourceURI wmicimv2/Win32_Process -ValueSet @{commandline="notepad.exe";currentdirectory="C:\"} ``` ```Output @@ -98,14 +98,14 @@ ProcessId : 6356 ReturnValue : 0 ``` -This command calls the **Create** method of the Win32_Process class. It passes the method two +This command calls the **Create** method of the **Win32_Process** class. It passes the method two parameter values, `Notepad.exe` and `C:\`. As a result, a new process is created to run Notepad, and the current directory of the new process is set to `C:\`. ### Example 4: Invoke a method on a remote computer ```powershell -Invoke-WSManAction -Action startservice -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication Default ``` ```Output @@ -116,9 +116,9 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. Because the ComputerName parameter is specified, the command runs against -the remote server01 computer. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. Because the ComputerName parameter is specified, the command +runs against the remote server01 computer. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -299,7 +299,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the ResourceURI parameter and the SelectorSet parameter. For example, the following command uses the FilePath parameter: -`Invoke-WSManAction -Action stopservice -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath c:\input.xml -Authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md index 1829fa91d615..e9c75102a7a5 100644 --- a/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md @@ -211,7 +211,7 @@ Specifies the path of a file that is used to create a management resource. You s management resource using the **ResourceURI** parameter and the **SelectorSet** parameter . For example, the following command uses the **File** parameter: -`Invoke-WSManAction -Action stopservice -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File c:\input.xml -Authentication Default` +`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md index d15638ac753d..29a4c3dd7486 100644 --- a/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -38,7 +38,7 @@ WSMan cmdlets: ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md index db1d5296ec4a..8f36502a8013 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -317,7 +317,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the **ResourceURI** parameter and the **SelectorSet** parameter. For example, the following command uses the **FilePath** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:c:\input.xml -authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md index ef66abd02e1b..222a2a0c97c0 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md @@ -49,24 +49,24 @@ This command determines whether the WinRM service is running on the server01 com ### Example 3: Determine the status of the WinRM service and the operating system version ```powershell -Test-WSMan -Authentication default +Test-WSMan -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the local computer -by using the authentication parameter. +by using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ### Example 4: Determine the status of the WinRM service and the OS version on a remote computer ```powershell -Test-WSMan -ComputerName "server01" -Authentication default +Test-WSMan -ComputerName "server01" -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the computer named -server01 using the authentication parameter. +server01 using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ## PARAMETERS diff --git a/reference/5.1/PSDiagnostics/Start-Trace.md b/reference/5.1/PSDiagnostics/Start-Trace.md index 6c709b5da23a..187129020ab5 100644 --- a/reference/5.1/PSDiagnostics/Start-Trace.md +++ b/reference/5.1/PSDiagnostics/Start-Trace.md @@ -39,13 +39,13 @@ You must run this cmdlet from an elevated PowerShell session. $parameters = @{ SessionName = 'wsmlog' ETS = $true - OutputFilePath = "$env:windir\system32\wsmtraces.log" + OutputFilePath = "$Env:windir\system32\wsmtraces.log" Format = 'bincirc' MinBuffers = 16 MaxBuffers = 256 BufferSizeInKb = 64 MaxLogFileSizeInMB = 256 - ProviderFilePath = "$env:windir\system32\wsmtraceproviders.txt" + ProviderFilePath = "$Env:windir\system32\wsmtraceproviders.txt" } Start-Trace @parameters ``` @@ -160,7 +160,7 @@ Accept wildcard characters: False ### -OutputFilePath Path of the output log file or the DSN and log set name in a SQL database. The default path is -`$env:systemdrive\PerfLogs\Admin`. +`$Env:SystemDrive\PerfLogs\Admin`. ```yaml Type: System.String @@ -169,7 +169,7 @@ Aliases: Required: False Position: 1 -Default value: $env:systemdrive\PerfLogs\Admin +Default value: $Env:SystemDrive\PerfLogs\Admin Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/7.4/Microsoft.WSMan.Management/About/about_WSMan_Provider.md b/reference/7.4/Microsoft.WSMan.Management/About/about_WSMan_Provider.md index 17056e60b4ac..c73410bb38bd 100644 --- a/reference/7.4/Microsoft.WSMan.Management/About/about_WSMan_Provider.md +++ b/reference/7.4/Microsoft.WSMan.Management/About/about_WSMan_Provider.md @@ -101,7 +101,7 @@ WSMan:\localhost --------- InitializationParameters --------- Resources ------------ Security ------- Microsoft.Powershell +------ Microsoft.PowerShell --------- InitializationParameters --------- Resources ------------ Security @@ -153,35 +153,35 @@ Set-Location -Path WSMan:\SERVER01 ## Displaying the Contents of the WSMan: Drive -This command uses the `Get-Childitem` cmdlet to display the WS-Management stores +This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the Localhost store location. ```powershell -Get-ChildItem -path WSMan:\Localhost +Get-ChildItem -Path WSMan:\Localhost ``` If you are in the `WSMan:` drive, you can omit the drive name. -This command uses the `Get-Childitem` cmdlet to display the WS-Management +This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the remote computer "SERVER01" store location. ```powershell -Get-ChildItem -path WSMan:\SERVER01 +Get-ChildItem -Path WSMan:\SERVER01 ``` > [!NOTE] > The above command assume that a connection to the remote system already > exists. -## Setting the value of items in the WSMAN: drive +## Setting the value of items in the WSMan: drive You can use the `Set-Item` cmdlet to change configuration settings in the -`WSMAN` drive. The following example sets the **TrustedHosts** value to +`WSMan:` drive. The following example sets the **TrustedHosts** value to accept all hosts with the suffix "contoso.com". ```powershell # You do not need to specify the -Path parameter name when using Set-Item. -PS WSMAN:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" +PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that @@ -189,21 +189,21 @@ appends a value instead of changing it. The following example will append a new value "*.domain2.com" to the old value stored in `TrustedHost:` ```powershell -Set-Item WSMAN:\localhost\Client\TrustedHosts *.domain2.com -Concatenate +Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ``` -## Creating items in the WSMAN: drive +## Creating items in the WSMan: drive ### Creating a new listener The `New-Item` cmdlet creates items within a provider drive. Each provider -has different item types that you can create. In the `WSMAN:` drive, you can +has different item types that you can create. In the `WSMan:` drive, you can create *Listeners* which you configure to receive and respond to remote requests. The following command creates a new HTTP listener using the `New-Item` cmdlet. ```powershell -New-Item -Path WSMan:\localhost\Listener -Address * -Transport HTTP -force +New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force ``` ### Creating a new plug-in @@ -213,7 +213,7 @@ This command creates (registers) a plug-in for the WS-Management service. ```powershell New-Item -Path WSMan:\localhost\Plugin ` -Plugin TestPlugin ` - -FileName %systemroot%\system32\WsmWmiPl.dll ` + -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` -SDKVersion 1 ` -Capability "Get","Put","Invoke","Enumerate" ` @@ -257,7 +257,7 @@ certificate. $cred = Get-Credential New-Item -Path WSMan:\localhost\ClientCertificate ` -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -URI wmicimv2/* ` + -Uri wmicimv2/* ` -Credential $cred; ``` @@ -515,7 +515,7 @@ Specifies the entity that is identified by the certificate. ### Transport \ Specifies the transport to use to send and receive WS-Management protocol -requests and responses. The value must be either HTTP or HTTPS. +requests and responses. The value must be either **http** or **https**. Note: The Transport value is set when creating a Listener. @@ -592,7 +592,7 @@ Get-Help Get-ChildItem ``` ```powershell -Get-Help Get-ChildItem -Path wsman: +Get-Help Get-ChildItem -Path WSMan: ``` ## See also diff --git a/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md index e7a77c7e9cb7..374b2cf2b13f 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md @@ -53,7 +53,7 @@ For information about how to disconnect from the WinRM service on a remote compu ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -79,7 +79,7 @@ the **ComputerName** list. ```powershell PS C:\> $cred = Get-Credential Administrator PS C:\> Connect-WSMan -ComputerName "server01" -Credential $cred -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -108,7 +108,7 @@ Administrator credentials. ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -Port 80 -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -128,7 +128,7 @@ This command creates a connection to the remote server01 computer over port 80. ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md index 65079380eae3..38c69e89c496 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -38,7 +38,7 @@ For more information about how to connect to the WinRM service on a remote compu ### Example 1: Delete a connection to a remote computer ```powershell -PS C:\> Disconnect-WSMan -computer server01 +PS C:\> Disconnect-WSMan -Computer server01 PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md index 65ea80966d76..9d52a0290cc1 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -48,7 +48,7 @@ This cmdlet uses the WS-Management connection/transport layer to retrieve inform ### Example 1: Get all information from WMI ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="winrm"} -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="winrm"} -ComputerName "Server01" ``` This command returns all of the information that Windows Management Instrumentation (WMI) exposes @@ -57,7 +57,7 @@ about the **WinRM** service on the remote server01 computer. ### Example 2: Get the status of the Spooler service ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" ``` This command returns only the status of the **Spooler** service on the remote server01 computer. @@ -65,7 +65,7 @@ This command returns only the status of the **Spooler** service on the remote se ### Example 3: Get endpoint references for all services ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/win32_service -ReturnType EPR +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/Win32_Service -ReturnType EPR ``` This command returns endpoint references that correspond to all the services on the local computer. @@ -73,7 +73,7 @@ This command returns endpoint references that correspond to all the services on ### Example 4: Get services that meet specified criteria ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from win32_service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from Win32_Service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" ``` This command lists all of the services that meet the following criteria on the remote Server01 @@ -103,7 +103,7 @@ listener that matches the criteria in the selector set. ### Example 7: Get associated instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets the associated instances that are related to the specified instance (winrm). @@ -113,7 +113,7 @@ You must enclose the filter in quotation marks, as shown in the example. ### Example 8: Get association instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets association instances that are related to the specified instance (winrm). Because diff --git a/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md index fc37f7a4f1c0..b33635dc62fa 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -47,7 +47,7 @@ This cmdlet uses the WSMan connection/transport layer to run the action. ### Example 1: Invoke a method ```powershell -Invoke-WSManAction -Action startservice -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Authentication Default ``` ```Output @@ -58,8 +58,8 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -67,7 +67,7 @@ indicates success. A return value of 5 indicates that the service is already sta ### Example 2: Invoke a method ```powershell -Invoke-WSManAction -Action stopservice -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication default +Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication Default ``` ```Output @@ -86,7 +86,7 @@ The file, `Input.xml`, contains the following content: ### Example 3: Invoke a method with specified parameter values ```powershell -Invoke-WSManAction -Action create -ResourceURI wmicimv2/win32_process -ValueSet @{commandline="notepad.exe";currentdirectory="C:\"} +Invoke-WSManAction -Action Create -ResourceURI wmicimv2/Win32_Process -ValueSet @{commandline="notepad.exe";currentdirectory="C:\"} ``` ```Output @@ -98,14 +98,14 @@ ProcessId : 6356 ReturnValue : 0 ``` -This command calls the **Create** method of the Win32_Process class. It passes the method two +This command calls the **Create** method of the **Win32_Process** class. It passes the method two parameter values, `Notepad.exe` and `C:\`. As a result, a new process is created to run Notepad, and the current directory of the new process is set to `C:\`. ### Example 4: Invoke a method on a remote computer ```powershell -Invoke-WSManAction -Action startservice -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication Default ``` ```Output @@ -116,9 +116,9 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. Because the ComputerName parameter is specified, the command runs against -the remote server01 computer. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. Because the ComputerName parameter is specified, the command +runs against the remote server01 computer. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -299,7 +299,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the ResourceURI parameter and the SelectorSet parameter. For example, the following command uses the FilePath parameter: -`Invoke-WSManAction -Action stopservice -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath c:\input.xml -Authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md index d366f2bed7e5..d031dec685ed 100644 --- a/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md @@ -213,7 +213,7 @@ Specifies the path of a file that is used to create a management resource. You s management resource using the **ResourceURI** parameter and the **SelectorSet** parameter . For example, the following command uses the **File** parameter: -`Invoke-WSManAction -Action stopservice -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File c:\input.xml -Authentication Default` +`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md index cacc1fa5f28b..5bdc186a3c9c 100644 --- a/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -40,7 +40,7 @@ WSMan cmdlets: ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md index dee27b8c5b77..3ba00b44f5a6 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -316,7 +316,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the **ResourceURI** parameter and the **SelectorSet** parameter. For example, the following command uses the **FilePath** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:c:\input.xml -authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md index 95373b137a02..55baaf697c54 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md @@ -51,24 +51,24 @@ This command determines whether the WinRM service is running on the server01 com ### Example 3: Determine the status of the WinRM service and the operating system version ```powershell -Test-WSMan -Authentication default +Test-WSMan -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the local computer -by using the authentication parameter. +by using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ### Example 4: Determine the status of the WinRM service and the OS version on a remote computer ```powershell -Test-WSMan -ComputerName "server01" -Authentication default +Test-WSMan -ComputerName "server01" -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the computer named -server01 using the authentication parameter. +server01 using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ## PARAMETERS diff --git a/reference/7.4/PSDiagnostics/Start-Trace.md b/reference/7.4/PSDiagnostics/Start-Trace.md index a0ec8c70436f..b9615284ed9d 100644 --- a/reference/7.4/PSDiagnostics/Start-Trace.md +++ b/reference/7.4/PSDiagnostics/Start-Trace.md @@ -42,13 +42,13 @@ You must run this cmdlet from an elevated PowerShell session. $parameters = @{ SessionName = 'wsmlog' ETS = $true - OutputFilePath = "$env:windir\system32\wsmtraces.log" + OutputFilePath = "$Env:windir\system32\wsmtraces.log" Format = 'bincirc' MinBuffers = 16 MaxBuffers = 256 BufferSizeInKb = 64 MaxLogFileSizeInMB = 256 - ProviderFilePath = "$env:windir\system32\wsmtraceproviders.txt" + ProviderFilePath = "$Env:windir\system32\wsmtraceproviders.txt" } Start-Trace @parameters ``` @@ -163,7 +163,7 @@ Accept wildcard characters: False ### -OutputFilePath Path of the output log file or the DSN and log set name in a SQL database. The default path is -`$env:systemdrive\PerfLogs\Admin`. +`$Env:SystemDrive\PerfLogs\Admin`. ```yaml Type: System.String @@ -172,7 +172,7 @@ Aliases: Required: False Position: 1 -Default value: $env:systemdrive\PerfLogs\Admin +Default value: $Env:SystemDrive\PerfLogs\Admin Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/7.5/Microsoft.WSMan.Management/About/about_WSMan_Provider.md b/reference/7.5/Microsoft.WSMan.Management/About/about_WSMan_Provider.md index 1048dad0e3a9..93f331ba2307 100644 --- a/reference/7.5/Microsoft.WSMan.Management/About/about_WSMan_Provider.md +++ b/reference/7.5/Microsoft.WSMan.Management/About/about_WSMan_Provider.md @@ -101,7 +101,7 @@ WSMan:\localhost --------- InitializationParameters --------- Resources ------------ Security ------- Microsoft.Powershell +------ Microsoft.PowerShell --------- InitializationParameters --------- Resources ------------ Security @@ -157,7 +157,7 @@ This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the Localhost store location. ```powershell -Get-ChildItem -path WSMan:\Localhost +Get-ChildItem -Path WSMan:\Localhost ``` If you are in the `WSMan:` drive, you can omit the drive name. @@ -166,22 +166,22 @@ This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the remote computer "SERVER01" store location. ```powershell -Get-ChildItem -path WSMan:\SERVER01 +Get-ChildItem -Path WSMan:\SERVER01 ``` > [!NOTE] > The above command assume that a connection to the remote system already > exists. -## Setting the value of items in the WSMAN: drive +## Setting the value of items in the WSMan: drive You can use the `Set-Item` cmdlet to change configuration settings in the -`WSMAN` drive. The following example sets the **TrustedHosts** value to +`WSMan:` drive. The following example sets the **TrustedHosts** value to accept all hosts with the suffix "contoso.com". ```powershell # You do not need to specify the -Path parameter name when using Set-Item. -PS WSMAN:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" +PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that @@ -189,21 +189,21 @@ appends a value instead of changing it. The following example will append a new value "*.domain2.com" to the old value stored in `TrustedHost:` ```powershell -Set-Item WSMAN:\localhost\Client\TrustedHosts *.domain2.com -Concatenate +Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ``` -## Creating items in the WSMAN: drive +## Creating items in the WSMan: drive ### Creating a new listener The `New-Item` cmdlet creates items within a provider drive. Each provider -has different item types that you can create. In the `WSMAN:` drive, you can +has different item types that you can create. In the `WSMan:` drive, you can create *Listeners* which you configure to receive and respond to remote requests. The following command creates a new HTTP listener using the `New-Item` cmdlet. ```powershell -New-Item -Path WSMan:\localhost\Listener -Address * -Transport HTTP -force +New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force ``` ### Creating a new plug-in @@ -213,7 +213,7 @@ This command creates (registers) a plug-in for the WS-Management service. ```powershell New-Item -Path WSMan:\localhost\Plugin ` -Plugin TestPlugin ` - -FileName %systemroot%\system32\WsmWmiPl.dll ` + -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` -SDKVersion 1 ` -Capability "Get","Put","Invoke","Enumerate" ` @@ -257,7 +257,7 @@ certificate. $cred = Get-Credential New-Item -Path WSMan:\localhost\ClientCertificate ` -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -URI wmicimv2/* ` + -Uri wmicimv2/* ` -Credential $cred; ``` @@ -515,7 +515,7 @@ Specifies the entity that is identified by the certificate. ### Transport \ Specifies the transport to use to send and receive WS-Management protocol -requests and responses. The value must be either HTTP or HTTPS. +requests and responses. The value must be either **http** or **https**. Note: The Transport value is set when creating a Listener. @@ -592,7 +592,7 @@ Get-Help Get-ChildItem ``` ```powershell -Get-Help Get-ChildItem -Path wsman: +Get-Help Get-ChildItem -Path WSMan: ``` ## See also diff --git a/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md index 9921d2287875..c078c0743a03 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md @@ -53,7 +53,7 @@ For information about how to disconnect from the WinRM service on a remote compu ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -79,7 +79,7 @@ the **ComputerName** list. ```powershell PS C:\> $cred = Get-Credential Administrator PS C:\> Connect-WSMan -ComputerName "server01" -Credential $cred -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -108,7 +108,7 @@ Administrator credentials. ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -Port 80 -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -128,7 +128,7 @@ This command creates a connection to the remote server01 computer over port 80. ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md index 2610af68047b..44fb34e4a5a9 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -38,7 +38,7 @@ For more information about how to connect to the WinRM service on a remote compu ### Example 1: Delete a connection to a remote computer ```powershell -PS C:\> Disconnect-WSMan -computer server01 +PS C:\> Disconnect-WSMan -Computer server01 PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md index d2658a3dfe8a..159596eda5d1 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -48,7 +48,7 @@ This cmdlet uses the WS-Management connection/transport layer to retrieve inform ### Example 1: Get all information from WMI ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="winrm"} -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="winrm"} -ComputerName "Server01" ``` This command returns all of the information that Windows Management Instrumentation (WMI) exposes @@ -57,7 +57,7 @@ about the **WinRM** service on the remote server01 computer. ### Example 2: Get the status of the Spooler service ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" ``` This command returns only the status of the **Spooler** service on the remote server01 computer. @@ -65,7 +65,7 @@ This command returns only the status of the **Spooler** service on the remote se ### Example 3: Get endpoint references for all services ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/win32_service -ReturnType EPR +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/Win32_Service -ReturnType EPR ``` This command returns endpoint references that correspond to all the services on the local computer. @@ -73,7 +73,7 @@ This command returns endpoint references that correspond to all the services on ### Example 4: Get services that meet specified criteria ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from win32_service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from Win32_Service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" ``` This command lists all of the services that meet the following criteria on the remote Server01 @@ -103,7 +103,7 @@ listener that matches the criteria in the selector set. ### Example 7: Get associated instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets the associated instances that are related to the specified instance (winrm). @@ -113,7 +113,7 @@ You must enclose the filter in quotation marks, as shown in the example. ### Example 8: Get association instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets association instances that are related to the specified instance (winrm). Because diff --git a/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md index 2ce82b1045ac..4f1306ccab10 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -47,7 +47,7 @@ This cmdlet uses the WSMan connection/transport layer to run the action. ### Example 1: Invoke a method ```powershell -Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Authentication Default ``` ```Output @@ -58,8 +58,8 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -67,7 +67,7 @@ indicates success. A return value of 5 indicates that the service is already sta ### Example 2: Invoke a method ```powershell -Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication default +Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication Default ``` ```Output @@ -86,7 +86,7 @@ The file, `Input.xml`, contains the following content: ### Example 3: Invoke a method with specified parameter values ```powershell -Invoke-WSManAction -Action create -ResourceURI wmicimv2/win32_process -ValueSet @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +Invoke-WSManAction -Action Create -ResourceURI wmicimv2/Win32_Process -ValueSet @{CommandLine="notepad.exe";CurrentDirectory="C:\"} ``` ```Output @@ -98,14 +98,14 @@ ProcessId : 6356 ReturnValue : 0 ``` -This command calls the **Create** method of the Win32_Process class. It passes the method two +This command calls the **Create** method of the **Win32_Process** class. It passes the method two parameter values, `Notepad.exe` and `C:\`. As a result, a new process is created to run Notepad, and the current directory of the new process is set to `C:\`. ### Example 4: Invoke a method on a remote computer ```powershell -Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication Default ``` ```Output @@ -116,9 +116,9 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. Because the ComputerName parameter is specified, the command runs against -the remote server01 computer. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. Because the ComputerName parameter is specified, the command +runs against the remote server01 computer. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -299,7 +299,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the ResourceURI parameter and the SelectorSet parameter. For example, the following command uses the FilePath parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath c:\input.xml -Authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md index c8c81bcb5810..d2ee9d049fa1 100644 --- a/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md @@ -213,7 +213,7 @@ Specifies the path of a file that is used to create a management resource. You s management resource using the **ResourceURI** parameter and the **SelectorSet** parameter . For example, the following command uses the **File** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File c:\input.xml -Authentication Default` +`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md index 0be2c154e020..bbbd762716eb 100644 --- a/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -40,7 +40,7 @@ WSMan cmdlets: ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md index b0fcd9d6d0b3..5ed3743ea431 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -316,7 +316,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the **ResourceURI** parameter and the **SelectorSet** parameter. For example, the following command uses the **FilePath** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:c:\input.xml -authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md index e24013314560..9eae71f8b34f 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md @@ -51,24 +51,24 @@ This command determines whether the WinRM service is running on the server01 com ### Example 3: Determine the status of the WinRM service and the operating system version ```powershell -Test-WSMan -Authentication default +Test-WSMan -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the local computer -by using the authentication parameter. +by using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ### Example 4: Determine the status of the WinRM service and the OS version on a remote computer ```powershell -Test-WSMan -ComputerName "server01" -Authentication default +Test-WSMan -ComputerName "server01" -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the computer named -server01 using the authentication parameter. +server01 using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ## PARAMETERS diff --git a/reference/7.5/PSDiagnostics/Start-Trace.md b/reference/7.5/PSDiagnostics/Start-Trace.md index 47138bf66a1e..11868cdfbbbe 100644 --- a/reference/7.5/PSDiagnostics/Start-Trace.md +++ b/reference/7.5/PSDiagnostics/Start-Trace.md @@ -42,13 +42,13 @@ You must run this cmdlet from an elevated PowerShell session. $parameters = @{ SessionName = 'wsmlog' ETS = $true - OutputFilePath = "$env:windir\system32\wsmtraces.log" + OutputFilePath = "$Env:windir\system32\wsmtraces.log" Format = 'bincirc' MinBuffers = 16 MaxBuffers = 256 BufferSizeInKb = 64 MaxLogFileSizeInMB = 256 - ProviderFilePath = "$env:windir\system32\wsmtraceproviders.txt" + ProviderFilePath = "$Env:windir\system32\wsmtraceproviders.txt" } Start-Trace @parameters ``` @@ -163,7 +163,7 @@ Accept wildcard characters: False ### -OutputFilePath Path of the output log file or the DSN and log set name in a SQL database. The default path is -`$env:systemdrive\PerfLogs\Admin`. +`$Env:SystemDrive\PerfLogs\Admin`. ```yaml Type: System.String @@ -172,7 +172,7 @@ Aliases: Required: False Position: 1 -Default value: $env:systemdrive\PerfLogs\Admin +Default value: $Env:SystemDrive\PerfLogs\Admin Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/reference/7.6/Microsoft.WSMan.Management/About/about_WSMan_Provider.md b/reference/7.6/Microsoft.WSMan.Management/About/about_WSMan_Provider.md index ad6e163f0970..71f2fdb965bc 100644 --- a/reference/7.6/Microsoft.WSMan.Management/About/about_WSMan_Provider.md +++ b/reference/7.6/Microsoft.WSMan.Management/About/about_WSMan_Provider.md @@ -101,7 +101,7 @@ WSMan:\localhost --------- InitializationParameters --------- Resources ------------ Security ------- Microsoft.Powershell +------ Microsoft.PowerShell --------- InitializationParameters --------- Resources ------------ Security @@ -157,7 +157,7 @@ This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the Localhost store location. ```powershell -Get-ChildItem -path WSMan:\Localhost +Get-ChildItem -Path WSMan:\Localhost ``` If you are in the `WSMan:` drive, you can omit the drive name. @@ -166,22 +166,22 @@ This command uses the `Get-ChildItem` cmdlet to display the WS-Management stores in the remote computer "SERVER01" store location. ```powershell -Get-ChildItem -path WSMan:\SERVER01 +Get-ChildItem -Path WSMan:\SERVER01 ``` > [!NOTE] > The above command assume that a connection to the remote system already > exists. -## Setting the value of items in the WSMAN: drive +## Setting the value of items in the WSMan: drive You can use the `Set-Item` cmdlet to change configuration settings in the -`WSMAN` drive. The following example sets the **TrustedHosts** value to +`WSMan:` drive. The following example sets the **TrustedHosts** value to accept all hosts with the suffix "contoso.com". ```powershell # You do not need to specify the -Path parameter name when using Set-Item. -PS WSMAN:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" +PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that @@ -189,21 +189,21 @@ appends a value instead of changing it. The following example will append a new value "*.domain2.com" to the old value stored in `TrustedHost:` ```powershell -Set-Item WSMAN:\localhost\Client\TrustedHosts *.domain2.com -Concatenate +Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ``` -## Creating items in the WSMAN: drive +## Creating items in the WSMan: drive ### Creating a new listener The `New-Item` cmdlet creates items within a provider drive. Each provider -has different item types that you can create. In the `WSMAN:` drive, you can +has different item types that you can create. In the `WSMan:` drive, you can create *Listeners* which you configure to receive and respond to remote requests. The following command creates a new HTTP listener using the `New-Item` cmdlet. ```powershell -New-Item -Path WSMan:\localhost\Listener -Address * -Transport HTTP -force +New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force ``` ### Creating a new plug-in @@ -213,7 +213,7 @@ This command creates (registers) a plug-in for the WS-Management service. ```powershell New-Item -Path WSMan:\localhost\Plugin ` -Plugin TestPlugin ` - -FileName %systemroot%\system32\WsmWmiPl.dll ` + -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` -SDKVersion 1 ` -Capability "Get","Put","Invoke","Enumerate" ` @@ -257,7 +257,7 @@ certificate. $cred = Get-Credential New-Item -Path WSMan:\localhost\ClientCertificate ` -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -URI wmicimv2/* ` + -Uri wmicimv2/* ` -Credential $cred; ``` @@ -515,7 +515,7 @@ Specifies the entity that is identified by the certificate. ### Transport \ Specifies the transport to use to send and receive WS-Management protocol -requests and responses. The value must be either HTTP or HTTPS. +requests and responses. The value must be either **http** or **https**. Note: The Transport value is set when creating a Listener. @@ -592,7 +592,7 @@ Get-Help Get-ChildItem ``` ```powershell -Get-Help Get-ChildItem -Path wsman: +Get-Help Get-ChildItem -Path WSMan: ``` ## See also diff --git a/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md index 5afc30aea4a2..71a7b6e18dc9 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md @@ -53,7 +53,7 @@ For information about how to disconnect from the WinRM service on a remote compu ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -79,7 +79,7 @@ the **ComputerName** list. ```powershell PS C:\> $cred = Get-Credential Administrator PS C:\> Connect-WSMan -ComputerName "server01" -Credential $cred -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -108,7 +108,7 @@ Administrator credentials. ```powershell PS C:\> Connect-WSMan -ComputerName "server01" -Port 80 -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> PS WSMan:\> dir ``` @@ -128,7 +128,7 @@ This command creates a connection to the remote server01 computer over port 80. ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md index bf30d529a816..73988794d1d7 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -38,7 +38,7 @@ For more information about how to connect to the WinRM service on a remote compu ### Example 1: Delete a connection to a remote computer ```powershell -PS C:\> Disconnect-WSMan -computer server01 +PS C:\> Disconnect-WSMan -Computer server01 PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md index 7797cf4f41ba..7e8af52f6baa 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -48,7 +48,7 @@ This cmdlet uses the WS-Management connection/transport layer to retrieve inform ### Example 1: Get all information from WMI ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="winrm"} -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="winrm"} -ComputerName "Server01" ``` This command returns all of the information that Windows Management Instrumentation (WMI) exposes @@ -57,7 +57,7 @@ about the **WinRM** service on the remote server01 computer. ### Example 2: Get the status of the Spooler service ```powershell -Get-WSManInstance -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" +Get-WSManInstance -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Fragment Status -ComputerName "Server01" ``` This command returns only the status of the **Spooler** service on the remote server01 computer. @@ -65,7 +65,7 @@ This command returns only the status of the **Spooler** service on the remote se ### Example 3: Get endpoint references for all services ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/win32_service -ReturnType EPR +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/Win32_Service -ReturnType EPR ``` This command returns endpoint references that correspond to all the services on the local computer. @@ -73,7 +73,7 @@ This command returns endpoint references that correspond to all the services on ### Example 4: Get services that meet specified criteria ```powershell -Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from win32_service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" +Get-WSManInstance -Enumerate -ResourceURI wmicimv2/* -Filter "select * from Win32_Service where StartMode = 'Auto' and State = 'Stopped'" -ComputerName "Server01" ``` This command lists all of the services that meet the following criteria on the remote Server01 @@ -103,7 +103,7 @@ listener that matches the criteria in the selector set. ### Example 7: Get associated instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets the associated instances that are related to the specified instance (winrm). @@ -113,7 +113,7 @@ You must enclose the filter in quotation marks, as shown in the example. ### Example 8: Get association instances related to a specified instance ```powershell -Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=win32_service?name=winrm}" -ResourceURI wmicimv2/* +Get-WSManInstance -Enumerate -Dialect Association -Associations -Filter "{Object=Win32_Service?name=winrm}" -ResourceURI wmicimv2/* ``` This command gets association instances that are related to the specified instance (winrm). Because diff --git a/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md index ed99556efe5b..7155fca398a9 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -47,7 +47,7 @@ This cmdlet uses the WSMan connection/transport layer to run the action. ### Example 1: Invoke a method ```powershell -Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -Authentication Default ``` ```Output @@ -58,8 +58,8 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -67,7 +67,7 @@ indicates success. A return value of 5 indicates that the service is already sta ### Example 2: Invoke a method ```powershell -Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication default +Invoke-WSManAction -Action StopService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:input.xml -Authentication Default ``` ```Output @@ -86,7 +86,7 @@ The file, `Input.xml`, contains the following content: ### Example 3: Invoke a method with specified parameter values ```powershell -Invoke-WSManAction -Action create -ResourceURI wmicimv2/win32_process -ValueSet @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +Invoke-WSManAction -Action Create -ResourceURI wmicimv2/Win32_Process -ValueSet @{CommandLine="notepad.exe";CurrentDirectory="C:\"} ``` ```Output @@ -98,14 +98,14 @@ ProcessId : 6356 ReturnValue : 0 ``` -This command calls the **Create** method of the Win32_Process class. It passes the method two +This command calls the **Create** method of the **Win32_Process** class. It passes the method two parameter values, `Notepad.exe` and `C:\`. As a result, a new process is created to run Notepad, and the current directory of the new process is set to `C:\`. ### Example 4: Invoke a method on a remote computer ```powershell -Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/win32_service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication default +Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service -SelectorSet @{name="spooler"} -ComputerName server01 -Authentication Default ``` ```Output @@ -116,9 +116,9 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the Win32_Service WMI class instance that corresponds -to the Spooler service. Because the ComputerName parameter is specified, the command runs against -the remote server01 computer. +This command calls the StartService method of the **Win32_Service** WMI class instance that +corresponds to the Spooler service. Because the ComputerName parameter is specified, the command +runs against the remote server01 computer. The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started. @@ -299,7 +299,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the ResourceURI parameter and the SelectorSet parameter. For example, the following command uses the FilePath parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath c:\input.xml -Authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md index 0705989d6de2..fd186bdfc9c5 100644 --- a/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md @@ -213,7 +213,7 @@ Specifies the path of a file that is used to create a management resource. You s management resource using the **ResourceURI** parameter and the **SelectorSet** parameter . For example, the following command uses the **File** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File c:\input.xml -Authentication Default` +`Invoke-WSManAction -Action StopService -ResourceUri wmi/cimv2/Win32_Service -SelectorSet @{Name="spooler"} -File C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md index d8256d6bf692..9c17249ff979 100644 --- a/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -40,7 +40,7 @@ WSMan cmdlets: ```powershell PS C:\> $a = New-WSManSessionOption -OperationTimeout 30000 PS C:\> Connect-WSMan -ComputerName "server01" -SessionOption $a -PS C:\> cd wsman: +PS C:\> cd WSMan: PS WSMan:\> dir ``` diff --git a/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md index e30ca06c049c..62b976fa69e2 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -316,7 +316,7 @@ Specifies the path of a file that is used to update a management resource. You s management resource by using the **ResourceURI** parameter and the **SelectorSet** parameter. For example, the following command uses the **FilePath** parameter: -`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:c:\input.xml -authentication default` +`Invoke-WSManAction -Action StopService -ResourceUri wmicimv2/Win32_Service -SelectorSet @{Name="spooler"} -FilePath:C:\input.xml -Authentication Default` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: diff --git a/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md index 659653007e2a..8f5b8aacf498 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md @@ -51,24 +51,24 @@ This command determines whether the WinRM service is running on the server01 com ### Example 3: Determine the status of the WinRM service and the operating system version ```powershell -Test-WSMan -Authentication default +Test-WSMan -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the local computer -by using the authentication parameter. +by using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ### Example 4: Determine the status of the WinRM service and the OS version on a remote computer ```powershell -Test-WSMan -ComputerName "server01" -Authentication default +Test-WSMan -ComputerName "server01" -Authentication Default ``` This command tests to see whether the WS-Management (WinRM) service is running on the computer named -server01 using the authentication parameter. +server01 using the **Authentication** parameter. -Using the authentication parameter enables `Test-WSMan` to return the operating system version. +Using the **Authentication** parameter enables `Test-WSMan` to return the operating system version. ## PARAMETERS diff --git a/reference/7.6/PSDiagnostics/Start-Trace.md b/reference/7.6/PSDiagnostics/Start-Trace.md index 7f1d70467162..c32f8d4234a6 100644 --- a/reference/7.6/PSDiagnostics/Start-Trace.md +++ b/reference/7.6/PSDiagnostics/Start-Trace.md @@ -42,13 +42,13 @@ You must run this cmdlet from an elevated PowerShell session. $parameters = @{ SessionName = 'wsmlog' ETS = $true - OutputFilePath = "$env:windir\system32\wsmtraces.log" + OutputFilePath = "$Env:windir\system32\wsmtraces.log" Format = 'bincirc' MinBuffers = 16 MaxBuffers = 256 BufferSizeInKb = 64 MaxLogFileSizeInMB = 256 - ProviderFilePath = "$env:windir\system32\wsmtraceproviders.txt" + ProviderFilePath = "$Env:windir\system32\wsmtraceproviders.txt" } Start-Trace @parameters ``` @@ -163,7 +163,7 @@ Accept wildcard characters: False ### -OutputFilePath Path of the output log file or the DSN and log set name in a SQL database. The default path is -`$env:systemdrive\PerfLogs\Admin`. +`$Env:SystemDrive\PerfLogs\Admin`. ```yaml Type: System.String @@ -172,7 +172,7 @@ Aliases: Required: False Position: 1 -Default value: $env:systemdrive\PerfLogs\Admin +Default value: $Env:SystemDrive\PerfLogs\Admin Accept pipeline input: False Accept wildcard characters: False ```