From 0b0d8dde65e6606b0d1c2c9a5d213a876cc7d59c Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 16 Jun 2026 10:49:43 -0500 Subject: [PATCH] Sync changes from PR#13059 - part 3 --- .../Import-LocalizedData.md | 5 +- .../Import-PSSession.md | 16 +- .../Invoke-RestMethod.md | 7 +- .../Microsoft.PowerShell.Utility/New-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/New-Event.md | 4 +- .../New-Object.md | 21 +- .../New-TemporaryFile.md | 7 +- .../New-Variable.md | 11 +- .../Microsoft.PowerShell.Utility/Out-File.md | 6 +- .../Out-GridView.md | 22 +- .../Register-ObjectEvent.md | 33 +- .../Remove-PSBreakpoint.md | 2 +- .../Remove-TypeData.md | 3 +- .../Remove-Variable.md | 10 +- .../Select-Object.md | 14 +- .../Select-String.md | 21 +- .../Select-Xml.md | 21 +- .../Send-MailMessage.md | 4 +- .../Microsoft.PowerShell.Utility/Set-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/Set-Date.md | 6 +- .../Set-PSBreakpoint.md | 10 +- .../Set-TraceSource.md | 12 +- .../Set-Variable.md | 7 +- .../Show-Command.md | 9 +- .../Tee-Object.md | 6 +- .../Trace-Command.md | 14 +- .../Unblock-File.md | 2 +- .../Unregister-Event.md | 6 +- .../Update-FormatData.md | 26 +- .../Update-List.md | 4 +- .../Update-TypeData.md | 8 +- .../Wait-Event.md | 7 +- .../Write-Error.md | 9 +- .../Write-Host.md | 5 +- .../Write-Information.md | 5 +- .../About/about_WSMan_Provider.md | 283 ++++++----- .../Connect-WSMan.md | 12 +- .../Disconnect-WSMan.md | 3 +- .../Enable-WSManCredSSP.md | 6 +- .../Get-WSManInstance.md | 20 +- .../Invoke-WSManAction.md | 60 ++- .../New-WSManInstance.md | 38 +- .../New-WSManSessionOption.md | 8 +- .../Remove-WSManInstance.md | 12 +- .../Set-WSManInstance.md | 66 ++- .../Set-WSManQuickConfig.md | 3 +- .../Microsoft.WSMan.Management/Test-WSMan.md | 6 +- reference/5.1/PSDiagnostics/Start-Trace.md | 7 +- .../5.1/PSReadLine/About/about_PSReadLine.md | 4 +- .../About/about_PSReadLine_Functions.md | 48 +- .../PSReadLine/Get-PSReadLineKeyHandler.md | 3 +- .../5.1/PSReadLine/Set-PSReadLineOption.md | 19 +- .../Import-LocalizedData.md | 5 +- .../Import-PSSession.md | 16 +- .../Invoke-RestMethod.md | 92 ++-- .../Invoke-WebRequest.md | 99 ++-- .../Join-String.md | 23 +- .../Microsoft.PowerShell.Utility/New-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/New-Event.md | 4 +- .../New-Object.md | 21 +- .../New-TemporaryFile.md | 8 +- .../New-Variable.md | 11 +- .../Microsoft.PowerShell.Utility/Out-File.md | 6 +- .../Out-GridView.md | 21 +- .../Register-ObjectEvent.md | 33 +- .../Remove-PSBreakpoint.md | 5 +- .../Remove-TypeData.md | 3 +- .../Remove-Variable.md | 10 +- .../Select-Object.md | 20 +- .../Select-String.md | 44 +- .../Select-Xml.md | 23 +- .../Send-MailMessage.md | 17 +- .../Microsoft.PowerShell.Utility/Set-Alias.md | 7 +- .../Microsoft.PowerShell.Utility/Set-Date.md | 6 +- .../Set-MarkdownOption.md | 11 +- .../Set-PSBreakpoint.md | 12 +- .../Set-TraceSource.md | 12 +- .../Set-Variable.md | 7 +- .../Show-Command.md | 9 +- .../Show-Markdown.md | 4 +- .../Tee-Object.md | 9 +- .../Trace-Command.md | 15 +- .../Unblock-File.md | 2 +- .../Unregister-Event.md | 6 +- .../Update-FormatData.md | 18 +- .../Update-List.md | 4 +- .../Update-TypeData.md | 11 +- .../Wait-Event.md | 8 +- .../Write-Error.md | 3 +- .../Write-Host.md | 5 +- .../Write-Information.md | 1 - .../About/about_WSMan_Provider.md | 283 ++++++----- .../Connect-WSMan.md | 12 +- .../Disconnect-WSMan.md | 3 +- .../Enable-WSManCredSSP.md | 6 +- .../Get-WSManInstance.md | 20 +- .../Invoke-WSManAction.md | 58 ++- .../New-WSManInstance.md | 38 +- .../New-WSManSessionOption.md | 8 +- .../Remove-WSManInstance.md | 12 +- .../Set-WSManInstance.md | 66 ++- .../Set-WSManQuickConfig.md | 3 +- .../Microsoft.WSMan.Management/Test-WSMan.md | 6 +- reference/7.4/PSDiagnostics/Start-Trace.md | 7 +- .../7.4/PSReadLine/About/about_PSReadLine.md | 4 +- .../About/about_PSReadLine_Functions.md | 9 +- .../PSReadLine/Get-PSReadLineKeyHandler.md | 3 +- .../7.4/PSReadLine/Set-PSReadLineOption.md | 19 +- .../Import-LocalizedData.md | 5 +- .../Import-PSSession.md | 16 +- .../Invoke-RestMethod.md | 65 +-- .../Invoke-WebRequest.md | 99 ++-- .../Join-String.md | 23 +- .../Microsoft.PowerShell.Utility/New-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/New-Event.md | 4 +- .../New-Object.md | 21 +- .../New-TemporaryFile.md | 7 +- .../New-Variable.md | 11 +- .../Microsoft.PowerShell.Utility/Out-File.md | 6 +- .../Out-GridView.md | 21 +- .../Register-ObjectEvent.md | 33 +- .../Remove-PSBreakpoint.md | 3 +- .../Remove-TypeData.md | 3 +- .../Remove-Variable.md | 10 +- .../Select-Object.md | 20 +- .../Select-String.md | 44 +- .../Select-Xml.md | 20 +- .../Send-MailMessage.md | 17 +- .../Microsoft.PowerShell.Utility/Set-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/Set-Date.md | 6 +- .../Set-MarkdownOption.md | 10 +- .../Set-PSBreakpoint.md | 12 +- .../Set-TraceSource.md | 12 +- .../Set-Variable.md | 7 +- .../Show-Command.md | 9 +- .../Show-Markdown.md | 3 +- .../Tee-Object.md | 9 +- .../Trace-Command.md | 14 +- .../Unblock-File.md | 2 +- .../Unregister-Event.md | 6 +- .../Update-FormatData.md | 18 +- .../Update-List.md | 4 +- .../Update-TypeData.md | 11 +- .../Wait-Event.md | 5 +- .../Write-Error.md | 3 +- .../Write-Host.md | 5 +- .../Write-Information.md | 1 - .../About/about_WSMan_Provider.md | 283 ++++++----- .../Connect-WSMan.md | 12 +- .../Disconnect-WSMan.md | 3 +- .../Enable-WSManCredSSP.md | 6 +- .../Get-WSManInstance.md | 20 +- .../Invoke-WSManAction.md | 58 ++- .../New-WSManInstance.md | 38 +- .../New-WSManSessionOption.md | 8 +- .../Remove-WSManInstance.md | 12 +- .../Set-WSManInstance.md | 66 ++- .../Set-WSManQuickConfig.md | 3 +- .../Microsoft.WSMan.Management/Test-WSMan.md | 6 +- reference/7.5/PSDiagnostics/Start-Trace.md | 7 +- .../7.5/PSReadLine/About/about_PSReadLine.md | 4 +- .../About/about_PSReadLine_Functions.md | 6 +- .../PSReadLine/Get-PSReadLineKeyHandler.md | 3 +- .../7.5/PSReadLine/Set-PSReadLineOption.md | 19 +- .../Import-LocalizedData.md | 5 +- .../Import-PSSession.md | 16 +- .../Invoke-RestMethod.md | 90 ++-- .../Invoke-WebRequest.md | 99 ++-- .../Join-String.md | 23 +- .../Microsoft.PowerShell.Utility/New-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/New-Event.md | 4 +- .../New-Object.md | 21 +- .../New-TemporaryFile.md | 7 +- .../New-Variable.md | 11 +- .../Microsoft.PowerShell.Utility/Out-File.md | 6 +- .../Out-GridView.md | 21 +- .../Register-ObjectEvent.md | 33 +- .../Remove-PSBreakpoint.md | 3 +- .../Remove-TypeData.md | 3 +- .../Remove-Variable.md | 10 +- .../Select-Object.md | 20 +- .../Select-String.md | 44 +- .../Select-Xml.md | 20 +- .../Send-MailMessage.md | 17 +- .../Microsoft.PowerShell.Utility/Set-Alias.md | 5 +- .../Microsoft.PowerShell.Utility/Set-Date.md | 6 +- .../Set-MarkdownOption.md | 10 +- .../Set-PSBreakpoint.md | 12 +- .../Set-TraceSource.md | 12 +- .../Set-Variable.md | 7 +- .../Show-Command.md | 9 +- .../Show-Markdown.md | 3 +- .../Tee-Object.md | 9 +- .../Trace-Command.md | 14 +- .../Unblock-File.md | 2 +- .../Unregister-Event.md | 6 +- .../Update-FormatData.md | 18 +- .../Update-List.md | 4 +- .../Update-TypeData.md | 11 +- .../Wait-Event.md | 5 +- .../Write-Error.md | 3 +- .../Write-Host.md | 5 +- .../Write-Information.md | 1 - .../About/about_WSMan_Provider.md | 283 ++++++----- .../Connect-WSMan.md | 12 +- .../Disconnect-WSMan.md | 3 +- .../Enable-WSManCredSSP.md | 6 +- .../Get-WSManInstance.md | 20 +- .../Invoke-WSManAction.md | 58 ++- .../New-WSManInstance.md | 38 +- .../New-WSManSessionOption.md | 8 +- .../Remove-WSManInstance.md | 12 +- .../Set-WSManInstance.md | 66 ++- .../Set-WSManQuickConfig.md | 3 +- .../Microsoft.WSMan.Management/Test-WSMan.md | 6 +- reference/7.6/PSDiagnostics/Start-Trace.md | 7 +- .../7.6/PSReadLine/About/about_PSReadLine.md | 4 +- .../About/about_PSReadLine_Functions.md | 6 +- .../PSReadLine/Get-PSReadLineKeyHandler.md | 3 +- .../7.6/PSReadLine/Set-PSReadLineOption.md | 19 +- .../Invoke-WebRequest.md | 14 +- .../Select-Xml.md | 2 +- .../Send-MailMessage.md | 6 +- .../Show-Command.md | 8 +- .../About/about_WSMan_Provider.md | 264 +++++----- .../Get-WSManInstance.md | 7 +- .../Invoke-WSManAction.md | 16 +- .../About/about_PSReadLine_Functions.md | 2 +- .../cmdlet/required-development-guidelines.md | 459 +++++++++++------- 229 files changed, 3096 insertions(+), 2089 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md index b71f4cefbe46..e51a17758d3b 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -17,8 +17,9 @@ for the operating system. ## SYNTAX ``` -Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] [-BaseDirectory ] - [-FileName ] [-SupportedCommand ] [] +Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] + [-BaseDirectory ] [-FileName ] [-SupportedCommand ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md index 85a722315c1b..749008a1dcae 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -17,10 +17,11 @@ Imports commands from another session into the current session. ## SYNTAX ``` -Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] [-AllowClobber] - [-ArgumentList ] [-CommandType ] [-Module ] - [-FullyQualifiedModule ] [[-FormatTypeName] ] - [-Certificate ] [-Session] [] +Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] + [-AllowClobber] [-ArgumentList ] [-CommandType ] + [-Module ] [-FullyQualifiedModule ] + [[-FormatTypeName] ] [-Certificate ] [-Session] + [] ``` ## DESCRIPTION @@ -281,8 +282,8 @@ Function Start-BitsTransfer Function Suspend-BitsTransfer ``` -This command shows how to use the **Module** parameter of `Get-Command` to find out which commands were -imported into the session by an `Import-PSSession` command. +This command shows how to use the **Module** parameter of `Get-Command` to find out which commands +were imported into the session by an `Import-PSSession` command. The first command uses the `Import-PSSession` cmdlet to import commands whose names include "bits" from the PSSession in the `$S` variable. The `Import-PSSession` command returns a temporary module, @@ -528,7 +529,8 @@ and module names. Wildcards are not permitted. `Import-PSSession` cannot import providers from a snap-in. -For more information, see [about_PSSnapins](../Microsoft.PowerShell.Core/About/about_PSSnapins.md) +For more information, see +[about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) and [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ```yaml diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 0caafeed86aa..4ce444f87a2f 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -22,9 +22,10 @@ Invoke-RestMethod [-Method ] [-UseBasicParsing] [-Uri] [-WebSession ] [-SessionVariable ] [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-UserAgent ] [-DisableKeepAlive] [-TimeoutSec ] [-Headers ] - [-MaximumRedirection ] [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] - [-Body ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [] + [-MaximumRedirection ] [-Proxy ] [-ProxyCredential ] + [-ProxyUseDefaultCredentials] [-Body ] [-ContentType ] + [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md index 72a7c47d9a29..f513160c646c 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md @@ -18,8 +18,9 @@ Creates a new alias. ## SYNTAX ``` -New-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +New-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-Event.md b/reference/5.1/Microsoft.PowerShell.Utility/New-Event.md index 5aeca5d7a1f5..4de3f916ce89 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-Event.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-Event.md @@ -16,8 +16,8 @@ Creates a new event. ## SYNTAX ``` -New-Event [-SourceIdentifier] [[-Sender] ] [[-EventArguments] ] - [[-MessageData] ] [] +New-Event [-SourceIdentifier] [[-Sender] ] + [[-EventArguments] ] [[-MessageData] ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md b/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md index c16791fe4391..0a9e7b0ecebc 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md @@ -18,7 +18,8 @@ Creates an instance of a Microsoft .NET Framework or COM object. ### Net (Default) ``` -New-Object [-TypeName] [[-ArgumentList] ] [-Property ] [] +New-Object [-TypeName] [[-ArgumentList] ] [-Property ] + [] ``` ### Com @@ -92,8 +93,8 @@ At line:1 char:14 This example shows how to create and use a COM object to manage your Windows desktop. The first command uses the **ComObject** parameter of the `New-Object` cmdlet to create a COM object -with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. The -second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the +with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. +The second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the properties and methods of the COM object. Among the methods is the **ToggleDesktop** method. The third command calls the **ToggleDesktop** method of the object to minimize the open windows on your desktop. @@ -209,9 +210,16 @@ Specifies an array of arguments to pass to the constructor of the .NET Framework constructor takes a single parameter that is an array, you must wrap that parameter inside another array. For example: -`$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList (,$bytes)` +```powershell +$params = @{ + TypeName = 'System.Security.Cryptography.X509Certificates.X509Certificate' + ArgumentList = (,$bytes) +} +$cert = New-Object @params +``` -For more information about the behavior of **ArgumentList**, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). +For more information about the behavior of **ArgumentList**, see +[about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). The alias for **ArgumentList** is **Args**. @@ -306,7 +314,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md b/reference/5.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md index 0f18572931c1..e8261cd29d52 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md @@ -47,8 +47,8 @@ order and uses the first path found: $TempFile = New-TemporaryFile ``` -This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file -in the `$TempFile` variable. You can use this file later in your script. +This command generates a `.tmp` file in your temporary folder, and then stores a reference to the +file in the `$TempFile` variable. You can use this file later in your script. ## PARAMETERS @@ -89,7 +89,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md b/reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md index 91d324a22e56..f0add549a12a 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md @@ -18,9 +18,9 @@ Creates a new variable. ## SYNTAX ``` -New-Variable [-Name] [[-Value] ] [-Description ] [-Option ] - [-Visibility ] [-Force] [-PassThru] [-Scope ] [-WhatIf] [-Confirm] - [] +New-Variable [-Name] [[-Value] ] [-Description ] + [-Option ] [-Visibility ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -359,7 +359,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Out-File.md b/reference/5.1/Microsoft.PowerShell.Utility/Out-File.md index cf338e751ecf..723d050451aa 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Out-File.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Out-File.md @@ -19,14 +19,16 @@ Sends output to a file. ``` Out-File [-FilePath] [[-Encoding] ] [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` Out-File [[-Encoding] ] -LiteralPath [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md b/reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md index 09e46a1d9e0a..562fb1da30e0 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md @@ -9,7 +9,6 @@ aliases: - ogv title: Out-GridView --- - # Out-GridView ## SYNOPSIS @@ -322,7 +321,7 @@ Deserialized output from remote commands might not be formatted correctly in the **To hide or show a column:** 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected +1. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected columns to the Available columns boxes. Only columns in the **Select Columns** box appear in the grid view window. @@ -331,7 +330,7 @@ Deserialized output from remote commands might not be formatted correctly in the You can drag and drop columns into the desired location. Or use the following steps: 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder +1. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder the columns. Columns at the top of the list appear to the left of columns at the bottom of the list in the grid view window. @@ -346,9 +345,10 @@ You can drag and drop columns into the desired location. Or use the following st - To select a row, select the row or use the up or down arrow to navigate to the row. - To select all rows (except for the header row), press CTRL+A. -- To select consecutive rows, press and hold the SHIFT key while clicking the rows or using the - arrow keys. -- To select nonconsecutive rows, press the CTRL key and click to add a row to the selection. +- To select consecutive rows, press and hold the SHIFT key while clicking the rows or + using the arrow keys. +- To select nonconsecutive rows, press the CTRL key and click to add a row to the + selection. - You cannot select columns, and you cannot select the entire column header row. **How to Copy Rows** @@ -404,11 +404,11 @@ The criteria only affects the display. It does not delete items from the table. 1. To display the **Add criteria** menu button, in the upper right corner of the window, click the Expand arrow. -2. Click the **Add Criteria** menu button. -3. Click to select columns (properties). You can select one or many properties. -4. When you are finished selecting properties, click the **Add** button. -5. To cancel the additions, click **Cancel**. -6. To add more criteria, click the **Add Criteria** button again. +1. Click the **Add Criteria** menu button. +1. Click to select columns (properties). You can select one or many properties. +1. When you are finished selecting properties, click the **Add** button. +1. To cancel the additions, click **Cancel**. +1. To add more criteria, click the **Add Criteria** button again. **How to Edit a Criterion** diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md b/reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md index c49bc0f2b802..d4fa1452ba89 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md @@ -15,9 +15,9 @@ Subscribes to the events that are generated by a Microsoft .NET Framework object ## SYNTAX ``` -Register-ObjectEvent [-InputObject] [-EventName] [[-SourceIdentifier] ] - [[-Action] ] [-MessageData ] [-SupportEvent] [-Forward] [-MaxTriggerCount ] - [] +Register-ObjectEvent [-InputObject] [-EventName] + [[-SourceIdentifier] ] [[-Action] ] [-MessageData ] + [-SupportEvent] [-Forward] [-MaxTriggerCount ] [] ``` ## DESCRIPTION @@ -29,13 +29,13 @@ When the subscribed event is raised, it is added to the event queue in your sess in the event queue, use the `Get-Event` cmdlet. You can use the parameters of `Register-ObjectEvent` to specify property values of the events that -can help you to identify the event in the queue. You can also use the **Action** parameter to specify -actions to take when a subscribed event is raised and the **Forward** parameter to send remote events -to the event queue in the local session. +can help you to identify the event in the queue. You can also use the **Action** parameter to +specify actions to take when a subscribed event is raised and the **Forward** parameter to send +remote events to the event queue in the local session. When you subscribe to an event, an event subscriber is added to your session. To get the event -subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the -`Unregister-Event` cmdlet, which deletes the event subscriber from the session. +subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use +the `Unregister-Event` cmdlet, which deletes the event subscriber from the session. ## EXAMPLES @@ -80,12 +80,13 @@ Id Name PSJobTypeName State HasMoreData Location Com 5 3db2d67a-efff-... NotStarted False New-Event @newEventArgs ``` -The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for event -actions. +The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for +event actions. The `Register-ObjectEvent` command returns a job object that represents the action, which runs as a background job. You can use the Job cmdlets, such as `Get-Job` and `Receive-Job`, to manage the -background job. For more information, see [about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). +background job. For more information, see +[about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). ### Example 3: Subscribe to object events on remote computers @@ -180,11 +181,12 @@ Information : {} 47 ``` -The **PSEventJob** has a **Module** property that contains a dynamic script module that implements the -action. Using the call operator (`&`), we invoke the command in the module to display the +The **PSEventJob** has a **Module** property that contains a dynamic script module that implements +the action. Using the call operator (`&`), we invoke the command in the module to display the value of the `$Random` variable. -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ## PARAMETERS @@ -346,7 +348,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md b/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md index 11570ed47abf..00b607621c16 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md @@ -78,7 +78,7 @@ Remove-PSBreakpoint -Id 2 ### Example 4: Use a function to remove all breakpoints -This simple function deletes all of the breakpoints in the current console. +This simple function deletes all the breakpoints in the current session. ```powershell function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint } diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Remove-TypeData.md b/reference/5.1/Microsoft.PowerShell.Utility/Remove-TypeData.md index bafbfee479ba..4f527f5020c8 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Remove-TypeData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Remove-TypeData.md @@ -108,7 +108,8 @@ current session. Remove-TypeData -Path "$PSHOME\Modules\PSScheduledJob", "$PSHOME\Modules\PSWorkflow\PSWorkflow.types.ps1xml" ``` -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ### Example 5: Remove extended types from a remote session diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md b/reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md index e7424d55085a..6d9cbe311d15 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md @@ -18,8 +18,8 @@ Deletes a variable and its value. ## SYNTAX ``` -Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-Scope ] - [-WhatIf] [-Confirm] [] +Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -120,7 +120,8 @@ Gets only the variables in the specified scope. The acceptable values for this p - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -170,7 +171,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md b/reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md index 96d1a0e02eba..fffc80f85999 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md @@ -19,22 +19,24 @@ Selects objects or object properties. ### DefaultParameter (Default) ``` -Select-Object [[-Property] ] [-InputObject ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-Last ] [-First ] [-Skip ] [-Wait] - [] +Select-Object [[-Property] ] [-InputObject ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-Last ] + [-First ] [-Skip ] [-Wait] [] ``` ### SkipLastParameter ``` -Select-Object [[-Property] ] [-InputObject ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-SkipLast ] [] +Select-Object [[-Property] ] [-InputObject ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-SkipLast ] + [] ``` ### IndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-Wait] [-Index ] [] +Select-Object [-InputObject ] [-Unique] [-Wait] [-Index ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md b/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md index 9701c596dd89..ab67928cc1f5 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md @@ -20,25 +20,25 @@ Finds text in strings and files. ### File (Default) ``` -Select-String [-Pattern] [-Path] [-SimpleMatch] [-CaseSensitive] [-Quiet] - [-List] [-Include ] [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] - [-Context ] [] +Select-String [-Pattern] [-Path] [-SimpleMatch] [-CaseSensitive] + [-Quiet] [-List] [-Include ] [-Exclude ] [-NotMatch] [-AllMatches] + [-Encoding ] [-Context ] [] ``` ### Object ``` -Select-String -InputObject [-Pattern] [-SimpleMatch] [-CaseSensitive] [-Quiet] - [-List] [-Include ] [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] - [-Context ] [] +Select-String -InputObject [-Pattern] [-SimpleMatch] + [-CaseSensitive] [-Quiet] [-List] [-Include ] [-Exclude ] [-NotMatch] + [-AllMatches] [-Encoding ] [-Context ] [] ``` ### LiteralFile ``` -Select-String [-Pattern] -LiteralPath [-SimpleMatch] [-CaseSensitive] [-Quiet] - [-List] [-Include ] [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] - [-Context ] [] +Select-String [-Pattern] -LiteralPath [-SimpleMatch] + [-CaseSensitive] [-Quiet] [-List] [-Include ] [-Exclude ] [-NotMatch] + [-AllMatches] [-Encoding ] [-Context ] [] ``` ## DESCRIPTION @@ -190,7 +190,8 @@ matches in `$_.Message`. `Select-String` displays the output in the PowerShell c This example searches a directory and all of its subdirectories for a specific text string. ```powershell -Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse | Select-String -Pattern 'Microsoft' -CaseSensitive +Get-ChildItem -Path C:\Windows\System32\*.txt -Recurse | + Select-String -Pattern 'Microsoft' -CaseSensitive ``` `Get-ChildItem` uses the **Path** parameter to specify **C:\Windows\System32\*.txt**. The diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md b/reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md index 64465a747d0c..781840c4b6f7 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md @@ -17,25 +17,29 @@ Finds text in an XML string or document. ### Xml (Default) ``` -Select-Xml [-XPath] [-Xml] [-Namespace ] [] +Select-Xml [-XPath] [-Xml] [-Namespace ] + [] ``` ### Path ``` -Select-Xml [-XPath] [-Path] [-Namespace ] [] +Select-Xml [-XPath] [-Path] [-Namespace ] + [] ``` ### LiteralPath ``` -Select-Xml [-XPath] -LiteralPath [-Namespace ] [] +Select-Xml [-XPath] -LiteralPath [-Namespace ] + [] ``` ### Content ``` -Select-Xml [-XPath] -Content [-Namespace ] [] +Select-Xml [-XPath] -Content [-Namespace ] + [] ``` ## DESCRIPTION @@ -56,9 +60,9 @@ The first command saves the path to the `Types.ps1xml` file in the `$Path` varia The second command saves the XML path to the **AliasProperty** node in the `$XPath` variable. The `Select-Xml` cmdlet gets the **AliasProperty** nodes that are identified by -the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send the -**AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands the -**Node** object and returns its **Name** and **ReferencedMemberName** properties. +the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send +the **AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands +the **Node** object and returns its **Name** and **ReferencedMemberName** properties. ```powershell $Path = "$PSHOME\Types.ps1xml" @@ -169,7 +173,6 @@ about here-strings, see The third command is the same as the second, except that tt uses a pipeline operator (`|`) to send the XML in the `$Xml` variable to the `Select-Xml` cmdlet. - ```powershell $Xml = @" @@ -222,7 +225,7 @@ value of the **InnerXml** property of the node. $SnippetNamespace = @{snip = "http://schemas.microsoft.com/PowerShell/Snippets"} Select-Xml -Path $HOME\Documents\WindowsPowerShell\Snippets -Namespace $SnippetNamespace -XPath "//snip:Title" | - ForEach-Object {$_.Node.Innerxml} + ForEach-Object {$_.Node.InnerXml} ``` ## PARAMETERS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Send-MailMessage.md b/reference/5.1/Microsoft.PowerShell.Utility/Send-MailMessage.md index e18247507edc..9481c95aa6ba 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Send-MailMessage.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Send-MailMessage.md @@ -212,8 +212,8 @@ user. Type a user name, such as **User01** or **Domain01\User01**. Or, enter a **PSCredential** object, such as one from the `Get-Credential` cmdlet. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md index 5e888628f153..6febcbdf2403 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md @@ -20,8 +20,9 @@ Creates or changes an alias for a cmdlet or other command in the current PowerSh ### Default (Default) ``` -Set-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +Set-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Set-Date.md b/reference/5.1/Microsoft.PowerShell.Utility/Set-Date.md index 72f87aec04f6..576916331777 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Set-Date.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Set-Date.md @@ -18,13 +18,15 @@ Changes the system time on the computer to a time that you specify. ### Date (Default) ``` -Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ### Adjust ``` -Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md b/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md index 35c3b048f8b3..a2cd4de1b01a 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md @@ -19,14 +19,15 @@ Sets a breakpoint on a line, command, or variable. ### Line (Default) ``` -Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] [-Script] - [] +Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] + [-Script] [] ``` ### Command ``` -Set-PSBreakpoint [-Action ] -Command [[-Script] ] [] +Set-PSBreakpoint [-Action ] -Command + [[-Script] ] [] ``` ### Variable @@ -225,7 +226,8 @@ When the **Action** parameter is used, the Action scriptblock runs at each break does not stop unless the scriptblock includes the `break` keyword. If you use the `continue` keyword in the scriptblock, execution resumes until the next breakpoint. -For more information, see [about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), +For more information, see +[about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), [about_Break](../Microsoft.PowerShell.Core/About/about_Break.md), and [about_Continue](../Microsoft.PowerShell.Core/About/about_Continue.md). diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md b/reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md index 668fa7e697a4..78e7c5e37af0 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md @@ -18,8 +18,9 @@ Configures, starts, and stops a trace of PowerShell components. ### optionsSet (Default) ``` -Set-TraceSource [-Name] [[-Option] ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [-PassThru] [] +Set-TraceSource [-Name] [[-Option] ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [-PassThru] [] ``` ### removeAllListenersSet @@ -43,7 +44,7 @@ can use it to specify which components will be traced and where the tracing outp ### Example 1: Trace the ParameterBinding component -``` +```powershell Set-TraceSource -Name "ParameterBinding" -Option ExecutionFlow -PSHost -ListenerOption "ProcessId,TimeStamp" ``` @@ -297,7 +298,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md b/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md index ea1c5c2cac0d..7f8b9dec9c02 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md @@ -19,9 +19,10 @@ Sets the value of a variable. Creates the variable if one with the requested nam ## SYNTAX ``` -Set-Variable [-Name] [[-Value] ] [-Include ] [-Exclude ] - [-Description ] [-Option ] [-Force] [-Visibility ] - [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] +Set-Variable [-Name] [[-Value] ] [-Include ] + [-Exclude ] [-Description ] [-Option ] [-Force] + [-Visibility ] [-PassThru] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Show-Command.md b/reference/5.1/Microsoft.PowerShell.Utility/Show-Command.md index d8be16f1747a..f081e99e644d 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Show-Command.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Show-Command.md @@ -103,8 +103,10 @@ $PSDefaultParameterValues = @{ Now when you run a `Show-Command` command, the new defaults are applied automatically. To use these default values in every PowerShell session, add the `$PSDefaultParameterValues` variable to your -PowerShell profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) -and [about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). +PowerShell profile. For more information, see +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) +and +[about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). ### Example 5: Send output to a grid view @@ -303,7 +305,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md b/reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md index f7b50b68dc1d..577b49cc5f13 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md @@ -20,7 +20,8 @@ Saves command output in a file or variable and also sends it down the pipeline. ### File (Default) ``` -Tee-Object [-InputObject ] [-FilePath] [-Append] [] +Tee-Object [-InputObject ] [-FilePath] [-Append] + [] ``` ### LiteralFile @@ -227,7 +228,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md b/reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md index 352fe3adceec..7a6dd97a7b4a 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md @@ -20,17 +20,19 @@ Configures and starts a trace of the specified expression or command. ### expressionSet (Default) ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Expression] [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] - [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Expression] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ### commandSet ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Command] [-ArgumentList ] [-ListenerOption ] [-FilePath ] [-Force] - [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Command] [-ArgumentList ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md b/reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md index 965e6350b292..2e544a724a29 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md @@ -67,7 +67,7 @@ PS C:\> dir C:\Downloads\*PowerShell* | Unblock-File This command shows how to find and unblock PowerShell scripts. -The first command uses the **Stream** parameter of the *Get-Item* cmdlet get files with the +The first command uses the **Stream** parameter of the `Get-Item` cmdlet to get files with the **Zone.Identifier** stream. The second command shows what happens when you run a blocked script in a PowerShell session in which diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Unregister-Event.md b/reference/5.1/Microsoft.PowerShell.Utility/Unregister-Event.md index b89683980913..75c243b235b6 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Unregister-Event.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Unregister-Event.md @@ -18,13 +18,15 @@ Cancels an event subscription. ### BySource (Default) ``` -Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ById ``` -Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md b/reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md index 574ced6b7afc..9dc866806825 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md @@ -16,8 +16,8 @@ Updates the formatting data in the current session. ## SYNTAX ``` -Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] [-Confirm] - [] +Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -36,7 +36,8 @@ installation directory (`$PSHOME`) into the session. You can use `Update-FormatD formatting data into the current session without restarting PowerShell. This is useful when you have added or changed a formatting file, but do not want to interrupt the session. -For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). +For more information about formatting files in PowerShell, see +[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). ## EXAMPLES @@ -57,8 +58,8 @@ Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xml This command reloads the formatting files into the session, including two new files, `Trace.format.ps1xml` and `Log.format.ps1xml`. -Because the command uses the **AppendPath** parameter, the formatting data in the new files is loaded -after the formatting data from the built-in files. +Because the command uses the **AppendPath** parameter, the formatting data in the new files is +loaded after the formatting data from the built-in files. The **AppendPath** parameter is used because the new files contain formatting data for objects that are not referenced in the built-in files. @@ -93,9 +94,9 @@ without using parameters. Specifies formatting files that this cmdlet adds to the session. The files are loaded after PowerShell loads the built-in formatting files. -When formatting .NET objects,Windows PowerShell uses the first formatting definition that it finds -for each .NET type. If you use the **AppendPath** parameter, Windows PowerShell searches the data -from the built-in files before it encounters the formatting data that you are adding. +When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each +.NET type. If you use the **AppendPath** parameter, PowerShell searches the data from the built-in +files before it encounters the formatting data that you are adding. Use this parameter to add a file that formats a .NET object that is not referenced in the built-in formatting files. @@ -117,9 +118,9 @@ Accept wildcard characters: False Specifies formatting files that this cmdlet adds to the session. The files are loaded before PowerShell loads the built-in formatting files. -When formatting .NET objects, Windows PowerShell uses the first formatting definition that it finds -for each .NET type. If you use the **PrependPath** parameter, Windows PowerShell searches the data -from the files that you are adding before it encounters the formatting data from the built-in files. +When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each +.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files +that you are adding before it encounters the formatting data from the built-in files. Use this parameter to add a file that formats a .NET object that is also referenced in the built-in formatting files. @@ -173,7 +174,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Update-List.md b/reference/5.1/Microsoft.PowerShell.Utility/Update-List.md index 54734a9c0f53..fb13752b88e1 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Update-List.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Update-List.md @@ -18,8 +18,8 @@ Adds items to and removes items from a property value that contains a collection ### AddRemoveSet (Default) ``` -Update-List [-Add ] [-Remove ] [-InputObject ] [[-Property] ] - [] +Update-List [-Add ] [-Remove ] [-InputObject ] + [[-Property] ] [] ``` ### ReplaceSet diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md b/reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md index 7fd4e1861de7..2488f651781f 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md @@ -607,8 +607,8 @@ Accept wildcard characters: False Specifies additional values for **AliasProperty**, **ScriptProperty**, **CodeProperty**, or **CodeMethod** members. -Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters to add -or change a property or method of a type. +Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters +to add or change a property or method of a type. When the value of the **MemberType** parameter is `AliasProperty`, the value of the **SecondValue** parameter must be a data type. PowerShell converts (that is, casts) the value of the alias property @@ -618,8 +618,8 @@ string value to an integer. When the value of the **MemberType** parameter is `ScriptProperty`, you can use the **SecondValue** parameter to specify an additional scriptblock. The scriptblock in the value of the **Value** -parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** parameter -set the value of the variable. +parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** +parameter sets the value of the variable. This parameter was introduced in Windows PowerShell 3.0. diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Wait-Event.md b/reference/5.1/Microsoft.PowerShell.Utility/Wait-Event.md index 5a779e121df2..507a21543bbb 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Wait-Event.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Wait-Event.md @@ -43,7 +43,7 @@ Wait-Event ### Example 2: Wait for an event with a specified source identifier -This example waits for the next event that is raised and that has a source identifier of ProcessStarted. +This example waits for the next event that has a source identifier of ProcessStarted. ```powershell Wait-Event -SourceIdentifier "ProcessStarted" @@ -51,7 +51,8 @@ Wait-Event -SourceIdentifier "ProcessStarted" ### Example 3: Wait for a timer elapsed event -This example uses the `Wait-Event` cmdlet to wait for a timer event on a timer that is set for 2000 milliseconds. +This example uses the `Wait-Event` cmdlet to wait for a timer event that's set for 2000 +milliseconds. ```powershell $Timer = New-Object Timers.Timer @@ -62,7 +63,7 @@ $objectEventArgs = @{ } Register-ObjectEvent @objectEventArgs $Timer.Interval = 2000 -$Timer.Autoreset = $false +$Timer.AutoReset = $false $Timer.Enabled = $true Wait-Event Timer.Elapsed ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md b/reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md index f06c332476c4..c6de99d7c7e9 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md @@ -36,9 +36,9 @@ Write-Error -Exception [-Message ] [-Category [-RecommendedAction ] [-CategoryActivity ] - [-CategoryReason ] [-CategoryTargetName ] [-CategoryTargetType ] - [] +Write-Error -ErrorRecord [-RecommendedAction ] + [-CategoryActivity ] [-CategoryReason ] [-CategoryTargetName ] + [-CategoryTargetType ] [] ``` ## DESCRIPTION @@ -150,7 +150,8 @@ for this parameter are: - QuotaExceeded - NotEnabled -For information about the error categories, see [ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). +For information about the error categories, see +[ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). ```yaml Type: System.Management.Automation.ErrorCategory diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md b/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md index d2f9f8fd17c2..07629e55ece6 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md @@ -11,14 +11,13 @@ title: Write-Host # Write-Host ## SYNOPSIS - Writes customized output to a host. ## SYNTAX ``` -Write-Host [[-Object] ] [-NoNewline] [-Separator ] [-ForegroundColor ] - [-BackgroundColor ] [] +Write-Host [[-Object] ] [-NoNewline] [-Separator ] + [-ForegroundColor ] [-BackgroundColor ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md b/reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md index 837e550e5543..2e0b09a01e34 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md @@ -138,8 +138,9 @@ Using the **InformationVariable** parameter, you can save information records to allows you to inspect the information stream messages later in the script. ```powershell -$psproc = Get-Process -Id $PID | Select-Object ProcessName, CPU, Path -Write-Information -MessageData $psproc -Tags 'PowerShell' -InformationVariable 'InfoMsg' +Get-Process -Id $PID | + Select-Object ProcessName, CPU, Path | + Write-Information -Tags 'PowerShell' -InformationVariable 'InfoMsg' $InfoMsg | Select-Object * ``` 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 6f3d71ba9ef1..acd30407f9b1 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 @@ -23,43 +23,44 @@ information. ## Detailed description -The **WSMan** provider for PowerShell lets you add, change, clear, and -delete WS-Management configuration data on local or remote computers. +The **WSMan** provider for PowerShell lets you add, change, clear, and delete +WS-Management configuration data on local or remote computers. -The **WSMan** provider exposes a PowerShell drive with a directory -structure that corresponds to a logical grouping of WS-Management configuration -settings. These groupings are known as containers. +The **WSMan** provider exposes a PowerShell drive with a directory structure +that corresponds to a logical grouping of WS-Management configuration settings. +These groupings are known as containers. -Beginning in Windows PowerShell 3.0, the **WSMan** provider has been -updated to support new properties for session configurations, such as +Beginning in Windows PowerShell 3.0, the **WSMan** provider has been updated to +support new properties for session configurations, such as **OutputBufferingMode**. The session configurations appear as items in the Plugin directory of the `WSMan:` drive and the properties appear as items in each session configuration. -The **WSMan** provider supports the following cmdlets, which are covered -in this article. +The **WSMan** provider supports the following cmdlets, which are covered in +this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) +- [Get-Location][05] +- [Set-Location][08] +- [Get-Item][04] +- [Get-ChildItem][03] +- [New-Item][06] +- [Remove-Item][07] > [!NOTE] > You can use commands in the `WSMan:` drive to change the values of the new -> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 -> to change properties that are introduced in Windows PowerShell 3.0. -> Although no error is generated, the commands are not effective To change these -> settings, use the **WSMan** drive in Windows PowerShell 3.0. +> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 to +> change properties that are introduced in Windows PowerShell 3.0. Although no +> error is generated, the commands are not effective To change these settings, +> use the **WSMan** drive in Windows PowerShell 3.0. ### Organization of the WSMan: Drive -- **Client**: You can configure various aspects of the WS-Management client. The - configuration information is stored in the registry. +- **Client**: You can configure various aspects of the WS-Management client. + The configuration information is stored in the registry. - **Service**: You can configure various aspects of the WS-Management service. The configuration information is stored in the registry. + > [!NOTE] > Service configuration is sometimes referred to as Server configuration. @@ -73,14 +74,16 @@ in this article. - **Plugin**: Plug-ins are loaded and used by the WS-Management service to provide various functions. By default, PowerShell provides three plug-ins: + - The Event Forwarding plug-in. - The Microsoft.PowerShell plug-in. - The Windows Management Instrumentation (WMI) Provider plug-in. + These three plug-ins support event forwarding, configuration, and WMI access. -- **ClientCertificate**: You can create and configure a client certificate. - A client certificate is used when the WS-Management client is configured to - use certificate authentication. +- **ClientCertificate**: You can create and configure a client certificate. A + client certificate is used when the WS-Management client is configured to use + certificate authentication. ### Directory Hierarchy of the WSMan Provider @@ -89,32 +92,33 @@ follows. ``` WSMan:\localhost ---- Client ---- Service ---- Shell ---- Listener ------- ---- Plugin ------- Event Forwarding Plugin ---------- InitializationParameters ---------- Resources ------------- Security ------- Microsoft.PowerShell ---------- InitializationParameters ---------- Resources ------------- Security ------- WMI Provider ---------- InitializationParameters ---------- Resources ------------- Security ---- ClientCertificate + \Client + \Service + \Shell + \Listener + \ + \Plugin + \Event Forwarding Plugin + \InitializationParameters + \Resources + \Security + \Microsoft.PowerShell + \InitializationParameters + \Resources + \Security + \WMI Provider + \InitializationParameters + \Resources + \Security + \ClientCertificate ``` The directory hierarchy of the WSMan provider for a remote computer is the same as a local computer. However, in order to access the configuration settings of a remote computer, you need to make a connection to the remote computer using -[Connect-WSMan](xref:Microsoft.WSMan.Management.Connect-WSMan). Once a connection is made to a remote -computer, the name of the remote computer shows up in the provider. +[Connect-WSMan][09]. Once a +connection is made to a remote computer, the name of the remote computer shows +up in the provider. ``` WSMan:\ @@ -137,9 +141,9 @@ Set-Location C: ### Navigating to a remote system store location -This command uses the `Set-Location` command to change the current location -to the root location in the remote system store location. Use a backslash `\` -or forward slash `/` to indicate a level of the `WSMan:` drive. +This command uses the `Set-Location` command to change the current location to +the root location in the remote system store location. Use a backslash `\` or +forward slash `/` to indicate a level of the `WSMan:` drive. ```powershell Set-Location -Path WSMan:\SERVER01 @@ -151,8 +155,8 @@ 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 -in the Localhost store location. +This command uses the `Get-ChildItem` cmdlet to display the WS-Management +stores in the Localhost store location. ```powershell Get-ChildItem -Path WSMan:\Localhost @@ -174,8 +178,8 @@ Get-ChildItem -Path WSMan:\SERVER01 ## 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 -accept all hosts with the suffix "contoso.com". +`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. @@ -183,8 +187,8 @@ PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that -appends a value instead of changing it. The following example will append a -new value "*.domain2.com" to the old value stored in `TrustedHost:` +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 @@ -194,11 +198,10 @@ Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ### 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 -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. +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 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 @@ -209,66 +212,80 @@ New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force This command creates (registers) a plug-in for the WS-Management service. ```powershell -New-Item -Path WSMan:\localhost\Plugin ` - -Plugin TestPlugin ` - -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` - -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` - -SDKVersion 1 ` - -Capability "Get","Put","Invoke","Enumerate" ` - -XMLRenderingType text +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin' + Plugin = 'TestPlugin' + FileName = "$Env:SystemRoot\system32\WsmWmiPl.dll" + Resource = 'http://schemas.dmtf.org/wbem/wscim/2/cim-schema' + SDKVersion = 1 + Capability = 'Get', 'Put', 'Invoke', 'Enumerate' + XMLRenderingType = 'text' +} +New-Item @newItemSplat ``` ### Creating a new resource entry -This command creates a resource entry in the Resources directory of -a TestPlugin. This command assumes that a TestPlugin has been created using -a separate command. +This command creates a resource entry in the `Resources` directory of a +`TestPlugin`. This command assumes that a `TestPlugin` has been created using a +separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\Resources ` - -ResourceUri http://schemas.dmtf.org/wbem/wscim/3/cim-schema ` - -Capability "Enumerate" - +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\Resources' + ResourceUri = 'http://schemas.dmtf.org/wbem/wscim/3/cim-schema' + Capability = "Enumerate" +} +New-Item @newItemSplat ``` ### Creating a new security entry for a resource This command creates a security entry in the Security directory of -Resource_5967683 (a specific resource). This command assumes that the resource -entry has been created using a separate command. +`Resource_5967683` (a specific resource). This command assumes that the +resource entry has been created using a separate command. ```powershell $path = "WSMan:\localhost\Plugin\TestPlugin\Resources\Resource_5967683" -New-Item -Path $path\Security ` - -Sddl "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +$newItemSplat = @{ + Path = "$path\Security" + Sddl = "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +} +New-Item @newItemSplat ``` ### Creating a new Client Certificate This command creates **ClientCertificate** entry that can be used by the WS-Management client. The new **ClientCertificate** will show up under the -**ClientCertificate** directory as "ClientCertificate_1234567890". All of the +**ClientCertificate** directory as `ClientCertificate_1234567890`. All of the parameters are mandatory. The **Issuer** needs to be thumbprint of the issuers certificate. ```powershell $cred = Get-Credential -New-Item -Path WSMan:\localhost\ClientCertificate ` - -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -Uri wmicimv2/* ` - -Credential $cred; +$newItemSplat = @{ + Path = 'WSMan:\localhost\ClientCertificate' + Issuer = '1b3fd224d66c6413fe20d21e38b304226d192dfe' + URI = 'wmicimv2/*' + Credential = $cred +} +New-Item @newItemSplat ``` ### Creating a new Initialization Parameter -This command creates an Initialization parameter named "testparametername" -in the "InitializationParameters" directory. This command assumes that the -"TestPlugin" has been created using a separate command. +This command creates an Initialization parameter named `testparametername` +in the `InitializationParameters` directory. This command assumes that the +`TestPlugin` has been created using a separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters ` - -ParamName testparametername ` - -ParamValue testparametervalue +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\InitializationParameters' + ParamName = 'testparametername' + ParamValue = 'testparametervalue' +} +New-Item @newItemSplat ``` ## Dynamic parameters @@ -294,11 +311,11 @@ of the following: #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Capability \ -When working with *Plug-ins* this parameter specifies an operation that is +When working with _Plug-ins_ this parameter specifies an operation that is supported on this Uniform Resource Identifier (URI). You have to create one entry for each type of operation that the URI supports. You can specify any valid attributes for a given operation, if the operation supports it. @@ -310,74 +327,87 @@ These attributes include **SupportsFiltering** and **SupportsFragment**. supports the concept. - The **SupportFiltering** attribute is NOT valid for Create operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Delete**: Delete operations are supported on the URI. - The **SupportFragment** attribute is used if the Delete operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Delete operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Enumerate**: Enumerate operations are supported on the URI. - The **SupportFragment** attribute is NOT supported for Enumerate operations and should be set to False. - The **SupportFiltering** attribute is valid, and if the plug-in supports filtering, this attribute should be set to "True". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Get**: Get operations are supported on the URI. - The **SupportFragment** attribute is used if the Get operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Get operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Invoke**: Invoke operations are supported on the URI. - The **SupportFragment** attribute is not supported for Invoke operations and should be set to False. - The **SupportFiltering** attribute is not valid and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Put**: Put operations are supported on the URI. - The **SupportFragment** attribute is used if the Put operation supports the concept. - The **SupportFiltering** attribute is not valid for Put operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Subscribe**: Subscribe operations are supported on the URI. - The **SupportFragment** attribute is not supported for Subscribe operations and should be set to False. - - The **SupportFiltering** attribute is not valid for Subscribe operations and - should be set to "False". + - The **SupportFiltering** attribute is not valid for Subscribe operations + and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Shell**: Shell operations are supported on the URI. - The **SupportFragment** attribute is not supported for Shell operations and should be set to "False". - The **SupportFiltering** attribute is not valid for Shell operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if ANY other operation is also - > supported. - > [!NOTE] - > If a Shell operation is configured for a URI, Get, Put, Create, Delete, - > Invoke, and Enumerate operations are processed internally within the - > WS-Management (WinRM) service to manage shells. As a result, the plug-in - > cannot handle the operations. + > supported. If a Shell operation is configured for a URI, Get, Put, Create, + > Delete, Invoke, and Enumerate operations are processed internally within + > the WS-Management (WinRM) service to manage shells. As a result, the + > plug-in cannot handle the operations. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### CertificateThumbprint \ @@ -388,12 +418,12 @@ Thumbprint field of the certificate. It specifies the digital public key certificate (X509) of a user account that has permission to perform this action. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts, and they do not work with domain -accounts. To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` -cmdlets in the PowerShell `Cert:` drive. +accounts. To get a certificate thumbprint, use the `Get-Item` or +`Get-ChildItem` cmdlets in the PowerShell `Cert:` drive. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Enabled \ @@ -401,7 +431,7 @@ Specifies whether the listener is enabled or disabled. The default is True. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### FileName (Plugin) \ @@ -413,7 +443,7 @@ cannot be blank and must point to a valid plug-in. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### HostName \ @@ -425,7 +455,7 @@ string, or a wildcard character. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Issuer \ @@ -433,7 +463,7 @@ Specifies the name of the certification authority that issued the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Plugin \<\> WS-Management plug-ins are native dynamic link libraries (DLLs) @@ -447,7 +477,7 @@ requests are routed to these plug-in entry points to perform operations. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Port \ @@ -456,7 +486,7 @@ value from 1 through 65535. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -476,7 +506,7 @@ For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -491,7 +521,7 @@ A URI consists of a prefix and a path to a resource. For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### SDKVersion \ @@ -500,7 +530,7 @@ Specifies the version of the WS-Management plug-in SDK. The only valid value is #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Subject \ @@ -508,7 +538,7 @@ Specifies the entity that is identified by the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Transport \ @@ -519,7 +549,7 @@ Note: The Transport value is set when creating a Listener. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URI \ @@ -528,7 +558,7 @@ Sddl parameter. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URLPrefix \ @@ -541,7 +571,7 @@ in the destination address. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Value \ @@ -550,7 +580,7 @@ value that is used to specify configuration options. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### XMLRenderingType \ @@ -565,7 +595,7 @@ Specifies the format in which XML is passed to plug-ins through the #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ## Using the pipeline @@ -580,10 +610,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file -system drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file -system drive. +[Get-Help][02] command in a file system drive or use the `-Path` parameter of +[Get-Help][02] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -595,4 +623,15 @@ Get-Help Get-ChildItem -Path WSMan: ## See also -- [about_Providers](../../Microsoft.PowerShell.Core/About/about_Providers.md) +- [about_Providers][01] + + +[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md +[02]: xref:Microsoft.PowerShell.Core.Get-Help +[03]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[04]: xref:Microsoft.PowerShell.Management.Get-Item +[05]: xref:Microsoft.PowerShell.Management.Get-Location +[06]: xref:Microsoft.PowerShell.Management.New-Item +[07]: xref:Microsoft.PowerShell.Management.Remove-Item +[08]: xref:Microsoft.PowerShell.Management.Set-Location +[09]: xref:Microsoft.WSMan.Management.Connect-WSMan diff --git a/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md index ca62ce26fe3e..fd05c05e87f9 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md @@ -18,17 +18,19 @@ Connects to the WinRM service on a remote computer. ### ComputerName (Default) ``` -Connect-WSMan [-ApplicationName ] [[-ComputerName] ] [-OptionSet ] - [-Port ] [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Connect-WSMan [-ApplicationName ] [[-ComputerName] ] + [-OptionSet ] [-Port ] [-SessionOption ] [-UseSSL] + [-Credential ] [-Authentication ] + [-CertificateThumbprint ] [] ``` ### URI ``` Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] - [-SessionOption ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-SessionOption ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md index ca1aa2dc2a17..36581e2e08b4 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -85,7 +85,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md b/reference/5.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md index 2e58689a3a2c..656931c78350 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md +++ b/reference/5.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md @@ -18,7 +18,8 @@ Enables Credential Security Support Provider (CredSSP) authentication on a compu ### All ``` -Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] [] +Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] + [] ``` ## DESCRIPTION @@ -215,7 +216,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md index 96f3a6c1a006..6446fb278169 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -18,19 +18,22 @@ Displays management information for a resource instance specified by a Resource ### GetInstance (Default) ``` -Get-WSManInstance [-ApplicationName ] [-ComputerName ] [-ConnectionURI ] [-Dialect ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet ] +Get-WSManInstance [-ApplicationName ] [-ComputerName ] + [-ConnectionURI ] [-Dialect ] [-Fragment ] [-OptionSet ] + [-Port ] [-ResourceURI] [-SelectorSet ] [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### Enumerate ``` -Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] [-ComputerName ] - [-ConnectionURI ] [-Dialect ] [-Enumerate] [-Filter ] [-OptionSet ] - [-Port ] [-Associations] [-ResourceURI] [-ReturnType ] [-SessionOption ] - [-Shallow] [-UseSSL] [-Credential ] [-Authentication ] +Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] + [-ComputerName ] [-ConnectionURI ] [-Dialect ] [-Enumerate] + [-Filter ] [-OptionSet ] [-Port ] [-Associations] + [-ResourceURI] [-ReturnType ] [-SessionOption ] [-Shallow] + [-UseSSL] [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -575,7 +578,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md index 4ddcda57327c..5cf385e2139e 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -18,19 +18,22 @@ Invokes an action on the object that is specified by the Resource URI and by the ### URI (Default) ``` -Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] [-OptionSet ] - [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] [-ResourceURI] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] + [-OptionSet ] [[-SelectorSet] ] [-SessionOption ] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### ComputerName ``` -Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [[-SelectorSet] ] [-SessionOption ] - [-UseSSL] [-ValueSet ] [-ResourceURI] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] + [[-SelectorSet] ] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION @@ -45,7 +48,13 @@ 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 +$params = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name = 'spooler'} + Authentication = 'Default' +} +Invoke-WSManAction @params ``` ```Output @@ -86,7 +95,12 @@ 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:\"} +$invokeWSManActionSplat = @{ + Action = 'Create' + ResourceURI = 'wmicimv2/Win32_Process' + ValueSet = @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -105,7 +119,14 @@ 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 +$invokeWSManActionSplat = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name="spooler"} + ComputerName = 'server01' + Authentication = 'Default' +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -116,7 +137,7 @@ lang : en-US ReturnValue : 0 ``` -This command calls the StartService method of the **Win32_Service** WMI class instance that +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. @@ -216,7 +237,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows PowerShell Cert: drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows +PowerShell Cert: drive. ```yaml Type: System.String @@ -299,7 +321,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: @@ -470,7 +501,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md index e9c75102a7a5..b9ffba9e28f0 100644 --- a/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md @@ -18,18 +18,21 @@ Creates a new instance of a management resource. ### ComputerName (Default) ``` -New-WSManInstance [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] - [-SessionOption ] [-UseSSL] [-ValueSet ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +New-WSManInstance [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] [-ResourceURI] + [-SelectorSet] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI ``` -New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] [-ResourceURI] - [-SelectorSet] [-SessionOption ] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] + [-ResourceURI] [-SelectorSet] [-SessionOption ] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -126,8 +129,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell Cert: -drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell +Cert: drive. ```yaml Type: System.String @@ -211,7 +214,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmi/cimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + File = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: @@ -345,9 +357,9 @@ Specifies that the Secure Sockets Layer (SSL) protocol should be used to establi the remote computer. By default, SSL is not used. WS-Management encrypts all the Windows PowerShell content that is transmitted over the network. The -**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is not -available on the port that is used for the connection and you specify this parameter, the command -fails. +**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is +not available on the port that is used for the connection and you specify this parameter, the +command fails. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md index 29a4c3dd7486..bb90ba50d82e 100644 --- a/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -16,8 +16,9 @@ Creates session option hash table to use as input parameters for WS-Management c ## SYNTAX ``` -New-WSManSessionOption [-ProxyAccessType ] [-ProxyAuthentication ] - [-ProxyCredential ] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] +New-WSManSessionOption [-ProxyAccessType ] + [-ProxyAuthentication ] [-ProxyCredential ] + [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] [-OperationTimeout ] [-NoEncryption] [-UseUTF16] [] ``` @@ -263,7 +264,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/Remove-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/Remove-WSManInstance.md index 233ce45dc494..c0aa6f4ee784 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Remove-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/Remove-WSManInstance.md @@ -18,10 +18,11 @@ Deletes a management resource instance. ### ComputerName (Default) ``` -Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-OptionSet ] - [-Port ] [-ResourceURI] [-SelectorSet] [-SessionOption ] - [-UseSSL] [-Credential ] [-Authentication ] - [-CertificateThumbprint ] [] +Remove-WSManInstance [-ApplicationName ] [-ComputerName ] + [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] + [-SessionOption ] [-UseSSL] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI @@ -29,7 +30,8 @@ Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-Opti ``` Remove-WSManInstance [-ConnectionURI ] [-OptionSet ] [-ResourceURI] [-SelectorSet] [-SessionOption ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md index 8f36502a8013..722218fe5616 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -18,19 +18,21 @@ Modifies the management information that is related to a resource. ### ComputerName (Default) ``` -Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] [-FilePath ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] - [[-SelectorSet] ] [-SessionOption ] [-UseSSL] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] + [-FilePath ] [-Fragment ] [-OptionSet ] [-Port ] + [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] + [-UseSSL] [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### URI ``` -Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] [-Fragment ] - [-OptionSet ] [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] - [-ValueSet ] [-Credential ] [-Authentication ] +Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] + [-Fragment ] [-OptionSet ] [-ResourceURI] + [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] + [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -45,7 +47,12 @@ This cmdlet uses the WinRM connection/transport layer to modify the information. ### Example 1: Disable a listener on the local computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -105,7 +112,13 @@ This succeeds: `-ValueSet @{MaxEnvelopeSizekb ="200"}` ### Example 3: Disable a listener on a remote computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -ComputerName SERVER02 -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + ComputerName = 'SERVER02' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -133,6 +146,29 @@ This fails: `-ValueSet @{enabled="False"}` This succeeds: `-ValueSet @{Enabled="False"}` +### Example 4: Manage a resource using an input file + +The following command uses the **FilePath** parameter to update a management resource. Specify the +management resource using the **ResourceURI** and **SelectorSet** parameters. + +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` + +This command calls the **StopService** method on the Spooler service using input from a file. The +`input.xml` file contains the following content: + +```xml + +``` + ## PARAMETERS ### -ApplicationName @@ -313,16 +349,8 @@ Accept wildcard characters: False ### -FilePath -Specifies the path of a file that is used to update a management resource. You specify the -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` - -This command calls the **StopService** method on the Spooler service by using input from a file. -The file, `Input.xml`, contains the following content: - -`` +Specifies the path of a file used to update a management resource. For more information, see +[Example 4](#example-4-manage-a-resource-using-an-input-file). ```yaml Type: System.String diff --git a/reference/5.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md b/reference/5.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md index 4958f1ab5284..03e2a6778df5 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md +++ b/reference/5.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md @@ -134,7 +134,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md b/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md index 222a2a0c97c0..ab22a9961d72 100644 --- a/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md @@ -15,9 +15,9 @@ Tests whether the WinRM service is running on a local or remote computer. ## SYNTAX ``` -Test-WSMan [[-ComputerName] ] [-Authentication ] [-Port ] [-UseSSL] - [-ApplicationName ] [-Credential ] [-CertificateThumbprint ] - [] +Test-WSMan [[-ComputerName] ] [-Authentication ] + [-Port ] [-UseSSL] [-ApplicationName ] [-Credential ] + [-CertificateThumbprint ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/PSDiagnostics/Start-Trace.md b/reference/5.1/PSDiagnostics/Start-Trace.md index 187129020ab5..cbc0e0af0d1a 100644 --- a/reference/5.1/PSDiagnostics/Start-Trace.md +++ b/reference/5.1/PSDiagnostics/Start-Trace.md @@ -16,9 +16,10 @@ Start an Event Trace logging session. ## SYNTAX ``` -Start-Trace [-SessionName] [[-OutputFilePath] ] [[-ProviderFilePath] ] - [-ETS] [-Format ] [-MinBuffers ] [-MaxBuffers ] - [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] [] +Start-Trace [-SessionName] [[-OutputFilePath] ] + [[-ProviderFilePath] ] [-ETS] [-Format ] [-MinBuffers ] + [-MaxBuffers ] [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine.md b/reference/5.1/PSReadLine/About/about_PSReadLine.md index ac79d771ca52..cf0163e7ba0b 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine.md @@ -65,8 +65,8 @@ Install-Module -Name PSReadLine -AllowClobber -Force Predictive IntelliSense is an addition to the concept of tab completion that assists the user in successfully completing commands. It enables users to -discover, edit, and execute full commands based on matching predictions from the -user's history and additional domain specific plugins. +discover, edit, and execute full commands based on matching predictions from +the user's history and additional domain specific plugins. ### Enable Predictive IntelliSense diff --git a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md index bf5e0d0c53b7..8ba7cf1ad32a 100644 --- a/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md @@ -22,8 +22,8 @@ PowerShell 5.1 ships with PSReadLine 2.0.0. The current version is PSReadLine PowerShell 5.1 and newer. For some features, you need to be running PowerShell 7.2 or higher. -This article documents the functions provided by PSReadLine 2.0.0. These functions -can be bound to keystrokes for easy access and invocation. +This article documents the functions provided by PSReadLine 2.0.0. These +functions can be bound to keystrokes for easy access and invocation. ## Using the Microsoft.PowerShell.PSConsoleReadLine class @@ -627,11 +627,11 @@ of characters. - Vi command mode: `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ### BeginningOfLine @@ -673,11 +673,11 @@ characters. - Emacs mode: ``, `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ### GotoBrace @@ -721,11 +721,11 @@ defined by a configurable set of characters. - Vi command mode: `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ### NextWordEnd @@ -736,11 +736,11 @@ characters. - Vi command mode: `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ### PreviousLine @@ -778,11 +778,11 @@ set of characters. - Vi command mode: `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ### ViEndOfGlob @@ -817,11 +817,11 @@ defined by a configurable set of characters. - Vi command mode: `` The characters that define word boundaries are configured in the -[WordDelimiters](/dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters) +[WordDelimiters][01] property of the **PSConsoleReadLineOptions** object. To view or change the **WordDelimiters** property, see -[Get-PSReadLineOption](xref:PSReadLine.Get-PSReadLineOption) and -[Set-PSReadLineOption](xref:PSReadLine.Set-PSReadLineOption). +[Get-PSReadLineOption][03] and +[Set-PSReadLineOption][04]. ## History functions @@ -1396,4 +1396,10 @@ Behavior of the OnIdle event ## See also -- [about_PSReadLine](about_PSReadLine.md) +- [about_PSReadLine][02] + + +[01]: xref:Microsoft.PowerShell.PSConsoleReadLineOptions.WordDelimiters%2A#microsoft-powershell-psconsolereadlineoptions-worddelimiters +[02]: about_PSReadLine.md +[03]: xref:PSReadLine.Get-PSReadLineOption +[04]: xref:PSReadLine.Set-PSReadLineOption diff --git a/reference/5.1/PSReadLine/Get-PSReadLineKeyHandler.md b/reference/5.1/PSReadLine/Get-PSReadLineKeyHandler.md index 4a7b9abe7f92..31de03488809 100644 --- a/reference/5.1/PSReadLine/Get-PSReadLineKeyHandler.md +++ b/reference/5.1/PSReadLine/Get-PSReadLineKeyHandler.md @@ -139,7 +139,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/PSReadLine/Set-PSReadLineOption.md b/reference/5.1/PSReadLine/Set-PSReadLineOption.md index db866bab0354..5eeeba48660d 100644 --- a/reference/5.1/PSReadLine/Set-PSReadLineOption.md +++ b/reference/5.1/PSReadLine/Set-PSReadLineOption.md @@ -17,15 +17,16 @@ Customizes the behavior of command line editing in **PSReadLine**. ## SYNTAX ``` -Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] [-HistoryNoDuplicates] - [-AddToHistoryHandler ] - [-CommandValidationHandler ] - [-HistorySearchCursorMovesToEnd] [-MaximumHistoryCount ] [-MaximumKillRingCount ] - [-ShowToolTips] [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] - [-BellStyle ] [-CompletionQueryItems ] [-WordDelimiters ] - [-HistorySearchCaseSensitive] [-HistorySaveStyle ] [-HistorySavePath ] - [-AnsiEscapeTimeout ] [-PromptText ] [-ViModeIndicator ] - [-ViModeChangeHandler ] [-Colors ] [] +Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] + [-HistoryNoDuplicates] [-AddToHistoryHandler ] + [-CommandValidationHandler ] [-HistorySearchCursorMovesToEnd] + [-MaximumHistoryCount ] [-MaximumKillRingCount ] [-ShowToolTips] + [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] + [-BellStyle ] [-CompletionQueryItems ] [-WordDelimiters ] + [-HistorySearchCaseSensitive] [-HistorySaveStyle ] + [-HistorySavePath ] [-AnsiEscapeTimeout ] [-PromptText ] + [-ViModeIndicator ] [-ViModeChangeHandler ] + [-Colors ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md index 7eeff39ec281..43a530105ba8 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -17,8 +17,9 @@ for the operating system. ## SYNTAX ``` -Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] [-BaseDirectory ] - [-FileName ] [-SupportedCommand ] [] +Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] + [-BaseDirectory ] [-FileName ] [-SupportedCommand ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-PSSession.md index 26d20db467e6..9084f3ab77fe 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -17,10 +17,11 @@ Imports commands from another session into the current session. ## SYNTAX ``` -Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] [-AllowClobber] - [-ArgumentList ] [-CommandType ] [-Module ] - [-FullyQualifiedModule ] [[-FormatTypeName] ] - [-Certificate ] [-Session] [] +Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] + [-AllowClobber] [-ArgumentList ] [-CommandType ] + [-Module ] [-FullyQualifiedModule ] + [[-FormatTypeName] ] [-Certificate ] [-Session] + [] ``` ## DESCRIPTION @@ -281,8 +282,8 @@ Function Start-BitsTransfer Function Suspend-BitsTransfer ``` -This command shows how to use the **Module** parameter of `Get-Command` to find out which commands were -imported into the session by an `Import-PSSession` command. +This command shows how to use the **Module** parameter of `Get-Command` to find out which commands +were imported into the session by an `Import-PSSession` command. The first command uses the `Import-PSSession` cmdlet to import commands whose names include "bits" from the PSSession in the `$S` variable. The `Import-PSSession` command returns a temporary module, @@ -528,7 +529,8 @@ and module names. Wildcards are not permitted. `Import-PSSession` cannot import providers from a snap-in. -For more information, see [about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) +For more information, see +[about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) and [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ```yaml diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index cd1f42c158e9..1b7366e53ef7 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -21,75 +21,85 @@ Sends an HTTP or HTTPS request to a RESTful web service. ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] - [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] - [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` @@ -935,7 +945,7 @@ is to have the results written to the file and to the pipeline. > [!NOTE] > When you use the **PassThru** parameter, the output is written to the pipeline but the file isn't -> created. This is fixed in PowerShell 7.5-preview.4. For more information, see +> created. This is fixed in PowerShell 7.5. For more information, see > [PowerShell Issue #15409](https://github.com/PowerShell/PowerShell/issues/15409). ```yaml diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index 3abd2ef19a1d..9c6fc8b69975 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -21,67 +21,77 @@ Gets content from a web page on the internet. ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] - [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] - [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` @@ -1421,7 +1431,14 @@ properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuser as Chrome, Firefox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer: -`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)` + +```powershell +$params = @{ + Uri = 'https://website.com/' + UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer +} +Invoke-WebRequest @params +``` ```yaml Type: System.String diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Join-String.md b/reference/7.4/Microsoft.PowerShell.Utility/Join-String.md index 7e18ac3fd1fa..d84f17b2e170 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Join-String.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Join-String.md @@ -17,32 +17,33 @@ Combines objects from the pipeline into a single string. ### Default (Default) ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-UseCulture] [-InputObject ] [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-UseCulture] + [-InputObject ] [] ``` ### SingleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-SingleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-SingleQuote] [-UseCulture] + [-InputObject ] [] ``` ### DoubleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-DoubleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-DoubleQuote] [-UseCulture] + [-InputObject ] [] ``` ### Format ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-FormatString ] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-FormatString ] [-UseCulture] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/New-Alias.md index f4dbe6d25b12..b6007cbf2438 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-Alias.md @@ -18,8 +18,9 @@ Creates a new alias. ## SYNTAX ``` -New-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +New-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-Event.md b/reference/7.4/Microsoft.PowerShell.Utility/New-Event.md index 2fd249a703ac..e03a4adee111 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-Event.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-Event.md @@ -16,8 +16,8 @@ Creates a new event. ## SYNTAX ``` -New-Event [-SourceIdentifier] [[-Sender] ] [[-EventArguments] ] - [[-MessageData] ] [] +New-Event [-SourceIdentifier] [[-Sender] ] + [[-EventArguments] ] [[-MessageData] ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md index aac2e6cd114a..a78244eeb2f9 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-Object.md @@ -18,7 +18,8 @@ Creates an instance of a Microsoft .NET Framework or COM object. ### Net (Default) ``` -New-Object [-TypeName] [[-ArgumentList] ] [-Property ] [] +New-Object [-TypeName] [[-ArgumentList] ] [-Property ] + [] ``` ### Com @@ -92,8 +93,8 @@ At line:1 char:14 This example shows how to create and use a COM object to manage your Windows desktop. The first command uses the **ComObject** parameter of the `New-Object` cmdlet to create a COM object -with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. The -second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the +with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. +The second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the properties and methods of the COM object. Among the methods is the **ToggleDesktop** method. The third command calls the **ToggleDesktop** method of the object to minimize the open windows on your desktop. @@ -209,9 +210,16 @@ Specifies an array of arguments to pass to the constructor of the .NET Framework constructor takes a single parameter that is an array, you must wrap that parameter inside another array. For example: -`$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList (,$bytes)` +```powershell +$params = @{ + TypeName = 'System.Security.Cryptography.X509Certificates.X509Certificate' + ArgumentList = (,$bytes) +} +$cert = New-Object @params +``` -For more information about the behavior of **ArgumentList**, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). +For more information about the behavior of **ArgumentList**, see +[about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). The alias for **ArgumentList** is **Args**. @@ -306,7 +314,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-TemporaryFile.md b/reference/7.4/Microsoft.PowerShell.Utility/New-TemporaryFile.md index 0818bf6dc6a6..8071535e97a0 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-TemporaryFile.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-TemporaryFile.md @@ -47,8 +47,8 @@ order and uses the first path found: $TempFile = New-TemporaryFile ``` -This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file -in the `$TempFile` variable. You can use this file later in your script. +This command generates a `.tmp` file in your temporary folder, and then stores a reference to the +file in the `$TempFile` variable. You can use this file later in your script. ## PARAMETERS @@ -89,7 +89,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS @@ -102,4 +103,3 @@ This cmdlet returns a **FileInfo** object that represents the temporary file. ## NOTES ## RELATED LINKS - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/New-Variable.md b/reference/7.4/Microsoft.PowerShell.Utility/New-Variable.md index 0023e2608e68..f6d61ff60b0c 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/New-Variable.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/New-Variable.md @@ -18,9 +18,9 @@ Creates a new variable. ## SYNTAX ``` -New-Variable [-Name] [[-Value] ] [-Description ] [-Option ] - [-Visibility ] [-Force] [-PassThru] [-Scope ] [-WhatIf] [-Confirm] - [] +New-Variable [-Name] [[-Value] ] [-Description ] + [-Option ] [-Visibility ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -359,7 +359,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md b/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md index f92ee0057385..8dcdddc7b13a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Out-File.md @@ -19,14 +19,16 @@ Sends output to a file. ``` Out-File [-FilePath] [[-Encoding] ] [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` Out-File [[-Encoding] ] -LiteralPath [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Out-GridView.md b/reference/7.4/Microsoft.PowerShell.Utility/Out-GridView.md index c5bffdd8c67b..cdbd2fcc3826 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Out-GridView.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Out-GridView.md @@ -332,7 +332,7 @@ Deserialized output from remote commands might not be formatted correctly in the **To hide or show a column:** 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected +1. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected columns to the Available columns boxes. Only columns in the **Select Columns** box appear in the grid view window. @@ -341,7 +341,7 @@ Deserialized output from remote commands might not be formatted correctly in the You can drag and drop columns into the desired location. Or use the following steps: 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder +1. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder the columns. Columns at the top of the list appear to the left of columns at the bottom of the list in the grid view window. @@ -356,9 +356,10 @@ You can drag and drop columns into the desired location. Or use the following st - To select a row, select the row or use the up or down arrow to navigate to the row. - To select all rows (except for the header row), press CTRL+A. -- To select consecutive rows, press and hold the SHIFT key while clicking the rows or using the - arrow keys. -- To select nonconsecutive rows, press the CTRL key and click to add a row to the selection. +- To select consecutive rows, press and hold the SHIFT key while clicking the rows or + using the arrow keys. +- To select nonconsecutive rows, press the CTRL key and click to add a row to the + selection. - You cannot select columns, and you cannot select the entire column header row. **How to Copy Rows** @@ -414,11 +415,11 @@ The criteria only affects the display. It does not delete items from the table. 1. To display the **Add criteria** menu button, in the upper right corner of the window, click the Expand arrow. -2. Click the **Add Criteria** menu button. -3. Click to select columns (properties). You can select one or many properties. -4. When you are finished selecting properties, click the **Add** button. -5. To cancel the additions, click **Cancel**. -6. To add more criteria, click the **Add Criteria** button again. +1. Click the **Add Criteria** menu button. +1. Click to select columns (properties). You can select one or many properties. +1. When you are finished selecting properties, click the **Add** button. +1. To cancel the additions, click **Cancel**. +1. To add more criteria, click the **Add Criteria** button again. **How to Edit a Criterion** diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Register-ObjectEvent.md b/reference/7.4/Microsoft.PowerShell.Utility/Register-ObjectEvent.md index 8374797fc2dc..ac0a2af701a2 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Register-ObjectEvent.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Register-ObjectEvent.md @@ -15,9 +15,9 @@ Subscribes to the events that are generated by a Microsoft .NET Framework object ## SYNTAX ``` -Register-ObjectEvent [-InputObject] [-EventName] [[-SourceIdentifier] ] - [[-Action] ] [-MessageData ] [-SupportEvent] [-Forward] [-MaxTriggerCount ] - [] +Register-ObjectEvent [-InputObject] [-EventName] + [[-SourceIdentifier] ] [[-Action] ] [-MessageData ] + [-SupportEvent] [-Forward] [-MaxTriggerCount ] [] ``` ## DESCRIPTION @@ -29,13 +29,13 @@ When the subscribed event is raised, it is added to the event queue in your sess in the event queue, use the `Get-Event` cmdlet. You can use the parameters of `Register-ObjectEvent` to specify property values of the events that -can help you to identify the event in the queue. You can also use the **Action** parameter to specify -actions to take when a subscribed event is raised and the **Forward** parameter to send remote events -to the event queue in the local session. +can help you to identify the event in the queue. You can also use the **Action** parameter to +specify actions to take when a subscribed event is raised and the **Forward** parameter to send +remote events to the event queue in the local session. When you subscribe to an event, an event subscriber is added to your session. To get the event -subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the -`Unregister-Event` cmdlet, which deletes the event subscriber from the session. +subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use +the `Unregister-Event` cmdlet, which deletes the event subscriber from the session. ## EXAMPLES @@ -80,12 +80,13 @@ Id Name PSJobTypeName State HasMoreData Location Com 5 3db2d67a-efff-... NotStarted False New-Event @newEventArgs ``` -The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for event -actions. +The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for +event actions. The `Register-ObjectEvent` command returns a job object that represents the action, which runs as a background job. You can use the Job cmdlets, such as `Get-Job` and `Receive-Job`, to manage the -background job. For more information, see [about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). +background job. For more information, see +[about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). ### Example 3: Subscribe to object events on remote computers @@ -180,11 +181,12 @@ Information : {} 47 ``` -The **PSEventJob** has a **Module** property that contains a dynamic script module that implements the -action. Using the call operator (`&`), we invoke the command in the module to display the +The **PSEventJob** has a **Module** property that contains a dynamic script module that implements +the action. Using the call operator (`&`), we invoke the command in the module to display the value of the `$Random` variable. -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ## PARAMETERS @@ -346,7 +348,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md b/reference/7.4/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md index 597057b37673..67782487d140 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md @@ -26,7 +26,8 @@ Remove-PSBreakpoint [-Breakpoint] [-WhatIf] [-Confirm] [ [-Runspace ] [-WhatIf] [-Confirm] [] +Remove-PSBreakpoint [-Id] [-Runspace ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -161,6 +162,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -176,6 +178,7 @@ Accept wildcard characters: False ``` ### -WhatIf + Shows what would happen if the cmdlet runs. The cmdlet is not run. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Remove-TypeData.md b/reference/7.4/Microsoft.PowerShell.Utility/Remove-TypeData.md index 1742c08edf5a..31ce94c1e53f 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Remove-TypeData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Remove-TypeData.md @@ -108,7 +108,8 @@ current session. Remove-TypeData -Path "$PSHOME\Modules\PSScheduledJob", "$PSHOME\Modules\PSWorkflow\PSWorkflow.types.ps1xml" ``` -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ### Example 5: Remove extended types from a remote session diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Remove-Variable.md b/reference/7.4/Microsoft.PowerShell.Utility/Remove-Variable.md index e1885fbdd7b7..dc4084cd0cbb 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Remove-Variable.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Remove-Variable.md @@ -18,8 +18,8 @@ Deletes a variable and its value. ## SYNTAX ``` -Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-Scope ] - [-WhatIf] [-Confirm] [] +Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -120,7 +120,8 @@ Gets only the variables in the specified scope. The acceptable values for this p - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -170,7 +171,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Select-Object.md b/reference/7.4/Microsoft.PowerShell.Utility/Select-Object.md index 792b41527769..e4382c14e12a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Select-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Select-Object.md @@ -19,31 +19,31 @@ Selects objects or object properties. ### DefaultParameter (Default) ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Last ] [-First ] - [-Skip ] [-Wait] [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Last ] [-First ] [-Skip ] [-Wait] [] ``` ### SkipLastParameter ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Skip ] [-SkipLast ] - [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Skip ] [-SkipLast ] [] ``` ### IndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] [-Index ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] + [-Index ] [] ``` ### SkipIndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-SkipIndex ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] + [-SkipIndex ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Select-String.md b/reference/7.4/Microsoft.PowerShell.Utility/Select-String.md index 40012b29c88d..f11ce26e7ec4 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Select-String.md @@ -21,48 +21,54 @@ Finds text in strings and files. ``` Select-String [-Culture ] [-Pattern] [-Path] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] + [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### ObjectRaw ``` -Select-String [-Culture ] -InputObject [-Pattern] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + -Raw [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### Object ``` -Select-String [-Culture ] -InputObject [-Pattern] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### FileRaw ``` -Select-String [-Culture ] [-Pattern] [-Path] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] [-Path] -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFileRaw ``` -Select-String [-Culture ] [-Pattern] -LiteralPath -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFile ``` -Select-String [-Culture ] [-Pattern] -LiteralPath [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ## DESCRIPTION @@ -630,8 +636,8 @@ Accept wildcard characters: False Specifies the path to the files to be searched. The value of the **LiteralPath** parameter is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to -interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. For -more information, see +interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. +For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Select-Xml.md b/reference/7.4/Microsoft.PowerShell.Utility/Select-Xml.md index 1333064460e8..bac399870bfd 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Select-Xml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Select-Xml.md @@ -17,25 +17,29 @@ Finds text in an XML string or document. ### Xml (Default) ``` -Select-Xml [-XPath] [-Xml] [-Namespace ] [] +Select-Xml [-XPath] [-Xml] [-Namespace ] + [] ``` ### Path ``` -Select-Xml [-XPath] [-Path] [-Namespace ] [] +Select-Xml [-XPath] [-Path] [-Namespace ] + [] ``` ### LiteralPath ``` -Select-Xml [-XPath] -LiteralPath [-Namespace ] [] +Select-Xml [-XPath] -LiteralPath [-Namespace ] + [] ``` ### Content ``` -Select-Xml [-XPath] -Content [-Namespace ] [] +Select-Xml [-XPath] -Content [-Namespace ] + [] ``` ## DESCRIPTION @@ -56,9 +60,9 @@ The first command saves the path to the `Types.ps1xml` file in the `$Path` varia The second command saves the XML path to the **AliasProperty** node in the `$XPath` variable. The `Select-Xml` cmdlet gets the **AliasProperty** nodes that are identified by -the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send the -**AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands the -**Node** object and returns its **Name** and **ReferencedMemberName** properties. +the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send +the **AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands +the **Node** object and returns its **Name** and **ReferencedMemberName** properties. ```powershell $Path = "$PSHOME\Types.ps1xml" @@ -92,7 +96,7 @@ file. For example, there is a **Count** property that is an alias of the **Lengt ### Example 2: Input an XML document -This example shows how to use the **XML** parameter to provide an XML document to the `Select-Xml` +This example shows how to use the **Xml** parameter to provide an XML document to the `Select-Xml` cmdlet. The `Get-Content` cmdlet gets the content of the `Types.ps1xml` file and saves it in the `$Types` @@ -169,7 +173,6 @@ about here-strings, see The third command is the same as the second, except that tt uses a pipeline operator (`|`) to send the XML in the `$Xml` variable to the `Select-Xml` cmdlet. - ```powershell $Xml = @" @@ -222,7 +225,7 @@ value of the **InnerXml** property of the node. $SnippetNamespace = @{snip = "http://schemas.microsoft.com/PowerShell/Snippets"} Select-Xml -Path $HOME\Documents\WindowsPowerShell\Snippets -Namespace $SnippetNamespace -XPath "//snip:Title" | - ForEach-Object {$_.Node.Innerxml} + ForEach-Object {$_.Node.InnerXml} ``` ## PARAMETERS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Send-MailMessage.md b/reference/7.4/Microsoft.PowerShell.Utility/Send-MailMessage.md index 1bb2808cf7fd..5490556f0cbe 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Send-MailMessage.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Send-MailMessage.md @@ -18,11 +18,12 @@ Sends an email message. ### All ``` -Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] [-BodyAsHtml] - [-Encoding ] [-Cc ] [-DeliveryNotificationOption ] - -From [[-SmtpServer] ] [-Priority ] [-ReplyTo ] - [[-Subject] ] [-To] [-Credential ] [-UseSsl] [-Port ] - [] +Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] + [-BodyAsHtml] [-Encoding ] [-Cc ] + [-DeliveryNotificationOption ] -From + [[-SmtpServer] ] [-Priority ] [-ReplyTo ] + [[-Subject] ] [-To] [-Credential ] [-UseSsl] + [-Port ] [] ``` ## DESCRIPTION @@ -212,8 +213,8 @@ user. Type a user name, such as **User01** or **Domain01\User01**. Or, enter a **PSCredential** object, such as one from the `Get-Credential` cmdlet. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see @@ -287,7 +288,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-Alias.md index fad34c0a60c3..f12856074065 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-Alias.md @@ -20,8 +20,9 @@ Creates or changes an alias for a cmdlet or other command in the current PowerSh ### Default (Default) ``` -Set-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +Set-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -421,7 +422,7 @@ cmdlet displays the aliases available in a PowerShell session. To create an alias, use the cmdlets `Set-Alias` or `New-Alias`. In PowerShell 6, to delete an alias, use the `Remove-Alias` cmdlet. `Remove-Item` is accepted for backwards compatibility such as for scripts created with prior versions of PowerShell. Use a command such as -`Remove-Item -Path Alias:aliasname`. +`Remove-Item -Path Alias:AliasName`. To create an alias that's available in each PowerShell session, add it to your PowerShell profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-Date.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-Date.md index 9a54ffdcecac..9c7c7424eeb2 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-Date.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-Date.md @@ -18,13 +18,15 @@ Changes the system time on the computer to a time that you specify. ### Date (Default) ``` -Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ### Adjust ``` -Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-MarkdownOption.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-MarkdownOption.md index 902cad904569..541ce39c7dd3 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-MarkdownOption.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-MarkdownOption.md @@ -17,11 +17,11 @@ Sets the colors and styles used for rendering Markdown content in the console. ### IndividualSetting (Default) ``` -Set-MarkdownOption [-Header1Color ] [-Header2Color ] [-Header3Color ] - [-Header4Color ] [-Header5Color ] [-Header6Color ] [-Code ] - [-ImageAltTextForegroundColor ] [-LinkForegroundColor ] - [-ItalicsForegroundColor ] [-BoldForegroundColor ] [-PassThru] - [] +Set-MarkdownOption [-Header1Color ] [-Header2Color ] + [-Header3Color ] [-Header4Color ] [-Header5Color ] + [-Header6Color ] [-Code ] [-ImageAltTextForegroundColor ] + [-LinkForegroundColor ] [-ItalicsForegroundColor ] + [-BoldForegroundColor ] [-PassThru] [] ``` ### Theme @@ -362,4 +362,3 @@ The string values used to define the color and style must match the regular expr [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code) [CommonMark](https://commonmark.org/) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md index 533bea9932fc..8eb990e90da9 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md @@ -19,15 +19,15 @@ Sets a breakpoint on a line, command, or variable. ### Line (Default) ``` -Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] [-Script] - [-Runspace ] [] +Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] + [-Script] [-Runspace ] [] ``` ### Command ``` -Set-PSBreakpoint [-Action ] -Command [[-Script] ] [-Runspace ] - [] +Set-PSBreakpoint [-Action ] -Command [[-Script] ] + [-Runspace ] [] ``` ### Variable @@ -241,7 +241,8 @@ When the **Action** parameter is used, the Action scriptblock runs at each break does not stop unless the scriptblock includes the `break` keyword. If you use the `continue` keyword in the scriptblock, execution resumes until the next breakpoint. -For more information, see [about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), +For more information, see +[about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), [about_Break](../Microsoft.PowerShell.Core/About/about_Break.md), and [about_Continue](../Microsoft.PowerShell.Core/About/about_Continue.md). @@ -351,6 +352,7 @@ Accept wildcard characters: False ``` ### -Runspace + Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified runspace. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-TraceSource.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-TraceSource.md index 954f2b3f71f4..149cf4127682 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-TraceSource.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-TraceSource.md @@ -18,8 +18,9 @@ Configures, starts, and stops a trace of PowerShell components. ### optionsSet (Default) ``` -Set-TraceSource [-Name] [[-Option] ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [-PassThru] [] +Set-TraceSource [-Name] [[-Option] ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [-PassThru] [] ``` ### removeAllListenersSet @@ -43,7 +44,7 @@ can use it to specify which components will be traced and where the tracing outp ### Example 1: Trace the ParameterBinding component -``` +```powershell Set-TraceSource -Name "ParameterBinding" -Option ExecutionFlow -PSHost -ListenerOption "ProcessId,TimeStamp" ``` @@ -297,7 +298,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Set-Variable.md b/reference/7.4/Microsoft.PowerShell.Utility/Set-Variable.md index cad24d97916e..f12e625c2cc1 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Set-Variable.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Set-Variable.md @@ -19,9 +19,10 @@ Sets the value of a variable. Creates the variable if one with the requested nam ## SYNTAX ``` -Set-Variable [-Name] [[-Value] ] [-Include ] [-Exclude ] - [-Description ] [-Option ] [-Force] [-Visibility ] - [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] +Set-Variable [-Name] [[-Value] ] [-Include ] + [-Exclude ] [-Description ] [-Option ] [-Force] + [-Visibility ] [-PassThru] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Show-Command.md b/reference/7.4/Microsoft.PowerShell.Utility/Show-Command.md index b605729f4225..ab2b85e89dc1 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Show-Command.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Show-Command.md @@ -105,8 +105,10 @@ $PSDefaultParameterValues = @{ Now when you run a `Show-Command` command, the new defaults are applied automatically. To use these default values in every PowerShell session, add the `$PSDefaultParameterValues` variable to your -PowerShell profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) -and [about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). +PowerShell profile. For more information, see +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) +and +[about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). ### Example 5: Send output to a grid view @@ -305,7 +307,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Show-Markdown.md b/reference/7.4/Microsoft.PowerShell.Utility/Show-Markdown.md index c12eab76ac91..537de50b3910 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Show-Markdown.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Show-Markdown.md @@ -155,7 +155,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -172,4 +173,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS [ConvertFrom-Markdown](ConvertFrom-Markdown.md) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Tee-Object.md b/reference/7.4/Microsoft.PowerShell.Utility/Tee-Object.md index a1cd86cd3b97..7269c5088a61 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Tee-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Tee-Object.md @@ -20,13 +20,15 @@ Saves command output in a file or variable and also sends it down the pipeline. ### File (Default) ``` -Tee-Object [-InputObject ] [-FilePath] [-Append] [[-Encoding] ] [] +Tee-Object [-InputObject ] [-FilePath] [-Append] + [[-Encoding] ] [] ``` ### LiteralFile ``` -Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] [] +Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] + [] ``` ### Variable @@ -329,7 +331,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Trace-Command.md b/reference/7.4/Microsoft.PowerShell.Utility/Trace-Command.md index 54e019f4fd6b..b7a2a27cdb7c 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Trace-Command.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Trace-Command.md @@ -20,17 +20,19 @@ Configures and starts a trace of the specified expression or command. ### expressionSet (Default) ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Expression] [-ListenerOption ] [-FilePath ] [-Force] - [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Expression] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ### commandSet ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Command] [-ArgumentList ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Command] [-ArgumentList ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ## DESCRIPTION @@ -126,7 +128,6 @@ Specifies a command that's being processed during the trace. When you use this parameter, PowerShell processes the command just as it would be processed in a pipeline. For example, command discovery isn't repeated for each incoming object. - ```yaml Type: System.String Parameter Sets: commandSet diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Unblock-File.md b/reference/7.4/Microsoft.PowerShell.Utility/Unblock-File.md index df59cb30f2d6..b5fcdcfb4437 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Unblock-File.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Unblock-File.md @@ -70,7 +70,7 @@ PS C:\> dir C:\Downloads\*PowerShell* | Unblock-File This command shows how to find and unblock PowerShell scripts. -The first command uses the **Stream** parameter of the *Get-Item* cmdlet get files with the +The first command uses the **Stream** parameter of the `Get-Item` cmdlet to get files with the **Zone.Identifier** stream. The second command shows what happens when you run a blocked script in a PowerShell session in which diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Unregister-Event.md b/reference/7.4/Microsoft.PowerShell.Utility/Unregister-Event.md index 10f9809e7ac6..415a91e5c1b5 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Unregister-Event.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Unregister-Event.md @@ -18,13 +18,15 @@ Cancels an event subscription. ### BySource (Default) ``` -Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ById ``` -Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Update-FormatData.md b/reference/7.4/Microsoft.PowerShell.Utility/Update-FormatData.md index 1a11c729aeed..c6d941918ae9 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Update-FormatData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Update-FormatData.md @@ -16,8 +16,8 @@ Updates the formatting data in the current session. ## SYNTAX ``` -Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] [-Confirm] - [] +Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -37,7 +37,8 @@ create custom format.ps1xml files to update formatting in the current session. Y PowerShell. This is useful when you have added or changed a formatting file, but do not want to interrupt the session. -For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). +For more information about formatting files in PowerShell, see +[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). ## EXAMPLES @@ -58,8 +59,8 @@ Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xml This command reloads the formatting files into the session, including two new files, `Trace.format.ps1xml` and `Log.format.ps1xml`. -Because the command uses the **AppendPath** parameter, the formatting data in the new files is loaded -after the formatting data from the built-in files. +Because the command uses the **AppendPath** parameter, the formatting data in the new files is +loaded after the formatting data from the built-in files. The **AppendPath** parameter is used because the new files contain formatting data for objects that are not referenced in the built-in files. @@ -119,8 +120,8 @@ Specifies formatting files that this cmdlet adds to the session. The files are l PowerShell loads the built-in formatting files. When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each -.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files that -you are adding before it encounters the formatting data from the built-in files. +.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files +that you are adding before it encounters the formatting data from the built-in files. Use this parameter to add a file that formats a .NET object that is also referenced in the built-in formatting files. @@ -174,7 +175,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Update-List.md b/reference/7.4/Microsoft.PowerShell.Utility/Update-List.md index b39c6e6ea783..84fd9e06a4e2 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Update-List.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Update-List.md @@ -18,8 +18,8 @@ Adds items to and removes items from a property value that contains a collection ### AddRemoveSet (Default) ``` -Update-List [-Add ] [-Remove ] [-InputObject ] [[-Property] ] - [] +Update-List [-Add ] [-Remove ] [-InputObject ] + [[-Property] ] [] ``` ### ReplaceSet diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Update-TypeData.md b/reference/7.4/Microsoft.PowerShell.Utility/Update-TypeData.md index 68ca5ed62532..ae0174ebbd5d 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Update-TypeData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Update-TypeData.md @@ -37,7 +37,8 @@ Update-TypeData [-MemberType ] [-MemberName ] [-Value [-WhatIf] [-Confirm] [] +Update-TypeData [-Force] [-TypeData] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -615,8 +616,8 @@ Accept wildcard characters: False Specifies additional values for **AliasProperty**, **ScriptProperty**, **CodeProperty**, or **CodeMethod** members. -Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters to add -or change a property or method of a type. +Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters +to add or change a property or method of a type. When the value of the **MemberType** parameter is `AliasProperty`, the value of the **SecondValue** parameter must be a data type. PowerShell converts (that is, casts) the value of the alias property @@ -626,8 +627,8 @@ string value to an integer. When the value of the **MemberType** parameter is `ScriptProperty`, you can use the **SecondValue** parameter to specify an additional scriptblock. The scriptblock in the value of the **Value** -parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** parameter -set the value of the variable. +parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** +parameter sets the value of the variable. This parameter was introduced in Windows PowerShell 3.0. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Wait-Event.md b/reference/7.4/Microsoft.PowerShell.Utility/Wait-Event.md index 5027020f1bf2..16339a79a85f 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Wait-Event.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Wait-Event.md @@ -43,7 +43,7 @@ Wait-Event ### Example 2: Wait for an event with a specified source identifier -This example waits for the next event that is raised and that has a source identifier of ProcessStarted. +This example waits for the next event that has a source identifier of ProcessStarted. ```powershell Wait-Event -SourceIdentifier "ProcessStarted" @@ -51,7 +51,8 @@ Wait-Event -SourceIdentifier "ProcessStarted" ### Example 3: Wait for a timer elapsed event -This example uses the `Wait-Event` cmdlet to wait for a timer event on a timer that is set for 2000 milliseconds. +This example uses the `Wait-Event` cmdlet to wait for a timer event that's set for 2000 +milliseconds. ```powershell $Timer = New-Object Timers.Timer @@ -62,7 +63,7 @@ $objectEventArgs = @{ } Register-ObjectEvent @objectEventArgs $Timer.Interval = 2000 -$Timer.Autoreset = $false +$Timer.AutoReset = $false $Timer.Enabled = $true Wait-Event Timer.Elapsed ``` @@ -164,4 +165,3 @@ current session, the event queue is discarded and the event subscription is canc [Unregister-Event](Unregister-Event.md) [Wait-Event](Wait-Event.md) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Write-Error.md b/reference/7.4/Microsoft.PowerShell.Utility/Write-Error.md index b99c227f4b6c..955c969d4697 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Write-Error.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Write-Error.md @@ -150,7 +150,8 @@ for this parameter are: - QuotaExceeded - NotEnabled -For information about the error categories, see [ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). +For information about the error categories, see +[ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). ```yaml Type: System.Management.Automation.ErrorCategory diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md index 8e377e5f2d4a..09e377f9a0b0 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Write-Host.md @@ -11,14 +11,13 @@ title: Write-Host # Write-Host ## SYNOPSIS - Writes customized output to a host. ## SYNTAX ``` -Write-Host [[-Object] ] [-NoNewline] [-Separator ] [-ForegroundColor ] - [-BackgroundColor ] [] +Write-Host [[-Object] ] [-NoNewline] [-Separator ] + [-ForegroundColor ] [-BackgroundColor ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Write-Information.md b/reference/7.4/Microsoft.PowerShell.Utility/Write-Information.md index 65a9e59c0864..52c965ddd3da 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Write-Information.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Write-Information.md @@ -11,7 +11,6 @@ title: Write-Information # Write-Information ## SYNOPSIS - Specifies how PowerShell handles information stream data for a command. ## SYNTAX 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 73b566707da7..faafc163c4b6 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 @@ -25,43 +25,44 @@ information. > This information only applies to PowerShell running on Windows. -The **WSMan** provider for PowerShell lets you add, change, clear, and -delete WS-Management configuration data on local or remote computers. +The **WSMan** provider for PowerShell lets you add, change, clear, and delete +WS-Management configuration data on local or remote computers. -The **WSMan** provider exposes a PowerShell drive with a directory -structure that corresponds to a logical grouping of WS-Management configuration -settings. These groupings are known as containers. +The **WSMan** provider exposes a PowerShell drive with a directory structure +that corresponds to a logical grouping of WS-Management configuration settings. +These groupings are known as containers. -Beginning in Windows PowerShell 3.0, the **WSMan** provider has been -updated to support new properties for session configurations, such as +Beginning in Windows PowerShell 3.0, the **WSMan** provider has been updated to +support new properties for session configurations, such as **OutputBufferingMode**. The session configurations appear as items in the Plugin directory of the `WSMan:` drive and the properties appear as items in each session configuration. -The **WSMan** provider supports the following cmdlets, which are covered -in this article. +The **WSMan** provider supports the following cmdlets, which are covered in +this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) +- [Get-Location][05] +- [Set-Location][08] +- [Get-Item][04] +- [Get-ChildItem][03] +- [New-Item][06] +- [Remove-Item][07] > [!NOTE] > You can use commands in the `WSMan:` drive to change the values of the new -> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 -> to change properties that are introduced in Windows PowerShell 3.0. -> Although no error is generated, the commands are not effective To change these -> settings, use the **WSMan** drive in Windows PowerShell 3.0. +> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 to +> change properties that are introduced in Windows PowerShell 3.0. Although no +> error is generated, the commands are not effective To change these settings, +> use the **WSMan** drive in Windows PowerShell 3.0. ### Organization of the WSMan: Drive -- **Client**: You can configure various aspects of the WS-Management client. The - configuration information is stored in the registry. +- **Client**: You can configure various aspects of the WS-Management client. + The configuration information is stored in the registry. - **Service**: You can configure various aspects of the WS-Management service. The configuration information is stored in the registry. + > [!NOTE] > Service configuration is sometimes referred to as Server configuration. @@ -75,14 +76,16 @@ in this article. - **Plugin**: Plug-ins are loaded and used by the WS-Management service to provide various functions. By default, PowerShell provides three plug-ins: + - The Event Forwarding plug-in. - The Microsoft.PowerShell plug-in. - The Windows Management Instrumentation (WMI) Provider plug-in. + These three plug-ins support event forwarding, configuration, and WMI access. -- **ClientCertificate**: You can create and configure a client certificate. - A client certificate is used when the WS-Management client is configured to - use certificate authentication. +- **ClientCertificate**: You can create and configure a client certificate. A + client certificate is used when the WS-Management client is configured to use + certificate authentication. ### Directory Hierarchy of the WSMan Provider @@ -91,32 +94,33 @@ follows. ``` WSMan:\localhost ---- Client ---- Service ---- Shell ---- Listener ------- ---- Plugin ------- Event Forwarding Plugin ---------- InitializationParameters ---------- Resources ------------- Security ------- Microsoft.PowerShell ---------- InitializationParameters ---------- Resources ------------- Security ------- WMI Provider ---------- InitializationParameters ---------- Resources ------------- Security ---- ClientCertificate + \Client + \Service + \Shell + \Listener + \ + \Plugin + \Event Forwarding Plugin + \InitializationParameters + \Resources + \Security + \Microsoft.PowerShell + \InitializationParameters + \Resources + \Security + \WMI Provider + \InitializationParameters + \Resources + \Security + \ClientCertificate ``` The directory hierarchy of the WSMan provider for a remote computer is the same as a local computer. However, in order to access the configuration settings of a remote computer, you need to make a connection to the remote computer using -[Connect-WSMan](xref:Microsoft.WSMan.Management.Connect-WSMan). Once a connection is made to a remote -computer, the name of the remote computer shows up in the provider. +[Connect-WSMan][09]. Once a +connection is made to a remote computer, the name of the remote computer shows +up in the provider. ``` WSMan:\ @@ -139,9 +143,9 @@ Set-Location C: ### Navigating to a remote system store location -This command uses the `Set-Location` command to change the current location -to the root location in the remote system store location. Use a backslash `\` -or forward slash `/` to indicate a level of the `WSMan:` drive. +This command uses the `Set-Location` command to change the current location to +the root location in the remote system store location. Use a backslash `\` or +forward slash `/` to indicate a level of the `WSMan:` drive. ```powershell Set-Location -Path WSMan:\SERVER01 @@ -153,8 +157,8 @@ 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 -in the Localhost store location. +This command uses the `Get-ChildItem` cmdlet to display the WS-Management +stores in the Localhost store location. ```powershell Get-ChildItem -Path WSMan:\Localhost @@ -176,8 +180,8 @@ Get-ChildItem -Path WSMan:\SERVER01 ## 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 -accept all hosts with the suffix "contoso.com". +`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. @@ -185,8 +189,8 @@ PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that -appends a value instead of changing it. The following example will append a -new value "*.domain2.com" to the old value stored in `TrustedHost:` +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 @@ -196,11 +200,10 @@ Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ### 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 -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. +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 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 @@ -211,66 +214,80 @@ New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force This command creates (registers) a plug-in for the WS-Management service. ```powershell -New-Item -Path WSMan:\localhost\Plugin ` - -Plugin TestPlugin ` - -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` - -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` - -SDKVersion 1 ` - -Capability "Get","Put","Invoke","Enumerate" ` - -XMLRenderingType text +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin' + Plugin = 'TestPlugin' + FileName = "$Env:SystemRoot\system32\WsmWmiPl.dll" + Resource = 'http://schemas.dmtf.org/wbem/wscim/2/cim-schema' + SDKVersion = 1 + Capability = 'Get', 'Put', 'Invoke', 'Enumerate' + XMLRenderingType = 'text' +} +New-Item @newItemSplat ``` ### Creating a new resource entry -This command creates a resource entry in the Resources directory of -a TestPlugin. This command assumes that a TestPlugin has been created using -a separate command. +This command creates a resource entry in the `Resources` directory of a +`TestPlugin`. This command assumes that a `TestPlugin` has been created using a +separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\Resources ` - -ResourceUri http://schemas.dmtf.org/wbem/wscim/3/cim-schema ` - -Capability "Enumerate" - +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\Resources' + ResourceUri = 'http://schemas.dmtf.org/wbem/wscim/3/cim-schema' + Capability = "Enumerate" +} +New-Item @newItemSplat ``` ### Creating a new security entry for a resource This command creates a security entry in the Security directory of -Resource_5967683 (a specific resource). This command assumes that the resource -entry has been created using a separate command. +`Resource_5967683` (a specific resource). This command assumes that the +resource entry has been created using a separate command. ```powershell $path = "WSMan:\localhost\Plugin\TestPlugin\Resources\Resource_5967683" -New-Item -Path $path\Security ` - -Sddl "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +$newItemSplat = @{ + Path = "$path\Security" + Sddl = "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +} +New-Item @newItemSplat ``` ### Creating a new Client Certificate This command creates **ClientCertificate** entry that can be used by the WS-Management client. The new **ClientCertificate** will show up under the -**ClientCertificate** directory as "ClientCertificate_1234567890". All of the +**ClientCertificate** directory as `ClientCertificate_1234567890`. All of the parameters are mandatory. The **Issuer** needs to be thumbprint of the issuers certificate. ```powershell $cred = Get-Credential -New-Item -Path WSMan:\localhost\ClientCertificate ` - -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -Uri wmicimv2/* ` - -Credential $cred; +$newItemSplat = @{ + Path = 'WSMan:\localhost\ClientCertificate' + Issuer = '1b3fd224d66c6413fe20d21e38b304226d192dfe' + URI = 'wmicimv2/*' + Credential = $cred +} +New-Item @newItemSplat ``` ### Creating a new Initialization Parameter -This command creates an Initialization parameter named "testparametername" -in the "InitializationParameters" directory. This command assumes that the -"TestPlugin" has been created using a separate command. +This command creates an Initialization parameter named `testparametername` +in the `InitializationParameters` directory. This command assumes that the +`TestPlugin` has been created using a separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters ` - -ParamName testparametername ` - -ParamValue testparametervalue +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\InitializationParameters' + ParamName = 'testparametername' + ParamValue = 'testparametervalue' +} +New-Item @newItemSplat ``` ## Dynamic parameters @@ -296,11 +313,11 @@ of the following: #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Capability \ -When working with *Plug-ins* this parameter specifies an operation that is +When working with _Plug-ins_ this parameter specifies an operation that is supported on this Uniform Resource Identifier (URI). You have to create one entry for each type of operation that the URI supports. You can specify any valid attributes for a given operation, if the operation supports it. @@ -312,74 +329,87 @@ These attributes include **SupportsFiltering** and **SupportsFragment**. supports the concept. - The **SupportFiltering** attribute is NOT valid for Create operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Delete**: Delete operations are supported on the URI. - The **SupportFragment** attribute is used if the Delete operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Delete operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Enumerate**: Enumerate operations are supported on the URI. - The **SupportFragment** attribute is NOT supported for Enumerate operations and should be set to False. - The **SupportFiltering** attribute is valid, and if the plug-in supports filtering, this attribute should be set to "True". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Get**: Get operations are supported on the URI. - The **SupportFragment** attribute is used if the Get operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Get operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Invoke**: Invoke operations are supported on the URI. - The **SupportFragment** attribute is not supported for Invoke operations and should be set to False. - The **SupportFiltering** attribute is not valid and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Put**: Put operations are supported on the URI. - The **SupportFragment** attribute is used if the Put operation supports the concept. - The **SupportFiltering** attribute is not valid for Put operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Subscribe**: Subscribe operations are supported on the URI. - The **SupportFragment** attribute is not supported for Subscribe operations and should be set to False. - - The **SupportFiltering** attribute is not valid for Subscribe operations and - should be set to "False". + - The **SupportFiltering** attribute is not valid for Subscribe operations + and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Shell**: Shell operations are supported on the URI. - The **SupportFragment** attribute is not supported for Shell operations and should be set to "False". - The **SupportFiltering** attribute is not valid for Shell operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if ANY other operation is also - > supported. - > [!NOTE] - > If a Shell operation is configured for a URI, Get, Put, Create, Delete, - > Invoke, and Enumerate operations are processed internally within the - > WS-Management (WinRM) service to manage shells. As a result, the plug-in - > cannot handle the operations. + > supported. If a Shell operation is configured for a URI, Get, Put, Create, + > Delete, Invoke, and Enumerate operations are processed internally within + > the WS-Management (WinRM) service to manage shells. As a result, the + > plug-in cannot handle the operations. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### CertificateThumbprint \ @@ -390,12 +420,12 @@ Thumbprint field of the certificate. It specifies the digital public key certificate (X509) of a user account that has permission to perform this action. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts, and they do not work with domain -accounts. To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` -cmdlets in the PowerShell `Cert:` drive. +accounts. To get a certificate thumbprint, use the `Get-Item` or +`Get-ChildItem` cmdlets in the PowerShell `Cert:` drive. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Enabled \ @@ -403,7 +433,7 @@ Specifies whether the listener is enabled or disabled. The default is True. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### FileName (Plugin) \ @@ -415,7 +445,7 @@ cannot be blank and must point to a valid plug-in. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### HostName \ @@ -427,7 +457,7 @@ string, or a wildcard character. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Issuer \ @@ -435,7 +465,7 @@ Specifies the name of the certification authority that issued the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Plugin \<\> WS-Management plug-ins are native dynamic link libraries (DLLs) @@ -449,7 +479,7 @@ requests are routed to these plug-in entry points to perform operations. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Port \ @@ -458,7 +488,7 @@ value from 1 through 65535. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -478,7 +508,7 @@ For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -493,7 +523,7 @@ A URI consists of a prefix and a path to a resource. For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### SDKVersion \ @@ -502,7 +532,7 @@ Specifies the version of the WS-Management plug-in SDK. The only valid value is #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Subject \ @@ -510,7 +540,7 @@ Specifies the entity that is identified by the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Transport \ @@ -521,7 +551,7 @@ Note: The Transport value is set when creating a Listener. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URI \ @@ -530,7 +560,7 @@ Sddl parameter. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URLPrefix \ @@ -543,7 +573,7 @@ in the destination address. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Value \ @@ -552,7 +582,7 @@ value that is used to specify configuration options. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### XMLRenderingType \ @@ -567,7 +597,7 @@ Specifies the format in which XML is passed to plug-ins through the #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ## Using the pipeline @@ -582,10 +612,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file -system drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file -system drive. +[Get-Help][02] command in a file system drive or use the `-Path` parameter of +[Get-Help][02] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -597,4 +625,15 @@ Get-Help Get-ChildItem -Path WSMan: ## See also -- [about_Providers](../../Microsoft.PowerShell.Core/About/about_Providers.md) +- [about_Providers][01] + + +[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md +[02]: xref:Microsoft.PowerShell.Core.Get-Help +[03]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[04]: xref:Microsoft.PowerShell.Management.Get-Item +[05]: xref:Microsoft.PowerShell.Management.Get-Location +[06]: xref:Microsoft.PowerShell.Management.New-Item +[07]: xref:Microsoft.PowerShell.Management.Remove-Item +[08]: xref:Microsoft.PowerShell.Management.Set-Location +[09]: xref:Microsoft.WSMan.Management.Connect-WSMan diff --git a/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md index 374b2cf2b13f..84e182bf58f1 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Connect-WSMan.md @@ -18,16 +18,18 @@ Connects to the WinRM service on a remote computer. ### ComputerName (Default) ``` -Connect-WSMan [-ApplicationName ] [[-ComputerName] ] [-OptionSet ] [-Port ] - [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Connect-WSMan [-ApplicationName ] [[-ComputerName] ] + [-OptionSet ] [-Port ] [-SessionOption ] [-UseSSL] + [-Credential ] [-Authentication ] + [-CertificateThumbprint ] [] ``` ### URI ``` -Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] [-SessionOption ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] + [-SessionOption ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` diff --git a/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md index 38c69e89c496..47a4b8e9946c 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -87,7 +87,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/Enable-WSManCredSSP.md b/reference/7.4/Microsoft.WSMan.Management/Enable-WSManCredSSP.md index 50dc123dfe1c..ad47d42fb3b5 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Enable-WSManCredSSP.md +++ b/reference/7.4/Microsoft.WSMan.Management/Enable-WSManCredSSP.md @@ -18,7 +18,8 @@ Enables Credential Security Support Provider (CredSSP) authentication on a compu ### All ``` -Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] [] +Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] + [] ``` ## DESCRIPTION @@ -217,7 +218,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md index 9d52a0290cc1..c0241493a216 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -18,19 +18,22 @@ Displays management information for a resource instance specified by a Resource ### GetInstance (Default) ``` -Get-WSManInstance [-ApplicationName ] [-ComputerName ] [-ConnectionURI ] [-Dialect ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet ] +Get-WSManInstance [-ApplicationName ] [-ComputerName ] + [-ConnectionURI ] [-Dialect ] [-Fragment ] [-OptionSet ] + [-Port ] [-ResourceURI] [-SelectorSet ] [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### Enumerate ``` -Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] [-ComputerName ] - [-ConnectionURI ] [-Dialect ] [-Enumerate] [-Filter ] [-OptionSet ] - [-Port ] [-Associations] [-ResourceURI] [-ReturnType ] [-SessionOption ] - [-Shallow] [-UseSSL] [-Credential ] [-Authentication ] +Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] + [-ComputerName ] [-ConnectionURI ] [-Dialect ] [-Enumerate] + [-Filter ] [-OptionSet ] [-Port ] [-Associations] + [-ResourceURI] [-ReturnType ] [-SessionOption ] [-Shallow] + [-UseSSL] [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -575,7 +578,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md index b33635dc62fa..916ce7bb3098 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.4/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -18,19 +18,22 @@ Invokes an action on the object that is specified by the Resource URI and by the ### URI (Default) ``` -Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] [-OptionSet ] - [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] [-ResourceURI] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] + [-OptionSet ] [[-SelectorSet] ] [-SessionOption ] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### ComputerName ``` -Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [[-SelectorSet] ] [-SessionOption ] - [-UseSSL] [-ValueSet ] [-ResourceURI] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] + [[-SelectorSet] ] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION @@ -47,7 +50,13 @@ 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 +$params = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name = 'spooler'} + Authentication = 'Default' +} +Invoke-WSManAction @params ``` ```Output @@ -86,7 +95,12 @@ 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:\"} +$invokeWSManActionSplat = @{ + Action = 'Create' + ResourceURI = 'wmicimv2/Win32_Process' + ValueSet = @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -105,7 +119,14 @@ 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 +$invokeWSManActionSplat = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name="spooler"} + ComputerName = 'server01' + Authentication = 'Default' +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -216,7 +237,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows PowerShell Cert: drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows +PowerShell Cert: drive. ```yaml Type: System.String @@ -299,7 +321,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: @@ -470,7 +501,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md index d031dec685ed..a0ca0a156960 100644 --- a/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/New-WSManInstance.md @@ -18,18 +18,21 @@ Creates a new instance of a management resource. ### ComputerName (Default) ``` -New-WSManInstance [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] - [-SessionOption ] [-UseSSL] [-ValueSet ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +New-WSManInstance [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] [-ResourceURI] + [-SelectorSet] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI ``` -New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] [-ResourceURI] - [-SelectorSet] [-SessionOption ] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] + [-ResourceURI] [-SelectorSet] [-SessionOption ] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -128,8 +131,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell Cert: -drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell +Cert: drive. ```yaml Type: System.String @@ -213,7 +216,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmi/cimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + File = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: @@ -347,9 +359,9 @@ Specifies that the Secure Sockets Layer (SSL) protocol should be used to establi the remote computer. By default, SSL is not used. WS-Management encrypts all the Windows PowerShell content that is transmitted over the network. The -**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is not -available on the port that is used for the connection and you specify this parameter, the command -fails. +**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is +not available on the port that is used for the connection and you specify this parameter, the +command fails. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md index 5bdc186a3c9c..42f39f4cca64 100644 --- a/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.4/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -16,8 +16,9 @@ Creates session option hash table to use as input parameters for WS-Management c ## SYNTAX ``` -New-WSManSessionOption [-ProxyAccessType ] [-ProxyAuthentication ] - [-ProxyCredential ] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] +New-WSManSessionOption [-ProxyAccessType ] + [-ProxyAuthentication ] [-ProxyCredential ] + [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] [-OperationTimeout ] [-NoEncryption] [-UseUTF16] [] ``` @@ -265,7 +266,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/Remove-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/Remove-WSManInstance.md index 20fe7794814a..ad13736fcd7a 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Remove-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/Remove-WSManInstance.md @@ -18,10 +18,11 @@ Deletes a management resource instance. ### ComputerName (Default) ``` -Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-OptionSet ] - [-Port ] [-ResourceURI] [-SelectorSet] [-SessionOption ] - [-UseSSL] [-Credential ] [-Authentication ] - [-CertificateThumbprint ] [] +Remove-WSManInstance [-ApplicationName ] [-ComputerName ] + [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] + [-SessionOption ] [-UseSSL] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI @@ -29,7 +30,8 @@ Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-Opti ``` Remove-WSManInstance [-ConnectionURI ] [-OptionSet ] [-ResourceURI] [-SelectorSet] [-SessionOption ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md index 3ba00b44f5a6..495eb296882a 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.4/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -18,19 +18,21 @@ Modifies the management information that is related to a resource. ### ComputerName (Default) ``` -Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] [-FilePath ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] - [[-SelectorSet] ] [-SessionOption ] [-UseSSL] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] + [-FilePath ] [-Fragment ] [-OptionSet ] [-Port ] + [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] + [-UseSSL] [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### URI ``` -Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] [-Fragment ] - [-OptionSet ] [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] - [-ValueSet ] [-Credential ] [-Authentication ] +Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] + [-Fragment ] [-OptionSet ] [-ResourceURI] + [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] + [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -45,7 +47,12 @@ This cmdlet uses the WinRM connection/transport layer to modify the information. ### Example 1: Disable a listener on the local computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -105,7 +112,13 @@ This succeeds: `-ValueSet @{MaxEnvelopeSizekb ="200"}` ### Example 3: Disable a listener on a remote computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -ComputerName SERVER02 -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + ComputerName = 'SERVER02' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -133,6 +146,29 @@ This fails: `-ValueSet @{enabled="False"}` This succeeds: `-ValueSet @{Enabled="False"}` +### Example 4: Manage a resource using an input file + +The following command uses the **FilePath** parameter to update a management resource. Specify the +management resource using the **ResourceURI** and **SelectorSet** parameters. + +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` + +This command calls the **StopService** method on the Spooler service using input from a file. The +`input.xml` file contains the following content: + +```xml + +``` + ## PARAMETERS ### -ApplicationName @@ -312,16 +348,8 @@ Accept wildcard characters: False ### -FilePath -Specifies the path of a file that is used to update a management resource. You specify the -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` - -This command calls the **StopService** method on the Spooler service by using input from a file. -The file, `Input.xml`, contains the following content: - -`` +Specifies the path of a file used to update a management resource. For more information, see +[Example 4](#example-4-manage-a-resource-using-an-input-file). ```yaml Type: System.String diff --git a/reference/7.4/Microsoft.WSMan.Management/Set-WSManQuickConfig.md b/reference/7.4/Microsoft.WSMan.Management/Set-WSManQuickConfig.md index 4fdb23f9a507..283ece78b1b1 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Set-WSManQuickConfig.md +++ b/reference/7.4/Microsoft.WSMan.Management/Set-WSManQuickConfig.md @@ -136,7 +136,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md index 55baaf697c54..5af7b950fef6 100644 --- a/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.4/Microsoft.WSMan.Management/Test-WSMan.md @@ -15,9 +15,9 @@ Tests whether the WinRM service is running on a local or remote computer. ## SYNTAX ``` -Test-WSMan [[-ComputerName] ] [-Authentication ] [-Port ] [-UseSSL] - [-ApplicationName ] [-Credential ] [-CertificateThumbprint ] - [] +Test-WSMan [[-ComputerName] ] [-Authentication ] + [-Port ] [-UseSSL] [-ApplicationName ] [-Credential ] + [-CertificateThumbprint ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/PSDiagnostics/Start-Trace.md b/reference/7.4/PSDiagnostics/Start-Trace.md index b9615284ed9d..66555470d882 100644 --- a/reference/7.4/PSDiagnostics/Start-Trace.md +++ b/reference/7.4/PSDiagnostics/Start-Trace.md @@ -16,9 +16,10 @@ Start an Event Trace logging session. ## SYNTAX ``` -Start-Trace [-SessionName] [[-OutputFilePath] ] [[-ProviderFilePath] ] - [-ETS] [-Format ] [-MinBuffers ] [-MaxBuffers ] - [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] [] +Start-Trace [-SessionName] [[-OutputFilePath] ] + [[-ProviderFilePath] ] [-ETS] [-Format ] [-MinBuffers ] + [-MaxBuffers ] [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine.md b/reference/7.4/PSReadLine/About/about_PSReadLine.md index acf41e13eba6..f7407315ea4e 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine.md @@ -65,8 +65,8 @@ Install-Module -Name PSReadLine -AllowClobber -Force Predictive IntelliSense is an addition to the concept of tab completion that assists the user in successfully completing commands. It enables users to -discover, edit, and execute full commands based on matching predictions from the -user's history and additional domain specific plugins. +discover, edit, and execute full commands based on matching predictions from +the user's history and additional domain specific plugins. ### Enable Predictive IntelliSense diff --git a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md index 8736478511ac..51cf25a1fda0 100644 --- a/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.4/PSReadLine/About/about_PSReadLine_Functions.md @@ -1,6 +1,7 @@ --- description: > - This article documents the functions provided by PSReadLine. These functions can be bound to keystrokes for easy access and invocation. + This article documents the functions provided by PSReadLine. These functions + can be bound to keystrokes for easy access and invocation. Locale: en-US ms.date: 01/18/2026 online version: https://learn.microsoft.com/powershell/module/psreadline/about/about_psreadline_functions?view=powershell-7.4&WT.mc_id=ps-gethelp @@ -1169,8 +1170,8 @@ pressing the `#` key sends 10 `#` characters (`##########`) to the input line. Similarly, you can use this with other operations, like `` or `Left-Arrow`. -- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, - `Alt+8`, `Alt+9`, `Alt+-` +- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, + `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Emacs mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Vi command mode: `<0>`, `<1>`, `<2>`, `<3>`, `<4>`, `<5>`, `<6>`, `<7>`, @@ -1671,7 +1672,7 @@ Behavior of the OnIdle event - [about_PSReadLine][02] -[01]: /dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters +[01]: xref:Microsoft.PowerShell.PSConsoleReadLineOptions.WordDelimiters%2A#microsoft-powershell-psconsolereadlineoptions-worddelimiters [02]: about_PSReadLine.md [03]: https://apps.microsoft.com/detail/9N0DX20HK701 [04]: xref:PSReadLine.Get-PSReadLineOption diff --git a/reference/7.4/PSReadLine/Get-PSReadLineKeyHandler.md b/reference/7.4/PSReadLine/Get-PSReadLineKeyHandler.md index ec837acc22a7..1b87e311020c 100644 --- a/reference/7.4/PSReadLine/Get-PSReadLineKeyHandler.md +++ b/reference/7.4/PSReadLine/Get-PSReadLineKeyHandler.md @@ -181,7 +181,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/PSReadLine/Set-PSReadLineOption.md b/reference/7.4/PSReadLine/Set-PSReadLineOption.md index df8a4051a2f2..b5f36b93cb29 100644 --- a/reference/7.4/PSReadLine/Set-PSReadLineOption.md +++ b/reference/7.4/PSReadLine/Set-PSReadLineOption.md @@ -16,16 +16,17 @@ Customizes the behavior of command line editing in **PSReadLine**. ## SYNTAX ``` -Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] [-HistoryNoDuplicates] - [-AddToHistoryHandler ] [-CommandValidationHandler ] - [-HistorySearchCursorMovesToEnd] [-MaximumHistoryCount ] [-MaximumKillRingCount ] - [-ShowToolTips] [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] +Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] + [-HistoryNoDuplicates] [-AddToHistoryHandler ] + [-CommandValidationHandler ] [-HistorySearchCursorMovesToEnd] + [-MaximumHistoryCount ] [-MaximumKillRingCount ] [-ShowToolTips] + [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] [-BellStyle ] [-CompletionQueryItems ] [-WordDelimiters ] - [-HistorySearchCaseSensitive] [-HistorySaveStyle ] [-HistorySavePath ] - [-AnsiEscapeTimeout ] [-PromptText ] [-ViModeIndicator ] - [-ViModeChangeHandler ] [-PredictionSource ] - [-PredictionViewStyle ] [-Colors ] - [-TerminateOrphanedConsoleApps] [] + [-HistorySearchCaseSensitive] [-HistorySaveStyle ] + [-HistorySavePath ] [-AnsiEscapeTimeout ] [-PromptText ] + [-ViModeIndicator ] [-ViModeChangeHandler ] + [-PredictionSource ] [-PredictionViewStyle ] + [-Colors ] [-TerminateOrphanedConsoleApps] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md index 8f1f611a3a27..7fc07e723850 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -17,8 +17,9 @@ for the operating system. ## SYNTAX ``` -Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] [-BaseDirectory ] - [-FileName ] [-SupportedCommand ] [] +Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] + [-BaseDirectory ] [-FileName ] [-SupportedCommand ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-PSSession.md index 63ff5ce31576..2861c0efcd88 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -17,10 +17,11 @@ Imports commands from another session into the current session. ## SYNTAX ``` -Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] [-AllowClobber] - [-ArgumentList ] [-CommandType ] [-Module ] - [-FullyQualifiedModule ] [[-FormatTypeName] ] - [-Certificate ] [-Session] [] +Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] + [-AllowClobber] [-ArgumentList ] [-CommandType ] + [-Module ] [-FullyQualifiedModule ] + [[-FormatTypeName] ] [-Certificate ] [-Session] + [] ``` ## DESCRIPTION @@ -281,8 +282,8 @@ Function Start-BitsTransfer Function Suspend-BitsTransfer ``` -This command shows how to use the **Module** parameter of `Get-Command` to find out which commands were -imported into the session by an `Import-PSSession` command. +This command shows how to use the **Module** parameter of `Get-Command` to find out which commands +were imported into the session by an `Import-PSSession` command. The first command uses the `Import-PSSession` cmdlet to import commands whose names include "bits" from the PSSession in the `$S` variable. The `Import-PSSession` command returns a temporary module, @@ -528,7 +529,8 @@ and module names. Wildcards are not permitted. `Import-PSSession` cannot import providers from a snap-in. -For more information, see [about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) +For more information, see +[about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) and [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ```yaml diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index ae2db4d66bf6..2ae5a9bacf31 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -21,56 +21,63 @@ Sends an HTTP or HTTPS request to a RESTful web service. ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index ab8327b5d0b2..8a5dc076c2c9 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -21,67 +21,77 @@ Gets content from a web page on the internet. ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] - [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] - [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` @@ -1416,7 +1426,14 @@ properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuser as Chrome, Firefox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer: -`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)` + +```powershell +$params = @{ + Uri = 'https://website.com/' + UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer +} +Invoke-WebRequest @params +``` ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Join-String.md b/reference/7.5/Microsoft.PowerShell.Utility/Join-String.md index ce0730b235ad..2095225e56e8 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Join-String.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Join-String.md @@ -17,32 +17,33 @@ Combines objects from the pipeline into a single string. ### Default (Default) ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-UseCulture] [-InputObject ] [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-UseCulture] + [-InputObject ] [] ``` ### SingleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-SingleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-SingleQuote] [-UseCulture] + [-InputObject ] [] ``` ### DoubleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-DoubleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-DoubleQuote] [-UseCulture] + [-InputObject ] [] ``` ### Format ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-FormatString ] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-FormatString ] [-UseCulture] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/New-Alias.md index 6620b30a94a5..44e9f267692c 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-Alias.md @@ -18,8 +18,9 @@ Creates a new alias. ## SYNTAX ``` -New-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +New-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-Event.md b/reference/7.5/Microsoft.PowerShell.Utility/New-Event.md index 587399323e77..e37e4d20f55a 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-Event.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-Event.md @@ -16,8 +16,8 @@ Creates a new event. ## SYNTAX ``` -New-Event [-SourceIdentifier] [[-Sender] ] [[-EventArguments] ] - [[-MessageData] ] [] +New-Event [-SourceIdentifier] [[-Sender] ] + [[-EventArguments] ] [[-MessageData] ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md index 20be9c7a107d..33d608269d79 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-Object.md @@ -18,7 +18,8 @@ Creates an instance of a Microsoft .NET Framework or COM object. ### Net (Default) ``` -New-Object [-TypeName] [[-ArgumentList] ] [-Property ] [] +New-Object [-TypeName] [[-ArgumentList] ] [-Property ] + [] ``` ### Com @@ -92,8 +93,8 @@ At line:1 char:14 This example shows how to create and use a COM object to manage your Windows desktop. The first command uses the **ComObject** parameter of the `New-Object` cmdlet to create a COM object -with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. The -second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the +with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. +The second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the properties and methods of the COM object. Among the methods is the **ToggleDesktop** method. The third command calls the **ToggleDesktop** method of the object to minimize the open windows on your desktop. @@ -209,9 +210,16 @@ Specifies an array of arguments to pass to the constructor of the .NET Framework constructor takes a single parameter that is an array, you must wrap that parameter inside another array. For example: -`$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList (,$bytes)` +```powershell +$params = @{ + TypeName = 'System.Security.Cryptography.X509Certificates.X509Certificate' + ArgumentList = (,$bytes) +} +$cert = New-Object @params +``` -For more information about the behavior of **ArgumentList**, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). +For more information about the behavior of **ArgumentList**, see +[about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). The alias for **ArgumentList** is **Args**. @@ -306,7 +314,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-TemporaryFile.md b/reference/7.5/Microsoft.PowerShell.Utility/New-TemporaryFile.md index 30eaefb43a79..7f6d33d11496 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-TemporaryFile.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-TemporaryFile.md @@ -47,8 +47,8 @@ order and uses the first path found: $TempFile = New-TemporaryFile ``` -This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file -in the `$TempFile` variable. You can use this file later in your script. +This command generates a `.tmp` file in your temporary folder, and then stores a reference to the +file in the `$TempFile` variable. You can use this file later in your script. ## PARAMETERS @@ -89,7 +89,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/New-Variable.md b/reference/7.5/Microsoft.PowerShell.Utility/New-Variable.md index 8d08c282f4cb..b93894625c12 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/New-Variable.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/New-Variable.md @@ -18,9 +18,9 @@ Creates a new variable. ## SYNTAX ``` -New-Variable [-Name] [[-Value] ] [-Description ] [-Option ] - [-Visibility ] [-Force] [-PassThru] [-Scope ] [-WhatIf] [-Confirm] - [] +New-Variable [-Name] [[-Value] ] [-Description ] + [-Option ] [-Visibility ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -359,7 +359,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Out-File.md b/reference/7.5/Microsoft.PowerShell.Utility/Out-File.md index 00ceb24c97ea..7c0082f576d7 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Out-File.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Out-File.md @@ -19,14 +19,16 @@ Sends output to a file. ``` Out-File [-FilePath] [[-Encoding] ] [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` Out-File [[-Encoding] ] -LiteralPath [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Out-GridView.md b/reference/7.5/Microsoft.PowerShell.Utility/Out-GridView.md index 52d110c8b1ae..5dca37c6cde8 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Out-GridView.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Out-GridView.md @@ -332,7 +332,7 @@ Deserialized output from remote commands might not be formatted correctly in the **To hide or show a column:** 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected +1. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected columns to the Available columns boxes. Only columns in the **Select Columns** box appear in the grid view window. @@ -341,7 +341,7 @@ Deserialized output from remote commands might not be formatted correctly in the You can drag and drop columns into the desired location. Or use the following steps: 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder +1. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder the columns. Columns at the top of the list appear to the left of columns at the bottom of the list in the grid view window. @@ -356,9 +356,10 @@ You can drag and drop columns into the desired location. Or use the following st - To select a row, select the row or use the up or down arrow to navigate to the row. - To select all rows (except for the header row), press CTRL+A. -- To select consecutive rows, press and hold the SHIFT key while clicking the rows or using the - arrow keys. -- To select nonconsecutive rows, press the CTRL key and click to add a row to the selection. +- To select consecutive rows, press and hold the SHIFT key while clicking the rows or + using the arrow keys. +- To select nonconsecutive rows, press the CTRL key and click to add a row to the + selection. - You cannot select columns, and you cannot select the entire column header row. **How to Copy Rows** @@ -414,11 +415,11 @@ The criteria only affects the display. It does not delete items from the table. 1. To display the **Add criteria** menu button, in the upper right corner of the window, click the Expand arrow. -2. Click the **Add Criteria** menu button. -3. Click to select columns (properties). You can select one or many properties. -4. When you are finished selecting properties, click the **Add** button. -5. To cancel the additions, click **Cancel**. -6. To add more criteria, click the **Add Criteria** button again. +1. Click the **Add Criteria** menu button. +1. Click to select columns (properties). You can select one or many properties. +1. When you are finished selecting properties, click the **Add** button. +1. To cancel the additions, click **Cancel**. +1. To add more criteria, click the **Add Criteria** button again. **How to Edit a Criterion** diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Register-ObjectEvent.md b/reference/7.5/Microsoft.PowerShell.Utility/Register-ObjectEvent.md index 0db33ca9d61f..5839aaa74741 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Register-ObjectEvent.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Register-ObjectEvent.md @@ -15,9 +15,9 @@ Subscribes to the events that are generated by a Microsoft .NET Framework object ## SYNTAX ``` -Register-ObjectEvent [-InputObject] [-EventName] [[-SourceIdentifier] ] - [[-Action] ] [-MessageData ] [-SupportEvent] [-Forward] [-MaxTriggerCount ] - [] +Register-ObjectEvent [-InputObject] [-EventName] + [[-SourceIdentifier] ] [[-Action] ] [-MessageData ] + [-SupportEvent] [-Forward] [-MaxTriggerCount ] [] ``` ## DESCRIPTION @@ -29,13 +29,13 @@ When the subscribed event is raised, it is added to the event queue in your sess in the event queue, use the `Get-Event` cmdlet. You can use the parameters of `Register-ObjectEvent` to specify property values of the events that -can help you to identify the event in the queue. You can also use the **Action** parameter to specify -actions to take when a subscribed event is raised and the **Forward** parameter to send remote events -to the event queue in the local session. +can help you to identify the event in the queue. You can also use the **Action** parameter to +specify actions to take when a subscribed event is raised and the **Forward** parameter to send +remote events to the event queue in the local session. When you subscribe to an event, an event subscriber is added to your session. To get the event -subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the -`Unregister-Event` cmdlet, which deletes the event subscriber from the session. +subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use +the `Unregister-Event` cmdlet, which deletes the event subscriber from the session. ## EXAMPLES @@ -80,12 +80,13 @@ Id Name PSJobTypeName State HasMoreData Location Com 5 3db2d67a-efff-... NotStarted False New-Event @newEventArgs ``` -The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for event -actions. +The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for +event actions. The `Register-ObjectEvent` command returns a job object that represents the action, which runs as a background job. You can use the Job cmdlets, such as `Get-Job` and `Receive-Job`, to manage the -background job. For more information, see [about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). +background job. For more information, see +[about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). ### Example 3: Subscribe to object events on remote computers @@ -180,11 +181,12 @@ Information : {} 47 ``` -The **PSEventJob** has a **Module** property that contains a dynamic script module that implements the -action. Using the call operator (`&`), we invoke the command in the module to display the +The **PSEventJob** has a **Module** property that contains a dynamic script module that implements +the action. Using the call operator (`&`), we invoke the command in the module to display the value of the `$Random` variable. -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ## PARAMETERS @@ -346,7 +348,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md b/reference/7.5/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md index b030f470ff22..72ee8c5e38b0 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md @@ -26,7 +26,8 @@ Remove-PSBreakpoint [-Breakpoint] [-WhatIf] [-Confirm] [ [-Runspace ] [-WhatIf] [-Confirm] [] +Remove-PSBreakpoint [-Id] [-Runspace ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Remove-TypeData.md b/reference/7.5/Microsoft.PowerShell.Utility/Remove-TypeData.md index ed58e16201f2..ffd3f8ea21a3 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Remove-TypeData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Remove-TypeData.md @@ -108,7 +108,8 @@ current session. Remove-TypeData -Path "$PSHOME\Modules\PSScheduledJob", "$PSHOME\Modules\PSWorkflow\PSWorkflow.types.ps1xml" ``` -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ### Example 5: Remove extended types from a remote session diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Remove-Variable.md b/reference/7.5/Microsoft.PowerShell.Utility/Remove-Variable.md index 26c2a396d227..9f47cca975d2 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Remove-Variable.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Remove-Variable.md @@ -18,8 +18,8 @@ Deletes a variable and its value. ## SYNTAX ``` -Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-Scope ] - [-WhatIf] [-Confirm] [] +Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -120,7 +120,8 @@ Gets only the variables in the specified scope. The acceptable values for this p - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -170,7 +171,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Select-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/Select-Object.md index 80b9b6205b83..182dd0585670 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Select-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Select-Object.md @@ -19,31 +19,31 @@ Selects objects or object properties. ### DefaultParameter (Default) ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Last ] [-First ] - [-Skip ] [-Wait] [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Last ] [-First ] [-Skip ] [-Wait] [] ``` ### SkipLastParameter ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Skip ] [-SkipLast ] - [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Skip ] [-SkipLast ] [] ``` ### IndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] [-Index ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] + [-Index ] [] ``` ### SkipIndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-SkipIndex ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] + [-SkipIndex ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Select-String.md b/reference/7.5/Microsoft.PowerShell.Utility/Select-String.md index cc7d7f8e46d9..7f1bed7a1eee 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Select-String.md @@ -21,48 +21,54 @@ Finds text in strings and files. ``` Select-String [-Culture ] [-Pattern] [-Path] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] + [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### ObjectRaw ``` -Select-String [-Culture ] -InputObject [-Pattern] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + -Raw [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### Object ``` -Select-String [-Culture ] -InputObject [-Pattern] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### FileRaw ``` -Select-String [-Culture ] [-Pattern] [-Path] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] [-Path] -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFileRaw ``` -Select-String [-Culture ] [-Pattern] -LiteralPath -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFile ``` -Select-String [-Culture ] [-Pattern] -LiteralPath [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ## DESCRIPTION @@ -630,8 +636,8 @@ Accept wildcard characters: False Specifies the path to the files to be searched. The value of the **LiteralPath** parameter is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to -interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. For -more information, see +interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. +For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Select-Xml.md b/reference/7.5/Microsoft.PowerShell.Utility/Select-Xml.md index a80181e2bf04..bbd4e43b1db9 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Select-Xml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Select-Xml.md @@ -17,25 +17,29 @@ Finds text in an XML string or document. ### Xml (Default) ``` -Select-Xml [-XPath] [-Xml] [-Namespace ] [] +Select-Xml [-XPath] [-Xml] [-Namespace ] + [] ``` ### Path ``` -Select-Xml [-XPath] [-Path] [-Namespace ] [] +Select-Xml [-XPath] [-Path] [-Namespace ] + [] ``` ### LiteralPath ``` -Select-Xml [-XPath] -LiteralPath [-Namespace ] [] +Select-Xml [-XPath] -LiteralPath [-Namespace ] + [] ``` ### Content ``` -Select-Xml [-XPath] -Content [-Namespace ] [] +Select-Xml [-XPath] -Content [-Namespace ] + [] ``` ## DESCRIPTION @@ -56,9 +60,9 @@ The first command saves the path to the `Types.ps1xml` file in the `$Path` varia The second command saves the XML path to the **AliasProperty** node in the `$XPath` variable. The `Select-Xml` cmdlet gets the **AliasProperty** nodes that are identified by -the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send the -**AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands the -**Node** object and returns its **Name** and **ReferencedMemberName** properties. +the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send +the **AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands +the **Node** object and returns its **Name** and **ReferencedMemberName** properties. ```powershell $Path = "$PSHOME\Types.ps1xml" @@ -92,7 +96,7 @@ file. For example, there is a **Count** property that is an alias of the **Lengt ### Example 2: Input an XML document -This example shows how to use the **XML** parameter to provide an XML document to the `Select-Xml` +This example shows how to use the **Xml** parameter to provide an XML document to the `Select-Xml` cmdlet. The `Get-Content` cmdlet gets the content of the `Types.ps1xml` file and saves it in the `$Types` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Send-MailMessage.md b/reference/7.5/Microsoft.PowerShell.Utility/Send-MailMessage.md index 6d9f30d09a57..a480e85cc39d 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Send-MailMessage.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Send-MailMessage.md @@ -18,11 +18,12 @@ Sends an email message. ### All ``` -Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] [-BodyAsHtml] - [-Encoding ] [-Cc ] [-DeliveryNotificationOption ] - -From [[-SmtpServer] ] [-Priority ] [-ReplyTo ] - [[-Subject] ] [-To] [-Credential ] [-UseSsl] [-Port ] - [] +Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] + [-BodyAsHtml] [-Encoding ] [-Cc ] + [-DeliveryNotificationOption ] -From + [[-SmtpServer] ] [-Priority ] [-ReplyTo ] + [[-Subject] ] [-To] [-Credential ] [-UseSsl] + [-Port ] [] ``` ## DESCRIPTION @@ -212,8 +213,8 @@ user. Type a user name, such as **User01** or **Domain01\User01**. Or, enter a **PSCredential** object, such as one from the `Get-Credential` cmdlet. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see @@ -287,7 +288,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-Alias.md index bfae0a2813ac..fa7a43972c68 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-Alias.md @@ -20,8 +20,9 @@ Creates or changes an alias for a cmdlet or other command in the current PowerSh ### Default (Default) ``` -Set-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +Set-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-Date.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-Date.md index 71a6d95cf7bc..5efbf537752c 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-Date.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-Date.md @@ -18,13 +18,15 @@ Changes the system time on the computer to a time that you specify. ### Date (Default) ``` -Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ### Adjust ``` -Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-MarkdownOption.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-MarkdownOption.md index b627539d8075..d8df86229c9f 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-MarkdownOption.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-MarkdownOption.md @@ -17,11 +17,11 @@ Sets the colors and styles used for rendering Markdown content in the console. ### IndividualSetting (Default) ``` -Set-MarkdownOption [-Header1Color ] [-Header2Color ] [-Header3Color ] - [-Header4Color ] [-Header5Color ] [-Header6Color ] [-Code ] - [-ImageAltTextForegroundColor ] [-LinkForegroundColor ] - [-ItalicsForegroundColor ] [-BoldForegroundColor ] [-PassThru] - [] +Set-MarkdownOption [-Header1Color ] [-Header2Color ] + [-Header3Color ] [-Header4Color ] [-Header5Color ] + [-Header6Color ] [-Code ] [-ImageAltTextForegroundColor ] + [-LinkForegroundColor ] [-ItalicsForegroundColor ] + [-BoldForegroundColor ] [-PassThru] [] ``` ### Theme diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md index 6ca3e2bef074..400fb47953a9 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md @@ -19,15 +19,15 @@ Sets a breakpoint on a line, command, or variable. ### Line (Default) ``` -Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] [-Script] - [-Runspace ] [] +Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] + [-Script] [-Runspace ] [] ``` ### Command ``` -Set-PSBreakpoint [-Action ] -Command [[-Script] ] [-Runspace ] - [] +Set-PSBreakpoint [-Action ] -Command [[-Script] ] + [-Runspace ] [] ``` ### Variable @@ -241,7 +241,8 @@ When the **Action** parameter is used, the Action scriptblock runs at each break does not stop unless the scriptblock includes the `break` keyword. If you use the `continue` keyword in the scriptblock, execution resumes until the next breakpoint. -For more information, see [about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), +For more information, see +[about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), [about_Break](../Microsoft.PowerShell.Core/About/about_Break.md), and [about_Continue](../Microsoft.PowerShell.Core/About/about_Continue.md). @@ -351,6 +352,7 @@ Accept wildcard characters: False ``` ### -Runspace + Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified runspace. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-TraceSource.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-TraceSource.md index 5a308e550f52..41bbf2995663 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-TraceSource.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-TraceSource.md @@ -18,8 +18,9 @@ Configures, starts, and stops a trace of PowerShell components. ### optionsSet (Default) ``` -Set-TraceSource [-Name] [[-Option] ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [-PassThru] [] +Set-TraceSource [-Name] [[-Option] ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [-PassThru] [] ``` ### removeAllListenersSet @@ -43,7 +44,7 @@ can use it to specify which components will be traced and where the tracing outp ### Example 1: Trace the ParameterBinding component -``` +```powershell Set-TraceSource -Name "ParameterBinding" -Option ExecutionFlow -PSHost -ListenerOption "ProcessId,TimeStamp" ``` @@ -297,7 +298,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Set-Variable.md b/reference/7.5/Microsoft.PowerShell.Utility/Set-Variable.md index 7ea7f914a5a2..77f1ce0b7591 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Set-Variable.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Set-Variable.md @@ -19,9 +19,10 @@ Sets the value of a variable. Creates the variable if one with the requested nam ## SYNTAX ``` -Set-Variable [-Name] [[-Value] ] [-Include ] [-Exclude ] - [-Description ] [-Option ] [-Force] [-Visibility ] - [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] +Set-Variable [-Name] [[-Value] ] [-Include ] + [-Exclude ] [-Description ] [-Option ] [-Force] + [-Visibility ] [-PassThru] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Show-Command.md b/reference/7.5/Microsoft.PowerShell.Utility/Show-Command.md index c64913da5b0a..c1ad0ca4c7e7 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Show-Command.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Show-Command.md @@ -105,8 +105,10 @@ $PSDefaultParameterValues = @{ Now when you run a `Show-Command` command, the new defaults are applied automatically. To use these default values in every PowerShell session, add the `$PSDefaultParameterValues` variable to your -PowerShell profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) -and [about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). +PowerShell profile. For more information, see +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) +and +[about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). ### Example 5: Send output to a grid view @@ -305,7 +307,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Show-Markdown.md b/reference/7.5/Microsoft.PowerShell.Utility/Show-Markdown.md index 1ded1947987f..7ada0959500c 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Show-Markdown.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Show-Markdown.md @@ -155,7 +155,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Tee-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/Tee-Object.md index c19e923c335e..a620e2e9e5ed 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Tee-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Tee-Object.md @@ -20,13 +20,15 @@ Saves command output in a file or variable and also sends it down the pipeline. ### File (Default) ``` -Tee-Object [-InputObject ] [-FilePath] [-Append] [[-Encoding] ] [] +Tee-Object [-InputObject ] [-FilePath] [-Append] + [[-Encoding] ] [] ``` ### LiteralFile ``` -Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] [] +Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] + [] ``` ### Variable @@ -329,7 +331,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Trace-Command.md b/reference/7.5/Microsoft.PowerShell.Utility/Trace-Command.md index 7e495b29964a..9ccb14ccfd75 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Trace-Command.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Trace-Command.md @@ -20,17 +20,19 @@ Configures and starts a trace of the specified expression or command. ### expressionSet (Default) ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Expression] [-ListenerOption ] [-FilePath ] [-Force] - [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Expression] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ### commandSet ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Command] [-ArgumentList ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Command] [-ArgumentList ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Unblock-File.md b/reference/7.5/Microsoft.PowerShell.Utility/Unblock-File.md index 7a96f427f2e2..7233dad9bc70 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Unblock-File.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Unblock-File.md @@ -70,7 +70,7 @@ PS C:\> dir C:\Downloads\*PowerShell* | Unblock-File This command shows how to find and unblock PowerShell scripts. -The first command uses the **Stream** parameter of the *Get-Item* cmdlet get files with the +The first command uses the **Stream** parameter of the `Get-Item` cmdlet to get files with the **Zone.Identifier** stream. The second command shows what happens when you run a blocked script in a PowerShell session in which diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Unregister-Event.md b/reference/7.5/Microsoft.PowerShell.Utility/Unregister-Event.md index c184a8502142..9076250d7537 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Unregister-Event.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Unregister-Event.md @@ -18,13 +18,15 @@ Cancels an event subscription. ### BySource (Default) ``` -Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ById ``` -Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Update-FormatData.md b/reference/7.5/Microsoft.PowerShell.Utility/Update-FormatData.md index de5d0d1dd305..ec88dbc718d6 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Update-FormatData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Update-FormatData.md @@ -16,8 +16,8 @@ Updates the formatting data in the current session. ## SYNTAX ``` -Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] [-Confirm] - [] +Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -37,7 +37,8 @@ create custom format.ps1xml files to update formatting in the current session. Y PowerShell. This is useful when you have added or changed a formatting file, but do not want to interrupt the session. -For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). +For more information about formatting files in PowerShell, see +[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). ## EXAMPLES @@ -58,8 +59,8 @@ Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xml This command reloads the formatting files into the session, including two new files, `Trace.format.ps1xml` and `Log.format.ps1xml`. -Because the command uses the **AppendPath** parameter, the formatting data in the new files is loaded -after the formatting data from the built-in files. +Because the command uses the **AppendPath** parameter, the formatting data in the new files is +loaded after the formatting data from the built-in files. The **AppendPath** parameter is used because the new files contain formatting data for objects that are not referenced in the built-in files. @@ -119,8 +120,8 @@ Specifies formatting files that this cmdlet adds to the session. The files are l PowerShell loads the built-in formatting files. When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each -.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files that -you are adding before it encounters the formatting data from the built-in files. +.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files +that you are adding before it encounters the formatting data from the built-in files. Use this parameter to add a file that formats a .NET object that is also referenced in the built-in formatting files. @@ -174,7 +175,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Update-List.md b/reference/7.5/Microsoft.PowerShell.Utility/Update-List.md index 80a7e386e532..80548b4c6e01 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Update-List.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Update-List.md @@ -18,8 +18,8 @@ Adds items to and removes items from a property value that contains a collection ### AddRemoveSet (Default) ``` -Update-List [-Add ] [-Remove ] [-InputObject ] [[-Property] ] - [] +Update-List [-Add ] [-Remove ] [-InputObject ] + [[-Property] ] [] ``` ### ReplaceSet diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Update-TypeData.md b/reference/7.5/Microsoft.PowerShell.Utility/Update-TypeData.md index a7646b886502..6e6733ad064b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Update-TypeData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Update-TypeData.md @@ -37,7 +37,8 @@ Update-TypeData [-MemberType ] [-MemberName ] [-Value [-WhatIf] [-Confirm] [] +Update-TypeData [-Force] [-TypeData] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -615,8 +616,8 @@ Accept wildcard characters: False Specifies additional values for **AliasProperty**, **ScriptProperty**, **CodeProperty**, or **CodeMethod** members. -Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters to add -or change a property or method of a type. +Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters +to add or change a property or method of a type. When the value of the **MemberType** parameter is `AliasProperty`, the value of the **SecondValue** parameter must be a data type. PowerShell converts (that is, casts) the value of the alias property @@ -626,8 +627,8 @@ string value to an integer. When the value of the **MemberType** parameter is `ScriptProperty`, you can use the **SecondValue** parameter to specify an additional scriptblock. The scriptblock in the value of the **Value** -parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** parameter -set the value of the variable. +parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** +parameter sets the value of the variable. This parameter was introduced in Windows PowerShell 3.0. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Wait-Event.md b/reference/7.5/Microsoft.PowerShell.Utility/Wait-Event.md index 45890cebbda1..372e19166d0b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Wait-Event.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Wait-Event.md @@ -43,7 +43,7 @@ Wait-Event ### Example 2: Wait for an event with a specified source identifier -This example waits for the next event that is raised and that has a source identifier of ProcessStarted. +This example waits for the next event that has a source identifier of ProcessStarted. ```powershell Wait-Event -SourceIdentifier "ProcessStarted" @@ -51,7 +51,8 @@ Wait-Event -SourceIdentifier "ProcessStarted" ### Example 3: Wait for a timer elapsed event -This example uses the `Wait-Event` cmdlet to wait for a timer event on a timer that is set for 2000 milliseconds. +This example uses the `Wait-Event` cmdlet to wait for a timer event that's set for 2000 +milliseconds. ```powershell $Timer = New-Object Timers.Timer diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Write-Error.md b/reference/7.5/Microsoft.PowerShell.Utility/Write-Error.md index c137a1ac2419..3ad903bcaae9 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Write-Error.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Write-Error.md @@ -150,7 +150,8 @@ for this parameter are: - QuotaExceeded - NotEnabled -For information about the error categories, see [ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). +For information about the error categories, see +[ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). ```yaml Type: System.Management.Automation.ErrorCategory diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md index f72264c741f4..924cbdb509b2 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Write-Host.md @@ -11,14 +11,13 @@ title: Write-Host # Write-Host ## SYNOPSIS - Writes customized output to a host. ## SYNTAX ``` -Write-Host [[-Object] ] [-NoNewline] [-Separator ] [-ForegroundColor ] - [-BackgroundColor ] [] +Write-Host [[-Object] ] [-NoNewline] [-Separator ] + [-ForegroundColor ] [-BackgroundColor ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Write-Information.md b/reference/7.5/Microsoft.PowerShell.Utility/Write-Information.md index 9c2addd64a7f..99ba226a1ea0 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Write-Information.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Write-Information.md @@ -11,7 +11,6 @@ title: Write-Information # Write-Information ## SYNOPSIS - Specifies how PowerShell handles information stream data for a command. ## SYNTAX 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 f2b7fd01ea23..779e3328fb1c 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 @@ -25,43 +25,44 @@ information. > This information only applies to PowerShell running on Windows. -The **WSMan** provider for PowerShell lets you add, change, clear, and -delete WS-Management configuration data on local or remote computers. +The **WSMan** provider for PowerShell lets you add, change, clear, and delete +WS-Management configuration data on local or remote computers. -The **WSMan** provider exposes a PowerShell drive with a directory -structure that corresponds to a logical grouping of WS-Management configuration -settings. These groupings are known as containers. +The **WSMan** provider exposes a PowerShell drive with a directory structure +that corresponds to a logical grouping of WS-Management configuration settings. +These groupings are known as containers. -Beginning in Windows PowerShell 3.0, the **WSMan** provider has been -updated to support new properties for session configurations, such as +Beginning in Windows PowerShell 3.0, the **WSMan** provider has been updated to +support new properties for session configurations, such as **OutputBufferingMode**. The session configurations appear as items in the Plugin directory of the `WSMan:` drive and the properties appear as items in each session configuration. -The **WSMan** provider supports the following cmdlets, which are covered -in this article. +The **WSMan** provider supports the following cmdlets, which are covered in +this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) +- [Get-Location][05] +- [Set-Location][08] +- [Get-Item][04] +- [Get-ChildItem][03] +- [New-Item][06] +- [Remove-Item][07] > [!NOTE] > You can use commands in the `WSMan:` drive to change the values of the new -> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 -> to change properties that are introduced in Windows PowerShell 3.0. -> Although no error is generated, the commands are not effective To change these -> settings, use the **WSMan** drive in Windows PowerShell 3.0. +> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 to +> change properties that are introduced in Windows PowerShell 3.0. Although no +> error is generated, the commands are not effective To change these settings, +> use the **WSMan** drive in Windows PowerShell 3.0. ### Organization of the WSMan: Drive -- **Client**: You can configure various aspects of the WS-Management client. The - configuration information is stored in the registry. +- **Client**: You can configure various aspects of the WS-Management client. + The configuration information is stored in the registry. - **Service**: You can configure various aspects of the WS-Management service. The configuration information is stored in the registry. + > [!NOTE] > Service configuration is sometimes referred to as Server configuration. @@ -75,14 +76,16 @@ in this article. - **Plugin**: Plug-ins are loaded and used by the WS-Management service to provide various functions. By default, PowerShell provides three plug-ins: + - The Event Forwarding plug-in. - The Microsoft.PowerShell plug-in. - The Windows Management Instrumentation (WMI) Provider plug-in. + These three plug-ins support event forwarding, configuration, and WMI access. -- **ClientCertificate**: You can create and configure a client certificate. - A client certificate is used when the WS-Management client is configured to - use certificate authentication. +- **ClientCertificate**: You can create and configure a client certificate. A + client certificate is used when the WS-Management client is configured to use + certificate authentication. ### Directory Hierarchy of the WSMan Provider @@ -91,32 +94,33 @@ follows. ``` WSMan:\localhost ---- Client ---- Service ---- Shell ---- Listener ------- ---- Plugin ------- Event Forwarding Plugin ---------- InitializationParameters ---------- Resources ------------- Security ------- Microsoft.PowerShell ---------- InitializationParameters ---------- Resources ------------- Security ------- WMI Provider ---------- InitializationParameters ---------- Resources ------------- Security ---- ClientCertificate + \Client + \Service + \Shell + \Listener + \ + \Plugin + \Event Forwarding Plugin + \InitializationParameters + \Resources + \Security + \Microsoft.PowerShell + \InitializationParameters + \Resources + \Security + \WMI Provider + \InitializationParameters + \Resources + \Security + \ClientCertificate ``` The directory hierarchy of the WSMan provider for a remote computer is the same as a local computer. However, in order to access the configuration settings of a remote computer, you need to make a connection to the remote computer using -[Connect-WSMan](xref:Microsoft.WSMan.Management.Connect-WSMan). Once a connection is made to a remote -computer, the name of the remote computer shows up in the provider. +[Connect-WSMan][09]. Once a +connection is made to a remote computer, the name of the remote computer shows +up in the provider. ``` WSMan:\ @@ -139,9 +143,9 @@ Set-Location C: ### Navigating to a remote system store location -This command uses the `Set-Location` command to change the current location -to the root location in the remote system store location. Use a backslash `\` -or forward slash `/` to indicate a level of the `WSMan:` drive. +This command uses the `Set-Location` command to change the current location to +the root location in the remote system store location. Use a backslash `\` or +forward slash `/` to indicate a level of the `WSMan:` drive. ```powershell Set-Location -Path WSMan:\SERVER01 @@ -153,8 +157,8 @@ 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 -in the Localhost store location. +This command uses the `Get-ChildItem` cmdlet to display the WS-Management +stores in the Localhost store location. ```powershell Get-ChildItem -Path WSMan:\Localhost @@ -176,8 +180,8 @@ Get-ChildItem -Path WSMan:\SERVER01 ## 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 -accept all hosts with the suffix "contoso.com". +`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. @@ -185,8 +189,8 @@ PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that -appends a value instead of changing it. The following example will append a -new value "*.domain2.com" to the old value stored in `TrustedHost:` +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 @@ -196,11 +200,10 @@ Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ### 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 -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. +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 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 @@ -211,66 +214,80 @@ New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force This command creates (registers) a plug-in for the WS-Management service. ```powershell -New-Item -Path WSMan:\localhost\Plugin ` - -Plugin TestPlugin ` - -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` - -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` - -SDKVersion 1 ` - -Capability "Get","Put","Invoke","Enumerate" ` - -XMLRenderingType text +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin' + Plugin = 'TestPlugin' + FileName = "$Env:SystemRoot\system32\WsmWmiPl.dll" + Resource = 'http://schemas.dmtf.org/wbem/wscim/2/cim-schema' + SDKVersion = 1 + Capability = 'Get', 'Put', 'Invoke', 'Enumerate' + XMLRenderingType = 'text' +} +New-Item @newItemSplat ``` ### Creating a new resource entry -This command creates a resource entry in the Resources directory of -a TestPlugin. This command assumes that a TestPlugin has been created using -a separate command. +This command creates a resource entry in the `Resources` directory of a +`TestPlugin`. This command assumes that a `TestPlugin` has been created using a +separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\Resources ` - -ResourceUri http://schemas.dmtf.org/wbem/wscim/3/cim-schema ` - -Capability "Enumerate" - +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\Resources' + ResourceUri = 'http://schemas.dmtf.org/wbem/wscim/3/cim-schema' + Capability = "Enumerate" +} +New-Item @newItemSplat ``` ### Creating a new security entry for a resource This command creates a security entry in the Security directory of -Resource_5967683 (a specific resource). This command assumes that the resource -entry has been created using a separate command. +`Resource_5967683` (a specific resource). This command assumes that the +resource entry has been created using a separate command. ```powershell $path = "WSMan:\localhost\Plugin\TestPlugin\Resources\Resource_5967683" -New-Item -Path $path\Security ` - -Sddl "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +$newItemSplat = @{ + Path = "$path\Security" + Sddl = "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +} +New-Item @newItemSplat ``` ### Creating a new Client Certificate This command creates **ClientCertificate** entry that can be used by the WS-Management client. The new **ClientCertificate** will show up under the -**ClientCertificate** directory as "ClientCertificate_1234567890". All of the +**ClientCertificate** directory as `ClientCertificate_1234567890`. All of the parameters are mandatory. The **Issuer** needs to be thumbprint of the issuers certificate. ```powershell $cred = Get-Credential -New-Item -Path WSMan:\localhost\ClientCertificate ` - -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -Uri wmicimv2/* ` - -Credential $cred; +$newItemSplat = @{ + Path = 'WSMan:\localhost\ClientCertificate' + Issuer = '1b3fd224d66c6413fe20d21e38b304226d192dfe' + URI = 'wmicimv2/*' + Credential = $cred +} +New-Item @newItemSplat ``` ### Creating a new Initialization Parameter -This command creates an Initialization parameter named "testparametername" -in the "InitializationParameters" directory. This command assumes that the -"TestPlugin" has been created using a separate command. +This command creates an Initialization parameter named `testparametername` +in the `InitializationParameters` directory. This command assumes that the +`TestPlugin` has been created using a separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters ` - -ParamName testparametername ` - -ParamValue testparametervalue +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\InitializationParameters' + ParamName = 'testparametername' + ParamValue = 'testparametervalue' +} +New-Item @newItemSplat ``` ## Dynamic parameters @@ -296,11 +313,11 @@ of the following: #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Capability \ -When working with *Plug-ins* this parameter specifies an operation that is +When working with _Plug-ins_ this parameter specifies an operation that is supported on this Uniform Resource Identifier (URI). You have to create one entry for each type of operation that the URI supports. You can specify any valid attributes for a given operation, if the operation supports it. @@ -312,74 +329,87 @@ These attributes include **SupportsFiltering** and **SupportsFragment**. supports the concept. - The **SupportFiltering** attribute is NOT valid for Create operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Delete**: Delete operations are supported on the URI. - The **SupportFragment** attribute is used if the Delete operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Delete operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Enumerate**: Enumerate operations are supported on the URI. - The **SupportFragment** attribute is NOT supported for Enumerate operations and should be set to False. - The **SupportFiltering** attribute is valid, and if the plug-in supports filtering, this attribute should be set to "True". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Get**: Get operations are supported on the URI. - The **SupportFragment** attribute is used if the Get operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Get operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Invoke**: Invoke operations are supported on the URI. - The **SupportFragment** attribute is not supported for Invoke operations and should be set to False. - The **SupportFiltering** attribute is not valid and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Put**: Put operations are supported on the URI. - The **SupportFragment** attribute is used if the Put operation supports the concept. - The **SupportFiltering** attribute is not valid for Put operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Subscribe**: Subscribe operations are supported on the URI. - The **SupportFragment** attribute is not supported for Subscribe operations and should be set to False. - - The **SupportFiltering** attribute is not valid for Subscribe operations and - should be set to "False". + - The **SupportFiltering** attribute is not valid for Subscribe operations + and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Shell**: Shell operations are supported on the URI. - The **SupportFragment** attribute is not supported for Shell operations and should be set to "False". - The **SupportFiltering** attribute is not valid for Shell operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if ANY other operation is also - > supported. - > [!NOTE] - > If a Shell operation is configured for a URI, Get, Put, Create, Delete, - > Invoke, and Enumerate operations are processed internally within the - > WS-Management (WinRM) service to manage shells. As a result, the plug-in - > cannot handle the operations. + > supported. If a Shell operation is configured for a URI, Get, Put, Create, + > Delete, Invoke, and Enumerate operations are processed internally within + > the WS-Management (WinRM) service to manage shells. As a result, the + > plug-in cannot handle the operations. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### CertificateThumbprint \ @@ -390,12 +420,12 @@ Thumbprint field of the certificate. It specifies the digital public key certificate (X509) of a user account that has permission to perform this action. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts, and they do not work with domain -accounts. To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` -cmdlets in the PowerShell `Cert:` drive. +accounts. To get a certificate thumbprint, use the `Get-Item` or +`Get-ChildItem` cmdlets in the PowerShell `Cert:` drive. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Enabled \ @@ -403,7 +433,7 @@ Specifies whether the listener is enabled or disabled. The default is True. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### FileName (Plugin) \ @@ -415,7 +445,7 @@ cannot be blank and must point to a valid plug-in. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### HostName \ @@ -427,7 +457,7 @@ string, or a wildcard character. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Issuer \ @@ -435,7 +465,7 @@ Specifies the name of the certification authority that issued the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Plugin \<\> WS-Management plug-ins are native dynamic link libraries (DLLs) @@ -449,7 +479,7 @@ requests are routed to these plug-in entry points to perform operations. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Port \ @@ -458,7 +488,7 @@ value from 1 through 65535. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -478,7 +508,7 @@ For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -493,7 +523,7 @@ A URI consists of a prefix and a path to a resource. For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### SDKVersion \ @@ -502,7 +532,7 @@ Specifies the version of the WS-Management plug-in SDK. The only valid value is #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Subject \ @@ -510,7 +540,7 @@ Specifies the entity that is identified by the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Transport \ @@ -521,7 +551,7 @@ Note: The Transport value is set when creating a Listener. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URI \ @@ -530,7 +560,7 @@ Sddl parameter. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URLPrefix \ @@ -543,7 +573,7 @@ in the destination address. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Value \ @@ -552,7 +582,7 @@ value that is used to specify configuration options. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### XMLRenderingType \ @@ -567,7 +597,7 @@ Specifies the format in which XML is passed to plug-ins through the #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ## Using the pipeline @@ -582,10 +612,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file -system drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file -system drive. +[Get-Help][02] command in a file system drive or use the `-Path` parameter of +[Get-Help][02] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -597,4 +625,15 @@ Get-Help Get-ChildItem -Path WSMan: ## See also -- [about_Providers](../../Microsoft.PowerShell.Core/About/about_Providers.md) +- [about_Providers][01] + + +[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md +[02]: xref:Microsoft.PowerShell.Core.Get-Help +[03]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[04]: xref:Microsoft.PowerShell.Management.Get-Item +[05]: xref:Microsoft.PowerShell.Management.Get-Location +[06]: xref:Microsoft.PowerShell.Management.New-Item +[07]: xref:Microsoft.PowerShell.Management.Remove-Item +[08]: xref:Microsoft.PowerShell.Management.Set-Location +[09]: xref:Microsoft.WSMan.Management.Connect-WSMan diff --git a/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md index c078c0743a03..35da0a821189 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Connect-WSMan.md @@ -18,16 +18,18 @@ Connects to the WinRM service on a remote computer. ### ComputerName (Default) ``` -Connect-WSMan [-ApplicationName ] [[-ComputerName] ] [-OptionSet ] [-Port ] - [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Connect-WSMan [-ApplicationName ] [[-ComputerName] ] + [-OptionSet ] [-Port ] [-SessionOption ] [-UseSSL] + [-Credential ] [-Authentication ] + [-CertificateThumbprint ] [] ``` ### URI ``` -Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] [-SessionOption ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] + [-SessionOption ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` diff --git a/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md index 44fb34e4a5a9..4d680103ba4a 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -87,7 +87,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/Enable-WSManCredSSP.md b/reference/7.5/Microsoft.WSMan.Management/Enable-WSManCredSSP.md index c52c646b3fd2..c72157dd1666 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Enable-WSManCredSSP.md +++ b/reference/7.5/Microsoft.WSMan.Management/Enable-WSManCredSSP.md @@ -18,7 +18,8 @@ Enables Credential Security Support Provider (CredSSP) authentication on a compu ### All ``` -Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] [] +Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] + [] ``` ## DESCRIPTION @@ -217,7 +218,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md index 159596eda5d1..120e49bde7b1 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -18,19 +18,22 @@ Displays management information for a resource instance specified by a Resource ### GetInstance (Default) ``` -Get-WSManInstance [-ApplicationName ] [-ComputerName ] [-ConnectionURI ] [-Dialect ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet ] +Get-WSManInstance [-ApplicationName ] [-ComputerName ] + [-ConnectionURI ] [-Dialect ] [-Fragment ] [-OptionSet ] + [-Port ] [-ResourceURI] [-SelectorSet ] [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### Enumerate ``` -Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] [-ComputerName ] - [-ConnectionURI ] [-Dialect ] [-Enumerate] [-Filter ] [-OptionSet ] - [-Port ] [-Associations] [-ResourceURI] [-ReturnType ] [-SessionOption ] - [-Shallow] [-UseSSL] [-Credential ] [-Authentication ] +Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] + [-ComputerName ] [-ConnectionURI ] [-Dialect ] [-Enumerate] + [-Filter ] [-OptionSet ] [-Port ] [-Associations] + [-ResourceURI] [-ReturnType ] [-SessionOption ] [-Shallow] + [-UseSSL] [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -575,7 +578,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md index 4f1306ccab10..21610f6bf846 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.5/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -18,19 +18,22 @@ Invokes an action on the object that is specified by the Resource URI and by the ### URI (Default) ``` -Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] [-OptionSet ] - [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] [-ResourceURI] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] + [-OptionSet ] [[-SelectorSet] ] [-SessionOption ] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### ComputerName ``` -Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [[-SelectorSet] ] [-SessionOption ] - [-UseSSL] [-ValueSet ] [-ResourceURI] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] + [[-SelectorSet] ] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION @@ -47,7 +50,13 @@ 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 +$params = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name = 'spooler'} + Authentication = 'Default' +} +Invoke-WSManAction @params ``` ```Output @@ -86,7 +95,12 @@ 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:\"} +$invokeWSManActionSplat = @{ + Action = 'Create' + ResourceURI = 'wmicimv2/Win32_Process' + ValueSet = @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -105,7 +119,14 @@ 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 +$invokeWSManActionSplat = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name="spooler"} + ComputerName = 'server01' + Authentication = 'Default' +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -216,7 +237,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows PowerShell Cert: drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows +PowerShell Cert: drive. ```yaml Type: System.String @@ -299,7 +321,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: @@ -470,7 +501,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md index d2ee9d049fa1..82f928e8fc1b 100644 --- a/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/New-WSManInstance.md @@ -18,18 +18,21 @@ Creates a new instance of a management resource. ### ComputerName (Default) ``` -New-WSManInstance [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] - [-SessionOption ] [-UseSSL] [-ValueSet ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +New-WSManInstance [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] [-ResourceURI] + [-SelectorSet] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI ``` -New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] [-ResourceURI] - [-SelectorSet] [-SessionOption ] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] + [-ResourceURI] [-SelectorSet] [-SessionOption ] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -128,8 +131,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell Cert: -drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell +Cert: drive. ```yaml Type: System.String @@ -213,7 +216,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmi/cimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + File = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: @@ -347,9 +359,9 @@ Specifies that the Secure Sockets Layer (SSL) protocol should be used to establi the remote computer. By default, SSL is not used. WS-Management encrypts all the Windows PowerShell content that is transmitted over the network. The -**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is not -available on the port that is used for the connection and you specify this parameter, the command -fails. +**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is +not available on the port that is used for the connection and you specify this parameter, the +command fails. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md index bbbd762716eb..1992a572fff9 100644 --- a/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.5/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -16,8 +16,9 @@ Creates session option hash table to use as input parameters for WS-Management c ## SYNTAX ``` -New-WSManSessionOption [-ProxyAccessType ] [-ProxyAuthentication ] - [-ProxyCredential ] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] +New-WSManSessionOption [-ProxyAccessType ] + [-ProxyAuthentication ] [-ProxyCredential ] + [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] [-OperationTimeout ] [-NoEncryption] [-UseUTF16] [] ``` @@ -265,7 +266,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/Remove-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/Remove-WSManInstance.md index da39638d2d9c..33e576a12eab 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Remove-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/Remove-WSManInstance.md @@ -18,10 +18,11 @@ Deletes a management resource instance. ### ComputerName (Default) ``` -Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-OptionSet ] - [-Port ] [-ResourceURI] [-SelectorSet] [-SessionOption ] - [-UseSSL] [-Credential ] [-Authentication ] - [-CertificateThumbprint ] [] +Remove-WSManInstance [-ApplicationName ] [-ComputerName ] + [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] + [-SessionOption ] [-UseSSL] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI @@ -29,7 +30,8 @@ Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-Opti ``` Remove-WSManInstance [-ConnectionURI ] [-OptionSet ] [-ResourceURI] [-SelectorSet] [-SessionOption ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md index 5ed3743ea431..5bd4b2ee1842 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.5/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -18,19 +18,21 @@ Modifies the management information that is related to a resource. ### ComputerName (Default) ``` -Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] [-FilePath ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] - [[-SelectorSet] ] [-SessionOption ] [-UseSSL] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] + [-FilePath ] [-Fragment ] [-OptionSet ] [-Port ] + [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] + [-UseSSL] [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### URI ``` -Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] [-Fragment ] - [-OptionSet ] [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] - [-ValueSet ] [-Credential ] [-Authentication ] +Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] + [-Fragment ] [-OptionSet ] [-ResourceURI] + [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] + [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -45,7 +47,12 @@ This cmdlet uses the WinRM connection/transport layer to modify the information. ### Example 1: Disable a listener on the local computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -105,7 +112,13 @@ This succeeds: `-ValueSet @{MaxEnvelopeSizekb ="200"}` ### Example 3: Disable a listener on a remote computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -ComputerName SERVER02 -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + ComputerName = 'SERVER02' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -133,6 +146,29 @@ This fails: `-ValueSet @{enabled="False"}` This succeeds: `-ValueSet @{Enabled="False"}` +### Example 4: Manage a resource using an input file + +The following command uses the **FilePath** parameter to update a management resource. Specify the +management resource using the **ResourceURI** and **SelectorSet** parameters. + +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` + +This command calls the **StopService** method on the Spooler service using input from a file. The +`input.xml` file contains the following content: + +```xml + +``` + ## PARAMETERS ### -ApplicationName @@ -312,16 +348,8 @@ Accept wildcard characters: False ### -FilePath -Specifies the path of a file that is used to update a management resource. You specify the -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` - -This command calls the **StopService** method on the Spooler service by using input from a file. -The file, `Input.xml`, contains the following content: - -`` +Specifies the path of a file used to update a management resource. For more information, see +[Example 4](#example-4-manage-a-resource-using-an-input-file). ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.WSMan.Management/Set-WSManQuickConfig.md b/reference/7.5/Microsoft.WSMan.Management/Set-WSManQuickConfig.md index d65f8fb24805..083c1fb1bbde 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Set-WSManQuickConfig.md +++ b/reference/7.5/Microsoft.WSMan.Management/Set-WSManQuickConfig.md @@ -136,7 +136,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md index 9eae71f8b34f..97bf506d9fbb 100644 --- a/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.5/Microsoft.WSMan.Management/Test-WSMan.md @@ -15,9 +15,9 @@ Tests whether the WinRM service is running on a local or remote computer. ## SYNTAX ``` -Test-WSMan [[-ComputerName] ] [-Authentication ] [-Port ] [-UseSSL] - [-ApplicationName ] [-Credential ] [-CertificateThumbprint ] - [] +Test-WSMan [[-ComputerName] ] [-Authentication ] + [-Port ] [-UseSSL] [-ApplicationName ] [-Credential ] + [-CertificateThumbprint ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/PSDiagnostics/Start-Trace.md b/reference/7.5/PSDiagnostics/Start-Trace.md index 11868cdfbbbe..560e62c28c42 100644 --- a/reference/7.5/PSDiagnostics/Start-Trace.md +++ b/reference/7.5/PSDiagnostics/Start-Trace.md @@ -16,9 +16,10 @@ Start an Event Trace logging session. ## SYNTAX ``` -Start-Trace [-SessionName] [[-OutputFilePath] ] [[-ProviderFilePath] ] - [-ETS] [-Format ] [-MinBuffers ] [-MaxBuffers ] - [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] [] +Start-Trace [-SessionName] [[-OutputFilePath] ] + [[-ProviderFilePath] ] [-ETS] [-Format ] [-MinBuffers ] + [-MaxBuffers ] [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine.md b/reference/7.5/PSReadLine/About/about_PSReadLine.md index 380586988cc7..51c79008519b 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine.md @@ -65,8 +65,8 @@ Install-Module -Name PSReadLine -AllowClobber -Force Predictive IntelliSense is an addition to the concept of tab completion that assists the user in successfully completing commands. It enables users to -discover, edit, and execute full commands based on matching predictions from the -user's history and additional domain specific plugins. +discover, edit, and execute full commands based on matching predictions from +the user's history and additional domain specific plugins. ### Enable Predictive IntelliSense diff --git a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md index dee3b2fd758e..6e037c2b8a89 100644 --- a/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.5/PSReadLine/About/about_PSReadLine_Functions.md @@ -1170,8 +1170,8 @@ pressing the `#` key sends 10 `#` characters (`##########`) to the input line. Similarly, you can use this with other operations, like `` or `Left-Arrow`. -- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, - `Alt+8`, `Alt+9`, `Alt+-` +- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, + `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Emacs mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Vi command mode: `<0>`, `<1>`, `<2>`, `<3>`, `<4>`, `<5>`, `<6>`, `<7>`, @@ -1672,7 +1672,7 @@ Behavior of the OnIdle event - [about_PSReadLine][02] -[01]: /dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters +[01]: xref:Microsoft.PowerShell.PSConsoleReadLineOptions.WordDelimiters%2A#microsoft-powershell-psconsolereadlineoptions-worddelimiters [02]: about_PSReadLine.md [03]: https://apps.microsoft.com/detail/9N0DX20HK701 [04]: xref:PSReadLine.Get-PSReadLineOption diff --git a/reference/7.5/PSReadLine/Get-PSReadLineKeyHandler.md b/reference/7.5/PSReadLine/Get-PSReadLineKeyHandler.md index a0e74c4106cc..e582bff41945 100644 --- a/reference/7.5/PSReadLine/Get-PSReadLineKeyHandler.md +++ b/reference/7.5/PSReadLine/Get-PSReadLineKeyHandler.md @@ -181,7 +181,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/PSReadLine/Set-PSReadLineOption.md b/reference/7.5/PSReadLine/Set-PSReadLineOption.md index 24c5d2b46a41..c36a6dd13d25 100644 --- a/reference/7.5/PSReadLine/Set-PSReadLineOption.md +++ b/reference/7.5/PSReadLine/Set-PSReadLineOption.md @@ -16,16 +16,17 @@ Customizes the behavior of command line editing in **PSReadLine**. ## SYNTAX ``` -Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] [-HistoryNoDuplicates] - [-AddToHistoryHandler ] [-CommandValidationHandler ] - [-HistorySearchCursorMovesToEnd] [-MaximumHistoryCount ] [-MaximumKillRingCount ] - [-ShowToolTips] [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] +Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] + [-HistoryNoDuplicates] [-AddToHistoryHandler ] + [-CommandValidationHandler ] [-HistorySearchCursorMovesToEnd] + [-MaximumHistoryCount ] [-MaximumKillRingCount ] [-ShowToolTips] + [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] [-BellStyle ] [-CompletionQueryItems ] [-WordDelimiters ] - [-HistorySearchCaseSensitive] [-HistorySaveStyle ] [-HistorySavePath ] - [-AnsiEscapeTimeout ] [-PromptText ] [-ViModeIndicator ] - [-ViModeChangeHandler ] [-PredictionSource ] - [-PredictionViewStyle ] [-Colors ] - [-TerminateOrphanedConsoleApps] [] + [-HistorySearchCaseSensitive] [-HistorySaveStyle ] + [-HistorySavePath ] [-AnsiEscapeTimeout ] [-PromptText ] + [-ViModeIndicator ] [-ViModeChangeHandler ] + [-PredictionSource ] [-PredictionViewStyle ] + [-Colors ] [-TerminateOrphanedConsoleApps] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md index a1f9b5da57f2..86c0c955acb0 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-LocalizedData.md @@ -17,8 +17,9 @@ for the operating system. ## SYNTAX ``` -Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] [-BaseDirectory ] - [-FileName ] [-SupportedCommand ] [] +Import-LocalizedData [[-BindingVariable] ] [[-UICulture] ] + [-BaseDirectory ] [-FileName ] [-SupportedCommand ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-PSSession.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-PSSession.md index cbd86bf24a39..6b31c71305ae 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-PSSession.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-PSSession.md @@ -17,10 +17,11 @@ Imports commands from another session into the current session. ## SYNTAX ``` -Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] [-AllowClobber] - [-ArgumentList ] [-CommandType ] [-Module ] - [-FullyQualifiedModule ] [[-FormatTypeName] ] - [-Certificate ] [-Session] [] +Import-PSSession [-Prefix ] [-DisableNameChecking] [[-CommandName] ] + [-AllowClobber] [-ArgumentList ] [-CommandType ] + [-Module ] [-FullyQualifiedModule ] + [[-FormatTypeName] ] [-Certificate ] [-Session] + [] ``` ## DESCRIPTION @@ -281,8 +282,8 @@ Function Start-BitsTransfer Function Suspend-BitsTransfer ``` -This command shows how to use the **Module** parameter of `Get-Command` to find out which commands were -imported into the session by an `Import-PSSession` command. +This command shows how to use the **Module** parameter of `Get-Command` to find out which commands +were imported into the session by an `Import-PSSession` command. The first command uses the `Import-PSSession` cmdlet to import commands whose names include "bits" from the PSSession in the `$S` variable. The `Import-PSSession` command returns a temporary module, @@ -528,7 +529,8 @@ and module names. Wildcards are not permitted. `Import-PSSession` cannot import providers from a snap-in. -For more information, see [about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) +For more information, see +[about_PSSnapins](/powershell/module/Microsoft.PowerShell.Core/About/about_PSSnapins) and [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ```yaml diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md index 1d8639f6c816..36ba68fe3455 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-RestMethod.md @@ -21,75 +21,85 @@ Sends an HTTP or HTTPS request to a RESTful web service. ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] - [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] - [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy ``` Invoke-RestMethod [-FollowRelLink] [-MaximumFollowRelLink ] - [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] [-Uri] - [-HttpVersion ] [-WebSession ] [-SessionVariable ] - [-AllowUnencryptedAuthentication] [-Authentication ] - [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-ResponseHeadersVariable ] [-StatusCodeVariable ] [-UseBasicParsing] + [-Uri] [-HttpVersion ] [-WebSession ] + [-SessionVariable ] [-AllowUnencryptedAuthentication] + [-Authentication ] [-Credential ] + [-UseDefaultCredentials] [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index d083a5a97db4..ebf6e12b5daf 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -21,67 +21,77 @@ Gets content from a web page on the internet. ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-ProxyUseDefaultCredentials] [-Body ] [-Form ] + [-ContentType ] [-TransferEncoding ] [-InFile ] + [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` ### StandardMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] [-Method ] [-PreserveHttpMethodOnRedirect] - [-UnixSocket ] [-NoProxy] [-Body ] [-Form ] - [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] - [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-UnixSocket ] [-NoProxy] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethod ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] - [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] - [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy ``` Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] - [-WebSession ] [-SessionVariable ] [-AllowUnencryptedAuthentication] - [-Authentication ] [-Credential ] [-UseDefaultCredentials] - [-CertificateThumbprint ] [-Certificate ] [-SkipCertificateCheck] - [-SslProtocol ] [-Token ] [-UserAgent ] [-DisableKeepAlive] - [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] [-Headers ] - [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] - [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] - -CustomMethod [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-WebSession ] [-SessionVariable ] + [-AllowUnencryptedAuthentication] [-Authentication ] + [-Credential ] [-UseDefaultCredentials] [-CertificateThumbprint ] + [-Certificate ] [-SkipCertificateCheck] [-SslProtocol ] + [-Token ] [-UserAgent ] [-DisableKeepAlive] + [-ConnectionTimeoutSeconds ] [-OperationTimeoutSeconds ] + [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] + [-MaximumRedirection ] [-MaximumRetryCount ] + [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` @@ -1416,7 +1426,14 @@ properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuser as Chrome, Firefox, InternetExplorer, Opera, and Safari. For example, the following command uses the user agent string for Internet Explorer: -`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)` + +```powershell +$params = @{ + Uri = 'https://website.com/' + UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer +} +Invoke-WebRequest @params +``` ```yaml Type: System.String diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Join-String.md b/reference/7.6/Microsoft.PowerShell.Utility/Join-String.md index 948a51069c38..acee929f0efa 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Join-String.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Join-String.md @@ -17,32 +17,33 @@ Combines objects from the pipeline into a single string. ### Default (Default) ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-UseCulture] [-InputObject ] [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-UseCulture] + [-InputObject ] [] ``` ### SingleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-SingleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-SingleQuote] [-UseCulture] + [-InputObject ] [] ``` ### DoubleQuote ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-DoubleQuote] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-DoubleQuote] [-UseCulture] + [-InputObject ] [] ``` ### Format ``` -Join-String [[-Property] ] [[-Separator] ] [-OutputPrefix ] - [-OutputSuffix ] [-FormatString ] [-UseCulture] [-InputObject ] - [] +Join-String [[-Property] ] [[-Separator] ] + [-OutputPrefix ] [-OutputSuffix ] [-FormatString ] [-UseCulture] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/New-Alias.md index 4fcaff8df28c..d75ead5b25d7 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-Alias.md @@ -18,8 +18,9 @@ Creates a new alias. ## SYNTAX ``` -New-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +New-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-Event.md b/reference/7.6/Microsoft.PowerShell.Utility/New-Event.md index 511008b41b4d..83f9ead0487d 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-Event.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-Event.md @@ -16,8 +16,8 @@ Creates a new event. ## SYNTAX ``` -New-Event [-SourceIdentifier] [[-Sender] ] [[-EventArguments] ] - [[-MessageData] ] [] +New-Event [-SourceIdentifier] [[-Sender] ] + [[-EventArguments] ] [[-MessageData] ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md b/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md index 266456a0aa11..bce25c2f6751 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-Object.md @@ -18,7 +18,8 @@ Creates an instance of a Microsoft .NET Framework or COM object. ### Net (Default) ``` -New-Object [-TypeName] [[-ArgumentList] ] [-Property ] [] +New-Object [-TypeName] [[-ArgumentList] ] [-Property ] + [] ``` ### Com @@ -92,8 +93,8 @@ At line:1 char:14 This example shows how to create and use a COM object to manage your Windows desktop. The first command uses the **ComObject** parameter of the `New-Object` cmdlet to create a COM object -with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. The -second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the +with the **Shell.Application** ProgID. It stores the resulting object in the `$objShell` variable. +The second command pipes the `$objShell` variable to the `Get-Member` cmdlet, which displays the properties and methods of the COM object. Among the methods is the **ToggleDesktop** method. The third command calls the **ToggleDesktop** method of the object to minimize the open windows on your desktop. @@ -209,9 +210,16 @@ Specifies an array of arguments to pass to the constructor of the .NET Framework constructor takes a single parameter that is an array, you must wrap that parameter inside another array. For example: -`$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList (,$bytes)` +```powershell +$params = @{ + TypeName = 'System.Security.Cryptography.X509Certificates.X509Certificate' + ArgumentList = (,$bytes) +} +$cert = New-Object @params +``` -For more information about the behavior of **ArgumentList**, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). +For more information about the behavior of **ArgumentList**, see +[about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md#splatting-with-arrays). The alias for **ArgumentList** is **Args**. @@ -306,7 +314,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-TemporaryFile.md b/reference/7.6/Microsoft.PowerShell.Utility/New-TemporaryFile.md index eed41bde75c6..f3fdd13d7cb0 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-TemporaryFile.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-TemporaryFile.md @@ -47,8 +47,8 @@ order and uses the first path found: $TempFile = New-TemporaryFile ``` -This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file -in the `$TempFile` variable. You can use this file later in your script. +This command generates a `.tmp` file in your temporary folder, and then stores a reference to the +file in the `$TempFile` variable. You can use this file later in your script. ## PARAMETERS @@ -89,7 +89,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/New-Variable.md b/reference/7.6/Microsoft.PowerShell.Utility/New-Variable.md index 4df870cf5751..dcccbce83960 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/New-Variable.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/New-Variable.md @@ -18,9 +18,9 @@ Creates a new variable. ## SYNTAX ``` -New-Variable [-Name] [[-Value] ] [-Description ] [-Option ] - [-Visibility ] [-Force] [-PassThru] [-Scope ] [-WhatIf] [-Confirm] - [] +New-Variable [-Name] [[-Value] ] [-Description ] + [-Option ] [-Visibility ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -359,7 +359,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Out-File.md b/reference/7.6/Microsoft.PowerShell.Utility/Out-File.md index 4cd69f47a91a..231143f4c5a6 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Out-File.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Out-File.md @@ -19,14 +19,16 @@ Sends output to a file. ``` Out-File [-FilePath] [[-Encoding] ] [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` Out-File [[-Encoding] ] -LiteralPath [-Append] [-Force] [-NoClobber] - [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] [] + [-Width ] [-NoNewline] [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Out-GridView.md b/reference/7.6/Microsoft.PowerShell.Utility/Out-GridView.md index 7bae47acd3c9..c062031b94e1 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Out-GridView.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Out-GridView.md @@ -332,7 +332,7 @@ Deserialized output from remote commands might not be formatted correctly in the **To hide or show a column:** 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected +1. In the **Select Columns** dialog box, use the arrow keys to move the columns between the Selected columns to the Available columns boxes. Only columns in the **Select Columns** box appear in the grid view window. @@ -341,7 +341,7 @@ Deserialized output from remote commands might not be formatted correctly in the You can drag and drop columns into the desired location. Or use the following steps: 1. Right-click any column header and click **Select Columns**. -2. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder +1. In the **Select Columns** dialog box, use the **Move up** and **Move down** buttons to reorder the columns. Columns at the top of the list appear to the left of columns at the bottom of the list in the grid view window. @@ -356,9 +356,10 @@ You can drag and drop columns into the desired location. Or use the following st - To select a row, select the row or use the up or down arrow to navigate to the row. - To select all rows (except for the header row), press CTRL+A. -- To select consecutive rows, press and hold the SHIFT key while clicking the rows or using the - arrow keys. -- To select nonconsecutive rows, press the CTRL key and click to add a row to the selection. +- To select consecutive rows, press and hold the SHIFT key while clicking the rows or + using the arrow keys. +- To select nonconsecutive rows, press the CTRL key and click to add a row to the + selection. - You cannot select columns, and you cannot select the entire column header row. **How to Copy Rows** @@ -414,11 +415,11 @@ The criteria only affects the display. It does not delete items from the table. 1. To display the **Add criteria** menu button, in the upper right corner of the window, click the Expand arrow. -2. Click the **Add Criteria** menu button. -3. Click to select columns (properties). You can select one or many properties. -4. When you are finished selecting properties, click the **Add** button. -5. To cancel the additions, click **Cancel**. -6. To add more criteria, click the **Add Criteria** button again. +1. Click the **Add Criteria** menu button. +1. Click to select columns (properties). You can select one or many properties. +1. When you are finished selecting properties, click the **Add** button. +1. To cancel the additions, click **Cancel**. +1. To add more criteria, click the **Add Criteria** button again. **How to Edit a Criterion** diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Register-ObjectEvent.md b/reference/7.6/Microsoft.PowerShell.Utility/Register-ObjectEvent.md index 6c439f294acd..582f6adf6591 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Register-ObjectEvent.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Register-ObjectEvent.md @@ -15,9 +15,9 @@ Subscribes to the events that are generated by a Microsoft .NET Framework object ## SYNTAX ``` -Register-ObjectEvent [-InputObject] [-EventName] [[-SourceIdentifier] ] - [[-Action] ] [-MessageData ] [-SupportEvent] [-Forward] [-MaxTriggerCount ] - [] +Register-ObjectEvent [-InputObject] [-EventName] + [[-SourceIdentifier] ] [[-Action] ] [-MessageData ] + [-SupportEvent] [-Forward] [-MaxTriggerCount ] [] ``` ## DESCRIPTION @@ -29,13 +29,13 @@ When the subscribed event is raised, it is added to the event queue in your sess in the event queue, use the `Get-Event` cmdlet. You can use the parameters of `Register-ObjectEvent` to specify property values of the events that -can help you to identify the event in the queue. You can also use the **Action** parameter to specify -actions to take when a subscribed event is raised and the **Forward** parameter to send remote events -to the event queue in the local session. +can help you to identify the event in the queue. You can also use the **Action** parameter to +specify actions to take when a subscribed event is raised and the **Forward** parameter to send +remote events to the event queue in the local session. When you subscribe to an event, an event subscriber is added to your session. To get the event -subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the -`Unregister-Event` cmdlet, which deletes the event subscriber from the session. +subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use +the `Unregister-Event` cmdlet, which deletes the event subscriber from the session. ## EXAMPLES @@ -80,12 +80,13 @@ Id Name PSJobTypeName State HasMoreData Location Com 5 3db2d67a-efff-... NotStarted False New-Event @newEventArgs ``` -The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for event -actions. +The action uses the `$Sender` and `$EventArgs` automatic variables which are populated only for +event actions. The `Register-ObjectEvent` command returns a job object that represents the action, which runs as a background job. You can use the Job cmdlets, such as `Get-Job` and `Receive-Job`, to manage the -background job. For more information, see [about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). +background job. For more information, see +[about_Jobs](../Microsoft.PowerShell.Core/About/about_Jobs.md). ### Example 3: Subscribe to object events on remote computers @@ -180,11 +181,12 @@ Information : {} 47 ``` -The **PSEventJob** has a **Module** property that contains a dynamic script module that implements the -action. Using the call operator (`&`), we invoke the command in the module to display the +The **PSEventJob** has a **Module** property that contains a dynamic script module that implements +the action. Using the call operator (`&`), we invoke the command in the module to display the value of the `$Random` variable. -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ## PARAMETERS @@ -346,7 +348,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md b/reference/7.6/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md index b0d85ebdd837..4b859105dd7f 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md @@ -26,7 +26,8 @@ Remove-PSBreakpoint [-Breakpoint] [-WhatIf] [-Confirm] [ [-Runspace ] [-WhatIf] [-Confirm] [] +Remove-PSBreakpoint [-Id] [-Runspace ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Remove-TypeData.md b/reference/7.6/Microsoft.PowerShell.Utility/Remove-TypeData.md index 1128eacdcb45..d9b7412eb5d2 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Remove-TypeData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Remove-TypeData.md @@ -108,7 +108,8 @@ current session. Remove-TypeData -Path "$PSHOME\Modules\PSScheduledJob", "$PSHOME\Modules\PSWorkflow\PSWorkflow.types.ps1xml" ``` -For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). +For more information about modules, see +[about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md). ### Example 5: Remove extended types from a remote session diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Remove-Variable.md b/reference/7.6/Microsoft.PowerShell.Utility/Remove-Variable.md index 62a9d30ce06d..f428300aa8d6 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Remove-Variable.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Remove-Variable.md @@ -18,8 +18,8 @@ Deletes a variable and its value. ## SYNTAX ``` -Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-Scope ] - [-WhatIf] [-Confirm] [] +Remove-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -120,7 +120,8 @@ Gets only the variables in the specified scope. The acceptable values for this p - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -170,7 +171,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Select-Object.md b/reference/7.6/Microsoft.PowerShell.Utility/Select-Object.md index 2b4946d1a185..221511d61c51 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Select-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Select-Object.md @@ -19,31 +19,31 @@ Selects objects or object properties. ### DefaultParameter (Default) ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Last ] [-First ] - [-Skip ] [-Wait] [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Last ] [-First ] [-Skip ] [-Wait] [] ``` ### SkipLastParameter ``` -Select-Object [-InputObject ] [[-Property] ] [-ExcludeProperty ] - [-ExpandProperty ] [-Unique] [-CaseInsensitive] [-Skip ] [-SkipLast ] - [] +Select-Object [-InputObject ] [[-Property] ] + [-ExcludeProperty ] [-ExpandProperty ] [-Unique] [-CaseInsensitive] + [-Skip ] [-SkipLast ] [] ``` ### IndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] [-Index ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-Wait] + [-Index ] [] ``` ### SkipIndexParameter ``` -Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] [-SkipIndex ] - [] +Select-Object [-InputObject ] [-Unique] [-CaseInsensitive] + [-SkipIndex ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Select-String.md b/reference/7.6/Microsoft.PowerShell.Utility/Select-String.md index f358180a7b10..5864cc7f6503 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Select-String.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Select-String.md @@ -21,48 +21,54 @@ Finds text in strings and files. ``` Select-String [-Culture ] [-Pattern] [-Path] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] + [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### ObjectRaw ``` -Select-String [-Culture ] -InputObject [-Pattern] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + -Raw [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### Object ``` -Select-String [-Culture ] -InputObject [-Pattern] [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] -InputObject [-Pattern] + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### FileRaw ``` -Select-String [-Culture ] [-Pattern] [-Path] -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] [-Path] -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFileRaw ``` -Select-String [-Culture ] [-Pattern] -LiteralPath -Raw [-SimpleMatch] - [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] [-Exclude ] [-NotMatch] - [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath -Raw + [-SimpleMatch] [-CaseSensitive] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ### LiteralFile ``` -Select-String [-Culture ] [-Pattern] -LiteralPath [-SimpleMatch] - [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] [-Exclude ] - [-NotMatch] [-AllMatches] [-Encoding ] [-Context ] [] +Select-String [-Culture ] [-Pattern] -LiteralPath + [-SimpleMatch] [-CaseSensitive] [-Quiet] [-List] [-NoEmphasis] [-Include ] + [-Exclude ] [-NotMatch] [-AllMatches] [-Encoding ] + [-Context ] [] ``` ## DESCRIPTION @@ -630,8 +636,8 @@ Accept wildcard characters: False Specifies the path to the files to be searched. The value of the **LiteralPath** parameter is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to -interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. For -more information, see +interpret any characters as escape sequences. Paths containing spaces must be enclosed in quotes. +For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Select-Xml.md b/reference/7.6/Microsoft.PowerShell.Utility/Select-Xml.md index 6a862d83760c..2dd0849f3bc7 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Select-Xml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Select-Xml.md @@ -17,25 +17,29 @@ Finds text in an XML string or document. ### Xml (Default) ``` -Select-Xml [-XPath] [-Xml] [-Namespace ] [] +Select-Xml [-XPath] [-Xml] [-Namespace ] + [] ``` ### Path ``` -Select-Xml [-XPath] [-Path] [-Namespace ] [] +Select-Xml [-XPath] [-Path] [-Namespace ] + [] ``` ### LiteralPath ``` -Select-Xml [-XPath] -LiteralPath [-Namespace ] [] +Select-Xml [-XPath] -LiteralPath [-Namespace ] + [] ``` ### Content ``` -Select-Xml [-XPath] -Content [-Namespace ] [] +Select-Xml [-XPath] -Content [-Namespace ] + [] ``` ## DESCRIPTION @@ -56,9 +60,9 @@ The first command saves the path to the `Types.ps1xml` file in the `$Path` varia The second command saves the XML path to the **AliasProperty** node in the `$XPath` variable. The `Select-Xml` cmdlet gets the **AliasProperty** nodes that are identified by -the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send the -**AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands the -**Node** object and returns its **Name** and **ReferencedMemberName** properties. +the XPath statement from the `Types.ps1xml` file. The command uses a pipeline operator (`|`) to send +the **AliasProperty** nodes to the `Select-Object` cmdlet. The **ExpandProperty** parameter expands +the **Node** object and returns its **Name** and **ReferencedMemberName** properties. ```powershell $Path = "$PSHOME\Types.ps1xml" @@ -92,7 +96,7 @@ file. For example, there is a **Count** property that is an alias of the **Lengt ### Example 2: Input an XML document -This example shows how to use the **XML** parameter to provide an XML document to the `Select-Xml` +This example shows how to use the **Xml** parameter to provide an XML document to the `Select-Xml` cmdlet. The `Get-Content` cmdlet gets the content of the `Types.ps1xml` file and saves it in the `$Types` diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Send-MailMessage.md b/reference/7.6/Microsoft.PowerShell.Utility/Send-MailMessage.md index 553fe1c8713a..302de4fcbb24 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Send-MailMessage.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Send-MailMessage.md @@ -18,11 +18,12 @@ Sends an email message. ### All ``` -Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] [-BodyAsHtml] - [-Encoding ] [-Cc ] [-DeliveryNotificationOption ] - -From [[-SmtpServer] ] [-Priority ] [-ReplyTo ] - [[-Subject] ] [-To] [-Credential ] [-UseSsl] [-Port ] - [] +Send-MailMessage [-Attachments ] [-Bcc ] [[-Body] ] + [-BodyAsHtml] [-Encoding ] [-Cc ] + [-DeliveryNotificationOption ] -From + [[-SmtpServer] ] [-Priority ] [-ReplyTo ] + [[-Subject] ] [-To] [-Credential ] [-UseSsl] + [-Port ] [] ``` ## DESCRIPTION @@ -212,8 +213,8 @@ user. Type a user name, such as **User01** or **Domain01\User01**. Or, enter a **PSCredential** object, such as one from the `Get-Credential` cmdlet. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see @@ -287,7 +288,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-Alias.md index cfe2011c1dca..da3d4c6f8ae1 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-Alias.md @@ -20,8 +20,9 @@ Creates or changes an alias for a cmdlet or other command in the current PowerSh ### Default (Default) ``` -Set-Alias [-Name] [-Value] [-Description ] [-Option ] - [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] [] +Set-Alias [-Name] [-Value] [-Description ] + [-Option ] [-PassThru] [-Scope ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-Date.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-Date.md index b54965a88421..8c92d41ff28c 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-Date.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-Date.md @@ -18,13 +18,15 @@ Changes the system time on the computer to a time that you specify. ### Date (Default) ``` -Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Date] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ### Adjust ``` -Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] [] +Set-Date [-Adjust] [-DisplayHint ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-MarkdownOption.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-MarkdownOption.md index e15feff5d5f7..ff7f52b68644 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-MarkdownOption.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-MarkdownOption.md @@ -17,11 +17,11 @@ Sets the colors and styles used for rendering Markdown content in the console. ### IndividualSetting (Default) ``` -Set-MarkdownOption [-Header1Color ] [-Header2Color ] [-Header3Color ] - [-Header4Color ] [-Header5Color ] [-Header6Color ] [-Code ] - [-ImageAltTextForegroundColor ] [-LinkForegroundColor ] - [-ItalicsForegroundColor ] [-BoldForegroundColor ] [-PassThru] - [] +Set-MarkdownOption [-Header1Color ] [-Header2Color ] + [-Header3Color ] [-Header4Color ] [-Header5Color ] + [-Header6Color ] [-Code ] [-ImageAltTextForegroundColor ] + [-LinkForegroundColor ] [-ItalicsForegroundColor ] + [-BoldForegroundColor ] [-PassThru] [] ``` ### Theme diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md index d95cc6af0296..3fa3c8ffe11b 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md @@ -19,15 +19,15 @@ Sets a breakpoint on a line, command, or variable. ### Line (Default) ``` -Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] [-Script] - [-Runspace ] [] +Set-PSBreakpoint [-Action ] [[-Column] ] [-Line] + [-Script] [-Runspace ] [] ``` ### Command ``` -Set-PSBreakpoint [-Action ] -Command [[-Script] ] [-Runspace ] - [] +Set-PSBreakpoint [-Action ] -Command [[-Script] ] + [-Runspace ] [] ``` ### Variable @@ -241,7 +241,8 @@ When the **Action** parameter is used, the Action scriptblock runs at each break does not stop unless the scriptblock includes the `break` keyword. If you use the `continue` keyword in the scriptblock, execution resumes until the next breakpoint. -For more information, see [about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), +For more information, see +[about_Script_Blocks](../Microsoft.PowerShell.Core/About/about_Script_Blocks.md), [about_Break](../Microsoft.PowerShell.Core/About/about_Break.md), and [about_Continue](../Microsoft.PowerShell.Core/About/about_Continue.md). @@ -351,6 +352,7 @@ Accept wildcard characters: False ``` ### -Runspace + Specifies the Id of a **Runspace** object so you can interact with breakpoints in the specified runspace. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-TraceSource.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-TraceSource.md index b16c93416cc4..372337ad0b43 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-TraceSource.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-TraceSource.md @@ -18,8 +18,9 @@ Configures, starts, and stops a trace of PowerShell components. ### optionsSet (Default) ``` -Set-TraceSource [-Name] [[-Option] ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [-PassThru] [] +Set-TraceSource [-Name] [[-Option] ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [-PassThru] [] ``` ### removeAllListenersSet @@ -43,7 +44,7 @@ can use it to specify which components will be traced and where the tracing outp ### Example 1: Trace the ParameterBinding component -``` +```powershell Set-TraceSource -Name "ParameterBinding" -Option ExecutionFlow -PSHost -ListenerOption "ProcessId,TimeStamp" ``` @@ -297,7 +298,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Set-Variable.md b/reference/7.6/Microsoft.PowerShell.Utility/Set-Variable.md index cd28acd4f5d1..e7ecfab73237 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Set-Variable.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Set-Variable.md @@ -19,9 +19,10 @@ Sets the value of a variable. Creates the variable if one with the requested nam ## SYNTAX ``` -Set-Variable [-Name] [[-Value] ] [-Include ] [-Exclude ] - [-Description ] [-Option ] [-Force] [-Visibility ] - [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] +Set-Variable [-Name] [[-Value] ] [-Include ] + [-Exclude ] [-Description ] [-Option ] [-Force] + [-Visibility ] [-PassThru] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Show-Command.md b/reference/7.6/Microsoft.PowerShell.Utility/Show-Command.md index 4e1a97570ab3..65d5b3d3c64c 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Show-Command.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Show-Command.md @@ -105,8 +105,10 @@ $PSDefaultParameterValues = @{ Now when you run a `Show-Command` command, the new defaults are applied automatically. To use these default values in every PowerShell session, add the `$PSDefaultParameterValues` variable to your -PowerShell profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) -and [about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). +PowerShell profile. For more information, see +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) +and +[about_Parameters_Default_Values](../Microsoft.PowerShell.Core/About/about_Parameters_Default_Values.md). ### Example 5: Send output to a grid view @@ -305,7 +307,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Show-Markdown.md b/reference/7.6/Microsoft.PowerShell.Utility/Show-Markdown.md index 22b85e22be44..fa838e3c0ebf 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Show-Markdown.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Show-Markdown.md @@ -155,7 +155,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Tee-Object.md b/reference/7.6/Microsoft.PowerShell.Utility/Tee-Object.md index 4797353a8e7c..dffdc9d5ca24 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Tee-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Tee-Object.md @@ -20,13 +20,15 @@ Saves command output in a file or variable and also sends it down the pipeline. ### File (Default) ``` -Tee-Object [-InputObject ] [-FilePath] [-Append] [[-Encoding] ] [] +Tee-Object [-InputObject ] [-FilePath] [-Append] + [[-Encoding] ] [] ``` ### LiteralFile ``` -Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] [] +Tee-Object [-InputObject ] -LiteralPath [[-Encoding] ] + [] ``` ### Variable @@ -329,7 +331,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Trace-Command.md b/reference/7.6/Microsoft.PowerShell.Utility/Trace-Command.md index e36ce1bc1f55..8e6938be64e5 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Trace-Command.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Trace-Command.md @@ -20,17 +20,19 @@ Configures and starts a trace of the specified expression or command. ### expressionSet (Default) ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Expression] [-ListenerOption ] [-FilePath ] [-Force] - [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Expression] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ### commandSet ``` -Trace-Command [-InputObject ] [-Name] [[-Option] ] - [-Command] [-ArgumentList ] [-ListenerOption ] - [-FilePath ] [-Force] [-Debugger] [-PSHost] [] +Trace-Command [-InputObject ] [-Name] + [[-Option] ] [-Command] [-ArgumentList ] + [-ListenerOption ] [-FilePath ] [-Force] [-Debugger] [-PSHost] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Unblock-File.md b/reference/7.6/Microsoft.PowerShell.Utility/Unblock-File.md index 942b21faac0c..509443f6c1aa 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Unblock-File.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Unblock-File.md @@ -70,7 +70,7 @@ PS C:\> dir C:\Downloads\*PowerShell* | Unblock-File This command shows how to find and unblock PowerShell scripts. -The first command uses the **Stream** parameter of the *Get-Item* cmdlet get files with the +The first command uses the **Stream** parameter of the `Get-Item` cmdlet to get files with the **Zone.Identifier** stream. The second command shows what happens when you run a blocked script in a PowerShell session in which diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Unregister-Event.md b/reference/7.6/Microsoft.PowerShell.Utility/Unregister-Event.md index 96d1f1a237fb..f34fe1ecb828 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Unregister-Event.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Unregister-Event.md @@ -18,13 +18,15 @@ Cancels an event subscription. ### BySource (Default) ``` -Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SourceIdentifier] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ById ``` -Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] [] +Unregister-Event [-SubscriptionId] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Update-FormatData.md b/reference/7.6/Microsoft.PowerShell.Utility/Update-FormatData.md index be8605192532..99b6cc040716 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Update-FormatData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Update-FormatData.md @@ -16,8 +16,8 @@ Updates the formatting data in the current session. ## SYNTAX ``` -Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] [-Confirm] - [] +Update-FormatData [[-AppendPath] ] [-PrependPath ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -37,7 +37,8 @@ create custom format.ps1xml files to update formatting in the current session. Y PowerShell. This is useful when you have added or changed a formatting file, but do not want to interrupt the session. -For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). +For more information about formatting files in PowerShell, see +[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). ## EXAMPLES @@ -58,8 +59,8 @@ Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xml This command reloads the formatting files into the session, including two new files, `Trace.format.ps1xml` and `Log.format.ps1xml`. -Because the command uses the **AppendPath** parameter, the formatting data in the new files is loaded -after the formatting data from the built-in files. +Because the command uses the **AppendPath** parameter, the formatting data in the new files is +loaded after the formatting data from the built-in files. The **AppendPath** parameter is used because the new files contain formatting data for objects that are not referenced in the built-in files. @@ -119,8 +120,8 @@ Specifies formatting files that this cmdlet adds to the session. The files are l PowerShell loads the built-in formatting files. When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each -.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files that -you are adding before it encounters the formatting data from the built-in files. +.NET type. If you use the **PrependPath** parameter, PowerShell searches the data from the files +that you are adding before it encounters the formatting data from the built-in files. Use this parameter to add a file that formats a .NET object that is also referenced in the built-in formatting files. @@ -174,7 +175,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Update-List.md b/reference/7.6/Microsoft.PowerShell.Utility/Update-List.md index b52f4cc750a0..418e0e220099 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Update-List.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Update-List.md @@ -18,8 +18,8 @@ Adds items to and removes items from a property value that contains a collection ### AddRemoveSet (Default) ``` -Update-List [-Add ] [-Remove ] [-InputObject ] [[-Property] ] - [] +Update-List [-Add ] [-Remove ] [-InputObject ] + [[-Property] ] [] ``` ### ReplaceSet diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Update-TypeData.md b/reference/7.6/Microsoft.PowerShell.Utility/Update-TypeData.md index 2bb7716002d1..f28127c7eb75 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Update-TypeData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Update-TypeData.md @@ -37,7 +37,8 @@ Update-TypeData [-MemberType ] [-MemberName ] [-Value [-WhatIf] [-Confirm] [] +Update-TypeData [-Force] [-TypeData] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -615,8 +616,8 @@ Accept wildcard characters: False Specifies additional values for **AliasProperty**, **ScriptProperty**, **CodeProperty**, or **CodeMethod** members. -Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters to add -or change a property or method of a type. +Use this parameter with the **TypeName**, **MemberType**, **Value**, and **SecondValue** parameters +to add or change a property or method of a type. When the value of the **MemberType** parameter is `AliasProperty`, the value of the **SecondValue** parameter must be a data type. PowerShell converts (that is, casts) the value of the alias property @@ -626,8 +627,8 @@ string value to an integer. When the value of the **MemberType** parameter is `ScriptProperty`, you can use the **SecondValue** parameter to specify an additional scriptblock. The scriptblock in the value of the **Value** -parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** parameter -set the value of the variable. +parameter gets the value of a variable. The scriptblock in the value of the **SecondValue** +parameter sets the value of the variable. This parameter was introduced in Windows PowerShell 3.0. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Wait-Event.md b/reference/7.6/Microsoft.PowerShell.Utility/Wait-Event.md index 12c8b208bd36..cd6d1d5c0ac1 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Wait-Event.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Wait-Event.md @@ -43,7 +43,7 @@ Wait-Event ### Example 2: Wait for an event with a specified source identifier -This example waits for the next event that is raised and that has a source identifier of ProcessStarted. +This example waits for the next event that has a source identifier of ProcessStarted. ```powershell Wait-Event -SourceIdentifier "ProcessStarted" @@ -51,7 +51,8 @@ Wait-Event -SourceIdentifier "ProcessStarted" ### Example 3: Wait for a timer elapsed event -This example uses the `Wait-Event` cmdlet to wait for a timer event on a timer that is set for 2000 milliseconds. +This example uses the `Wait-Event` cmdlet to wait for a timer event that's set for 2000 +milliseconds. ```powershell $Timer = New-Object Timers.Timer diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Write-Error.md b/reference/7.6/Microsoft.PowerShell.Utility/Write-Error.md index ea04ed584bd9..bbb50a0c821f 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Write-Error.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Write-Error.md @@ -150,7 +150,8 @@ for this parameter are: - QuotaExceeded - NotEnabled -For information about the error categories, see [ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). +For information about the error categories, see +[ErrorCategory Enumeration](https://go.microsoft.com/fwlink/?LinkId=143600). ```yaml Type: System.Management.Automation.ErrorCategory diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md b/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md index c767ea99298e..0cec9e8b316a 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Write-Host.md @@ -11,14 +11,13 @@ title: Write-Host # Write-Host ## SYNOPSIS - Writes customized output to a host. ## SYNTAX ``` -Write-Host [[-Object] ] [-NoNewline] [-Separator ] [-ForegroundColor ] - [-BackgroundColor ] [] +Write-Host [[-Object] ] [-NoNewline] [-Separator ] + [-ForegroundColor ] [-BackgroundColor ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Write-Information.md b/reference/7.6/Microsoft.PowerShell.Utility/Write-Information.md index 8e9e83e4cf1c..90fa542e25f0 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Write-Information.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Write-Information.md @@ -11,7 +11,6 @@ title: Write-Information # Write-Information ## SYNOPSIS - Specifies how PowerShell handles information stream data for a command. ## SYNTAX 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 92fa1595bd39..76a6de84343c 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 @@ -25,43 +25,44 @@ information. > This information only applies to PowerShell running on Windows. -The **WSMan** provider for PowerShell lets you add, change, clear, and -delete WS-Management configuration data on local or remote computers. +The **WSMan** provider for PowerShell lets you add, change, clear, and delete +WS-Management configuration data on local or remote computers. -The **WSMan** provider exposes a PowerShell drive with a directory -structure that corresponds to a logical grouping of WS-Management configuration -settings. These groupings are known as containers. +The **WSMan** provider exposes a PowerShell drive with a directory structure +that corresponds to a logical grouping of WS-Management configuration settings. +These groupings are known as containers. -Beginning in Windows PowerShell 3.0, the **WSMan** provider has been -updated to support new properties for session configurations, such as +Beginning in Windows PowerShell 3.0, the **WSMan** provider has been updated to +support new properties for session configurations, such as **OutputBufferingMode**. The session configurations appear as items in the Plugin directory of the `WSMan:` drive and the properties appear as items in each session configuration. -The **WSMan** provider supports the following cmdlets, which are covered -in this article. +The **WSMan** provider supports the following cmdlets, which are covered in +this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) +- [Get-Location][05] +- [Set-Location][08] +- [Get-Item][04] +- [Get-ChildItem][03] +- [New-Item][06] +- [Remove-Item][07] > [!NOTE] > You can use commands in the `WSMan:` drive to change the values of the new -> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 -> to change properties that are introduced in Windows PowerShell 3.0. -> Although no error is generated, the commands are not effective To change these -> settings, use the **WSMan** drive in Windows PowerShell 3.0. +> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 to +> change properties that are introduced in Windows PowerShell 3.0. Although no +> error is generated, the commands are not effective To change these settings, +> use the **WSMan** drive in Windows PowerShell 3.0. ### Organization of the WSMan: Drive -- **Client**: You can configure various aspects of the WS-Management client. The - configuration information is stored in the registry. +- **Client**: You can configure various aspects of the WS-Management client. + The configuration information is stored in the registry. - **Service**: You can configure various aspects of the WS-Management service. The configuration information is stored in the registry. + > [!NOTE] > Service configuration is sometimes referred to as Server configuration. @@ -75,14 +76,16 @@ in this article. - **Plugin**: Plug-ins are loaded and used by the WS-Management service to provide various functions. By default, PowerShell provides three plug-ins: + - The Event Forwarding plug-in. - The Microsoft.PowerShell plug-in. - The Windows Management Instrumentation (WMI) Provider plug-in. + These three plug-ins support event forwarding, configuration, and WMI access. -- **ClientCertificate**: You can create and configure a client certificate. - A client certificate is used when the WS-Management client is configured to - use certificate authentication. +- **ClientCertificate**: You can create and configure a client certificate. A + client certificate is used when the WS-Management client is configured to use + certificate authentication. ### Directory Hierarchy of the WSMan Provider @@ -91,32 +94,33 @@ follows. ``` WSMan:\localhost ---- Client ---- Service ---- Shell ---- Listener ------- ---- Plugin ------- Event Forwarding Plugin ---------- InitializationParameters ---------- Resources ------------- Security ------- Microsoft.PowerShell ---------- InitializationParameters ---------- Resources ------------- Security ------- WMI Provider ---------- InitializationParameters ---------- Resources ------------- Security ---- ClientCertificate + \Client + \Service + \Shell + \Listener + \ + \Plugin + \Event Forwarding Plugin + \InitializationParameters + \Resources + \Security + \Microsoft.PowerShell + \InitializationParameters + \Resources + \Security + \WMI Provider + \InitializationParameters + \Resources + \Security + \ClientCertificate ``` The directory hierarchy of the WSMan provider for a remote computer is the same as a local computer. However, in order to access the configuration settings of a remote computer, you need to make a connection to the remote computer using -[Connect-WSMan](xref:Microsoft.WSMan.Management.Connect-WSMan). Once a connection is made to a remote -computer, the name of the remote computer shows up in the provider. +[Connect-WSMan][09]. Once a +connection is made to a remote computer, the name of the remote computer shows +up in the provider. ``` WSMan:\ @@ -139,9 +143,9 @@ Set-Location C: ### Navigating to a remote system store location -This command uses the `Set-Location` command to change the current location -to the root location in the remote system store location. Use a backslash `\` -or forward slash `/` to indicate a level of the `WSMan:` drive. +This command uses the `Set-Location` command to change the current location to +the root location in the remote system store location. Use a backslash `\` or +forward slash `/` to indicate a level of the `WSMan:` drive. ```powershell Set-Location -Path WSMan:\SERVER01 @@ -153,8 +157,8 @@ 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 -in the Localhost store location. +This command uses the `Get-ChildItem` cmdlet to display the WS-Management +stores in the Localhost store location. ```powershell Get-ChildItem -Path WSMan:\Localhost @@ -176,8 +180,8 @@ Get-ChildItem -Path WSMan:\SERVER01 ## 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 -accept all hosts with the suffix "contoso.com". +`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. @@ -185,8 +189,8 @@ PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that -appends a value instead of changing it. The following example will append a -new value "*.domain2.com" to the old value stored in `TrustedHost:` +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 @@ -196,11 +200,10 @@ Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ### 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 -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. +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 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 @@ -211,66 +214,80 @@ New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force This command creates (registers) a plug-in for the WS-Management service. ```powershell -New-Item -Path WSMan:\localhost\Plugin ` - -Plugin TestPlugin ` - -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` - -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` - -SDKVersion 1 ` - -Capability "Get","Put","Invoke","Enumerate" ` - -XMLRenderingType text +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin' + Plugin = 'TestPlugin' + FileName = "$Env:SystemRoot\system32\WsmWmiPl.dll" + Resource = 'http://schemas.dmtf.org/wbem/wscim/2/cim-schema' + SDKVersion = 1 + Capability = 'Get', 'Put', 'Invoke', 'Enumerate' + XMLRenderingType = 'text' +} +New-Item @newItemSplat ``` ### Creating a new resource entry -This command creates a resource entry in the Resources directory of -a TestPlugin. This command assumes that a TestPlugin has been created using -a separate command. +This command creates a resource entry in the `Resources` directory of a +`TestPlugin`. This command assumes that a `TestPlugin` has been created using a +separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\Resources ` - -ResourceUri http://schemas.dmtf.org/wbem/wscim/3/cim-schema ` - -Capability "Enumerate" - +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\Resources' + ResourceUri = 'http://schemas.dmtf.org/wbem/wscim/3/cim-schema' + Capability = "Enumerate" +} +New-Item @newItemSplat ``` ### Creating a new security entry for a resource This command creates a security entry in the Security directory of -Resource_5967683 (a specific resource). This command assumes that the resource -entry has been created using a separate command. +`Resource_5967683` (a specific resource). This command assumes that the +resource entry has been created using a separate command. ```powershell $path = "WSMan:\localhost\Plugin\TestPlugin\Resources\Resource_5967683" -New-Item -Path $path\Security ` - -Sddl "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +$newItemSplat = @{ + Path = "$path\Security" + Sddl = "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +} +New-Item @newItemSplat ``` ### Creating a new Client Certificate This command creates **ClientCertificate** entry that can be used by the WS-Management client. The new **ClientCertificate** will show up under the -**ClientCertificate** directory as "ClientCertificate_1234567890". All of the +**ClientCertificate** directory as `ClientCertificate_1234567890`. All of the parameters are mandatory. The **Issuer** needs to be thumbprint of the issuers certificate. ```powershell $cred = Get-Credential -New-Item -Path WSMan:\localhost\ClientCertificate ` - -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -Uri wmicimv2/* ` - -Credential $cred; +$newItemSplat = @{ + Path = 'WSMan:\localhost\ClientCertificate' + Issuer = '1b3fd224d66c6413fe20d21e38b304226d192dfe' + URI = 'wmicimv2/*' + Credential = $cred +} +New-Item @newItemSplat ``` ### Creating a new Initialization Parameter -This command creates an Initialization parameter named "testparametername" -in the "InitializationParameters" directory. This command assumes that the -"TestPlugin" has been created using a separate command. +This command creates an Initialization parameter named `testparametername` +in the `InitializationParameters` directory. This command assumes that the +`TestPlugin` has been created using a separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters ` - -ParamName testparametername ` - -ParamValue testparametervalue +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\InitializationParameters' + ParamName = 'testparametername' + ParamValue = 'testparametervalue' +} +New-Item @newItemSplat ``` ## Dynamic parameters @@ -296,11 +313,11 @@ of the following: #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Capability \ -When working with *Plug-ins* this parameter specifies an operation that is +When working with _Plug-ins_ this parameter specifies an operation that is supported on this Uniform Resource Identifier (URI). You have to create one entry for each type of operation that the URI supports. You can specify any valid attributes for a given operation, if the operation supports it. @@ -312,74 +329,87 @@ These attributes include **SupportsFiltering** and **SupportsFragment**. supports the concept. - The **SupportFiltering** attribute is NOT valid for Create operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Delete**: Delete operations are supported on the URI. - The **SupportFragment** attribute is used if the Delete operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Delete operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Enumerate**: Enumerate operations are supported on the URI. - The **SupportFragment** attribute is NOT supported for Enumerate operations and should be set to False. - The **SupportFiltering** attribute is valid, and if the plug-in supports filtering, this attribute should be set to "True". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Get**: Get operations are supported on the URI. - The **SupportFragment** attribute is used if the Get operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Get operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Invoke**: Invoke operations are supported on the URI. - The **SupportFragment** attribute is not supported for Invoke operations and should be set to False. - The **SupportFiltering** attribute is not valid and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Put**: Put operations are supported on the URI. - The **SupportFragment** attribute is used if the Put operation supports the concept. - The **SupportFiltering** attribute is not valid for Put operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Subscribe**: Subscribe operations are supported on the URI. - The **SupportFragment** attribute is not supported for Subscribe operations and should be set to False. - - The **SupportFiltering** attribute is not valid for Subscribe operations and - should be set to "False". + - The **SupportFiltering** attribute is not valid for Subscribe operations + and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Shell**: Shell operations are supported on the URI. - The **SupportFragment** attribute is not supported for Shell operations and should be set to "False". - The **SupportFiltering** attribute is not valid for Shell operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if ANY other operation is also - > supported. - > [!NOTE] - > If a Shell operation is configured for a URI, Get, Put, Create, Delete, - > Invoke, and Enumerate operations are processed internally within the - > WS-Management (WinRM) service to manage shells. As a result, the plug-in - > cannot handle the operations. + > supported. If a Shell operation is configured for a URI, Get, Put, Create, + > Delete, Invoke, and Enumerate operations are processed internally within + > the WS-Management (WinRM) service to manage shells. As a result, the + > plug-in cannot handle the operations. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### CertificateThumbprint \ @@ -390,12 +420,12 @@ Thumbprint field of the certificate. It specifies the digital public key certificate (X509) of a user account that has permission to perform this action. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts, and they do not work with domain -accounts. To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` -cmdlets in the PowerShell `Cert:` drive. +accounts. To get a certificate thumbprint, use the `Get-Item` or +`Get-ChildItem` cmdlets in the PowerShell `Cert:` drive. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Enabled \ @@ -403,7 +433,7 @@ Specifies whether the listener is enabled or disabled. The default is True. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### FileName (Plugin) \ @@ -415,7 +445,7 @@ cannot be blank and must point to a valid plug-in. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### HostName \ @@ -427,7 +457,7 @@ string, or a wildcard character. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Issuer \ @@ -435,7 +465,7 @@ Specifies the name of the certification authority that issued the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Plugin \<\> WS-Management plug-ins are native dynamic link libraries (DLLs) @@ -449,7 +479,7 @@ requests are routed to these plug-in entry points to perform operations. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Port \ @@ -458,7 +488,7 @@ value from 1 through 65535. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -478,7 +508,7 @@ For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -493,7 +523,7 @@ A URI consists of a prefix and a path to a resource. For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### SDKVersion \ @@ -502,7 +532,7 @@ Specifies the version of the WS-Management plug-in SDK. The only valid value is #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Subject \ @@ -510,7 +540,7 @@ Specifies the entity that is identified by the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Transport \ @@ -521,7 +551,7 @@ Note: The Transport value is set when creating a Listener. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URI \ @@ -530,7 +560,7 @@ Sddl parameter. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URLPrefix \ @@ -543,7 +573,7 @@ in the destination address. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Value \ @@ -552,7 +582,7 @@ value that is used to specify configuration options. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### XMLRenderingType \ @@ -567,7 +597,7 @@ Specifies the format in which XML is passed to plug-ins through the #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ## Using the pipeline @@ -582,10 +612,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file -system drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file -system drive. +[Get-Help][02] command in a file system drive or use the `-Path` parameter of +[Get-Help][02] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -597,4 +625,15 @@ Get-Help Get-ChildItem -Path WSMan: ## See also -- [about_Providers](../../Microsoft.PowerShell.Core/About/about_Providers.md) +- [about_Providers][01] + + +[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md +[02]: xref:Microsoft.PowerShell.Core.Get-Help +[03]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[04]: xref:Microsoft.PowerShell.Management.Get-Item +[05]: xref:Microsoft.PowerShell.Management.Get-Location +[06]: xref:Microsoft.PowerShell.Management.New-Item +[07]: xref:Microsoft.PowerShell.Management.Remove-Item +[08]: xref:Microsoft.PowerShell.Management.Set-Location +[09]: xref:Microsoft.WSMan.Management.Connect-WSMan diff --git a/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md index 71a7b6e18dc9..e7bc4b705b02 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Connect-WSMan.md @@ -18,16 +18,18 @@ Connects to the WinRM service on a remote computer. ### ComputerName (Default) ``` -Connect-WSMan [-ApplicationName ] [[-ComputerName] ] [-OptionSet ] [-Port ] - [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Connect-WSMan [-ApplicationName ] [[-ComputerName] ] + [-OptionSet ] [-Port ] [-SessionOption ] [-UseSSL] + [-Credential ] [-Authentication ] + [-CertificateThumbprint ] [] ``` ### URI ``` -Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] [-SessionOption ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Connect-WSMan [-ConnectionURI ] [-OptionSet ] [-Port ] + [-SessionOption ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` diff --git a/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md index 73988794d1d7..cc9126181569 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Disconnect-WSMan.md @@ -87,7 +87,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/Enable-WSManCredSSP.md b/reference/7.6/Microsoft.WSMan.Management/Enable-WSManCredSSP.md index adfdd94f664d..74052cb93d00 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Enable-WSManCredSSP.md +++ b/reference/7.6/Microsoft.WSMan.Management/Enable-WSManCredSSP.md @@ -18,7 +18,8 @@ Enables Credential Security Support Provider (CredSSP) authentication on a compu ### All ``` -Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] [] +Enable-WSManCredSSP [[-DelegateComputer] ] [-Force] [-Role] + [] ``` ## DESCRIPTION @@ -217,7 +218,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md index 7e8af52f6baa..4be84992aec0 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -18,19 +18,22 @@ Displays management information for a resource instance specified by a Resource ### GetInstance (Default) ``` -Get-WSManInstance [-ApplicationName ] [-ComputerName ] [-ConnectionURI ] [-Dialect ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet ] +Get-WSManInstance [-ApplicationName ] [-ComputerName ] + [-ConnectionURI ] [-Dialect ] [-Fragment ] [-OptionSet ] + [-Port ] [-ResourceURI] [-SelectorSet ] [-SessionOption ] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### Enumerate ``` -Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] [-ComputerName ] - [-ConnectionURI ] [-Dialect ] [-Enumerate] [-Filter ] [-OptionSet ] - [-Port ] [-Associations] [-ResourceURI] [-ReturnType ] [-SessionOption ] - [-Shallow] [-UseSSL] [-Credential ] [-Authentication ] +Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] + [-ComputerName ] [-ConnectionURI ] [-Dialect ] [-Enumerate] + [-Filter ] [-OptionSet ] [-Port ] [-Associations] + [-ResourceURI] [-ReturnType ] [-SessionOption ] [-Shallow] + [-UseSSL] [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -575,7 +578,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md index 7155fca398a9..0ea778ddd790 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.6/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -18,19 +18,22 @@ Invokes an action on the object that is specified by the Resource URI and by the ### URI (Default) ``` -Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] [-OptionSet ] - [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] [-ResourceURI] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Invoke-WSManAction [-Action] [-ConnectionURI ] [-FilePath ] + [-OptionSet ] [[-SelectorSet] ] [-SessionOption ] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### ComputerName ``` -Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [[-SelectorSet] ] [-SessionOption ] - [-UseSSL] [-ValueSet ] [-ResourceURI] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +Invoke-WSManAction [-Action] [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] + [[-SelectorSet] ] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-ResourceURI] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION @@ -47,7 +50,13 @@ 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 +$params = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name = 'spooler'} + Authentication = 'Default' +} +Invoke-WSManAction @params ``` ```Output @@ -86,7 +95,12 @@ 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:\"} +$invokeWSManActionSplat = @{ + Action = 'Create' + ResourceURI = 'wmicimv2/Win32_Process' + ValueSet = @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -105,7 +119,14 @@ 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 +$invokeWSManActionSplat = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name="spooler"} + ComputerName = 'server01' + Authentication = 'Default' +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -216,7 +237,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows PowerShell Cert: drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the Windows +PowerShell Cert: drive. ```yaml Type: System.String @@ -299,7 +321,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service by using input from a file. The file, `Input.xml`, contains the following content: @@ -470,7 +501,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md index fd186bdfc9c5..73aaa3a931e7 100644 --- a/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/New-WSManInstance.md @@ -18,18 +18,21 @@ Creates a new instance of a management resource. ### ComputerName (Default) ``` -New-WSManInstance [-ApplicationName ] [-ComputerName ] [-FilePath ] - [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] - [-SessionOption ] [-UseSSL] [-ValueSet ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] +New-WSManInstance [-ApplicationName ] [-ComputerName ] + [-FilePath ] [-OptionSet ] [-Port ] [-ResourceURI] + [-SelectorSet] [-SessionOption ] [-UseSSL] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI ``` -New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] [-ResourceURI] - [-SelectorSet] [-SessionOption ] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +New-WSManInstance [-ConnectionURI ] [-FilePath ] [-OptionSet ] + [-ResourceURI] [-SelectorSet] [-SessionOption ] + [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -128,8 +131,8 @@ this action. Enter the certificate thumbprint of the certificate. Certificates are used in client certificate-based authentication. They can be mapped only to local user accounts; they do not work with domain accounts. -To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell Cert: -drive. +To get a certificate thumbprint, use the `Get-Item` or `Get-ChildItem` command in the PowerShell +Cert: drive. ```yaml Type: System.String @@ -213,7 +216,16 @@ 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` +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmi/cimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + File = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` This command calls the **StopService** method on the Spooler service using input from a file. The file, `Input.xml`, contains the following content: @@ -347,9 +359,9 @@ Specifies that the Secure Sockets Layer (SSL) protocol should be used to establi the remote computer. By default, SSL is not used. WS-Management encrypts all the Windows PowerShell content that is transmitted over the network. The -**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is not -available on the port that is used for the connection and you specify this parameter, the command -fails. +**UseSSL** parameter lets you specify the additional protection of HTTPS instead of HTTP. If SSL is +not available on the port that is used for the connection and you specify this parameter, the +command fails. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md b/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md index 9c17249ff979..e94a4fd4abce 100644 --- a/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md +++ b/reference/7.6/Microsoft.WSMan.Management/New-WSManSessionOption.md @@ -16,8 +16,9 @@ Creates session option hash table to use as input parameters for WS-Management c ## SYNTAX ``` -New-WSManSessionOption [-ProxyAccessType ] [-ProxyAuthentication ] - [-ProxyCredential ] [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] +New-WSManSessionOption [-ProxyAccessType ] + [-ProxyAuthentication ] [-ProxyCredential ] + [-SkipCACheck] [-SkipCNCheck] [-SkipRevocationCheck] [-SPNPort ] [-OperationTimeout ] [-NoEncryption] [-UseUTF16] [] ``` @@ -265,7 +266,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/Remove-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/Remove-WSManInstance.md index 88ced3dbadf2..18299885b7dc 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Remove-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/Remove-WSManInstance.md @@ -18,10 +18,11 @@ Deletes a management resource instance. ### ComputerName (Default) ``` -Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-OptionSet ] - [-Port ] [-ResourceURI] [-SelectorSet] [-SessionOption ] - [-UseSSL] [-Credential ] [-Authentication ] - [-CertificateThumbprint ] [] +Remove-WSManInstance [-ApplicationName ] [-ComputerName ] + [-OptionSet ] [-Port ] [-ResourceURI] [-SelectorSet] + [-SessionOption ] [-UseSSL] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ### URI @@ -29,7 +30,8 @@ Remove-WSManInstance [-ApplicationName ] [-ComputerName ] [-Opti ``` Remove-WSManInstance [-ConnectionURI ] [-OptionSet ] [-ResourceURI] [-SelectorSet] [-SessionOption ] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] [] + [-Authentication ] [-CertificateThumbprint ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md b/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md index 62b976fa69e2..4b955fcc72df 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md +++ b/reference/7.6/Microsoft.WSMan.Management/Set-WSManInstance.md @@ -18,19 +18,21 @@ Modifies the management information that is related to a resource. ### ComputerName (Default) ``` -Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] [-FilePath ] - [-Fragment ] [-OptionSet ] [-Port ] [-ResourceURI] - [[-SelectorSet] ] [-SessionOption ] [-UseSSL] [-ValueSet ] - [-Credential ] [-Authentication ] [-CertificateThumbprint ] +Set-WSManInstance [-ApplicationName ] [-ComputerName ] [-Dialect ] + [-FilePath ] [-Fragment ] [-OptionSet ] [-Port ] + [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] + [-UseSSL] [-ValueSet ] [-Credential ] + [-Authentication ] [-CertificateThumbprint ] [] ``` ### URI ``` -Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] [-Fragment ] - [-OptionSet ] [-ResourceURI] [[-SelectorSet] ] [-SessionOption ] - [-ValueSet ] [-Credential ] [-Authentication ] +Set-WSManInstance [-ConnectionURI ] [-Dialect ] [-FilePath ] + [-Fragment ] [-OptionSet ] [-ResourceURI] + [[-SelectorSet] ] [-SessionOption ] [-ValueSet ] + [-Credential ] [-Authentication ] [-CertificateThumbprint ] [] ``` @@ -45,7 +47,12 @@ This cmdlet uses the WinRM connection/transport layer to modify the information. ### Example 1: Disable a listener on the local computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -105,7 +112,13 @@ This succeeds: `-ValueSet @{MaxEnvelopeSizekb ="200"}` ### Example 3: Disable a listener on a remote computer ```powershell -Set-WSManInstance -ResourceURI winrm/config/listener -ComputerName SERVER02 -SelectorSet @{address="*";transport="https"} -ValueSet @{Enabled="false"} +$params = @{ + ResourceURI = 'winrm/config/listener' + ComputerName = 'SERVER02' + SelectorSet = @{address = '*'; transport = 'https'} + ValueSet = @{Enabled = 'false'} +} +Set-WSManInstance @params ``` ```Output @@ -133,6 +146,29 @@ This fails: `-ValueSet @{enabled="False"}` This succeeds: `-ValueSet @{Enabled="False"}` +### Example 4: Manage a resource using an input file + +The following command uses the **FilePath** parameter to update a management resource. Specify the +management resource using the **ResourceURI** and **SelectorSet** parameters. + +```powershell +$params = @{ + Action = 'StopService' + ResourceUri = 'wmicimv2/Win32_Service' + SelectorSet = @{Name = 'spooler'} + FilePath = 'C:\input.xml' + Authentication = 'Default' +} +Invoke-WSManAction @params +``` + +This command calls the **StopService** method on the Spooler service using input from a file. The +`input.xml` file contains the following content: + +```xml + +``` + ## PARAMETERS ### -ApplicationName @@ -312,16 +348,8 @@ Accept wildcard characters: False ### -FilePath -Specifies the path of a file that is used to update a management resource. You specify the -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` - -This command calls the **StopService** method on the Spooler service by using input from a file. -The file, `Input.xml`, contains the following content: - -`` +Specifies the path of a file used to update a management resource. For more information, see +[Example 4](#example-4-manage-a-resource-using-an-input-file). ```yaml Type: System.String diff --git a/reference/7.6/Microsoft.WSMan.Management/Set-WSManQuickConfig.md b/reference/7.6/Microsoft.WSMan.Management/Set-WSManQuickConfig.md index 9fedeffba251..c1e24ff08cc4 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Set-WSManQuickConfig.md +++ b/reference/7.6/Microsoft.WSMan.Management/Set-WSManQuickConfig.md @@ -136,7 +136,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md b/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md index 8f5b8aacf498..7df4d8fdf468 100644 --- a/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md +++ b/reference/7.6/Microsoft.WSMan.Management/Test-WSMan.md @@ -15,9 +15,9 @@ Tests whether the WinRM service is running on a local or remote computer. ## SYNTAX ``` -Test-WSMan [[-ComputerName] ] [-Authentication ] [-Port ] [-UseSSL] - [-ApplicationName ] [-Credential ] [-CertificateThumbprint ] - [] +Test-WSMan [[-ComputerName] ] [-Authentication ] + [-Port ] [-UseSSL] [-ApplicationName ] [-Credential ] + [-CertificateThumbprint ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/PSDiagnostics/Start-Trace.md b/reference/7.6/PSDiagnostics/Start-Trace.md index c32f8d4234a6..0d1761aeae3d 100644 --- a/reference/7.6/PSDiagnostics/Start-Trace.md +++ b/reference/7.6/PSDiagnostics/Start-Trace.md @@ -16,9 +16,10 @@ Start an Event Trace logging session. ## SYNTAX ``` -Start-Trace [-SessionName] [[-OutputFilePath] ] [[-ProviderFilePath] ] - [-ETS] [-Format ] [-MinBuffers ] [-MaxBuffers ] - [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] [] +Start-Trace [-SessionName] [[-OutputFilePath] ] + [[-ProviderFilePath] ] [-ETS] [-Format ] [-MinBuffers ] + [-MaxBuffers ] [-BufferSizeInKB ] [-MaxLogFileSizeInMB ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/PSReadLine/About/about_PSReadLine.md b/reference/7.6/PSReadLine/About/about_PSReadLine.md index 4631b6bcff12..60530960c050 100644 --- a/reference/7.6/PSReadLine/About/about_PSReadLine.md +++ b/reference/7.6/PSReadLine/About/about_PSReadLine.md @@ -65,8 +65,8 @@ Install-Module -Name PSReadLine -AllowClobber -Force Predictive IntelliSense is an addition to the concept of tab completion that assists the user in successfully completing commands. It enables users to -discover, edit, and execute full commands based on matching predictions from the -user's history and additional domain specific plugins. +discover, edit, and execute full commands based on matching predictions from +the user's history and additional domain specific plugins. ### Enable Predictive IntelliSense diff --git a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md index a35a1edbd2cc..0162dc03ef76 100644 --- a/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.6/PSReadLine/About/about_PSReadLine_Functions.md @@ -1170,8 +1170,8 @@ pressing the `#` key sends 10 `#` characters (`##########`) to the input line. Similarly, you can use this with other operations, like `` or `Left-Arrow`. -- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, - `Alt+8`, `Alt+9`, `Alt+-` +- Windows mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, + `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Emacs mode: `Alt+0`, `Alt+1`, `Alt+2`, `Alt+3`, `Alt+4`, `Alt+5`, `Alt+6`, `Alt+7`, `Alt+8`, `Alt+9`, `Alt+-` - Vi command mode: `<0>`, `<1>`, `<2>`, `<3>`, `<4>`, `<5>`, `<6>`, `<7>`, @@ -1672,7 +1672,7 @@ Behavior of the OnIdle event - [about_PSReadLine][02] -[01]: /dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters +[01]: xref:Microsoft.PowerShell.PSConsoleReadLineOptions.WordDelimiters%2A#microsoft-powershell-psconsolereadlineoptions-worddelimiters [02]: about_PSReadLine.md [03]: https://apps.microsoft.com/detail/9N0DX20HK701 [04]: xref:PSReadLine.Get-PSReadLineOption diff --git a/reference/7.6/PSReadLine/Get-PSReadLineKeyHandler.md b/reference/7.6/PSReadLine/Get-PSReadLineKeyHandler.md index 909d34d61f23..eedbbf376cb9 100644 --- a/reference/7.6/PSReadLine/Get-PSReadLineKeyHandler.md +++ b/reference/7.6/PSReadLine/Get-PSReadLineKeyHandler.md @@ -181,7 +181,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/PSReadLine/Set-PSReadLineOption.md b/reference/7.6/PSReadLine/Set-PSReadLineOption.md index 6a22541f0727..c68c2bd6cbf1 100644 --- a/reference/7.6/PSReadLine/Set-PSReadLineOption.md +++ b/reference/7.6/PSReadLine/Set-PSReadLineOption.md @@ -16,16 +16,17 @@ Customizes the behavior of command line editing in **PSReadLine**. ## SYNTAX ``` -Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] [-HistoryNoDuplicates] - [-AddToHistoryHandler ] [-CommandValidationHandler ] - [-HistorySearchCursorMovesToEnd] [-MaximumHistoryCount ] [-MaximumKillRingCount ] - [-ShowToolTips] [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] +Set-PSReadLineOption [-EditMode ] [-ContinuationPrompt ] + [-HistoryNoDuplicates] [-AddToHistoryHandler ] + [-CommandValidationHandler ] [-HistorySearchCursorMovesToEnd] + [-MaximumHistoryCount ] [-MaximumKillRingCount ] [-ShowToolTips] + [-ExtraPromptLineCount ] [-DingTone ] [-DingDuration ] [-BellStyle ] [-CompletionQueryItems ] [-WordDelimiters ] - [-HistorySearchCaseSensitive] [-HistorySaveStyle ] [-HistorySavePath ] - [-AnsiEscapeTimeout ] [-PromptText ] [-ViModeIndicator ] - [-ViModeChangeHandler ] [-PredictionSource ] - [-PredictionViewStyle ] [-Colors ] - [-TerminateOrphanedConsoleApps] [] + [-HistorySearchCaseSensitive] [-HistorySaveStyle ] + [-HistorySavePath ] [-AnsiEscapeTimeout ] [-PromptText ] + [-ViModeIndicator ] [-ViModeChangeHandler ] + [-PredictionSource ] [-PredictionViewStyle ] + [-Colors ] [-TerminateOrphanedConsoleApps] [] ``` ## DESCRIPTION diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Invoke-WebRequest.md b/reference/7.7/Microsoft.PowerShell.Utility/Invoke-WebRequest.md index 74571dae6e96..fd6831e09c36 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Invoke-WebRequest.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Invoke-WebRequest.md @@ -70,11 +70,11 @@ Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod - [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] - [-Body ] [-Form ] [-ContentType ] - [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] - [-SkipHttpErrorCheck] [] + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-Proxy ] + [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-Body ] + [-Form ] [-ContentType ] [-TransferEncoding ] + [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] + [] ``` ### CustomMethodNoProxy @@ -90,8 +90,8 @@ Invoke-WebRequest [-UseBasicParsing] [-Uri] [-HttpVersion ] [-Headers ] [-SkipHeaderValidation] [-AllowInsecureRedirect] [-MaximumRedirection ] [-MaximumRetryCount ] [-PreserveAuthorizationOnRedirect] [-RetryIntervalSec ] -CustomMethod - [-PreserveHttpMethodOnRedirect] [-UnixSocket ] - [-NoProxy] [-Body ] [-Form ] [-ContentType ] + [-PreserveHttpMethodOnRedirect] [-UnixSocket ] [-NoProxy] + [-Body ] [-Form ] [-ContentType ] [-TransferEncoding ] [-InFile ] [-OutFile ] [-PassThru] [-Resume] [-SkipHttpErrorCheck] [] ``` diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Select-Xml.md b/reference/7.7/Microsoft.PowerShell.Utility/Select-Xml.md index f687e288e2b2..630c15afa957 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Select-Xml.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Select-Xml.md @@ -96,7 +96,7 @@ file. For example, there is a **Count** property that is an alias of the **Lengt ### Example 2: Input an XML document -This example shows how to use the **XML** parameter to provide an XML document to the `Select-Xml` +This example shows how to use the **Xml** parameter to provide an XML document to the `Select-Xml` cmdlet. The `Get-Content` cmdlet gets the content of the `Types.ps1xml` file and saves it in the `$Types` diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Send-MailMessage.md b/reference/7.7/Microsoft.PowerShell.Utility/Send-MailMessage.md index 24d57dec53b8..3ec0a1a6e54b 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Send-MailMessage.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Send-MailMessage.md @@ -213,8 +213,8 @@ user. Type a user name, such as **User01** or **Domain01\User01**. Or, enter a **PSCredential** object, such as one from the `Get-Credential` cmdlet. -Credentials are stored in a [PSCredential](/dotnet/api/system.management.automation.pscredential) -object and the password is stored as a [SecureString](/dotnet/api/system.security.securestring). +Credentials are stored in a [PSCredential](xref:System.Management.Automation.PSCredential) +object and the password is stored as a [SecureString](xref:System.Security.SecureString). > [!NOTE] > For more information about **SecureString** data protection, see @@ -288,7 +288,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Show-Command.md b/reference/7.7/Microsoft.PowerShell.Utility/Show-Command.md index d0627860885d..732213ecdf3d 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Show-Command.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Show-Command.md @@ -37,10 +37,10 @@ all installed modules. To find the commands in a module, select the module from drop-down list. To select a command, click the command name. To use the command window, select a command, either by using the Name or by clicking the command -name in the **Commands** list. Each parameter set is displayed on a separate tab. Asterisks indicate -the mandatory parameters. To enter values for a parameter, type the value in the text box or select -the value from the drop-down box. To add a switch parameter, click to select the parameter check -box. +name in the **Commands** list. Each parameter set is displayed on a separate tab. Asterisks +indicate the mandatory parameters. To enter values for a parameter, type the value in the text box +or select the value from the drop-down box. To add a `[switch]` parameter, click to select the +parameter check box. When you're ready, you can click **Copy** to copy the command that you've created to the clipboard or click **Run** to run the command. You can also use the **PassThru** parameter to return the diff --git a/reference/7.7/Microsoft.WSMan.Management/About/about_WSMan_Provider.md b/reference/7.7/Microsoft.WSMan.Management/About/about_WSMan_Provider.md index d1b89066d131..07a9c6e15311 100644 --- a/reference/7.7/Microsoft.WSMan.Management/About/about_WSMan_Provider.md +++ b/reference/7.7/Microsoft.WSMan.Management/About/about_WSMan_Provider.md @@ -25,35 +25,35 @@ information. > This information only applies to PowerShell running on Windows. -The **WSMan** provider for PowerShell lets you add, change, clear, and -delete WS-Management configuration data on local or remote computers. +The **WSMan** provider for PowerShell lets you add, change, clear, and delete +WS-Management configuration data on local or remote computers. -The **WSMan** provider exposes a PowerShell drive with a directory -structure that corresponds to a logical grouping of WS-Management configuration -settings. These groupings are known as containers. +The **WSMan** provider exposes a PowerShell drive with a directory structure +that corresponds to a logical grouping of WS-Management configuration settings. +These groupings are known as containers. -Beginning in Windows PowerShell 3.0, the **WSMan** provider has been -updated to support new properties for session configurations, such as +Beginning in Windows PowerShell 3.0, the **WSMan** provider has been updated to +support new properties for session configurations, such as **OutputBufferingMode**. The session configurations appear as items in the Plugin directory of the `WSMan:` drive and the properties appear as items in each session configuration. -The **WSMan** provider supports the following cmdlets, which are covered -in this article. +The **WSMan** provider supports the following cmdlets, which are covered in +this article. -- [Get-Location](xref:Microsoft.PowerShell.Management.Get-Location) -- [Set-Location](xref:Microsoft.PowerShell.Management.Set-Location) -- [Get-Item](xref:Microsoft.PowerShell.Management.Get-Item) -- [Get-ChildItem](xref:Microsoft.PowerShell.Management.Get-ChildItem) -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) -- [Remove-Item](xref:Microsoft.PowerShell.Management.Remove-Item) +- [Get-Location][05] +- [Set-Location][08] +- [Get-Item][04] +- [Get-ChildItem][03] +- [New-Item][06] +- [Remove-Item][07] > [!NOTE] > You can use commands in the `WSMan:` drive to change the values of the new -> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 -> to change properties that are introduced in Windows PowerShell 3.0. -> Although no error is generated, the commands are not effective To change these -> settings, use the **WSMan** drive in Windows PowerShell 3.0. +> properties. However, you cannot use the `WSMan:` drive in PowerShell 2.0 to +> change properties that are introduced in Windows PowerShell 3.0. Although no +> error is generated, the commands are not effective To change these settings, +> use the **WSMan** drive in Windows PowerShell 3.0. ### Organization of the WSMan: Drive @@ -62,6 +62,7 @@ in this article. - **Service**: You can configure various aspects of the WS-Management service. The configuration information is stored in the registry. + > [!NOTE] > Service configuration is sometimes referred to as Server configuration. @@ -75,14 +76,16 @@ in this article. - **Plugin**: Plug-ins are loaded and used by the WS-Management service to provide various functions. By default, PowerShell provides three plug-ins: + - The Event Forwarding plug-in. - The Microsoft.PowerShell plug-in. - The Windows Management Instrumentation (WMI) Provider plug-in. + These three plug-ins support event forwarding, configuration, and WMI access. -- **ClientCertificate**: You can create and configure a client certificate. - A client certificate is used when the WS-Management client is configured to - use certificate authentication. +- **ClientCertificate**: You can create and configure a client certificate. A + client certificate is used when the WS-Management client is configured to use + certificate authentication. ### Directory Hierarchy of the WSMan Provider @@ -91,31 +94,31 @@ follows. ``` WSMan:\localhost ---- Client ---- Service ---- Shell ---- Listener ------- ---- Plugin ------- Event Forwarding Plugin ---------- InitializationParameters ---------- Resources ------------- Security ------- Microsoft.PowerShell ---------- InitializationParameters ---------- Resources ------------- Security ------- WMI Provider ---------- InitializationParameters ---------- Resources ------------- Security ---- ClientCertificate + \Client + \Service + \Shell + \Listener + \ + \Plugin + \Event Forwarding Plugin + \InitializationParameters + \Resources + \Security + \Microsoft.PowerShell + \InitializationParameters + \Resources + \Security + \WMI Provider + \InitializationParameters + \Resources + \Security + \ClientCertificate ``` The directory hierarchy of the WSMan provider for a remote computer is the same as a local computer. However, in order to access the configuration settings of a remote computer, you need to make a connection to the remote computer using -[Connect-WSMan](xref:Microsoft.WSMan.Management.Connect-WSMan). Once a +[Connect-WSMan][09]. Once a connection is made to a remote computer, the name of the remote computer shows up in the provider. @@ -140,9 +143,9 @@ Set-Location C: ### Navigating to a remote system store location -This command uses the `Set-Location` command to change the current location -to the root location in the remote system store location. Use a backslash `\` -or forward slash `/` to indicate a level of the `WSMan:` drive. +This command uses the `Set-Location` command to change the current location to +the root location in the remote system store location. Use a backslash `\` or +forward slash `/` to indicate a level of the `WSMan:` drive. ```powershell Set-Location -Path WSMan:\SERVER01 @@ -177,8 +180,8 @@ Get-ChildItem -Path WSMan:\SERVER01 ## 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 -accept all hosts with the suffix "contoso.com". +`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. @@ -186,8 +189,8 @@ PS WSMan:\localhost\Client> Set-Item .\TrustedHosts -Value "*.contoso.com" ``` The `Set-Item` cmdlet supports an additional parameter `-Concatenate` that -appends a value instead of changing it. The following example will append a -new value "*.domain2.com" to the old value stored in `TrustedHost:` +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 @@ -197,11 +200,10 @@ Set-Item WSMan:\localhost\Client\TrustedHosts *.domain2.com -Concatenate ### 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 -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. +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 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 @@ -212,66 +214,80 @@ New-Item -Path WSMan:\localhost\Listener -Address * -Transport http -Force This command creates (registers) a plug-in for the WS-Management service. ```powershell -New-Item -Path WSMan:\localhost\Plugin ` - -Plugin TestPlugin ` - -FileName $Env:SystemRoot\system32\WsmWmiPl.dll ` - -Resource http://schemas.dmtf.org/wbem/wscim/2/cim-schema ` - -SDKVersion 1 ` - -Capability "Get","Put","Invoke","Enumerate" ` - -XMLRenderingType text +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin' + Plugin = 'TestPlugin' + FileName = "$Env:SystemRoot\system32\WsmWmiPl.dll" + Resource = 'http://schemas.dmtf.org/wbem/wscim/2/cim-schema' + SDKVersion = 1 + Capability = 'Get', 'Put', 'Invoke', 'Enumerate' + XMLRenderingType = 'text' +} +New-Item @newItemSplat ``` ### Creating a new resource entry -This command creates a resource entry in the Resources directory of -a TestPlugin. This command assumes that a TestPlugin has been created using -a separate command. +This command creates a resource entry in the `Resources` directory of a +`TestPlugin`. This command assumes that a `TestPlugin` has been created using a +separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\Resources ` - -ResourceUri http://schemas.dmtf.org/wbem/wscim/3/cim-schema ` - -Capability "Enumerate" - +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\Resources' + ResourceUri = 'http://schemas.dmtf.org/wbem/wscim/3/cim-schema' + Capability = "Enumerate" +} +New-Item @newItemSplat ``` ### Creating a new security entry for a resource This command creates a security entry in the Security directory of -Resource_5967683 (a specific resource). This command assumes that the resource -entry has been created using a separate command. +`Resource_5967683` (a specific resource). This command assumes that the +resource entry has been created using a separate command. ```powershell $path = "WSMan:\localhost\Plugin\TestPlugin\Resources\Resource_5967683" -New-Item -Path $path\Security ` - -Sddl "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +$newItemSplat = @{ + Path = "$path\Security" + Sddl = "O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)" +} +New-Item @newItemSplat ``` ### Creating a new Client Certificate This command creates **ClientCertificate** entry that can be used by the WS-Management client. The new **ClientCertificate** will show up under the -**ClientCertificate** directory as "ClientCertificate_1234567890". All of the +**ClientCertificate** directory as `ClientCertificate_1234567890`. All of the parameters are mandatory. The **Issuer** needs to be thumbprint of the issuers certificate. ```powershell $cred = Get-Credential -New-Item -Path WSMan:\localhost\ClientCertificate ` - -Issuer 1b3fd224d66c6413fe20d21e38b304226d192dfe ` - -Uri wmicimv2/* ` - -Credential $cred; +$newItemSplat = @{ + Path = 'WSMan:\localhost\ClientCertificate' + Issuer = '1b3fd224d66c6413fe20d21e38b304226d192dfe' + URI = 'wmicimv2/*' + Credential = $cred +} +New-Item @newItemSplat ``` ### Creating a new Initialization Parameter -This command creates an Initialization parameter named "testparametername" -in the "InitializationParameters" directory. This command assumes that the -"TestPlugin" has been created using a separate command. +This command creates an Initialization parameter named `testparametername` +in the `InitializationParameters` directory. This command assumes that the +`TestPlugin` has been created using a separate command. ```powershell -New-Item -Path WSMan:\localhost\Plugin\TestPlugin\InitializationParameters ` - -ParamName testparametername ` - -ParamValue testparametervalue +$newItemSplat = @{ + Path = 'WSMan:\localhost\Plugin\TestPlugin\InitializationParameters' + ParamName = 'testparametername' + ParamValue = 'testparametervalue' +} +New-Item @newItemSplat ``` ## Dynamic parameters @@ -297,11 +313,11 @@ of the following: #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Capability \ -When working with *Plug-ins* this parameter specifies an operation that is +When working with _Plug-ins_ this parameter specifies an operation that is supported on this Uniform Resource Identifier (URI). You have to create one entry for each type of operation that the URI supports. You can specify any valid attributes for a given operation, if the operation supports it. @@ -313,74 +329,87 @@ These attributes include **SupportsFiltering** and **SupportsFragment**. supports the concept. - The **SupportFiltering** attribute is NOT valid for Create operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Delete**: Delete operations are supported on the URI. - The **SupportFragment** attribute is used if the Delete operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Delete operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Enumerate**: Enumerate operations are supported on the URI. - The **SupportFragment** attribute is NOT supported for Enumerate operations and should be set to False. - The **SupportFiltering** attribute is valid, and if the plug-in supports filtering, this attribute should be set to "True". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Get**: Get operations are supported on the URI. - The **SupportFragment** attribute is used if the Get operation supports the concept. - The **SupportFiltering** attribute is NOT valid for Get operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Invoke**: Invoke operations are supported on the URI. - The **SupportFragment** attribute is not supported for Invoke operations and should be set to False. - The **SupportFiltering** attribute is not valid and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Put**: Put operations are supported on the URI. - The **SupportFragment** attribute is used if the Put operation supports the concept. - The **SupportFiltering** attribute is not valid for Put operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Subscribe**: Subscribe operations are supported on the URI. - The **SupportFragment** attribute is not supported for Subscribe operations and should be set to False. - The **SupportFiltering** attribute is not valid for Subscribe operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if Shell operations are also > supported. + - **Shell**: Shell operations are supported on the URI. - The **SupportFragment** attribute is not supported for Shell operations and should be set to "False". - The **SupportFiltering** attribute is not valid for Shell operations and should be set to "False". + > [!NOTE] > This operation is not valid for a URI if ANY other operation is also - > supported. - > [!NOTE] - > If a Shell operation is configured for a URI, Get, Put, Create, Delete, - > Invoke, and Enumerate operations are processed internally within the - > WS-Management (WinRM) service to manage shells. As a result, the plug-in - > cannot handle the operations. + > supported. If a Shell operation is configured for a URI, Get, Put, Create, + > Delete, Invoke, and Enumerate operations are processed internally within + > the WS-Management (WinRM) service to manage shells. As a result, the + > plug-in cannot handle the operations. #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### CertificateThumbprint \ @@ -396,7 +425,7 @@ accounts. To get a certificate thumbprint, use the `Get-Item` or #### Cmdlets supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Enabled \ @@ -404,7 +433,7 @@ Specifies whether the listener is enabled or disabled. The default is True. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### FileName (Plugin) \ @@ -416,7 +445,7 @@ cannot be blank and must point to a valid plug-in. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### HostName \ @@ -428,7 +457,7 @@ string, or a wildcard character. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Issuer \ @@ -436,7 +465,7 @@ Specifies the name of the certification authority that issued the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Plugin \<\> WS-Management plug-ins are native dynamic link libraries (DLLs) @@ -450,7 +479,7 @@ requests are routed to these plug-in entry points to perform operations. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Port \ @@ -459,7 +488,7 @@ value from 1 through 65535. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -479,7 +508,7 @@ For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Resource \ @@ -494,7 +523,7 @@ A URI consists of a prefix and a path to a resource. For example: #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### SDKVersion \ @@ -503,7 +532,7 @@ Specifies the version of the WS-Management plug-in SDK. The only valid value is #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Subject \ @@ -511,7 +540,7 @@ Specifies the entity that is identified by the certificate. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Transport \ @@ -522,7 +551,7 @@ Note: The Transport value is set when creating a Listener. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URI \ @@ -531,7 +560,7 @@ Sddl parameter. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### URLPrefix \ @@ -544,7 +573,7 @@ in the destination address. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### Value \ @@ -553,7 +582,7 @@ value that is used to specify configuration options. #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ### XMLRenderingType \ @@ -568,7 +597,7 @@ Specifies the format in which XML is passed to plug-ins through the #### Cmdlets Supported -- [New-Item](xref:Microsoft.PowerShell.Management.New-Item) +- [New-Item][06] ## Using the pipeline @@ -583,10 +612,8 @@ Beginning in Windows PowerShell 3.0, you can get customized help topics for provider cmdlets that explain how those cmdlets behave in a file system drive. To get the help topics that are customized for the file system drive, run a -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) command in a file -system drive or use the `-Path` parameter of -[Get-Help](xref:Microsoft.PowerShell.Core.Get-Help) to specify a file -system drive. +[Get-Help][02] command in a file system drive or use the `-Path` parameter of +[Get-Help][02] to specify a file system drive. ```powershell Get-Help Get-ChildItem @@ -598,4 +625,15 @@ Get-Help Get-ChildItem -Path WSMan: ## See also -- [about_Providers](../../Microsoft.PowerShell.Core/About/about_Providers.md) +- [about_Providers][01] + + +[01]: ../../Microsoft.PowerShell.Core/About/about_Providers.md +[02]: xref:Microsoft.PowerShell.Core.Get-Help +[03]: xref:Microsoft.PowerShell.Management.Get-ChildItem +[04]: xref:Microsoft.PowerShell.Management.Get-Item +[05]: xref:Microsoft.PowerShell.Management.Get-Location +[06]: xref:Microsoft.PowerShell.Management.New-Item +[07]: xref:Microsoft.PowerShell.Management.Remove-Item +[08]: xref:Microsoft.PowerShell.Management.Set-Location +[09]: xref:Microsoft.WSMan.Management.Connect-WSMan diff --git a/reference/7.7/Microsoft.WSMan.Management/Get-WSManInstance.md b/reference/7.7/Microsoft.WSMan.Management/Get-WSManInstance.md index 008f82e8ae13..e289ee4ca7ce 100644 --- a/reference/7.7/Microsoft.WSMan.Management/Get-WSManInstance.md +++ b/reference/7.7/Microsoft.WSMan.Management/Get-WSManInstance.md @@ -32,10 +32,9 @@ Get-WSManInstance [-ApplicationName ] [-ComputerName ] Get-WSManInstance [-ApplicationName ] [-BasePropertiesOnly] [-ComputerName ] [-ConnectionURI ] [-Dialect ] [-Enumerate] [-Filter ] [-OptionSet ] [-Port ] [-Associations] - [-ResourceURI] [-ReturnType ] [-SessionOption ] - [-Shallow] [-UseSSL] [-Credential ] - [-Authentication ] [-CertificateThumbprint ] - [] + [-ResourceURI] [-ReturnType ] [-SessionOption ] [-Shallow] + [-UseSSL] [-Credential ] [-Authentication ] + [-CertificateThumbprint ] [] ``` ## DESCRIPTION diff --git a/reference/7.7/Microsoft.WSMan.Management/Invoke-WSManAction.md b/reference/7.7/Microsoft.WSMan.Management/Invoke-WSManAction.md index 30ca2e9e4ddf..a7a88e2012ce 100644 --- a/reference/7.7/Microsoft.WSMan.Management/Invoke-WSManAction.md +++ b/reference/7.7/Microsoft.WSMan.Management/Invoke-WSManAction.md @@ -95,7 +95,12 @@ 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:\"} +$invokeWSManActionSplat = @{ + Action = 'Create' + ResourceURI = 'wmicimv2/Win32_Process' + ValueSet = @{CommandLine="notepad.exe";CurrentDirectory="C:\"} +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output @@ -114,7 +119,14 @@ 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 +$invokeWSManActionSplat = @{ + Action = 'StartService' + ResourceURI = 'wmicimv2/Win32_Service' + SelectorSet = @{name="spooler"} + ComputerName = 'server01' + Authentication = 'Default' +} +Invoke-WSManAction @invokeWSManActionSplat ``` ```Output diff --git a/reference/7.7/PSReadLine/About/about_PSReadLine_Functions.md b/reference/7.7/PSReadLine/About/about_PSReadLine_Functions.md index cb93593b3fbe..08f06055b570 100644 --- a/reference/7.7/PSReadLine/About/about_PSReadLine_Functions.md +++ b/reference/7.7/PSReadLine/About/about_PSReadLine_Functions.md @@ -1672,7 +1672,7 @@ Behavior of the OnIdle event - [about_PSReadLine][02] -[01]: /dotnet/api/microsoft.powershell.psconsolereadlineoptions.worddelimiters#microsoft-powershell-psconsolereadlineoptions-worddelimiters +[01]: xref:Microsoft.PowerShell.PSConsoleReadLineOptions.WordDelimiters%2A#microsoft-powershell-psconsolereadlineoptions-worddelimiters [02]: about_PSReadLine.md [03]: https://apps.microsoft.com/detail/9N0DX20HK701 [04]: xref:PSReadLine.Get-PSReadLineOption diff --git a/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md b/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md index a89e667b4de4..36f3df9b36b6 100644 --- a/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md +++ b/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md @@ -5,206 +5,327 @@ title: Required Development Guidelines --- # Required Development Guidelines -The following guidelines must be followed when you write your cmdlets. They are separated into guidelines for designing cmdlets and guidelines for writing your cmdlet code. If you do not follow these guidelines, your cmdlets could fail, and your users might have a poor experience when they use your cmdlets. +The following guidelines must be followed when you write your cmdlets. They're separated into +guidelines for designing cmdlets and guidelines for writing your cmdlet code. If you don't follow +these guidelines, your cmdlets could fail, and your users might have a poor experience when they use +your cmdlets. ## In this Topic ### Design Guidelines -- [Use Only Approved Verbs (RD01)](./required-development-guidelines.md#use-only-approved-verbs-rd01) - -- [Cmdlet Names: Characters that cannot be Used (RD02)](./required-development-guidelines.md#cmdlet-names-characters-that-cannot-be-used-rd02) - -- [Parameters Names that cannot be Used (RD03)](./required-development-guidelines.md#parameters-names-that-cannot-be-used-rd03) - -- [Support Confirmation Requests (RD04)](./required-development-guidelines.md#support-confirmation-requests-rd04) - -- [Support Force Parameter for Interactive Sessions (RD05)](./required-development-guidelines.md#support-force-parameter-for-interactive-sessions-rd05) - -- [Document Output Objects (RD06)](./required-development-guidelines.md#document-output-objects-rd06) +- [Use only approved verbs (RD01)][14] +- [Cmdlet names: characters that can't be used (RD02)][02] +- [Parameter names that can't be used (RD03)][08] +- [Support confirmation requests (RD04)][11] +- [Support force parameter for interactive sessions (RD05)][12] +- [Document output objects (RD06)][04] ### Code Guidelines -- [Derive from the Cmdlet or PSCmdlet Classes (RC01)](./required-development-guidelines.md#derive-from-the-cmdlet-or-pscmdlet-classes-rc01) - -- [Specify the Cmdlet Attribute (RC02)](./required-development-guidelines.md#specify-the-cmdlet-attribute-rc02) - -- [Override an Input Processing Method (RC03)](./required-development-guidelines.md#override-an-input-processing-method-rc03) - -- [Specify the OutputType Attribute (RC04)](./required-development-guidelines.md#specify-the-outputtype-attribute-rc04) - -- [Do Not Retain Handles to Output Objects (RC05)](./required-development-guidelines.md#do-not-retain-handles-to-output-objects-rc05) - -- [Handle Errors Robustly (RC06)](./required-development-guidelines.md#handle-errors-robustly-rc06) - -- [Use a Windows PowerShell Module to Deploy your Cmdlets (RC07)](./required-development-guidelines.md#use-a-windows-powershell-module-to-deploy-your-cmdlets-rc07) +- [Derive from the Cmdlet or PSCmdlet classes (RC01)][03] +- [Specify the Cmdlet attribute (RC02)][09] +- [Override an input processing method (RC03)][07] +- [Specify the OutputType attribute (RC04)][10] +- [Don't retain handles to output objects (RC05)][05] +- [Handle errors robustly (RC06)][06] +- [Use a Windows PowerShell module to deploy your cmdlets (RC07)][13] ## Design Guidelines -The following guidelines must be followed when designing cmdlets to ensure a consistent user experience between using your cmdlets and other cmdlets. When you find a Design guideline that applies to your situation, be sure to look at the Code guidelines for similar guidelines. +The following guidelines must be followed when designing cmdlets to ensure a consistent user +experience between using your cmdlets and other cmdlets. When you find a Design guideline that +applies to your situation, be sure to look at the Code guidelines for similar guidelines. ### Use Only Approved Verbs (RD01) -The verb specified in the Cmdlet attribute must come from the recognized set of verbs provided by Windows PowerShell. It must not be one of the prohibited synonyms. Use the constant strings that are defined by the following enumerations to specify cmdlet verbs: - -- [System.Management.Automation.VerbsCommon](/dotnet/api/System.Management.Automation.VerbsCommon) - -- [System.Management.Automation.VerbsCommunications](/dotnet/api/System.Management.Automation.VerbsCommunications) - -- [System.Management.Automation.VerbsData](/dotnet/api/System.Management.Automation.VerbsData) - -- [System.Management.Automation.VerbsDiagnostic](/dotnet/api/System.Management.Automation.VerbsDiagnostic) - -- [System.Management.Automation.VerbsLifecycle](/dotnet/api/System.Management.Automation.VerbsLifecycle) - -- [System.Management.Automation.VerbsSecurity](/dotnet/api/System.Management.Automation.VerbsSecurity) - -- [System.Management.Automation.VerbsOther](/dotnet/api/System.Management.Automation.VerbsOther) - -For more information about the approved verb names, see [Cmdlet Verbs](./approved-verbs-for-windows-powershell-commands.md). - -Users need a set of discoverable and expected cmdlet names. Use the appropriate verb so that the user can make a quick assessment of what a cmdlet does and to easily discover the capabilities of the system. For example, the following command-line command gets a list of all the commands on the system whose names begin with "Start": `Get-Command Start-*`. Use the nouns in your cmdlets to differentiate your cmdlets from other cmdlets. The noun indicates the resource on which the operation will be performed. The operation itself is represented by the verb. - -### Cmdlet Names: Characters that cannot be Used (RD02) - -When you name cmdlets, do not use any of the following special characters. - -|Character|Name| -|---------------|----------| -|#|number sign| -|,|comma| -|()|parentheses| -|{}|braces| -|[]|brackets| -|&|ampersand| -|-|hyphen **Note:** The hyphen can be used to separate the verb from the noun, but it cannot be used within the noun or within the verb.| -|/|slash mark| -|\\|backslash| -|$|dollar sign| -|^|caret| -|;|semicolon| -|:|colon| -|"|double quotation mark| -|'|single quotation mark| -|<>|angle brackets| -|||vertical bar| -|?|question mark| -|@|at sign| -|`|back tick (grave accent)| -|*|asterisk| -|%|percent sign| -|+|plus sign| -|=|equals sign| -|~|tilde| - -### Parameters Names that cannot be Used (RD03) - -Windows PowerShell provides a common set of parameters to all cmdlets plus additional parameters that are added in specific situations. When designing your own cmdlets you cannot use the following names: Confirm, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, WarningVariable, WhatIf, UseTransaction, and Verbose. For more information about these parameters, see [Common Parameter Names](./common-parameter-names.md). - -### Support Confirmation Requests (RD04) - -For cmdlets that perform an operation that modifies the system, they should call the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method to request confirmation, and in special cases call the [System.Management.Automation.Cmdlet.ShouldContinue*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldContinue) method. (The [System.Management.Automation.Cmdlet.ShouldContinue*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldContinue) method should be called only after the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method is called.) - -To make these calls the cmdlet must specify that it supports confirmation requests by setting the `SupportsShouldProcess` keyword of the Cmdlet attribute. For more information about setting this attribute, see [Cmdlet Attribute Declaration](./cmdlet-attribute-declaration.md). +The verb specified in the Cmdlet attribute must come from the recognized set of verbs provided by +Windows PowerShell. It must not be one of the prohibited synonyms. Use the constant strings that are +defined by the following enumerations to specify cmdlet verbs: + +- [System.Management.Automation.VerbsCommon][45] +- [System.Management.Automation.VerbsCommunications][46] +- [System.Management.Automation.VerbsData][47] +- [System.Management.Automation.VerbsDiagnostic][48] +- [System.Management.Automation.VerbsLifecycle][49] +- [System.Management.Automation.VerbsSecurity][51] +- [System.Management.Automation.VerbsOther][50] + +For more information about the approved verb names, see [Cmdlet Verbs][16]. + +Users need a set of discoverable and expected cmdlet names. Use the appropriate verb so that the +user can make a quick assessment of what a cmdlet does and to easily discover the capabilities of +the system. For example, the following command-line command gets a list of all the commands on the +system whose names begin with "Start": `Get-Command Start-*`. Use the nouns in your cmdlets to +differentiate your cmdlets from other cmdlets. The noun indicates the resource on which the +operation will be performed. The operation itself is represented by the verb. + +### Cmdlet Names: Characters that can't be Used (RD02) + +When you name cmdlets, don't use any of the following special characters. + +| Character | Name | +| :-----------------: | ------------------------ | +| `#` | number sign | +| `,` | comma | +| `( )` | parentheses | +| `{ }` | braces | +| `[ ]` | brackets | +| `&` | ampersand | +| `-` | hyphen | +| `/` | slash mark | +| `\` | backslash | +| `$` | dollar sign | +| `^` | caret | +| `;` | semicolon | +| `:` | colon | +| `"` | double quotation mark | +| `'` | single quotation mark | +| `< >` | angle brackets | +| | | vertical bar | +| `?` | question mark | +| `@` | at sign | +| `` ` `` | back tick (grave accent) | +| `*` | asterisk | +| `%` | percent sign | +| `+` | plus sign | +| `=` | equals sign | +| `~` | tilde | + +### Parameter names that can't be used (RD03) + +Windows PowerShell provides a common set of parameters to all cmdlets plus additional parameters +that are added in specific situations. When designing your own cmdlets you can't use the following +names: `Confirm`, `Debug`, `ErrorAction`, `ErrorVariable`, `OutBuffer`, `OutVariable`, +`WarningAction`, `WarningVariable`, `WhatIf`, `UseTransaction`, and `Verbose`. For more information +about these parameters, see [Common Parameter Names][19]. + +### Support confirmation requests (RD04) + +For cmdlets that perform an operation that modifies the system, they should call the +[System.Management.Automation.Cmdlet.ShouldProcess*][32] method to request confirmation, and in +special cases call the [System.Management.Automation.Cmdlet.ShouldContinue*][31] method. (The +[System.Management.Automation.Cmdlet.ShouldContinue*][31] method should be called only after the +[System.Management.Automation.Cmdlet.ShouldProcess*][32] method is called.) + +To make these calls the cmdlet must specify that it supports confirmation requests by setting the +`SupportsShouldProcess` keyword of the Cmdlet attribute. For more information about setting this +attribute, see [Cmdlet Attribute Declaration][17]. > [!NOTE] -> If the Cmdlet attribute of the cmdlet class indicates that the cmdlet supports calls to the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method, and the cmdlet fails to make the call to the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method, the user could modify the system unexpectedly. - -Use the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method for any system modification. A user preference and the `WhatIf` parameter control the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method. In contrast, the [System.Management.Automation.Cmdlet.ShouldContinue*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldContinue) call performs an additional check for potentially dangerous modifications. This method is not controlled by any user preference or the `WhatIf` parameter. If your cmdlet calls the [System.Management.Automation.Cmdlet.ShouldContinue*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldContinue) method, it should have a `Force` parameter that bypasses the calls to these two methods and that proceeds with the operation. This is important because it allows your cmdlet to be used in non-interactive scripts and hosts. - -If your cmdlets support these calls, the user can determine whether the action should actually be performed. For example, the [Stop-Process](/powershell/module/microsoft.powershell.management/stop-process) cmdlet calls the [System.Management.Automation.Cmdlet.ShouldContinue*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldContinue) method before it stops a set of critical processes, including the System, Winlogon, and Spoolsv processes. +> If the Cmdlet attribute of the cmdlet class indicates that the cmdlet supports calls to the +> [System.Management.Automation.Cmdlet.ShouldProcess*][32] method, and the cmdlet fails to make the +> call to the [System.Management.Automation.Cmdlet.ShouldProcess*][32] method, the user could modify +> the system unexpectedly. -For more information about supporting these methods, see [Requesting Confirmation](./requesting-confirmation-from-cmdlets.md). +Use the [System.Management.Automation.Cmdlet.ShouldProcess*][32] method for any system modification. +A user preference and the `WhatIf` parameter control the +[System.Management.Automation.Cmdlet.ShouldProcess*][32] method. In contrast, the +[System.Management.Automation.Cmdlet.ShouldContinue*][31] call performs an additional check for +potentially dangerous modifications. This method isn't controlled by any user preference or the +`WhatIf` parameter. If your cmdlet calls the +[System.Management.Automation.Cmdlet.ShouldContinue*][31] method, it should have a `Force` parameter +that bypasses the calls to these two methods and that proceeds with the operation. This is important +because it allows your cmdlet to be used in non-interactive scripts and hosts. -### Support Force Parameter for Interactive Sessions (RD05) +If your cmdlets support these calls, the user can determine whether the action should actually be +performed. For example, the [Stop-Process][25] cmdlet calls the +[System.Management.Automation.Cmdlet.ShouldContinue*][31] method before it stops a set of critical +processes, including the System, Winlogon, and Spoolsv processes. -If your cmdlet is used interactively, always provide a Force parameter to override the interactive actions, such as prompts or reading lines of input. This is important because it allows your cmdlet to be used in non-interactive scripts and hosts. The following methods can be implemented by an interactive host. +For more information about supporting these methods, see [Requesting Confirmation][22]. -- [System.Management.Automation.Host.PSHostUserInterface.Prompt*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.Prompt) +### Support Force parameter for interactive sessions (RD05) -- [System.Management.Automation.Host.PSHostUserInterface.PromptForChoice](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForChoice) +If your cmdlet is used interactively, always provide a Force parameter to override the interactive +actions, such as prompts or reading lines of input. This is important because it allows your cmdlet +to be used in non-interactive scripts and hosts. The following methods can be implemented by an +interactive host. -- [System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice](/dotnet/api/System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice) +- [System.Management.Automation.Host.PSHostUserInterface.Prompt*][39] +- [System.Management.Automation.Host.PSHostUserInterface.PromptForChoice][40] +- [System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice][38] +- [System.Management.Automation.Host.PSHostUserInterface.PromptForCredential*][41] +- [System.Management.Automation.Host.PSHostUserInterface.ReadLine*][42] +- [System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString*][43] -- [System.Management.Automation.Host.PSHostUserInterface.PromptForCredential*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForCredential) +### Document output objects (RD06) -- [System.Management.Automation.Host.PSHostUserInterface.ReadLine*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLine) +Windows PowerShell uses the objects that are written to the pipeline. In order for users to take +advantage of the objects that are returned by each cmdlet, you must document the objects that are +returned, and you must document what the members of those returned objects are used for. -- [System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString) +## Code guidelines -### Document Output Objects (RD06) +The following guidelines must be followed when writing cmdlet code. When you find a Code guideline +that applies to your situation, be sure to look at the Design guidelines for similar guidelines. -Windows PowerShell uses the objects that are written to the pipeline. In order for users to take advantage of the objects that are returned by each cmdlet, you must document the objects that are returned, and you must document what the members of those returned objects are used for. +### Derive from the Cmdlet or PSCmdlet classes (RC01) -## Code Guidelines +A cmdlet must derive from either the [System.Management.Automation.Cmdlet][27] or +[System.Management.Automation.PSCmdlet][44] base class. Cmdlets that derive from the +[System.Management.Automation.Cmdlet][27] class don't depend on the Windows PowerShell runtime. They +can be called directly from any Microsoft .NET Framework language. Cmdlets that derive from the +[System.Management.Automation.PSCmdlet][44] class depend on the Windows PowerShell runtime. +Therefore, they execute within a runspace. -The following guidelines must be followed when writing cmdlet code. When you find a Code guideline that applies to your situation, be sure to look at the Design guidelines for similar guidelines. +All cmdlet classes that you implement must be public classes. For more information about these +cmdlet classes, see [Cmdlet Overview][18]. -### Derive from the Cmdlet or PSCmdlet Classes (RC01) +### Specify the Cmdlet attribute (RC02) -A cmdlet must derive from either the [System.Management.Automation.Cmdlet](/dotnet/api/System.Management.Automation.Cmdlet) or [System.Management.Automation.PSCmdlet](/dotnet/api/System.Management.Automation.PSCmdlet) base class. Cmdlets that derive from the [System.Management.Automation.Cmdlet](/dotnet/api/System.Management.Automation.Cmdlet) class do not depend on the Windows PowerShell runtime. They can be called directly from any Microsoft .NET Framework language. Cmdlets that derive from the [System.Management.Automation.PSCmdlet](/dotnet/api/System.Management.Automation.PSCmdlet) class depend on the Windows PowerShell runtime. Therefore, they execute within a runspace. - -All cmdlet classes that you implement must be public classes. For more information about these cmdlet classes, see [Cmdlet Overview](./cmdlet-overview.md). - -### Specify the Cmdlet Attribute (RC02) - -For a cmdlet to be recognized by Windows PowerShell, its .NET Framework class must be decorated with the Cmdlet attribute. This attribute specifies the following features of the cmdlet. +For a cmdlet to be recognized by Windows PowerShell, its .NET Framework class must be decorated with +the Cmdlet attribute. This attribute specifies the following features of the cmdlet. - The verb-and-noun pair that identifies the cmdlet. -- The default parameter set that is used when multiple parameter sets are specified. The default parameter set is used when Windows PowerShell does not have enough information to determine which parameter set to use. - -- Indicates if the cmdlet supports calls to the [System.Management.Automation.Cmdlet.ShouldProcess*](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method. This method displays a confirmation message to the user before the cmdlet makes a change to the system. For more information about how confirmation requests are made, see [Requesting Confirmation](./requesting-confirmation-from-cmdlets.md). - -- Indicate the impact level (or severity) of the action associated with the confirmation message. In most cases, the default value of Medium should be used. For more information about how the impact level affects the confirmation requests that are displayed to the user, see [Requesting Confirmation](./requesting-confirmation-from-cmdlets.md). - -For more information about how to declare the cmdlet attribute, see [CmdletAttribute Declaration](./cmdlet-attribute-declaration.md). - -### Override an Input Processing Method (RC03) - -For the cmdlet to participate in the Windows PowerShell environment, it must override at least one of the following *input processing methods*. - -[System.Management.Automation.Cmdlet.BeginProcessing](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing) -This method is called one time, and it is used to provide pre-processing functionality. - -[System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord) -This method is called multiple times, and it is used to provide record-by-record functionality. - -[System.Management.Automation.Cmdlet.EndProcessing](/dotnet/api/System.Management.Automation.Cmdlet.EndProcessing) -This method is called one time, and it is used to provide post-processing functionality. - -### Specify the OutputType Attribute (RC04) - -The OutputType attribute (introduced in Windows PowerShell 2.0) specifies the .NET Framework type that your cmdlet returns to the pipeline. By specifying the output type of your cmdlets you make the objects returned by your cmdlet more discoverable by other cmdlets. For more information about decorating the cmdlet class with this attribute, see [OutputType Attribute Declaration](./outputtype-attribute-declaration.md). - -### Do Not Retain Handles to Output Objects (RC05) - -Your cmdlet should not retain any handles to the objects that are passed to the [System.Management.Automation.Cmdlet.WriteObject*](/dotnet/api/System.Management.Automation.Cmdlet.WriteObject) method. These objects are passed to the next cmdlet in the pipeline, or they are used by a script. If you retain the handles to the objects, two entities will own each object, which causes errors. - -### Handle Errors Robustly (RC06) - -An administration environment inherently detects and makes important changes to the system that you are administering. Therefore, it is vital that cmdlets handle errors correctly. For more information about error records, see [Windows PowerShell Error Reporting](./error-reporting-concepts.md). - -- When an error prevents a cmdlet from continuing to process any more records, it is a terminating error. The cmdlet must call the [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) method that references an [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) object. If an exception is not caught by the cmdlet, the Windows PowerShell runtime itself throws a terminating error that contains less information. - -- For a non-terminating error that does not stop operation on the next record that is coming from the pipeline (for example, a record produced by a different process), the cmdlet must call the [System.Management.Automation.Cmdlet.WriteError*](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) method that references an [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) object. An example of a non-terminating error is the error that occurs if a particular process fails to stop. Calling the [System.Management.Automation.Cmdlet.WriteError*](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) method allows the user to consistently perform the actions requested and to retain the information for particular actions that fail. Your cmdlet should handle each record as independently as possible. - -- The [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) object that is referenced by the [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) and [System.Management.Automation.Cmdlet.WriteError*](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) methods requires an exception at its core. Follow the .NET Framework design guidelines when you determine the exception to use. If the error is semantically the same as an existing exception, use that exception or derive from that exception. Otherwise, derive a new exception or exception hierarchy directly from the [System.Exception](/dotnet/api/System.Exception) type. - -An [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) object also requires an error category that groups errors for the user. The user can view errors based on the category by setting the value of the `$ErrorView` shell variable to CategoryView. The possible categories are defined by the [System.Management.Automation.ErrorCategory](/dotnet/api/System.Management.Automation.ErrorCategory) enumeration. - -- If a cmdlet creates a new thread, and if the code that is running in that thread throws an unhandled exception, Windows PowerShell will not catch the error and will terminate the process. - -- If an object has code in its destructor that causes an unhandled exception, Windows PowerShell will not catch the error and will terminate the process. This also occurs if an object calls Dispose methods that cause an unhandled exception. - -### Use a Windows PowerShell Module to Deploy your Cmdlets (RC07) - -Create a Windows PowerShell module to package and deploy your cmdlets. Support for modules is introduced in Windows PowerShell 2.0. You can use the assemblies that contain your cmdlet classes directly as binary module files (this is very useful when testing your cmdlets), or you can create a module manifest that references the cmdlet assemblies. (You can also add existing snap-in assemblies when using modules.) For more information about modules, see [Writing a Windows PowerShell Module](../module/writing-a-windows-powershell-module.md). - -## See Also - -[Strongly Encouraged Development Guidelines](./strongly-encouraged-development-guidelines.md) - -[Advisory Development Guidelines](./advisory-development-guidelines.md) - -[Writing a Windows PowerShell Cmdlet](./writing-a-windows-powershell-cmdlet.md) +- The default parameter set that's used when multiple parameter sets are specified. The default + parameter set is used when Windows PowerShell doesn't have enough information to determine which + parameter set to use. + +- Indicates if the cmdlet supports calls to the + [System.Management.Automation.Cmdlet.ShouldProcess*][32] method. This method displays a + confirmation message to the user before the cmdlet makes a change to the system. For more + information about how confirmation requests are made, see [Requesting Confirmation][22]. + +- Indicate the impact level (or severity) of the action associated with the confirmation message. In + most cases, the default value of Medium should be used. For more information about how the impact + level affects the confirmation requests that are displayed to the user, see + [Requesting Confirmation][22]. + +For more information about how to declare the cmdlet attribute, see [CmdletAttribute Declaration][17]. + +### Override an input processing method (RC03) + +For the cmdlet to participate in the Windows PowerShell environment, it must override at least one +of the following _input processing methods_. + +- [System.Management.Automation.Cmdlet.BeginProcessing][28] This method is called one time, and it + is used to provide pre-processing functionality. +- [System.Management.Automation.Cmdlet.ProcessRecord][30] This method is called multiple times, and + it's used to provide record-by-record functionality. +- [System.Management.Automation.Cmdlet.EndProcessing][29] This method is called one time, and it's + used to provide post-processing functionality. + +### Specify the OutputType attribute (RC04) + +The OutputType attribute (introduced in Windows PowerShell 2.0) specifies the .NET Framework type +that your cmdlet returns to the pipeline. By specifying the output type of your cmdlets you make the +objects returned by your cmdlet more discoverable by other cmdlets. For more information about +decorating the cmdlet class with this attribute, see [OutputType Attribute Declaration][21]. + +### Don't retain handles to output objects (RC05) + +Your cmdlet shouldn't retain any handles to the objects that are passed to the +[System.Management.Automation.Cmdlet.WriteObject*][35] method. These objects are passed to the next +cmdlet in the pipeline, or they're used by a script. If you retain the handles to the objects, two +entities will own each object, which causes errors. + +### Handle errors robustly (RC06) + +An administration environment inherently detects and makes important changes to the system that you +are administering. Therefore, it's vital that cmdlets handle errors correctly. For more information +about error records, see [Windows PowerShell Error Reporting][20]. + +- When an error prevents a cmdlet from continuing to process any more records, it's a terminating + error. The cmdlet must call the [System.Management.Automation.Cmdlet.ThrowTerminatingError*][33] + method that references an [System.Management.Automation.ErrorRecord][37] object. If an exception + isn't caught by the cmdlet, the Windows PowerShell runtime itself throws a terminating error that + contains less information. + +- For a non-terminating error that doesn't stop operation on the next record that's coming from + the pipeline (for example, a record produced by a different process), the cmdlet must call the + [System.Management.Automation.Cmdlet.WriteError*][34] method that references an + [System.Management.Automation.ErrorRecord][37] object. An example of a non-terminating error is + the error that occurs if a particular process fails to stop. Calling the + [System.Management.Automation.Cmdlet.WriteError*][34] method allows the user to consistently + perform the actions requested and to retain the information for particular actions that fail. Your + cmdlet should handle each record as independently as possible. + +- The [System.Management.Automation.ErrorRecord][37] object that's referenced by the + [System.Management.Automation.Cmdlet.ThrowTerminatingError*][33] and + [System.Management.Automation.Cmdlet.WriteError*][34] methods requires an exception at its core. + Follow the .NET Framework design guidelines when you determine the exception to use. If the error + is semantically the same as an existing exception, use that exception or derive from that + exception. Otherwise, derive a new exception or exception hierarchy directly from the + [System.Exception][26] type. + +An [System.Management.Automation.ErrorRecord][37] object also requires an error category that groups +errors for the user. The user can view errors based on the category by setting the value of the +`$ErrorView` shell variable to CategoryView. The possible categories are defined by the +[System.Management.Automation.ErrorCategory][36] enumeration. + +- If a cmdlet creates a new thread, and if the code that's running in that thread throws an + unhandled exception, Windows PowerShell can't catch the error and terminates the process. + +- If an object has code in its destructor that causes an unhandled exception, Windows PowerShell + can't catch the error and terminates the process. This also occurs if an object calls + Dispose methods that cause an unhandled exception. + +### Use a Windows PowerShell module to deploy your cmdlets (RC07) + +Create a Windows PowerShell module to package and deploy your cmdlets. Support for modules is +introduced in Windows PowerShell 2.0. You can use the assemblies that contain your cmdlet classes +directly as binary module files (this is very useful when testing your cmdlets), or you can create a +module manifest that references the cmdlet assemblies. You can also add existing snap-in assemblies +when using modules. For more information about modules, see +[Writing a Windows PowerShell Module][01]. + +## See also + +- [Strongly Encouraged Development Guidelines][23] +- [Advisory Development Guidelines][15] +- [Writing a Windows PowerShell Cmdlet][24] + + +[01]: ../module/writing-a-windows-powershell-module.md +[02]: #cmdlet-names-characters-that-cant-be-used-rd02 +[03]: #derive-from-the-cmdlet-or-pscmdlet-classes-rc01 +[04]: #document-output-objects-rd06 +[05]: #dont-retain-handles-to-output-objects-rc05 +[06]: #handle-errors-robustly-rc06 +[07]: #override-an-input-processing-method-rc03 +[08]: #parameter-names-that-cant-be-used-rd03 +[09]: #specify-the-cmdlet-attribute-rc02 +[10]: #specify-the-outputtype-attribute-rc04 +[11]: #support-confirmation-requests-rd04 +[12]: #support-force-parameter-for-interactive-sessions-rd05 +[13]: #use-a-windows-powershell-module-to-deploy-your-cmdlets-rc07 +[14]: #use-only-approved-verbs-rd01 +[15]: advisory-development-guidelines.md +[16]: approved-verbs-for-windows-powershell-commands.md +[17]: cmdlet-attribute-declaration.md +[18]: cmdlet-overview.md +[19]: common-parameter-names.md +[20]: error-reporting-concepts.md +[21]: outputtype-attribute-declaration.md +[22]: requesting-confirmation-from-cmdlets.md +[23]: strongly-encouraged-development-guidelines.md +[24]: writing-a-windows-powershell-cmdlet.md +[25]: xref:Microsoft.PowerShell.Management.Stop-Process +[26]: xref:System.Exception +[27]: xref:System.Management.Automation.Cmdlet +[28]: xref:System.Management.Automation.Cmdlet.BeginProcessing%2A +[29]: xref:System.Management.Automation.Cmdlet.EndProcessing%2A +[30]: xref:System.Management.Automation.Cmdlet.ProcessRecord%2A +[31]: xref:System.Management.Automation.Cmdlet.ShouldContinue%2A +[32]: xref:System.Management.Automation.Cmdlet.ShouldProcess%2A +[33]: xref:System.Management.Automation.Cmdlet.ThrowTerminatingError%2A +[34]: xref:System.Management.Automation.Cmdlet.WriteError%2A +[35]: xref:System.Management.Automation.Cmdlet.WriteObject%2A +[36]: xref:System.Management.Automation.ErrorCategory +[37]: xref:System.Management.Automation.ErrorRecord +[38]: xref:System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice%2A +[39]: xref:System.Management.Automation.Host.PSHostUserInterface.Prompt%2A +[40]: xref:System.Management.Automation.Host.PSHostUserInterface.PromptForChoice%2A +[41]: xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A +[42]: xref:System.Management.Automation.Host.PSHostUserInterface.ReadLine%2A +[43]: xref:System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString%2A +[44]: xref:System.Management.Automation.PSCmdlet +[45]: xref:System.Management.Automation.VerbsCommon +[46]: xref:System.Management.Automation.VerbsCommunications +[47]: xref:System.Management.Automation.VerbsData +[48]: xref:System.Management.Automation.VerbsDiagnostic +[49]: xref:System.Management.Automation.VerbsLifecycle +[50]: xref:System.Management.Automation.VerbsOther +[51]: xref:System.Management.Automation.VerbsSecurity