diff --git a/reference/5.1/CimCmdlets/Register-CimIndicationEvent.md b/reference/5.1/CimCmdlets/Register-CimIndicationEvent.md index 040f8ce8d3e4..e88feb78aa9c 100644 --- a/reference/5.1/CimCmdlets/Register-CimIndicationEvent.md +++ b/reference/5.1/CimCmdlets/Register-CimIndicationEvent.md @@ -419,4 +419,3 @@ This cmdlet returns an **EventSubscription** object. [New-CimSession](New-CimSession.md) [about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md) - diff --git a/reference/5.1/Microsoft.PowerShell.Core/Where-Object.md b/reference/5.1/Microsoft.PowerShell.Core/Where-Object.md index 510d7507feb2..6189bd9f5d42 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/Where-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Core/Where-Object.md @@ -244,9 +244,9 @@ particular version of Windows. Starting in Windows PowerShell 3.0, there are two different ways to construct a `Where-Object` command. -- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison operator, - and a property value. `Where-Object` returns all objects for which the scriptblock statement is - true. +- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison + operator, and a property value. `Where-Object` returns all objects for which the scriptblock + statement is true. For example, the following command gets processes where the value of the **PriorityClass** property equals `Normal`. @@ -256,9 +256,9 @@ command. All PowerShell comparison operators are valid in the scriptblock format. For more information, see [about_Comparison_Operators](./About/about_Comparison_Operators.md). -- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 `[switch]` +- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 switch parameters that represent the comparison operators. The simplified syntax is easier to read and - write than the scriptblock syntax. You can combine one of the `[switch]` parameters with the + write than the scriptblock syntax. You can combine one of the switch parameters with the **Property** and **Value** parameters to create a command that filters objects based on the values of their properties. @@ -271,7 +271,7 @@ command. As shown in the example, the parameter names **Property** and **Value** are optional. The **Property** parameter is a positional parameter mapped to position `0`. The **Value** parameter - is a positional parameter mapped to position `1`. The `[switch]` parameter, used to specify the + is a positional parameter mapped to position `1`. The switch parameter, used to specify the comparison, can be used in any position. The simplified syntax was introduced in Windows PowerShell 3.0. For more information, see diff --git a/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md b/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md index 6216d2f80db7..f0b179104fb7 100644 --- a/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md +++ b/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md @@ -17,8 +17,8 @@ Gets performance counter data from local and remote computers. ### GetCounterSet (Default) ``` -Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] [-Continuous] - [-ComputerName ] [] +Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] + [-Continuous] [-ComputerName ] [] ``` ### ListSetSet @@ -244,11 +244,11 @@ Timestamp CounterSamples 5.35768447160776 ``` -The `Get-Random` cmdlet uses `Get-Content` to select 50 random computer names from the -`Servers.txt` file. The remote computer names are stored in the `$Servers` variable. The -`\Processor(*)\% Processor Time` counter's path is stored in the `$Counter` variable. `Get-Counter` -uses the **Counter** parameter to specify the counters in the `$Counter` variable. The -**ComputerName** parameter specifies the computer names in the `$Servers` variable. +The `Get-Random` cmdlet uses `Get-Content` to select 50 random computer names from the `Servers.txt` +file. The remote computer names are stored in the `$Servers` variable. The `\Processor(*)\% +Processor Time` counter's path is stored in the `$Counter` variable. `Get-Counter` uses the +**Counter** parameter to specify the counters in the `$Counter` variable. The **ComputerName** +parameter specifies the computer names in the `$Servers` variable. ### Example 8: Use the Path property to get formatted path names diff --git a/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md b/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md index a8dcb1ea0eff..6593ca619357 100644 --- a/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md +++ b/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md @@ -18,28 +18,30 @@ Gets events from event logs and event tracing log files on local and remote comp ``` Get-WinEvent [[-LogName] ] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### ListLogSet ``` -Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] [-Force] - [] +Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] + [-Force] [] ``` ### ListProviderSet ``` -Get-WinEvent [-ListProvider] [-ComputerName ] [-Credential ] - [] +Get-WinEvent [-ListProvider] [-ComputerName ] + [-Credential ] [] ``` ### GetProviderSet ``` Get-WinEvent [-ProviderName] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### FileSet @@ -148,9 +150,9 @@ with the asterisk (`*`) wildcard to display each property. ### Example 3: Configure the classic Security log -This command gets an **EventLogConfiguration** object that represents the classic **Security** log. The -object is then used to configure settings for the log, such as max file size, file path, and whether the -log is enabled. +This command gets an **EventLogConfiguration** object that represents the classic **Security** log. +The object is then used to configure settings for the log, such as max file size, file path, and +whether the log is enabled. ```powershell $log = Get-WinEvent -ListLog Security @@ -193,11 +195,12 @@ ProviderLatency : 1000 ProviderControlGuid : ``` -The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is -saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object +is saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle -access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the -`Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. +access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to +the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the +machine. ### Example 4: Get event logs from a server @@ -230,7 +233,8 @@ is a property of the object with a non-null value. This example gets objects that represent the **Application** event logs on three computers: Server01, Server02, and Server03. The `foreach` keyword is used because the **ComputerName** -parameter accepts only one value. For more information, see [about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). +parameter accepts only one value. For more information, see +[about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). ```powershell $S = 'Server01', 'Server02', 'Server03' @@ -341,7 +345,8 @@ This command lists the Event Ids that the **Microsoft-Windows-GroupPolicy** even along with the event description. ```powershell -(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events | Format-Table Id, Description +(Get-WinEvent -ListProvider Microsoft-Windows-GroupPolicy).Events | + Format-Table Id, Description ``` ```Output @@ -367,7 +372,8 @@ Event objects are stored in a variable and then grouped and counted by **Event I ```powershell $Event = Get-WinEvent -LogName 'Windows PowerShell' $Event.Count -$Event | Group-Object -Property Id -NoElement | Sort-Object -Property Count -Descending +$Event | Group-Object -Property Id -NoElement | + Sort-Object -Property Count -Descending $Event | Group-Object -Property LevelDisplayName -NoElement ``` @@ -414,7 +420,7 @@ error or warning and the log name. ```powershell Get-WinEvent -LogName *PowerShell*, Microsoft-Windows-Kernel-WHEA* | - Group-Object -Property LevelDisplayName, LogName -NoElement | + Group-Object -Property LevelDisplayName, LogName -NoElement | Format-Table -AutoSize ``` @@ -507,10 +513,10 @@ Get-WinEvent -Path 'C:\Tracing\TraceLog.etl' -Oldest | The `Get-WinEvent` cmdlet gets log information from the archived file. The **Path** parameter specifies the directory and file name. The **Oldest** parameter is used to output events in the -order they're written, oldest to newest. The objects are sent down the pipeline to the -`Sort-Object` cmdlet `Sort-Object` sorts the objects in descending order by the value of the -**TimeCreated** property. The objects are sent down the pipeline to the `Select-Object` cmdlet that -displays the 100 newest events. +order they're written, oldest to newest. The objects are sent down the pipeline to the `Sort-Object` +cmdlet `Sort-Object` sorts the objects in descending order by the value of the **TimeCreated** +property. The objects are sent down the pipeline to the `Select-Object` cmdlet that displays the 100 +newest events. ### Example 15: Get events from an event trace log @@ -521,8 +527,9 @@ filter them with the same properties. The command requires the **Oldest** parame reading from an `.etl` file, but the **Oldest** parameter applies to each file. ```powershell -Get-WinEvent -Path 'C:\Tracing\TraceLog.etl', 'C:\Test\Windows PowerShell.evtx' -Oldest | - Where-Object { $_.Id -eq '403' } +$logfiles = 'C:\Tracing\TraceLog.etl', 'C:\Test\Windows PowerShell.evtx' +Get-WinEvent -Path $logfiles -Oldest | + Where-Object { $_.Id -eq '403' } ``` The `Get-WinEvent` cmdlet gets log information from the archived files. The **Path** parameter uses @@ -543,11 +550,16 @@ of the objects. ```powershell # Using the Where-Object cmdlet: $Yesterday = (Get-Date) - (New-TimeSpan -Day 1) -Get-WinEvent -LogName 'Windows PowerShell' | Where-Object { $_.TimeCreated -ge $Yesterday } +Get-WinEvent -LogName 'Windows PowerShell' | + Where-Object { $_.TimeCreated -ge $Yesterday } # Using the FilterHashtable parameter: $Yesterday = (Get-Date) - (New-TimeSpan -Day 1) -Get-WinEvent -FilterHashtable @{ LogName='Windows PowerShell'; Level=3; StartTime=$Yesterday } +Get-WinEvent -FilterHashtable @{ + LogName = 'Windows PowerShell' + Level = 3 + StartTime = $Yesterday +} # Using the FilterXML parameter: $xmlQuery = @' @@ -576,7 +588,11 @@ For more information about hash tables, see ```powershell $Date = (Get-Date).AddDays(-2) -Get-WinEvent -FilterHashtable @{ LogName='Application'; StartTime=$Date; Id='1003' } +Get-WinEvent -FilterHashtable @{ + LogName = 'Application' + StartTime = $Date + Id = '1003' +} ``` The `Get-Date` cmdlet uses the **AddDays** method to get a date that's two days before the current @@ -594,10 +610,10 @@ that occurred within the last week. ```powershell $StartTime = (Get-Date).AddDays(-7) Get-WinEvent -FilterHashtable @{ - Logname='Application' - ProviderName='Application Error' - Data='iexplore.exe' - StartTime=$StartTime + LogName = 'Application' + ProviderName = 'Application Error' + Data = 'iexplore.exe' + StartTime = $StartTime } ``` diff --git a/reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md b/reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md index be36dd41f407..7ffa8e8227ec 100644 --- a/reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md +++ b/reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md @@ -16,8 +16,8 @@ Creates a new Windows event for the specified event provider. ## SYNTAX ``` -New-WinEvent [-ProviderName] [-Id] [-Version ] [[-Payload] ] - [] +New-WinEvent [-ProviderName] [-Id] [-Version ] + [[-Payload] ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md b/reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md index 8c11d04f8039..472db19368e9 100644 --- a/reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md +++ b/reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md @@ -17,22 +17,22 @@ Creates a record of all or part of a PowerShell session to a text file. ### ByPath (Default) ``` -Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] [-WhatIf] - [-Confirm] [] +Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Start-Transcript [[-LiteralPath] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] [-WhatIf] - [-Confirm] [] +Start-Transcript [[-LiteralPath] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-WhatIf] [-Confirm] [] ``` ### ByOutputDirectory ``` -Start-Transcript [[-OutputDirectory] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] - [-WhatIf] [-Confirm] [] +Start-Transcript [[-OutputDirectory] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -45,7 +45,7 @@ By default, `Start-Transcript` stores the transcript in the following location u name: - Default location: `$HOME\Documents` -- Default filename: `PowerShell_transcript....txt` +The default filename is `PowerShell_transcript....txt`. Starting in Windows PowerShell 5.0, `Start-Transcript` includes the hostname in the generated file name of all transcripts. The filename also includes random characters in names to prevent potential @@ -98,6 +98,7 @@ Start-Transcript The full path to the transcript file is stored in the `$Transcript` preference variable. For more information about the `$Transcript` preference variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#transcript). + ### Example 4: Start a transcript using a relative path on Windows systems When you use a relative path with the **OutputDirectory** parameter on Windows, the path is relative @@ -111,7 +112,6 @@ Start-Transcript -Path .\transcripts Transcript started, output file is C:\Users\username\Documents\.\transcripts\PowerShell_transcript.HOSTNAME.8S6RpEfN.20251105152247.txt ``` - ## PARAMETERS ### -Append @@ -258,8 +258,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet isn't run. +Shows what would happen if the cmdlet runs. The cmdlet isn't run. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Management/Add-Content.md b/reference/5.1/Microsoft.PowerShell.Management/Add-Content.md index 3eac707d22a8..9cdfef701133 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Add-Content.md @@ -21,18 +21,18 @@ Adds content to the specified items, such as adding words to a file. ``` Add-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [-NoNewline] [-Encoding ] - [-Stream ] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-NoNewline] + [-Encoding ] [-Stream ] [] ``` ### LiteralPath ``` Add-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [-NoNewline] [-Encoding ] - [-Stream ] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-NoNewline] + [-Encoding ] [-Stream ] [] ``` ## DESCRIPTION @@ -55,7 +55,7 @@ Add-Content -Path .\*.txt -Exclude help* -Value 'End of file' The **Path** parameter specifies all `.txt` files in the current directory, but the **Exclude** parameter ignores file names that match the specified pattern. The **Value** parameter specifies the -text string that is written to the files. +text string that's written to the files. Use [Get-Content](Get-Content.md) to display the contents of these files. @@ -77,7 +77,7 @@ Tuesday, May 14, 2019 8:24:27 AM The `Add-Content` cmdlet creates two new files in the current directory. The **Value** parameter contains the output of the `Get-Date` cmdlet. The **PassThru** parameter outputs the added contents -to the pipeline. Because there is no other cmdlet to receive the output, it is displayed in the +to the pipeline. Because there is no other cmdlet to receive the output, it's displayed in the PowerShell console. The `Get-Content` cmdlet displays the updated file, `DateTimeFile1.log`. ### Example 3: Add the contents of a specified file to another file @@ -400,7 +400,8 @@ Accept wildcard characters: False ### -UseTransaction Includes the command in the active transaction. This parameter is valid only when a transaction is -in progress. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md index 2957fd95c630..723dc7ba4e3b 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md @@ -20,31 +20,33 @@ Clears the contents of an item, but does not delete the item. ### Path (Default) ``` -Clear-Item [-Path] [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Clear-Item [-Path] [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### LiteralPath ``` -Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ## DESCRIPTION -The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. -For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the -variable. The value that used to represent a cleared item is defined by each PowerShell provider. -This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files. +The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, +the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The +value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is +similar to `Clear-Content`, but it works on aliases and variables, instead of files. ## EXAMPLES ### Example 1: Clear the value of a variable -This command clears the value of the variable named `TestVar1`. -The variable remains and is valid, but its value is set to `$null`. -The variable name is prefixed with `Variable:` to indicate the PowerShell Variable provider. +This command clears the value of the variable named `TestVar1`. The variable remains and is valid, +but its value is set to `$null`. The variable name is prefixed with `Variable:` to indicate the +PowerShell Variable provider. The alternate commands show that, to get the same result, you can switch to the PowerShell `Variable:` drive and then run the `Clear-Item` command. @@ -77,9 +79,9 @@ Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ### -Credential > [!NOTE] -> This parameter is not supported by any providers installed with PowerShell. -> To impersonate another user, or elevate your credentials when running this cmdlet, -> use [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). +> This parameter is not supported by any providers installed with PowerShell. To impersonate another +> user, or elevate your credentials when running this cmdlet, use +> [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). ```yaml Type: System.Management.Automation.PSCredential @@ -138,10 +140,9 @@ Accept wildcard characters: True ### -Force Indicates that the cmdlet clears items that cannot otherwise be changed, such as read- only aliases. -The cmdlet cannot clear constants. -Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). -The cmdlet cannot override security restrictions, even when the **Force** parameter is used. +The cmdlet cannot clear constants. Implementation varies from provider to provider. For more +information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). The +cmdlet cannot override security restrictions, even when the **Force** parameter is used. ```yaml Type: System.Management.Automation.SwitchParameter @@ -182,7 +183,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -198,9 +200,8 @@ Accept wildcard characters: False ### -Path -Specifies the path to the items being cleared. -Wildcard characters are permitted. -This parameter is required, but the parameter name **Path** is optional. +Specifies the path to the items being cleared. Wildcard characters are permitted. This parameter is +required, but the parameter name **Path** is optional. ```yaml Type: System.String[] @@ -216,9 +217,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -250,8 +251,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter @@ -267,10 +267,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.Management/Clear-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Clear-ItemProperty.md index 3844cf69f28a..5035dd613195 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Clear-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Clear-ItemProperty.md @@ -20,17 +20,17 @@ Clears the value of a property but does not delete the property. ### Path (Default) ``` -Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [] +Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ### LiteralPath ``` -Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [] +Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION @@ -54,9 +54,9 @@ Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ### -Credential > [!NOTE] -> This parameter is not supported by any providers installed with PowerShell. -> To impersonate another user, or elevate your credentials when running this cmdlet, -> use [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). +> This parameter is not supported by any providers installed with PowerShell. To impersonate another +> user, or elevate your credentials when running this cmdlet, use +> [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). ```yaml Type: System.Management.Automation.PSCredential @@ -92,9 +92,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -113,8 +115,8 @@ Accept wildcard characters: True ### -Force Indicates that this cmdlet deletes properties from items that cannot otherwise be accessed by the -user. Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +user. Implementation varies from provider to provider. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -155,7 +157,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -222,9 +225,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -256,8 +259,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter @@ -273,10 +275,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -301,9 +303,13 @@ Windows PowerShell includes the following aliases for `Clear-ItemProperty`: - `clp` -You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero. Otherwise, the value is empty. +You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. +If the data type of the value is Binary or DWORD, clearing the data sets the value to zero. +Otherwise, the value is empty. -The `Clear-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +The `Clear-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list +the providers available in your session, type `Get-PSProvider`. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md b/reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md index 067c40152ab5..aef2c9e13c6a 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md @@ -18,7 +18,8 @@ Clears the contents of the current user's recycle bin. ### All ``` -Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] [] +Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md index 8e6efeb59da5..a902d1523ad8 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -20,32 +20,39 @@ Copies a property and value from a specified location to another location. ### Path (Default) ``` -Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ### LiteralPath ``` -Copy-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Copy-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION -The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. -For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key. +The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another +location. For instance, you can use this cmdlet to copy one or more registry entries from one +registry key to another registry key. ## EXAMPLES ### Example 1: Copy a property from a registry key to another registry key -This command copies the property named "MyProperty" from the "MyApplication" registry key to the "MyApplicationRev2" registry key. +This command copies the property named "MyProperty" from the "MyApplication" registry key to the +"MyApplicationRev2" registry key. ```powershell -Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" +$params = @{ + Path = 'MyApplication' + Destination = 'HKLM:\Software\MyApplicationRev2' + Name = 'MyProperty' +} +Copy-ItemProperty @params ``` ## PARAMETERS @@ -55,8 +62,9 @@ Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicati Specifies a user account that has permission to perform this action. The default is the current user. -Type a user name, such as "User01" or "Domain01\User01", or enter a **PSCredential** object, such as one generated by the `Get-Credential` cmdlet. -If you type a user name, you are prompted for a password. +Type a user name, such as "User01" or "Domain01\User01", or enter a **PSCredential** object, such as +one generated by the `Get-Credential` cmdlet. If you type a user name, you are prompted for a +password. > [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell. @@ -91,9 +99,8 @@ Accept wildcard characters: False ### -Exclude -Specifies, as a string array, an item or items that this cmdlet excludes. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". +Specifies, as a string array, an item or items that this cmdlet excludes. The value of this +parameter qualifies the **Path** parameter. Enter a path element or pattern, such as "*.txt". Wildcard characters are permitted. ```yaml @@ -110,11 +117,12 @@ Accept wildcard characters: True ### -Filter -Specifies a filter in the format or language of the provider. -The value of this parameter qualifies the **Path** parameter. +Specifies a filter in the format or language of the provider. The value of this parameter qualifies +the **Path** parameter. -The syntax of the filter, including the use of wildcard characters, depends on the provider. -Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. +The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters +are more efficient than other parameters, because the provider applies them when the cmdlet gets the +objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -130,9 +138,9 @@ Accept wildcard characters: True ### -Force -Forces the command to run without asking for user confirmation. -Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +Forces the command to run without asking for user confirmation. Implementation varies from provider +to provider. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -148,10 +156,9 @@ Accept wildcard characters: False ### -Include -Specifies, as a string array, an item or items that this cmdlet includes in the operation. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". -Wildcard characters are permitted. +Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value +of this parameter qualifies the **Path** parameter. Enter a path element or pattern, such as +"*.txt". Wildcard characters are permitted. ```yaml Type: System.String[] @@ -167,11 +174,10 @@ Accept wildcard characters: False ### -LiteralPath -Specifies the path to the current location of the property. -Unlike the **Path** parameter, the value of **LiteralPath** is used exactly as it is 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. +Specifies the path to the current location of the property. Unlike the **Path** parameter, the value +of **LiteralPath** is used exactly as it is 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. ```yaml Type: System.String[] @@ -203,8 +209,8 @@ Accept wildcard characters: False ### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. +Returns an object representing the item with which you are working. By default, this cmdlet does not +generate any output. ```yaml Type: System.Management.Automation.SwitchParameter @@ -235,9 +241,9 @@ Accept wildcard characters: False ``` ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -268,8 +274,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter @@ -285,11 +290,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). - +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 ### System.String diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md index 282f4a6338be..c601ce7bbd8c 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md @@ -22,18 +22,19 @@ Gets the content of the item at the specified location. ``` Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] [-Path] - [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-UseTransaction] [-Delimiter ] [-Wait] [-Raw] + [-Filter ] [-Include ] [-Exclude ] [-Force] + [-Credential ] [-UseTransaction] [-Delimiter ] [-Wait] [-Raw] [-Encoding ] [-Stream ] [] ``` ### LiteralPath ``` -Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] -LiteralPath - [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-UseTransaction] [-Delimiter ] [-Wait] [-Raw] - [-Encoding ] [-Stream ] [] +Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] + -LiteralPath [-Filter ] [-Include ] [-Exclude ] + [-Force] [-Credential ] [-UseTransaction] [-Delimiter ] [-Wait] + [-Raw] [-Encoding ] [-Stream ] + [] ``` ## DESCRIPTION @@ -53,7 +54,9 @@ This example gets the content of a file in the current directory. The `LineNumbe has 100 lines in the format, **This is Line X** and is used in several examples. ```powershell -1..100 | ForEach-Object { Add-Content -Path .\LineNumbers.txt -Value "This is line $_." } +1..100 | ForEach-Object { + Add-Content -Path .\LineNumbers.txt -Value "This is line $_." +} Get-Content -Path .\LineNumbers.txt ``` @@ -258,7 +261,7 @@ This example demonstrates how to get the contents of a file as a `[byte[]]` as a ```powershell $byteArray = Get-Content -Path C:\temp\test.txt -Encoding Byte -Raw -Get-Member -InputObject $bytearray +Get-Member -InputObject $byteArray ``` ```Output diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-HotFix.md b/reference/5.1/Microsoft.PowerShell.Management/Get-HotFix.md index 13fbe98f0be6..3ffd02aca9bd 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-HotFix.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-HotFix.md @@ -25,8 +25,8 @@ Get-HotFix [[-Id] ] [-ComputerName ] [-Credential ] [-ComputerName ] [-Credential ] - [] +Get-HotFix [-Description ] [-ComputerName ] + [-Credential ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Item.md index 74f59e82f101..d14c242593af 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Item.md @@ -396,7 +396,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Get-ItemProperty.md index e6b5bbf12717..ad975a0fb03b 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-ItemProperty.md @@ -20,16 +20,17 @@ Gets the properties of a specified item. ### Path (Default) ``` -Get-ItemProperty [-Path] [[-Name] ] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-UseTransaction] [] +Get-ItemProperty [-Path] [[-Name] ] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [-UseTransaction] [] ``` ### LiteralPath ``` Get-ItemProperty -LiteralPath [[-Name] ] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-UseTransaction] - [] + [-Include ] [-Exclude ] [-Credential ] + [-UseTransaction] [] ``` ## DESCRIPTION @@ -100,8 +101,8 @@ PSCompatibleVersion : 1.0,2.0 ### -Credential > [!NOTE] -> This parameter is not supported by any providers installed with Windows PowerShell. To impersonate -> another user, or elevate your credentials when running this cmdlet, use +> This parameter is not supported by any providers installed with PowerShell. To impersonate another +> user, or elevate your credentials when running this cmdlet, use > [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). ```yaml @@ -252,10 +253,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -275,8 +276,8 @@ You can pipe a string that contains a path to this cmdlet. ### System.IO.DirectoryInfo -This cmdlet returns an object for each item property that it gets. The object type depends on -the object that is retrieved. For example, in a file system drive, it might return a file or folder. +This cmdlet returns an object for each item property that it gets. The object type depends on the +object that is retrieved. For example, in a file system drive, it might return a file or folder. ## NOTES diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md b/reference/5.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md index d080ed3777f5..be83067ebfbe 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md @@ -20,15 +20,17 @@ Gets the value for one or more properties of a specified item. ### Path (Default) ``` -Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-UseTransaction] [] +Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [-UseTransaction] [] ``` ### LiteralPath ``` -Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-UseTransaction] [] +Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [-UseTransaction] [] ``` ## DESCRIPTION @@ -41,8 +43,8 @@ parameters. ### Example 1: Get the value of the ProductID property -This command gets the value of the **ProductID** property of the `\SOFTWARE\Microsoft\WindowsNT\CurrentVersion` -object in the Windows Registry provider. +This command gets the value of the **ProductID** property of the +`\SOFTWARE\Microsoft\WindowsNT\CurrentVersion` object in the Windows Registry provider. ```powershell Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductID @@ -235,7 +237,8 @@ Accept wildcard characters: False ### -UseTransaction Includes the command in the active transaction. This parameter is valid only when a transaction is -in progress. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -251,10 +254,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -266,8 +269,8 @@ You can pipe a string that contains a path to this cmdlet. ### System.Management.Automation.PSObject -This cmdlet returns an object for each item property value that it gets. -The object type depends on the property value that is retrieved. +This cmdlet returns an object for each item property value that it gets. The object type depends on +the property value that is retrieved. ## NOTES diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md index 2ce61abf3be4..569a9233abb0 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -20,13 +20,15 @@ Gets drives in the current session. ### Name (Default) ``` -Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] [] +Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] + [-UseTransaction] [] ``` ### LiteralName ``` -Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] [] +Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] + [-UseTransaction] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Service.md index a6ca0dec6284..af1e2cfdaf88 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Service.md @@ -20,29 +20,30 @@ Gets the services on a local or remote computer. ### Default (Default) ``` -Get-Service [[-Name] ] [-ComputerName ] [-DependentServices] [-RequiredServices] - [-Include ] [-Exclude ] [] +Get-Service [[-Name] ] [-ComputerName ] [-DependentServices] + [-RequiredServices] [-Include ] [-Exclude ] [] ``` ### DisplayName ``` -Get-Service [-ComputerName ] [-DependentServices] [-RequiredServices] -DisplayName - [-Include ] [-Exclude ] [] +Get-Service [-ComputerName ] [-DependentServices] [-RequiredServices] + -DisplayName [-Include ] [-Exclude ] [] ``` ### InputObject ``` -Get-Service [-ComputerName ] [-DependentServices] [-RequiredServices] [-Include ] - [-Exclude ] [-InputObject ] [] +Get-Service [-ComputerName ] [-DependentServices] [-RequiredServices] + [-Include ] [-Exclude ] [-InputObject ] + [] ``` ## DESCRIPTION -The `Get-Service` cmdlet gets objects that represent the services on a local computer or on a remote -computer, including running and stopped services. By default, when `Get-Service` is run without -parameters, all the local computer's services are returned. +The `Get-Service` cmdlet gets objects that represent the services on a computer, including running +and stopped services. By default, when `Get-Service` is run without parameters, all the local +computer's services are returned. You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet. @@ -71,8 +72,8 @@ Get-Service "wmi*" ### Example 3: Display services that include a search string This example displays services with a display name that includes the word `network`. Searching the -display name finds network-related services even when the service name doesn't include `Net`, such as -xmlprov, the Network Provisioning Service. +display name finds network-related services even when the service name doesn't include `Net`, such +as xmlprov, the Network Provisioning Service. ```powershell Get-Service -DisplayName "*network*" @@ -119,7 +120,7 @@ This example gets services that have dependent services. ```powershell Get-Service | - Where-Object {$_.DependentServices} | + Where-Object {$_.DependentServices} | Format-List -Property Name, DependentServices, @{ Label="NoOfDependentServices"; Expression={$_.DependentServices.Count} } diff --git a/reference/5.1/Microsoft.PowerShell.Management/Invoke-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Invoke-Item.md index 6923a2f9670a..d5566ba0c8c9 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Invoke-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Invoke-Item.md @@ -20,15 +20,17 @@ Performs the default action on the specified item. ### Path (Default) ``` -Invoke-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Invoke-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### LiteralPath ``` -Invoke-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Invoke-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ## DESCRIPTION @@ -144,12 +146,13 @@ Accept wildcard characters: True ### -LiteralPath -Specifies a path to one or more locations. The value of **LiteralPath** is used exactly as it is +Specifies a path to one or more locations. The value of **LiteralPath** 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. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). > [!IMPORTANT] > Using this parameter with untrusted data is a security risk. Only use trusted data with this @@ -191,9 +194,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Management/Move-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Move-ItemProperty.md index c2f4c0fba6dd..85b9df554eb7 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Move-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Move-ItemProperty.md @@ -20,17 +20,17 @@ Moves a property from one location to another. ### Path (Default) ``` -Move-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Move-ItemProperty [-Path] [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf][-Confirm] [-UseTransaction] [] ``` ### LiteralPath ``` -Move-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Move-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION @@ -48,7 +48,12 @@ This command moves the Version registry value, and its data, from the "MyApp" su subkey of the `HKLM\Software\MyCompany` registry key. ```powershell -Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" +$params = @{ + Path = 'HKLM:\Software\MyCompany\MyApp' + Name = 'Version' + Destination = 'HKLM:\Software\MyCompany\NewApp' +} +Move-ItemProperty @params ``` ## PARAMETERS @@ -91,9 +96,8 @@ Accept wildcard characters: False ### -Exclude Specifies, as a string array, a property or property that this cmdlet excludes from the operation. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". -Wildcard characters are permitted. +The value of this parameter qualifies the **Path** parameter. Enter a path element or pattern, such +as "*.txt". Wildcard characters are permitted. ```yaml Type: System.String[] @@ -109,11 +113,12 @@ Accept wildcard characters: True ### -Filter -Specifies a filter in the format or language of the provider. -The value of this parameter qualifies the **Path** parameter. +Specifies a filter in the format or language of the provider. The value of this parameter qualifies +the **Path** parameter. -The syntax of the filter, including the use of wildcard characters, depends on the provider. -Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. +The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters +are more efficient than other parameters, because the provider applies them when the cmdlet gets the +objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -129,9 +134,9 @@ Accept wildcard characters: True ### -Force -Forces the command to run without asking for user confirmation. -Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +Forces the command to run without asking for user confirmation. Implementation varies from provider +to provider. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -147,10 +152,9 @@ Accept wildcard characters: False ### -Include -Specifies, as a string array, a property or property that this cmdlet includes in the operation. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". -Wildcard characters are permitted. +Specifies, as a string array, a property or property that this cmdlet includes in the operation. The +value of this parameter qualifies the **Path** parameter. Enter a path element or pattern, such as +"*.txt". Wildcard characters are permitted. ```yaml Type: System.String[] @@ -166,11 +170,10 @@ Accept wildcard characters: True ### -LiteralPath -Specifies the path to the current location of the property. -Unlike the **Path** parameter, the value of **LiteralPath** is used exactly as it is 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. +Specifies the path to the current location of the property. Unlike the **Path** parameter, the value +of **LiteralPath** is used exactly as it is 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. ```yaml Type: System.String[] @@ -202,8 +205,8 @@ Accept wildcard characters: False ### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. +Returns an object representing the item with which you are working. By default, this cmdlet does not +generate any output. ```yaml Type: System.Management.Automation.SwitchParameter @@ -236,9 +239,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -287,7 +290,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -312,7 +318,9 @@ Windows PowerShell includes the following aliases for `Move-ItemProperty`: - `mp` -This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +This cmdlet is designed to work with the data exposed by any provider. To list the providers +available in your session, type `Get-PSProvider`. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/New-Item.md b/reference/5.1/Microsoft.PowerShell.Management/New-Item.md index eba38f1c88cd..eeaee36ba0d9 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/New-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/New-Item.md @@ -22,21 +22,24 @@ Creates a new item. ``` New-Item [-Path] [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### nameSet - All providers ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +New-Item [[-Path] ] -Name [-ItemType ] + [-Value ] [-Force] [-Credential ] [-WhatIf] [-Confirm] + [-UseTransaction] [] ``` ### pathSet (Default) - WSMan provider ``` -New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [-OptionSet ] +New-Item [-Path] -ConnectionURI [-ItemType ] + [-Value ] [-Force] [-Credential ] [-WhatIf] [-Confirm] + [-UseTransaction] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-Port ] [] ``` @@ -44,11 +47,11 @@ New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [-OptionSet ] - [-Authentication ] [-CertificateThumbprint ] - [-SessionOption ] [-ApplicationName ] [-Port ] [-UseSSL] - [] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [-OptionSet ] [-Authentication ] + [-CertificateThumbprint ] [-SessionOption ] + [-ApplicationName ] [-Port ] [-UseSSL] [] ``` ### pathSet (Default) @@ -62,8 +65,8 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [-Options ] [] ``` @@ -112,7 +115,8 @@ profile path, even when the directories in the path do not exist. After you create a profile, you can enter aliases, functions, and scripts in the profile to customize your shell. -For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) +For more information, see +[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) and [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). ```powershell diff --git a/reference/5.1/Microsoft.PowerShell.Management/Push-Location.md b/reference/5.1/Microsoft.PowerShell.Management/Push-Location.md index b35637cf02ea..64e5bae71a53 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Push-Location.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Push-Location.md @@ -20,13 +20,15 @@ Adds the current location to the top of a location stack. ### Path (Default) ``` -Push-Location [[-Path] ] [-PassThru] [-StackName ] [-UseTransaction] [] +Push-Location [[-Path] ] [-PassThru] [-StackName ] + [-UseTransaction] [] ``` ### LiteralPath ``` -Push-Location [-LiteralPath ] [-PassThru] [-StackName ] [-UseTransaction] [] +Push-Location [-LiteralPath ] [-PassThru] [-StackName ] + [-UseTransaction] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md index 95bd63405b58..9107356c5ae6 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md @@ -24,49 +24,51 @@ Deletes the specified items. ### Path (Default) - FileSystem provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [-Stream ] [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-Stream ] + [] ``` ### LiteralPath - FileSystem provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [-Stream ] [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-Stream ] + [] ``` ### Path (Default) - Certificate provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [-DeleteKey] ] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-DeleteKey] [] ``` ### LiteralPath - Certificate provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [-DeleteKey] [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [-DeleteKey] [] ``` ### Path (Default) - All providers ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ### LiteralPath - All providers ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION @@ -378,7 +380,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/5.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md index 588dc7ecd807..60e9fe1ca24e 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md @@ -20,8 +20,9 @@ Deletes the property and its value from an item. ### Path (Default) ``` -Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [-UseTransaction] [] ``` ### LiteralPath @@ -34,46 +35,48 @@ Remove-ItemProperty -LiteralPath [-Name] [-Force] [-Filter ## DESCRIPTION -The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. -You can use it to delete registry values and the data that they store. +The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to +delete registry values and the data that they store. ## EXAMPLES ### Example 1: Delete a registry value -This command deletes the "SmpProperty" registry value, and its data, from the "SmpApplication" subkey of the "HKEY_LOCAL_MACHINE\Software" registry key. - -Because the command is issued from a file system drive (`PS C:\>`), it includes the fully qualified path of the "SmpApplication" subkey, including the drive, `HKLM:`, and the "Software" key. - -It uses the **Name** parameter to identify the registry value that is being deleted. +This command deletes the "SmpProperty" registry value, and its data, from the "SmpApplication" +subkey of the `HKEY_LOCAL_MACHINE\Software` registry key. ```powershell Remove-ItemProperty -Path "HKLM:\Software\SmpApplication" -Name "SmpProperty" ``` +Because the command is issued from a file system drive (`PS C:\>`), it includes the fully qualified +path of the "SmpApplication" subkey, including the drive, `HKLM:`, and the "Software" key. ### Example 2: Delete a registry value from the HKCU location -These commands delete the "Options" registry value, and its data, from the "MyApp" subkey of "HKEY_CURRENT_USER\Software\MyCompany". +These commands delete the "Options" registry value, and its data, from the "MyApp" subkey of +"HKEY_CURRENT_USER\Software\MyCompany". -The first command uses the `Set-Location` cmdlet to change the current location to the **HKEY_CURRENT_USER** drive (`HKCU:`) and the "Software\MyCompany\MyApp" subkey. +The first command uses the `Set-Location` cmdlet to change the current location to the +**HKEY_CURRENT_USER** drive (`HKCU:`) and the "Software\MyCompany\MyApp" subkey. -The second command uses `Remove-ItemProperty` to remove the "Options" registry value, and its data, from the "MyApp" subkey. -Because **Path** is required, the command uses a dot ('.') to indicate the current location. -It uses **Name** to specify which registry value to delete. -It uses the **Confirm** parameter to request a user prompt before deleting the value. +The second command uses `Remove-ItemProperty` to remove the "Options" registry value, and its data, +from the "MyApp" subkey. Because **Path** is required, the command uses a dot ('.') to indicate the +current location. It uses **Name** to specify which registry value to delete. It uses the +**Confirm** parameter to request a user prompt before deleting the value. -``` +```powershell PS C:\> Set-Location HKCU:\Software\MyCompany\MyApp PS HKCU:\Software\MyCompany\MyApp> Remove-ItemProperty -Path . -Name "Options" -Confirm ``` ### Example 3: Remove a registry value by using the pipeline -This command deletes the "NoOfEmployees" registry value, and its data, from the "HKLM\Software\MyCompany" registry key. +This command deletes the "NoOfEmployees" registry value, and its data, from the +`HKLM\Software\MyCompany` registry key. -The command uses the `Get-Item` cmdlet to get an item that represents the registry key. -It uses a pipeline operator (`|`) to send the object to `Remove-ItemProperty`. -Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the name of the registry value. +The command uses the `Get-Item` cmdlet to get an item that represents the registry key. It uses a +pipeline operator (`|`) to send the object to `Remove-ItemProperty`. Then, it uses the **Name** +parameter of `Remove-ItemProperty` to specify the name of the registry value. ```powershell Get-Item -Path HKLM:\Software\MyCompany | Remove-ItemProperty -Name NoOfEmployees @@ -84,9 +87,9 @@ Get-Item -Path HKLM:\Software\MyCompany | Remove-ItemProperty -Name NoOfEmployee ### -Credential > [!NOTE] -> This parameter is not supported by any providers installed with PowerShell. -> To impersonate another user, or elevate your credentials when running this cmdlet, -> use [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). +> This parameter is not supported by any providers installed with PowerShell. To impersonate another +> user, or elevate your credentials when running this cmdlet, use +> [Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md). ```yaml Type: System.Management.Automation.PSCredential @@ -102,10 +105,8 @@ Accept wildcard characters: False ### -Exclude -Specifies items that this cmdlet omits. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". -Wildcard characters are permitted. +Specifies items that this cmdlet omits. The value of this parameter qualifies the **Path** +parameter. Enter a path element or pattern, such as "*.txt". Wildcard characters are permitted. ```yaml Type: System.String[] @@ -121,11 +122,12 @@ Accept wildcard characters: True ### -Filter -Specifies a filter in the format or language of the provider. -The value of this parameter qualifies the **Path** parameter. +Specifies a filter in the format or language of the provider. The value of this parameter qualifies +the **Path** parameter. -The syntax of the filter, including the use of wildcard characters, depends on the provider. -Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. +The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters +are more efficient than other parameters, because the provider applies them when the cmdlet gets the +objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -142,8 +144,8 @@ Accept wildcard characters: True ### -Force Forces the cmdlet to remove a property of an object that cannot otherwise be accessed by the user. -Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +Implementation varies from provider to provider. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -159,10 +161,9 @@ Accept wildcard characters: False ### -Include -Specifies, as a string array, an item or items that this cmdlet includes in the operation. -The value of this parameter qualifies the **Path** parameter. -Enter a path element or pattern, such as "*.txt". -Wildcard characters are permitted. +Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value +of this parameter qualifies the **Path** parameter. Enter a path element or pattern, such as +"*.txt". Wildcard characters are permitted. ```yaml Type: System.String[] @@ -178,11 +179,10 @@ Accept wildcard characters: True ### -LiteralPath -Specifies the path to the current location of the property. -Unlike the **Path** parameter, the value of **LiteralPath** is used exactly as it is 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. +Specifies the path to the current location of the property. Unlike the **Path** parameter, the value +of **LiteralPath** is used exactly as it is 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. ```yaml Type: System.String[] @@ -215,8 +215,8 @@ Accept wildcard characters: True ### -Path -Specifies the path of the item whose properties are being removed. -Wildcard characters are permitted. +Specifies the path of the item whose properties are being removed. Wildcard characters are +permitted. ```yaml Type: System.String[] @@ -232,9 +232,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -266,8 +266,7 @@ Accept wildcard characters: False ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: System.Management.Automation.SwitchParameter @@ -283,7 +282,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -303,9 +305,11 @@ Windows PowerShell includes the following aliases for `Remove-ItemProperty`: - `rp` -In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values. - -`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +- In the PowerShell Registry provider, registry values are considered to be properties of a registry + key or subkey. You can use the **ItemProperty** cmdlets to manage these values. +- `Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the + providers available in your session, type `Get-PSProvider`. For more information, see + [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md index 20edb7ef9fcc..a49caf27e7bd 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -20,15 +20,15 @@ Deletes temporary PowerShell drives and disconnects mapped network drives. ### Name (Default) ``` -Remove-PSDrive [-Name] [-PSProvider ] [-Scope ] [-Force] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Remove-PSDrive [-Name] [-PSProvider ] [-Scope ] [-Force] + [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ### LiteralName ``` -Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] [-Force] - [-WhatIf] [-Confirm] [-UseTransaction] [] +Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] + [-Force] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Rename-Computer.md b/reference/5.1/Microsoft.PowerShell.Management/Rename-Computer.md index 8f2c737eb762..05c90be4f219 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Rename-Computer.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Rename-Computer.md @@ -17,14 +17,14 @@ Renames a computer. ``` Rename-Computer [-ComputerName ] [-PassThru] [-DomainCredential ] - [-LocalCredential ] [-NewName] [-Force] [-Restart] [-WsmanAuthentication ] - [-Protocol ] [-WhatIf] [-Confirm] [] + [-LocalCredential ] [-NewName] [-Force] [-Restart] + [-WsmanAuthentication ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The `Rename-Computer` cmdlet renames the local computer or a remote computer. -It renames one computer in each command. +The `Rename-Computer` cmdlet renames the local computer or a remote computer. It renames one +computer in each command. This cmdlet was introduced in Windows PowerShell 3.0. @@ -49,7 +49,13 @@ computers in the domain. The **Force** parameter suppresses the confirmation prompt. ```powershell -Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force +$renameParams = @{ + ComputerName = "Srv01" + NewName = "Server001" + DomainCredential = "Domain01\Admin01" + Force = $true +} +Rename-Computer @renameParams ``` ## PARAMETERS @@ -184,9 +190,8 @@ Accept wildcard characters: False ### -Protocol -Specifies which protocol to use to rename the computer. -The acceptable values for this parameter are: WSMan and DCOM. -The default value is DCOM. +Specifies which protocol to use to rename the computer. The acceptable values for this parameter +are: WSMan and DCOM. The default value is DCOM. This parameter was introduced in Windows PowerShell 3.0. @@ -205,8 +210,8 @@ Accept wildcard characters: False ### -Restart -Indicates that this cmdlet restarts the computer that was renamed. -A restart is often required to make the change effective. +Indicates that this cmdlet restarts the computer that was renamed. A restart is often required to +make the change effective. ```yaml Type: System.Management.Automation.SwitchParameter @@ -234,15 +239,15 @@ WSMan protocol. The acceptable values for this parameter are: The default value is **Default**. -For more information about the values of this parameter, see [AuthenticationMechanism Enumeration](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +For more information about the values of this parameter, see +[AuthenticationMechanism Enumeration](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] -> Credential Security Service Provider (CredSSP) authentication, in which the user -> credentials are passed to a remote computer to be authenticated, is designed for commands that -> require authentication on more than one resource, such as accessing a remote network share. -> This mechanism increases the security risk of the remote operation. -> If the remote computer is compromised, the credentials that are passed to it can be used to -> control > the network session. +> Credential Security Service Provider (CredSSP) authentication, in which the user credentials are +> passed to a remote computer to be authenticated, is designed for commands that require +> authentication on more than one resource, such as accessing a remote network share. This mechanism +> increases the security risk of the remote operation. If the remote computer is compromised, the +> credentials that are passed to it can be used to control > the network session. This parameter was introduced in Windows PowerShell 3.0. @@ -297,7 +302,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md index bb11359ad037..b29ad8053cd1 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md @@ -21,15 +21,17 @@ Renames an item in a PowerShell provider namespace. ### ByPath (Default) ``` -Rename-Item [-Path] [-NewName] [-Force] [-PassThru] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [] +Rename-Item [-Path] [-NewName] [-Force] [-PassThru] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### ByLiteralPath ``` Rename-Item -LiteralPath [-NewName] [-Force] [-PassThru] - [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ## DESCRIPTION @@ -79,8 +81,8 @@ Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key -This example renames a registry key from **Advertising** to **Marketing**. When the command is complete, -the key is renamed, but the registry entries in the key are unchanged. +This example renames a registry key from **Advertising** to **Marketing**. When the command is +complete, the key is renamed, but the registry entries in the key are unchanged. ```powershell Rename-Item -Path "HKLM:\Software\MyCompany\Advertising" -NewName "Marketing" @@ -251,9 +253,9 @@ Accept wildcard characters: False ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md index 0c28d954bc38..c920a1b89d39 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md @@ -20,17 +20,18 @@ Renames a property of an item. ### Path (Default) ``` -Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### LiteralPath ``` -Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [-UseTransaction] [] +Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION @@ -43,7 +44,8 @@ For example, you can use `Rename-ItemProperty` to change the name of a registry ### Example 1: Rename a registry entry -This command renames the config registry entry that is contained in the "HKEY_LOCAL_MACHINE\Software\SmpApplication" key to "oldconfig". +This command renames the config registry entry that is contained in the +`HKEY_LOCAL_MACHINE\Software\SmpApplication` key to "oldconfig". ```powershell Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig @@ -56,8 +58,9 @@ Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName ol Specifies a user account that has permission to perform this action. The default is the current user. -Type a user name, such as "User01" or "Domain01\User01", or enter a **PSCredential** object, such as one generated by the `Get-Credential` cmdlet. -If you type a user name, you are prompted for a password. +Type a user name, such as "User01" or "Domain01\User01", or enter a **PSCredential** object, such as +one generated by the `Get-Credential` cmdlet. If you type a user name, you are prompted for a +password. > [!WARNING] > This parameter is not supported by any providers installed with Windows PowerShell. @@ -95,11 +98,12 @@ Accept wildcard characters: True ### -Filter -Specifies a filter in the format or language of the provider. -The value of this parameter qualifies the **Path** parameter. +Specifies a filter in the format or language of the provider. The value of this parameter qualifies +the **Path** parameter. -The syntax of the filter, including the use of wildcard characters, depends on the provider. -Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. +The syntax of the filter, including the use of wildcard characters, depends on the provider. Filters +are more efficient than other parameters, because the provider applies them when the cmdlet gets the +objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -116,8 +120,8 @@ Accept wildcard characters: True ### -Force Forces the cmdlet to rename a property of an object that cannot otherwise be accessed by the user. -Implementation varies from provider to provider. -For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +Implementation varies from provider to provider. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -152,11 +156,10 @@ Accept wildcard characters: True ### -LiteralPath -Specifies a path to the item. -Unlike the **Path** parameter, the value of **LiteralPath** is used exactly as it is 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. +Specifies a path to the item. Unlike the **Path** parameter, the value of **LiteralPath** is used +exactly as it is 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. ```yaml Type: System.String @@ -204,8 +207,8 @@ Accept wildcard characters: False ### -PassThru -Returns an object that represents the item property. -By default, this cmdlet does not generate any output. +Returns an object that represents the item property. By default, this cmdlet does not generate any +output. ```yaml Type: System.Management.Automation.SwitchParameter @@ -237,9 +240,9 @@ Accept wildcard characters: True ### -UseTransaction -Includes the command in the active transaction. -This parameter is valid only when a transaction is in progress. -For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). +Includes the command in the active transaction. This parameter is valid only when a transaction is +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md). ```yaml Type: System.Management.Automation.SwitchParameter @@ -288,10 +291,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.Management/Restart-Computer.md b/reference/5.1/Microsoft.PowerShell.Management/Restart-Computer.md index e093539b0bf9..ad8172beb66a 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Restart-Computer.md @@ -18,18 +18,21 @@ Restarts the operating system on local and remote computers. ### DefaultSet (Default) ``` -Restart-Computer [-DcomAuthentication ] [-Impersonation ] - [-WsmanAuthentication ] [-Protocol ] [[-ComputerName] ] - [[-Credential] ] [-Force] [-Wait] [-Timeout ] [-For ] - [-Delay ] [-WhatIf] [-Confirm] [] +Restart-Computer [-DcomAuthentication ] + [-Impersonation ] [-WsmanAuthentication ] + [-Protocol ] [[-ComputerName] ] + [[-Credential] ] [-Force] [-Wait] [-Timeout ] + [-For ] [-Delay ] [-WhatIf] [-Confirm] + [] ``` ### AsJobSet ``` Restart-Computer [-AsJob] [-DcomAuthentication ] - [-Impersonation ] [[-ComputerName] ] [[-Credential] ] - [-Force] [-ThrottleLimit ] [-WhatIf] [-Confirm] [] + [-Impersonation ] [[-ComputerName] ] + [[-Credential] ] [-Force] [-ThrottleLimit ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -249,7 +252,8 @@ Valid values are: - **PacketPrivacy**: Packet Privacy-level COM authentication. - **Unchanged**: The authentication level is the same as the previous command. -For more information, see [AuthenticationLevel Enumeration](/dotnet/api/system.management.authenticationlevel). +For more information, see +[AuthenticationLevel Enumeration](/dotnet/api/system.management.authenticationlevel). This parameter is introduced in Windows PowerShell 3.0. @@ -455,7 +459,7 @@ The acceptable values for this parameter are: **Basic**, **CredSSP**, **Default* **Kerberos**, and **Negotiate**. For more information, see -[AuthenticationMechanism](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user credentials are @@ -513,7 +517,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 @@ -533,12 +538,11 @@ When you use the **AsJob** parameter, this cmdlet returns a job object. ## NOTES -- `Restart-Computer` only work on computers running Windows and requires WinRM and WMI to shutdown a - system, including the local system. -- `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) - class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account - used to restart the machine. +- On Windows, `Restart-Computer` uses the + [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) + [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method + requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart + the machine. In Windows PowerShell 2.0, the **AsJob** parameter doesn't work reliably when you are restarting or stopping remote computers. In Windows PowerShell 3.0, the implementation is changed to resolve this diff --git a/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md index 026dbfe838f6..4384311ca1df 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md @@ -18,22 +18,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Restart-Service [-Force] [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Restart-Service [-Force] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md index d10c9eb34717..1b477896696b 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md @@ -18,22 +18,22 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Resume-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Resume-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Set-Item.md b/reference/5.1/Microsoft.PowerShell.Management/Set-Item.md index cc33229a5580..619d6fcd26b8 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Set-Item.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Set-Item.md @@ -20,48 +20,48 @@ Changes the value of an item to the value specified in the command. ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [] ``` ### LiteralPath - All providers ``` Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [] ``` ### Path (Default) - Alias and Function providers ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [-Options ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [-Options ] [] ``` ### LiteralPath - Alias and Function providers ``` Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [-Options ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [-Options ] [] ``` ### Path (Default) - Registry provider ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [-Type ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [-Type ] [] ``` ### LiteralPath - Registry provider ``` Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-UseTransaction] [-Type ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-UseTransaction] [-Type ] [] ``` ## DESCRIPTION @@ -92,7 +92,9 @@ Set-Item -Path Env:UserRole -Value "Administrator" This command changes the prompt function so that it displays the time before the path. ```powershell -Set-Item -Path Function:prompt -Value {'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> '} +Set-Item -Path Function:prompt -Value { + 'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> ' +} ``` ### Example 4: Set options for your prompt function @@ -149,9 +151,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -214,7 +218,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -417,16 +422,17 @@ Windows PowerShell includes the following aliases for `Set-Item`: - `si` -- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in - the file system, use the `Set-Content` cmdlet. -- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of a - registry key. +- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items + in the file system, use the `Set-Content` cmdlet. +- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of + a registry key. - To create and change the names of registry keys, use the `New-Item` and `Rename-Item` cmdlet. - - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, and - `Rename-ItemProperty` cmdlets. + - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, + and `Rename-ItemProperty` cmdlets. - `Set-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. - For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). + For more information, see + [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md b/reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md index 4501df514b80..ded3309b6d49 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md @@ -20,65 +20,73 @@ Creates or changes the value of a property of an item. ### propertyValuePathSet (Default) - All providers ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### propertyPSObjectPathSet - All providers ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### propertyValueLiteralPathSet - All providers ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### propertyPSObjectLiteralPathSet - All providers ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### propertyValuePathSet (Default) - Registry provider ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [-Type ] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [-Type ] [] ``` ### propertyPSObjectPathSet - Registry provider ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [-Type ] [] ``` ### propertyValueLiteralPathSet - Registry provider ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [-Type ] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] + [-Type ] [] ``` ### propertyPSObjectLiteralPathSet - Registry provider ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-UseTransaction] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-UseTransaction] [-Type ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Set-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Set-Service.md index 5f664f861576..3a96eb07e843 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Set-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Set-Service.md @@ -19,16 +19,16 @@ Starts, stops, and suspends a service, and changes its properties. ``` Set-Service [-ComputerName ] [-Name] [-DisplayName ] - [-Description ] [-StartupType ] [-Status ] [-PassThru] [-WhatIf] - [-Confirm] [] + [-Description ] [-StartupType ] [-Status ] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ### InputObject ``` Set-Service [-ComputerName ] [-DisplayName ] [-Description ] - [-StartupType ] [-Status ] [-InputObject ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-StartupType ] [-Status ] [-InputObject ] + [-PassThru] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md b/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md index 3a5eb1088460..c442b7139e8c 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md @@ -32,7 +32,8 @@ Set-TimeZone -Id [-PassThru] [-WhatIf] [-Confirm] [] ### InputObject ``` -Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] [] +Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Management/Start-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Start-Service.md index 2537ac4effdd..5c14f714bef7 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Start-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Start-Service.md @@ -20,22 +20,22 @@ Starts one or more stopped services. ### InputObject (Default) ``` -Start-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Start-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Start-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Start-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,7 +92,8 @@ This example shows how to start a service when the start type of the service is ``` PS> Start-Service tlntsvr -Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannot start service TlntSvr on computer '.'. +Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannot +start service TlntSvr on computer '.'. At line:1 char:14 + Start-Service <<<< tlntsvr @@ -254,7 +255,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.Management/Stop-Process.md b/reference/5.1/Microsoft.PowerShell.Management/Stop-Process.md index 666e6c5151f6..74a42dc35658 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Stop-Process.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Stop-Process.md @@ -21,19 +21,22 @@ Stops one or more running processes. ### Id (Default) ``` -Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### Name ``` -Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -78,7 +81,7 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName This command stops a particular instance of the Notepad process. It uses the process ID, 3952, to identify the process. The **Confirm** parameter directs PowerShell to prompt you before it stops the -process. Because the prompt includes the process namein addition to its ID, this is best practice. +process. Because the prompt includes the process name in addition to its ID, this is best practice. The **PassThru** parameter passes the process object to the formatter for display. Without this parameter, there would be no display after a `Stop-Process` command. @@ -274,7 +277,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 @@ -300,9 +304,9 @@ Windows PowerShell includes the following aliases for `Stop-Process`: - `kill` - `spps` - You can also use the properties and methods of the Windows Management Instrumentation (WMI) - **Win32_Process** object in Windows PowerShell. For more information, see `Get-CimInstance` and - the WMI SDK. +You can also use the properties and methods of the Windows Management Instrumentation (WMI) +**Win32_Process** object in Windows PowerShell. For more information, see `Get-CimInstance` and +the WMI SDK. - When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows. diff --git a/reference/5.1/Microsoft.PowerShell.Management/Stop-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Stop-Service.md index a994fa75869f..48ba23198669 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Stop-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Stop-Service.md @@ -20,22 +20,22 @@ Stops one or more running services. ### InputObject (Default) ``` -Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -49,16 +49,16 @@ to stop. ### Example 1: Stop a service on the local computer -``` -PS C:\> Stop-Service -Name "sysmonlog" +```powershell +Stop-Service -Name "sysmonlog" ``` This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer. ### Example 2: Stop a service by using the display name -``` -PS C:\> Get-Service -DisplayName "telnet" | Stop-Service +```powershell +Get-Service -DisplayName "telnet" | Stop-Service ``` This command stops the Telnet service on the local computer. The command uses `Get-Service` to get @@ -67,9 +67,9 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes ### Example 3: Stop a service that has dependent services -``` -PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices -PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm +```powershell +Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices +Stop-Service -Name "iisadmin" -Force -Confirm ``` This example stops the IISAdmin service on the local computer. Because stopping this service also diff --git a/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md b/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md index 64b9d9f31c0a..284cac472606 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md @@ -18,22 +18,22 @@ Suspends (pauses) one or more running services. ### InputObject (Default) ``` -Suspend-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Suspend-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Suspend-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Suspend-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -48,16 +48,16 @@ object that represents the services that you want to suspend. ### Example 1: Suspend a service -``` -PS C:\> Suspend-Service -DisplayName "Telnet" +```powershell +Suspend-Service -DisplayName "Telnet" ``` This command suspends the Telnet service (Tlntsvr) service on the local computer. ### Example 2: Display what would happen if you suspend services -``` -PS C:\> Suspend-Service -Name lanman* -WhatIf +```powershell +Suspend-Service -Name lanman* -WhatIf ``` This command tells what would happen if you suspended the services that have a service name that @@ -65,8 +65,8 @@ starts with lanman. To suspend the services, rerun the command without the **Wha ### Example 3: Get and suspend a service -``` -PS C:\> Get-Service schedule | Suspend-Service +```powershell +Get-Service schedule | Suspend-Service ``` This command uses the `Get-Service` cmdlet to get an object that represents the Task Scheduler @@ -75,8 +75,10 @@ This command uses the `Get-Service` cmdlet to get an object that represents the ### Example 4: Suspend all services that can be suspended -``` -PS C:\> Get-Service | Where-Object {$_.CanPauseAndContinue -eq "True"} | Suspend-Service -Confirm +```powershell +Get-Service | + Where-Object { $_.CanPauseAndContinue } | + Suspend-Service -Confirm ``` This command suspends all of the services on the computer that can be suspended. It uses diff --git a/reference/5.1/Microsoft.PowerShell.Management/Test-Path.md b/reference/5.1/Microsoft.PowerShell.Management/Test-Path.md index 5152e7704eee..86b1c78dd523 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Test-Path.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Test-Path.md @@ -166,7 +166,7 @@ False This command uses the **NewerThan** dynamic parameter to determine whether the `powershell.exe` file on the computer is newer than `July 13, 2009`. -The NewerThan parameter works only in file system drives. +The **NewerThan** parameter works only in file system drives. ```powershell Test-Path $PSHOME\powershell.exe -NewerThan "July 13, 2009" @@ -464,7 +464,8 @@ Accept wildcard characters: False ### -UseTransaction Includes the command in the active transaction. This parameter is valid only when a transaction is -in progress. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md) +in progress. For more information, see +[about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md) ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md b/reference/5.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md index 0be45782be9c..ea27335ef2c3 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md +++ b/reference/5.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md @@ -18,13 +18,15 @@ Converts a secure string to an encrypted standard string. ### Secure (Default) ``` -ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] [] +ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] + [] ``` ### Open ``` -ConvertFrom-SecureString [-SecureString] [-Key ] [] +ConvertFrom-SecureString [-SecureString] [-Key ] + [] ``` ## DESCRIPTION @@ -40,6 +42,10 @@ Encryption Standard (AES) encryption algorithm is used. The specified key must h key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the standard string representation. +> [!NOTE] +> For more information about **SecureString** data protection, see +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). + ## EXAMPLES ### Example 1: Create a secure string @@ -136,7 +142,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.Security/ConvertTo-SecureString.md b/reference/5.1/Microsoft.PowerShell.Security/ConvertTo-SecureString.md index 01f8fad8f7cc..64daf987510c 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/ConvertTo-SecureString.md +++ b/reference/5.1/Microsoft.PowerShell.Security/ConvertTo-SecureString.md @@ -18,7 +18,8 @@ Converts plain text or encrypted strings to secure strings. ### Secure (Default) ``` -ConvertTo-SecureString [-String] [[-SecureKey] ] [] +ConvertTo-SecureString [-String] [[-SecureKey] ] + [] ``` ### PlainText @@ -82,13 +83,16 @@ variable. The fourth command displays the encrypted string in the value of the `$Encrypted` variable. The fifth command uses the `ConvertTo-SecureString` cmdlet to convert the encrypted standard string -in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` variable. -The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates that -the command was successful. +in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` +variable. + +The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates +that the command was successful. ### Example 2: Create a secure string from an encrypted string in a file -This example shows how to create a secure string from an encrypted standard string that is saved in a file. +This example shows how to create a secure string from an encrypted standard string that is saved in +a file. ```powershell $Secure = Read-Host -AsSecureString diff --git a/reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md b/reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md index 12d0cbfc28ff..d8a96902f905 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md @@ -30,17 +30,18 @@ Get-AuthenticodeSignature -LiteralPath [] ### ByContent ``` -Get-AuthenticodeSignature -SourcePathOrExtension -Content [] +Get-AuthenticodeSignature -SourcePathOrExtension -Content + [] ``` ## DESCRIPTION -The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a -file or file content as a byte array. -If the file is both embedded signed and Windows catalog signed, -the Windows catalog signature is used. -If the file is not signed, the information is retrieved, but -the fields are blank. +> **This cmdlet is only available on the Windows platform.** + +The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file +or file content as a byte array. If the file is both embedded signed and Windows catalog signed, the +Windows catalog signature is used. If the file is not signed, the information is retrieved, but the +fields are blank. ## EXAMPLES @@ -60,7 +61,8 @@ Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1 ``` This command gets information about the Authenticode signature for the four files listed at the -command line. In this example, the name of the **FilePath** parameter, which is optional, is omitted. +command line. In this example, the name of the **FilePath** parameter, which is optional, is +omitted. ### Example 3: Get only valid Authenticode signatures for multiple files @@ -87,7 +89,11 @@ selects only the signature objects with a status of Valid. ### Example 4: Get the Authenticode signature for a file content specified as byte array ```powershell -Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePathorExtension ps1 +$authenticodeSignatureParams = @{ + Content = (Get-Content foo.ps1 -AsByteStream) + SourcePathorExtension = "ps1" +} +Get-AuthenticodeSignature @authenticodeSignatureParams ``` This command gets information about the Authenticode signature for the content of a file. In this @@ -98,8 +104,8 @@ example, the file extension is specified along with the content of the file. ### -Content Contents of a file as a byte array for which the Authenticode signature is retrieved. This parameter -must be used with **SourcePathOrExtension** parameter. The contents of the file must be in Unicode -(UTF-16LE) format. +must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the contents of the +file must be in Unicode (UTF-16LE) format. ```yaml Type: System.Byte[] @@ -172,7 +178,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Security/Get-Credential.md b/reference/5.1/Microsoft.PowerShell.Security/Get-Credential.md index 8a7d7ddea327..9f7f66b5d899 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Get-Credential.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Get-Credential.md @@ -75,7 +75,8 @@ object. ### Example 3 ```powershell -$Credential = $Host.UI.PromptForCredential("Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") +$Credential = $Host.UI.PromptForCredential( + "Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") ``` This command uses the **PromptForCredential** method to prompt the user for their user name and @@ -86,13 +87,13 @@ use **PromptForCredential**, you can specify the caption, messages, and user nam message box. For more information, see the -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) documentation in the SDK. ### Example 4 ```powershell -Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds" -Name ConsolePrompting -Value $true +Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds' -Name ConsolePrompting -Value $true ``` This example shows how to modify the registry so that the user is prompted at the command line, @@ -115,7 +116,11 @@ This example demonstrates how to create a credential object identical to the one ```powershell $User = "Domain01\User01" $PWord = Read-Host -Prompt 'Enter a Password' -AsSecureString -$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord +$credentialParams = @{ + TypeName = 'System.Management.Automation.PSCredential' + ArgumentList = $User, $PWord +} +$Credential = New-Object @credentialParams ``` The first command assigns the username to the `$User` variable. Ensure the value follows @@ -131,7 +136,11 @@ stored in the `$User` and `$PWord` variables. ### Example 6 ```powershell -Get-Credential -Message "Credential are required for access to the \\Server1\Scripts file share." -User Server01\PowerUser +$credentialParams = @{ + Message = "Credential are required for access to the \\Server1\Scripts file share." + UserName = "Server01\PowerUser" +} +Get-Credential @credentialParams ``` ```Output @@ -147,13 +156,14 @@ user why credentials are needed and gives them confidence that the request is le ### Example 7 ```powershell -Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02} +Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Credential Domain01\User02} ``` ```Output PowerShell Credential Request : PowerShell Credential Request -Warning: This credential is being requested by a script or application on the SERVER01 remote computer. Enter your credentials only if you - trust the remote computer and the application or script requesting it. +Warning: This credential is being requested by a script or application on the SERVER01 remote +computer. Enter your credentials only if you trust the remote computer and the application or script +requesting it. Enter your credentials. Password for user Domain01\User02: *************** @@ -182,8 +192,8 @@ this parameter, you're prompted for a user name and a password. Starting in PowerShell 3.0, if you enter a user name without a domain, `Get-Credential` no longer inserts a backslash before the name. -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,4 +297,4 @@ and `New-PSDrive` cmdlets. ## RELATED LINKS -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) diff --git a/reference/5.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md b/reference/5.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md index 23e5f2b4ae95..c4e43abd78e0 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md @@ -30,7 +30,8 @@ To display the execution policies for each scope in the order of precedence, use The effective execution policy is determined by execution policies that are set by `Set-ExecutionPolicy` and Group Policy settings. -For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). +For more information, see +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md). ## EXAMPLES @@ -231,7 +232,7 @@ whether scripts must be digitally signed before they are run. ## RELATED LINKS -[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md) +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md) [about_Group_Policy_Settings](../Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md) diff --git a/reference/7.4/CimCmdlets/Register-CimIndicationEvent.md b/reference/7.4/CimCmdlets/Register-CimIndicationEvent.md index 8f3f45f283d8..bf27b40e0755 100644 --- a/reference/7.4/CimCmdlets/Register-CimIndicationEvent.md +++ b/reference/7.4/CimCmdlets/Register-CimIndicationEvent.md @@ -428,6 +428,3 @@ This cmdlet is only available on Windows platforms. [New-CimSession](New-CimSession.md) [about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md) - - - diff --git a/reference/7.4/Microsoft.PowerShell.Core/Where-Object.md b/reference/7.4/Microsoft.PowerShell.Core/Where-Object.md index 33495034ace6..44ca26e0a1a9 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/Where-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Core/Where-Object.md @@ -251,9 +251,9 @@ particular version of Windows. Starting in Windows PowerShell 3.0, there are two different ways to construct a `Where-Object` command. -- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison operator, - and a property value. `Where-Object` returns all objects for which the scriptblock statement is - true. +- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison + operator, and a property value. `Where-Object` returns all objects for which the scriptblock + statement is true. For example, the following command gets processes where the value of the **PriorityClass** property equals `Normal`. @@ -263,9 +263,9 @@ command. All PowerShell comparison operators are valid in the scriptblock format. For more information, see [about_Comparison_Operators](./About/about_Comparison_Operators.md). -- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 `[switch]` +- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 switch parameters that represent the comparison operators. The simplified syntax is easier to read and - write than the scriptblock syntax. You can combine one of the `[switch]` parameters with the + write than the scriptblock syntax. You can combine one of the switch parameters with the **Property** and **Value** parameters to create a command that filters objects based on the values of their properties. @@ -278,7 +278,7 @@ command. As shown in the example, the parameter names **Property** and **Value** are optional. The **Property** parameter is a positional parameter mapped to position `0`. The **Value** parameter - is a positional parameter mapped to position `1`. The `[switch]` parameter, used to specify the + is a positional parameter mapped to position `1`. The switch parameter, used to specify the comparison, can be used in any position. The simplified syntax was introduced in Windows PowerShell 3.0. For more information, see diff --git a/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-Counter.md b/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-Counter.md index 960e4d058ff7..63a4f31be6ad 100644 --- a/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-Counter.md +++ b/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-Counter.md @@ -17,8 +17,8 @@ Gets performance counter data from local and remote computers. ### GetCounterSet (Default) ``` -Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] [-Continuous] - [-ComputerName ] [] +Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] + [-Continuous] [-ComputerName ] [] ``` ### ListSetSet diff --git a/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md b/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md index 245846c49710..05e6996a3a77 100644 --- a/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md +++ b/reference/7.4/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md @@ -18,28 +18,30 @@ Gets events from event logs and event tracing log files on local and remote comp ``` Get-WinEvent [[-LogName] ] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### ListLogSet ``` -Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] [-Force] - [] +Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] + [-Force] [] ``` ### ListProviderSet ``` -Get-WinEvent [-ListProvider] [-ComputerName ] [-Credential ] - [] +Get-WinEvent [-ListProvider] [-ComputerName ] + [-Credential ] [] ``` ### GetProviderSet ``` Get-WinEvent [-ProviderName] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### FileSet @@ -150,9 +152,9 @@ with the asterisk (`*`) wildcard to display each property. ### Example 3: Configure the classic Security log -This command gets an **EventLogConfiguration** object that represents the classic **Security** log. The -object is then used to configure settings for the log, such as max file size, file path, and whether the -log is enabled. +This command gets an **EventLogConfiguration** object that represents the classic **Security** log. +The object is then used to configure settings for the log, such as max file size, file path, and +whether the log is enabled. ```powershell $log = Get-WinEvent -ListLog Security @@ -195,11 +197,12 @@ ProviderLatency : 1000 ProviderControlGuid : ``` -The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is -saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object +is saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle -access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the -`Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. +access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to +the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the +machine. ### Example 4: Get event logs from a server @@ -232,7 +235,8 @@ is a property of the object with a non-null value. This example gets objects that represent the **Application** event logs on three computers: Server01, Server02, and Server03. The `foreach` keyword is used because the **ComputerName** -parameter accepts only one value. For more information, see [about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). +parameter accepts only one value. For more information, see +[about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). ```powershell $S = 'Server01', 'Server02', 'Server03' diff --git a/reference/7.4/Microsoft.PowerShell.Diagnostics/New-WinEvent.md b/reference/7.4/Microsoft.PowerShell.Diagnostics/New-WinEvent.md index 3fe6b242eb47..6e4853d540e2 100644 --- a/reference/7.4/Microsoft.PowerShell.Diagnostics/New-WinEvent.md +++ b/reference/7.4/Microsoft.PowerShell.Diagnostics/New-WinEvent.md @@ -16,8 +16,8 @@ Creates a new Windows event for the specified event provider. ## SYNTAX ``` -New-WinEvent [-ProviderName] [-Id] [-Version ] [[-Payload] ] - [] +New-WinEvent [-ProviderName] [-Id] [-Version ] + [[-Payload] ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md b/reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md index 96312f2b01c0..5a814c1444e3 100644 --- a/reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md +++ b/reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md @@ -17,22 +17,22 @@ Creates a record of all or part of a PowerShell session to a text file. ### ByPath (Default) ``` -Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] - [-UseMinimalHeader] [-WhatIf] [-Confirm] [] +Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` Start-Transcript [[-LiteralPath] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByOutputDirectory ``` Start-Transcript [[-OutputDirectory] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,7 +92,7 @@ $hostname = hostname $version = $PSVersionTable.PSVersion.ToString() $datetime = Get-Date -F 'yyyyMMddHHmmss' $filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt" -$Transcript = (Join-Path -Path $sharePath -ChildPath $filename).ToString() +$Transcript = Join-Path -Path $sharePath -ChildPath $filename Start-Transcript ``` @@ -115,8 +115,8 @@ Transcript started, output file is C:\Users\username\Documents\.\transcripts\Pow ### Example 5: Start a transcript using a relative path on non-Windows systems -When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the path is relative -to your home directory. +When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the +path is relative to your home directory. ```powershell Start-Transcript -Path ./transcripts diff --git a/reference/7.4/Microsoft.PowerShell.Management/Add-Content.md b/reference/7.4/Microsoft.PowerShell.Management/Add-Content.md index 5cb243ba1280..2e3760a905db 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Add-Content.md @@ -21,18 +21,18 @@ Adds content to the specified items, such as adding words to a file. ``` Add-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath ``` Add-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ## DESCRIPTION @@ -434,7 +434,6 @@ the `Unblock-File` cmdlet. This parameter was introduced in PowerShell 3.0. As of PowerShell 7.2, `Add-Content` can target alternative data streams on both files and directories. - ```yaml Type: System.String Parameter Sets: (All) diff --git a/reference/7.4/Microsoft.PowerShell.Management/Clear-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Clear-Item.md index d98ed8fd05a7..698bdf523d31 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Clear-Item.md @@ -20,15 +20,17 @@ Clears the contents of an item, but does not delete the item. ### Path (Default) ``` -Clear-Item [-Path] [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Clear-Item [-Path] [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` -Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -182,7 +184,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Clear-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Clear-ItemProperty.md index ca6f938b203d..135ac730a4f6 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Clear-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Clear-ItemProperty.md @@ -20,17 +20,17 @@ Clears the value of a property but does not delete the property. ### Path (Default) ``` -Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,9 +92,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -155,7 +157,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Clear-RecycleBin.md b/reference/7.4/Microsoft.PowerShell.Management/Clear-RecycleBin.md index 2ef12846d6d2..82222fe06851 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Clear-RecycleBin.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Clear-RecycleBin.md @@ -18,7 +18,8 @@ Clears the contents of the current user's recycle bin. ### All ``` -Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] [] +Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Copy-ItemProperty.md index c9267d20787c..4f8e4d6bb8cb 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -20,25 +20,24 @@ Copies a property and value from a specified location to another location. ### Path (Default) ``` -Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Copy-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Copy-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another -location. -For instance, you can use this cmdlet to copy one or more registry entries from one registry key to -another registry key. +location. For instance, you can use this cmdlet to copy one or more registry entries from one +registry key to another registry key. ## EXAMPLES @@ -48,7 +47,12 @@ This command copies the property named "MyProperty" from the "MyApplication" reg "MyApplicationRev2" registry key. ```powershell -Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" +$copyParams = @{ + Path = "MyApplication" + Destination = "HKLM:\Software\MyApplicationRev2" + Name = "MyProperty" +} +Copy-ItemProperty @copyParams ``` ## PARAMETERS @@ -110,9 +114,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -174,7 +180,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md index bcc647c4551f..a97d07eaef7e 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md @@ -30,10 +30,10 @@ Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] [-Path] < ### LiteralPath ``` -Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] -LiteralPath - [-Filter ] [-Include ] [-Exclude ] [-Force] - [-Credential ] [-Delimiter ] [-Wait] [-Raw] [-Encoding ] - [-AsByteStream] [-Stream ] [] +Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] + -LiteralPath [-Filter ] [-Include ] [-Exclude ] + [-Force] [-Credential ] [-Delimiter ] [-Wait] [-Raw] + [-Encoding ] [-AsByteStream] [-Stream ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-HotFix.md b/reference/7.4/Microsoft.PowerShell.Management/Get-HotFix.md index 69e7230358dc..bb958745d422 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-HotFix.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-HotFix.md @@ -25,8 +25,8 @@ Get-HotFix [[-Id] ] [-ComputerName ] [-Credential ] [-ComputerName ] [-Credential ] - [] +Get-HotFix [-Description ] [-ComputerName ] + [-Credential ] [] ``` ## DESCRIPTION @@ -60,7 +60,12 @@ The `Get-HotFix` command uses parameters to get hotfixes installed on remote com are filtered by a specified description string. ```powershell -Get-HotFix -Description Security* -ComputerName Server01, Server02 -Credential Domain01\admin01 +$hotFixParams = @{ + Description = "Security*" + ComputerName = "Server01", "Server02" + Credential = "Domain01\admin01" +} +Get-HotFix @hotFixParams ``` `Get-HotFix` filters the output with the **Description** parameter and the string **Security** that diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Get-Item.md index cb7b76ae00b4..e7fb2487e188 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-Item.md @@ -172,7 +172,8 @@ In PowerShell 6.2, an alternate view was added to get hardlink information. To g information, pipe the output to `Format-Table -View childrenWithHardlink` ```powershell -Get-Item C:\Windows\System32\ntoskrnl.exe | Format-Table -view childrenWithHardLink +Get-Item C:\Windows\System32\ntoskrnl.exe | + Format-Table -View childrenWithHardLink ``` ```Output @@ -443,7 +444,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Get-ItemProperty.md index 124572a446f2..4d6f9e7ffce7 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-ItemProperty.md @@ -20,15 +20,17 @@ Gets the properties of a specified item. ### Path (Default) ``` -Get-ItemProperty [-Path] [[-Name] ] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemProperty [-Path] [[-Name] ] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` Get-ItemProperty -LiteralPath [[-Name] ] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md b/reference/7.4/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md index 5aa53b86b3a1..eb20b6865ac5 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md @@ -20,15 +20,17 @@ Gets the value for one or more properties of a specified item. ### Path (Default) ``` -Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` -Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION @@ -41,8 +43,8 @@ parameters. ### Example 1: Get the value of the ProductID property -This command gets the value of the **ProductID** property of the "\SOFTWARE\Microsoft\Windows -NT\CurrentVersion" object in the Windows Registry provider. +This command gets the value of the **ProductID** property of the +`\SOFTWARE\Microsoft\Windows NT\CurrentVersion` object in the Windows Registry provider. ```powershell Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductID @@ -72,7 +74,7 @@ This command gets the values of the **LastWriteTime**, **CreationTime**, and **R a folder. The property values are returned in the order in which you specified the property names. ```powershell -Get-ItemPropertyValue -Path 'C:\Program Files\PowerShell' -Name LastWriteTime,CreationTime,Root +Get-ItemPropertyValue -Path 'C:\Program Files\PowerShell' -Name LastWriteTime, CreationTime, Root ``` ```output @@ -142,9 +144,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -187,7 +191,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -236,10 +241,10 @@ Accept wildcard characters: True ### 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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -251,8 +256,8 @@ You can pipe a string that contains a path to this cmdlet. ### System.Management.Automation.PSObject -This cmdlet returns an object for each item property value that it gets. -The object type depends on the property value that is retrieved. +This cmdlet returns an object for each item property value that it gets. The object type depends on +the property value that is retrieved. ## NOTES diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/7.4/Microsoft.PowerShell.Management/Get-PSDrive.md index f1fdd8900893..195d0080a85d 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -20,13 +20,15 @@ Gets drives in the current session. ### Name (Default) ``` -Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] [] +Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] + [] ``` ### LiteralName ``` -Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] [] +Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Get-Service.md index b3bf9cef37fd..d68bba93af5a 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-Service.md @@ -20,22 +20,22 @@ Gets the services on the computer. ### Default (Default) ``` -Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] [-Include ] - [-Exclude ] [] +Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] + [-Include ] [-Exclude ] [] ``` ### DisplayName ``` -Get-Service [-DependentServices] [-RequiredServices] -DisplayName [-Include ] - [-Exclude ] [] +Get-Service [-DependentServices] [-RequiredServices] -DisplayName + [-Include ] [-Exclude ] [] ``` ### InputObject ``` -Get-Service [-DependentServices] [-RequiredServices] [-Include ] [-Exclude ] - [-InputObject ] [] +Get-Service [-DependentServices] [-RequiredServices] [-Include ] + [-Exclude ] [-InputObject ] [] ``` ## DESCRIPTION @@ -73,8 +73,8 @@ Get-Service "wmi*" ### Example 3: Display services that include a search string This example displays services with a display name that includes the word `network`. Searching the -display name finds network-related services even when the service name doesn't include `Net`, such as -xmlprov, the Network Provisioning Service. +display name finds network-related services even when the service name doesn't include `Net`, such +as xmlprov, the Network Provisioning Service. ```powershell Get-Service -DisplayName "*network*" @@ -346,8 +346,8 @@ PowerShell 6.0 introduced the following changes: - **DelayedAutoStart** - **BinaryPathName** - **StartupType** -- The command no longer includes the **ComputerName** parameter. To use this command on a remote computer, - use the `Invoke-Command` to target a remote system. +- The command no longer includes the **ComputerName** parameter. To use this command on a remote + computer, use the `Invoke-Command` to target a remote system. This cmdlet can display services only when the current user has permission to see them. If this cmdlet does not display services, you might not have permission to see them. diff --git a/reference/7.4/Microsoft.PowerShell.Management/Invoke-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Invoke-Item.md index b4a8f899f705..1350033ba106 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Invoke-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Invoke-Item.md @@ -20,15 +20,17 @@ Performs the default action on the specified item. ### Path (Default) ``` -Invoke-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` -Invoke-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md index 6e3225e7cd44..af9faddfe9b2 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Move-Item.md @@ -23,16 +23,16 @@ Moves an item from one location to another. ``` Move-Item [-Path] [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` Move-Item -LiteralPath [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Move-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Move-ItemProperty.md index 3ec12f701af9..eab0ebda15aa 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Move-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Move-ItemProperty.md @@ -20,17 +20,17 @@ Moves a property from one location to another. ### Path (Default) ``` -Move-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Move-ItemProperty [-Path] [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Move-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Move-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -110,9 +110,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -173,7 +175,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -272,10 +275,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -302,7 +305,8 @@ PowerShell includes the following aliases for `Move-ItemProperty`: - `mp` This cmdlet is designed to work with the data exposed by any provider. To list the providers -available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +available in your session, type `Get-PSProvider`. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Management/New-Item.md b/reference/7.4/Microsoft.PowerShell.Management/New-Item.md index caf1d1926654..2eac33f2179f 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/New-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/New-Item.md @@ -28,15 +28,15 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - All providers ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [] ``` ### pathSet (Default) - WSMan provider ``` -New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-Port ] [] ``` @@ -44,8 +44,8 @@ New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-ApplicationName ] [-Port ] [-UseSSL] [] @@ -62,8 +62,8 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - Alias provider ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-Options ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Options ] [] ``` @@ -94,7 +94,7 @@ This command creates a directory named "Logfiles" in the `C:` drive. The **ItemT specifies that the new item is a directory, not a file or other file system object. ```powershell -New-Item -Path "C:\" -Name "logfiles" -ItemType "Directory" +New-Item -Path "C:\" -Name "Logfiles" -ItemType "Directory" ``` ### Example 3: Create a profile @@ -112,7 +112,8 @@ profile path, even when the directories in the path do not exist. After you create a profile, you can enter aliases, functions, and scripts in the profile to customize your shell. -For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) +For more information, see +[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) and [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). ```powershell @@ -244,9 +245,9 @@ Mode LastWriteTime Length Name ``` > [!NOTE] -> When using `New-Item` with the `-Force` switch to create registry keys, the command will behave +> When using `New-Item` with the **Force** parameter to create registry keys, the command behaves > the same as when overwriting a file. If the registry key already exists, the key and all -> properties and values will be overwritten with an empty registry key. +> properties and values are overwritten with an empty registry key. ## PARAMETERS diff --git a/reference/7.4/Microsoft.PowerShell.Management/New-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/New-ItemProperty.md index 22f32f5a7049..8e472db5b9a8 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/New-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/New-ItemProperty.md @@ -18,17 +18,17 @@ Creates a new property for an item and sets its value. ### Path (Default) ``` -New-ItemProperty [-Path] [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty [-Path] [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -New-ItemProperty -LiteralPath [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty -LiteralPath [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/7.4/Microsoft.PowerShell.Management/New-PSDrive.md index 25ee4a164e17..b8a11f7b32c5 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/7.4/Microsoft.PowerShell.Management/New-PSDrive.md @@ -21,9 +21,9 @@ Creates temporary and persistent drives that are associated with a location in a ### All ``` -New-PSDrive [-Name] [-PSProvider] [-Root] [-Description ] - [-Scope ] [-Persist] [-Credential ] [-WhatIf] [-Confirm] - [] +New-PSDrive [-Name] [-PSProvider] [-Root] + [-Description ] [-Scope ] [-Persist] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/New-Service.md b/reference/7.4/Microsoft.PowerShell.Management/New-Service.md index 5ab64ea14916..3d0146ed5b6b 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/New-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/New-Service.md @@ -16,9 +16,10 @@ Creates a new Windows service. ## SYNTAX ``` -New-Service [-Name] [-BinaryPathName] [-DisplayName ] [-Description ] - [-SecurityDescriptorSddl ] [-StartupType ] [-Credential ] - [-DependsOn ] [-WhatIf] [-Confirm] [] +New-Service [-Name] [-BinaryPathName] [-DisplayName ] + [-Description ] [-SecurityDescriptorSddl ] + [-StartupType ] [-Credential ] [-DependsOn ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -76,7 +77,7 @@ Status : OK This command uses `Get-CimInstance` to get the **Win32_Service** object for the new service. This object includes the start mode and the service description. -### Example 4: Set the SecurityDescriptor of a service when creating. +### Example 4: Set the SecurityDescriptor of a service when creating This example adds the **SecurityDescriptor** of the service being created. diff --git a/reference/7.4/Microsoft.PowerShell.Management/Push-Location.md b/reference/7.4/Microsoft.PowerShell.Management/Push-Location.md index b0a81252d2c6..36660d6644ba 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Push-Location.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Push-Location.md @@ -26,7 +26,8 @@ Push-Location [[-Path] ] [-PassThru] [-StackName ] [] [-PassThru] [-StackName ] [] +Push-Location [-LiteralPath ] [-PassThru] [-StackName ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md index 81a2f4302450..dbcd74a32dab 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Remove-Item.md @@ -24,47 +24,49 @@ Deletes the specified items. ### Path (Default) - FileSystem provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### LiteralPath - FileSystem provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### Path (Default) - Certificate provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### LiteralPath - Certificate provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### Path (Default) - All providers ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -371,7 +373,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -457,8 +459,8 @@ Accept wildcard characters: True Prompts you for confirmation before running the cmdlet. For more information, see the following articles: -- [about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) -- [about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +- [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) +- [about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) ```yaml Type: System.Management.Automation.SwitchParameter @@ -550,6 +552,6 @@ design. [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) -[about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) +[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) -[about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +[about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) diff --git a/reference/7.4/Microsoft.PowerShell.Management/Remove-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Remove-ItemProperty.md index 2ec5aed156e6..1e5e29ffc0e9 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Remove-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Remove-ItemProperty.md @@ -20,9 +20,10 @@ Deletes the property and its value from an item. ### Path (Default) ``` -Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-InformationAction ] - [-InformationVariable ] [-WhatIf] [-Confirm] [] +Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [-InformationAction ] [-InformationVariable ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath @@ -126,9 +127,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -189,7 +192,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/7.4/Microsoft.PowerShell.Management/Remove-PSDrive.md index 706e09a1a976..7fa20351e162 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -27,8 +27,8 @@ Remove-PSDrive [-Name] [-PSProvider ] [-Scope ] [-F ### LiteralName ``` -Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] [-Force] - [-WhatIf] [-Confirm] [] +Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Remove-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Remove-Service.md index 9515b7df89c8..174e1bfe2b41 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Remove-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Remove-Service.md @@ -24,7 +24,8 @@ Remove-Service [-Name] [-WhatIf] [-Confirm] [] ### InputObject ``` -Remove-Service [-InputObject ] [-WhatIf] [-Confirm] [] +Remove-Service [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Rename-Computer.md b/reference/7.4/Microsoft.PowerShell.Management/Rename-Computer.md index e4cbae73ef69..d584ddf8e5fc 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Rename-Computer.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Rename-Computer.md @@ -17,16 +17,16 @@ Renames a computer. ``` Rename-Computer [-ComputerName ] [-PassThru] [-DomainCredential ] - [-LocalCredential ] [-NewName] [-Force] [-Restart] [-WsmanAuthentication ] - [-WhatIf] [-Confirm] [] + [-LocalCredential ] [-NewName] [-Force] [-Restart] + [-WsmanAuthentication ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION > **This cmdlet is only available on the Windows platform.** -The `Rename-Computer` cmdlet renames the local computer or a remote computer. -It renames one computer in each command. +The `Rename-Computer` cmdlet renames the local computer or a remote computer. It renames one +computer in each command. This cmdlet was introduced in Windows PowerShell 3.0. @@ -51,7 +51,13 @@ computers in the domain. The **Force** parameter suppresses the confirmation prompt. ```powershell -Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force +$renameParams = @{ + ComputerName = "Srv01" + NewName = "Server001" + DomainCredential = "Domain01\Admin01" + Force = $true +} +Rename-Computer @renameParams ``` ## PARAMETERS @@ -215,7 +221,8 @@ WSMan protocol. The acceptable values for this parameter are: The default value is **Default**. -For more information about the values of this parameter, see [AuthenticationMechanism Enumeration](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +For more information about the values of this parameter, see +[AuthenticationMechanism Enumeration](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user @@ -278,7 +285,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md index c7893e004488..f831b02c46d9 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md @@ -20,8 +20,8 @@ Renames an item in a PowerShell provider namespace. ### ByPath (Default) ``` -Rename-Item [-Path] [-NewName] [-Force] [-PassThru] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-Item [-Path] [-NewName] [-Force] [-PassThru] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath @@ -78,8 +78,8 @@ Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key -This example renames a registry key from **Advertising** to **Marketing**. When the command is complete, -the key is renamed, but the registry entries in the key are unchanged. +This example renames a registry key from **Advertising** to **Marketing**. When the command is +complete, the key is renamed, but the registry entries in the key are unchanged. ```powershell Rename-Item -Path "HKLM:\Software\MyCompany\Advertising" -NewName "Marketing" diff --git a/reference/7.4/Microsoft.PowerShell.Management/Rename-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Rename-ItemProperty.md index f7a5721153ac..ddde27b7276a 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Rename-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Rename-ItemProperty.md @@ -20,17 +20,17 @@ Renames a property of an item. ### Path (Default) ``` -Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -93,9 +93,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -156,7 +158,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String diff --git a/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md index 6c962ce5f261..efdf0a44f3f4 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Restart-Computer.md @@ -19,8 +19,8 @@ Restarts the operating system on local and remote computers. ``` Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] - [[-Credential]] [-Force] [-Wait] [-Timeout ] [-For ] - [-Delay ] [-WhatIf] [-Confirm] [] + [[-Credential]] [-Force] [-Wait] [-Timeout ] + [-For ] [-Delay ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,8 +42,6 @@ the native command `/sbin/shutdown`. ## EXAMPLES -## EXAMPLES - ### Example 1: Restart the local computer `Restart-Computer` restarts the local computer. @@ -390,9 +388,8 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the +- On Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine. diff --git a/reference/7.4/Microsoft.PowerShell.Management/Restart-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Restart-Service.md index bbd21f67730a..e4dde6c1ee76 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Restart-Service.md @@ -18,22 +18,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Restart-Service [-Force] [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Restart-Service [-Force] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Resume-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Resume-Service.md index ffea09cff0ef..e84053e19cef 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Resume-Service.md @@ -18,22 +18,22 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Resume-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Resume-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Set-Content.md b/reference/7.4/Microsoft.PowerShell.Management/Set-Content.md index 7e0bf5dd1045..094ceae707ed 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Set-Content.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Set-Content.md @@ -22,8 +22,8 @@ Writes new content or replaces existing content in a file. ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath - FileSystem provider @@ -31,24 +31,24 @@ Set-Content [-Path] [-Value] [-PassThru] [-Filter ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### Path (Default) - All providers ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath - All providers ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Set-Item.md b/reference/7.4/Microsoft.PowerShell.Management/Set-Item.md index 7a166d5a87c6..52a972992282 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Set-Item.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Set-Item.md @@ -20,48 +20,51 @@ Changes the value of an item to the value specified in the command. ### Path (Default) - All providers ``` -Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] +Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### Path (Default) - Alias and Function providers ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Options ] [] ``` ### LiteralPath - Alias and Function providers ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Options ] + [] ``` ### Path (Default) - Registry provider ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Type ] [] ``` ### LiteralPath - Registry provider ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION @@ -92,7 +95,9 @@ Set-Item -Path Env:UserRole -Value "Administrator" This command changes the prompt function so that it displays the time before the path. ```powershell -Set-Item -Path Function:prompt -Value {'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> '} +Set-Item -Path Function:prompt -Value { + 'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> ' +} ``` ### Example 4: Set options for your prompt function @@ -149,9 +154,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -214,7 +221,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -400,16 +408,17 @@ PowerShell includes the following aliases for `Set-Item`: - All platforms: - `si` -- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in - the file system, use the `Set-Content` cmdlet. -- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of a - registry key. +- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items + in the file system, use the `Set-Content` cmdlet. +- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of + a registry key. - To create and change the names of registry keys, use the `New-Item` and `Rename-Item` cmdlet. - - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, and - `Rename-ItemProperty` cmdlets. + - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, + and `Rename-ItemProperty` cmdlets. - `Set-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. - For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). + For more information, see + [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Management/Set-ItemProperty.md b/reference/7.4/Microsoft.PowerShell.Management/Set-ItemProperty.md index dae24c9fe518..36f144e7644d 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Set-ItemProperty.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Set-ItemProperty.md @@ -20,65 +20,69 @@ Creates or changes the value of a property of an item. ### propertyValuePathSet (Default) - All providers ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectPathSet - All providers ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValueLiteralPathSet - All providers ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectLiteralPathSet - All providers ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValuePathSet (Default) - Registry provider ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectPathSet - Registry provider ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyValueLiteralPathSet - Registry provider ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectLiteralPathSet - Registry provider ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Set-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Set-Service.md index bb5c695046cd..f6ddc4127ded 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Set-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Set-Service.md @@ -20,15 +20,17 @@ Starts, stops, and suspends a service, and changes its properties. ``` Set-Service [-Name] [-DisplayName ] [-Credential ] [-Description ] [-StartupType ] [-Status ] - [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] + [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Set-Service [-InputObject] [-DisplayName ] [-Credential ] - [-Description ] [-StartupType ] [-SecurityDescriptorSddl ] - [-Status ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] +Set-Service [-InputObject] [-DisplayName ] + [-Credential ] [-Description ] [-StartupType ] + [-SecurityDescriptorSddl ] [-Status ] [-Force] [-PassThru] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Set-TimeZone.md b/reference/7.4/Microsoft.PowerShell.Management/Set-TimeZone.md index e2f677abc0d5..f0cf3c22354c 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Set-TimeZone.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Set-TimeZone.md @@ -32,7 +32,8 @@ Set-TimeZone -Id [-PassThru] [-WhatIf] [-Confirm] [] ### InputObject ``` -Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] [] +Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Split-Path.md b/reference/7.4/Microsoft.PowerShell.Management/Split-Path.md index 0fd94399dac1..8281b24c39df 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Split-Path.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Split-Path.md @@ -25,7 +25,8 @@ Split-Path [-Path] [-Parent] [-Resolve] [-Credential ] ### LeafSet ``` -Split-Path [-Path] -Leaf [-Resolve] [-Credential ] [] +Split-Path [-Path] -Leaf [-Resolve] [-Credential ] + [] ``` ### LeafBaseSet @@ -66,7 +67,8 @@ Split-Path [-Path] [-Resolve] -IsAbsolute [-Credential ### LiteralPathSet ``` -Split-Path -LiteralPath [-Resolve] [-Credential ] [] +Split-Path -LiteralPath [-Resolve] [-Credential ] + [] ``` ## DESCRIPTION @@ -299,8 +301,8 @@ Accept wildcard characters: False ### -NoQualifier Indicates that this cmdlet returns the path without the qualifier. For the FileSystem or registry -providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, in the -path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. +providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, in +the path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.4/Microsoft.PowerShell.Management/Start-Process.md b/reference/7.4/Microsoft.PowerShell.Management/Start-Process.md index a6c118abc352..d268391b34ae 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Start-Process.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Start-Process.md @@ -19,19 +19,21 @@ Starts one or more processes on the local computer. ## SYNTAX ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-Credential ] - [-WorkingDirectory ] [-LoadUserProfile] [-NoNewWindow] [-PassThru] - [-RedirectStandardError ] [-RedirectStandardInput ] - [-RedirectStandardOutput ] [-WindowStyle ] [-Wait] - [-UseNewEnvironment] [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-Credential ] [-WorkingDirectory ] [-LoadUserProfile] + [-NoNewWindow] [-PassThru] [-RedirectStandardError ] + [-RedirectStandardInput ] [-RedirectStandardOutput ] + [-WindowStyle ] [-Wait] [-UseNewEnvironment] + [-Environment ] [-WhatIf] [-Confirm] [] ``` ### UseShellExecute ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-WorkingDirectory ] - [-PassThru] [-Verb ] [-WindowStyle ] [-Wait] - [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-WorkingDirectory ] [-PassThru] [-Verb ] + [-WindowStyle ] [-Wait] [-Environment ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Start-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Start-Service.md index c4e33f0b2c26..3ffe1c8ae645 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Start-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Start-Service.md @@ -20,22 +20,22 @@ Starts one or more stopped services. ### InputObject (Default) ``` -Start-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Start-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Start-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Start-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -305,8 +305,8 @@ This cmdlet is only available on Windows platforms. work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \ start failed.` -Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use -this command on a remote computer, use the `Invoke-Command` to target a remote system. +Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To run +`Start-Service` on a remote computer, use `Invoke-Command`. ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Management/Stop-Process.md b/reference/7.4/Microsoft.PowerShell.Management/Stop-Process.md index 4fbb11eb93e6..56fe21312542 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Stop-Process.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Stop-Process.md @@ -21,19 +21,22 @@ Stops one or more running processes. ### Id (Default) ``` -Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### Name ``` -Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -274,7 +277,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.Management/Stop-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Stop-Service.md index 718d0a8750e6..f48440fee131 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Stop-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Stop-Service.md @@ -20,22 +20,22 @@ Stops one or more running services. ### InputObject (Default) ``` -Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -52,7 +52,7 @@ to stop. ### Example 1: Stop a service on the local computer ```powershell -PS C:\> Stop-Service -Name "sysmonlog" +Stop-Service -Name "sysmonlog" ``` This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer. @@ -60,7 +60,7 @@ This command stops the Performance Logs and Alerts (SysmonLog) service on the lo ### Example 2: Stop a service by using the display name ```powershell -PS C:\> Get-Service -DisplayName "telnet" | Stop-Service +Get-Service -DisplayName "telnet" | Stop-Service ``` This command stops the Telnet service on the local computer. The command uses `Get-Service` to get @@ -70,8 +70,8 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes ### Example 3: Stop a service that has dependent services ```powershell -PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices -PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm +Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices +Stop-Service -Name "iisadmin" -Force -Confirm ``` This example stops the IISAdmin service on the local computer. Because stopping this service also diff --git a/reference/7.4/Microsoft.PowerShell.Management/Suspend-Service.md b/reference/7.4/Microsoft.PowerShell.Management/Suspend-Service.md index 78cb3e7462ae..64826a5ad81e 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Suspend-Service.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Suspend-Service.md @@ -18,22 +18,22 @@ Suspends (pauses) one or more running services. ### InputObject (Default) ``` -Suspend-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Suspend-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Suspend-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Suspend-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -79,7 +79,7 @@ This command uses the `Get-Service` cmdlet to get an object that represents the ```powershell Get-Service | - Where-Object {$_.CanPauseAndContinue -eq "True"} | + Where-Object { $_.CanPauseAndContinue } | Suspend-Service -Confirm ``` diff --git a/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md index 92f2e8946eda..c39322e1d5e1 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Test-Connection.md @@ -26,9 +26,9 @@ Test-Connection [-TargetName] [-Ping] [-IPv4] [-IPv6] [-ResolveDestin ### RepeatPing ``` -Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-MaxHops ] [-Delay ] [-BufferSize ] [-DontFragment] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-MaxHops ] [-Delay ] + [-BufferSize ] [-DontFragment] [-Quiet] [-TimeoutSeconds ] [] ``` ### TraceRoute @@ -41,16 +41,16 @@ Test-Connection [-TargetName] -Traceroute [-IPv4] [-IPv6] [-ResolveDe ### MtuSizeDetect ``` -Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] + [-Quiet] [-TimeoutSeconds ] [] ``` ### TcpPort ``` -Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-Count ] [-Delay ] [-Repeat] [-Quiet] [-TimeoutSeconds ] - [-Detailed] [] +Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-Count ] [-Delay ] [-Repeat] + [-Quiet] [-TimeoutSeconds ] [-Detailed] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Management/Test-Path.md b/reference/7.4/Microsoft.PowerShell.Management/Test-Path.md index 3960b4057ee0..89661301c357 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Test-Path.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Test-Path.md @@ -17,31 +17,33 @@ Determines whether all elements of a path exist. ### Path (Default) - FileSystem provider ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### LiteralPath - FileSystem provider ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### Path (Default) - All providers ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ### LiteralPath - All providers ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ## DESCRIPTION @@ -164,7 +166,7 @@ False This command uses the **NewerThan** dynamic parameter to determine whether the `pwsh.exe` file on the computer is newer than `July 13, 2009`. -The NewerThan parameter works only in file system drives. +The **NewerThan** parameter works only in file system drives. ```powershell Test-Path $PSHOME\pwsh.exe -NewerThan "July 13, 2009" @@ -313,8 +315,8 @@ exist. PowerShell returns false because it doesn't know which drive provider to > A breaking change in the Path APIs was introduced in .NET 2.1. Those methods no longer check for > invalid path characters. This change caused a regression in PowerShell where the **IsValid** check > no longer tests for invalid characters. The regression will be addressed in a future release. For -> more information, -> see [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). +> more information, see +> [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.4/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md b/reference/7.4/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md index 3adca46bd896..e1f559fa4bbc 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md +++ b/reference/7.4/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md @@ -18,19 +18,22 @@ Converts a secure string to an encrypted standard string. ### Secure (Default) ``` -ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] [] +ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] + [] ``` ### AsPlainText ``` -ConvertFrom-SecureString [-SecureString] [-AsPlainText] [] +ConvertFrom-SecureString [-SecureString] [-AsPlainText] + [] ``` ### Open ``` -ConvertFrom-SecureString [-SecureString] [-Key ] [] +ConvertFrom-SecureString [-SecureString] [-Key ] + [] ``` ## DESCRIPTION @@ -47,8 +50,8 @@ key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the representation. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the -> contents of a SecureString are not encrypted on non-Windows systems. +> For more information about **SecureString** data protection, see +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). ## EXAMPLES @@ -173,7 +176,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.Security/ConvertTo-SecureString.md b/reference/7.4/Microsoft.PowerShell.Security/ConvertTo-SecureString.md index bc90498ab18b..eac626b0b727 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/ConvertTo-SecureString.md +++ b/reference/7.4/Microsoft.PowerShell.Security/ConvertTo-SecureString.md @@ -18,7 +18,8 @@ Converts plain text or encrypted strings to secure strings. ### Secure (Default) ``` -ConvertTo-SecureString [-String] [[-SecureKey] ] [] +ConvertTo-SecureString [-String] [[-SecureKey] ] + [] ``` ### PlainText @@ -47,7 +48,7 @@ specified key, that same key must be provided as the value of the **Key** or **S of the `ConvertTo-SecureString` cmdlet. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the +> Note that per [DotNet](xref:System.Security.SecureString#remarks), the > contents of a SecureString are not encrypted on non-Windows systems. ## EXAMPLES @@ -86,13 +87,16 @@ variable. The fourth command displays the encrypted string in the value of the `$Encrypted` variable. The fifth command uses the `ConvertTo-SecureString` cmdlet to convert the encrypted standard string -in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` variable. -The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates that -the command was successful. +in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` +variable. + +The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates +that the command was successful. ### Example 2: Create a secure string from an encrypted string in a file -This example shows how to create a secure string from an encrypted standard string that is saved in a file. +This example shows how to create a secure string from an encrypted standard string that is saved in +a file. ```powershell $Secure = Read-Host -AsSecureString diff --git a/reference/7.4/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md b/reference/7.4/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md index 246713e5b7f4..07bcd21f72c5 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md @@ -30,19 +30,18 @@ Get-AuthenticodeSignature -LiteralPath [] ### ByContent ``` -Get-AuthenticodeSignature -SourcePathOrExtension -Content [] +Get-AuthenticodeSignature -SourcePathOrExtension -Content + [] ``` ## DESCRIPTION > **This cmdlet is only available on the Windows platform.** -The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a -file or file content as a byte array. -If the file is both embedded signed and Windows catalog signed, -the Windows catalog signature is used. -If the file is not signed, the information is retrieved, but -the fields are blank. +The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file +or file content as a byte array. If the file is both embedded signed and Windows catalog signed, the +Windows catalog signature is used. If the file is not signed, the information is retrieved, but the +fields are blank. ## EXAMPLES @@ -62,7 +61,8 @@ Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1 ``` This command gets information about the Authenticode signature for the four files listed at the -command line. In this example, the name of the **FilePath** parameter, which is optional, is omitted. +command line. In this example, the name of the **FilePath** parameter, which is optional, is +omitted. ### Example 3: Get only valid Authenticode signatures for multiple files @@ -89,7 +89,11 @@ selects only the signature objects with a status of Valid. ### Example 4: Get the Authenticode signature for a file content specified as byte array ```powershell -Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePathorExtension ps1 +$authenticodeSignatureParams = @{ + Content = (Get-Content foo.ps1 -AsByteStream) + SourcePathorExtension = "ps1" +} +Get-AuthenticodeSignature @authenticodeSignatureParams ``` This command gets information about the Authenticode signature for the content of a file. In this @@ -99,9 +103,9 @@ example, the file extension is specified along with the content of the file. ### -Content -Contents of a file as a byte array for which the Authenticode signature is retrieved. This -parameter must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the -contents of the file must be in Unicode (UTF-16LE) format. +Contents of a file as a byte array for which the Authenticode signature is retrieved. This parameter +must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the contents of the +file must be in Unicode (UTF-16LE) format. ```yaml Type: System.Byte[] @@ -174,7 +178,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Security/Get-Credential.md b/reference/7.4/Microsoft.PowerShell.Security/Get-Credential.md index f2b85ddece16..0a5fc39149e0 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Get-Credential.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Get-Credential.md @@ -24,7 +24,8 @@ Get-Credential [[-Credential] ] [] ### MessageSet ``` -Get-Credential [-Message ] [[-UserName] ] [-Title ] [] +Get-Credential [-Message ] [[-UserName] ] [-Title ] + [] ``` ## DESCRIPTION @@ -73,7 +74,8 @@ object. ### Example 3 ```powershell -$Credential = $Host.UI.PromptForCredential("Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") +$Credential = $Host.UI.PromptForCredential( + "Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") ``` This command uses the **PromptForCredential** method to prompt the user for their user name and @@ -84,7 +86,7 @@ use **PromptForCredential**, you can specify the caption, messages, and user nam prompt. For more information, see the -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) documentation in the SDK. ### Example 4 @@ -95,7 +97,11 @@ This example demonstrates how to create a credential object identical to the one ```powershell $User = "Domain01\User01" $PWord = Read-Host -Prompt 'Enter a Password' -AsSecureString -$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord +$credentialParams = @{ + TypeName = 'System.Management.Automation.PSCredential' + ArgumentList = $User, $PWord +} +$Credential = New-Object @credentialParams ``` The first command assigns the username to the `$User` variable. Ensure the value follows @@ -111,7 +117,11 @@ stored in the `$User` and `$PWord` variables. ### Example 5 ```powershell -Get-Credential -Message "Credential are required for access to the \\Server1\Scripts file share." -User Server01\PowerUser +$credentialParams = @{ + Message = "Credential are required for access to the \\Server1\Scripts file share." + UserName = "Server01\PowerUser" +} +Get-Credential @credentialParams ``` ```Output @@ -127,13 +137,14 @@ user why credentials are needed and gives them confidence that the request is le ### Example 6 ```powershell -Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02} +Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Credential Domain01\User02} ``` ```Output PowerShell Credential Request : PowerShell Credential Request -Warning: This credential is being requested by a script or application on the SERVER01 remote computer. -Enter your credentials only if you trust the remote computer and the application or script requesting it. +Warning: This credential is being requested by a script or application on the SERVER01 remote +computer. Enter your credentials only if you trust the remote computer and the application or script +requesting it. Enter your credentials. Password for user Domain01\User02: *************** @@ -162,8 +173,8 @@ this parameter, you're prompted for a user name and a password. Starting in PowerShell 3.0, if you enter a user name without a domain, `Get-Credential` no longer inserts a backslash before the name. -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 @@ -268,4 +279,4 @@ and `New-PSDrive` cmdlets. ## RELATED LINKS -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) diff --git a/reference/7.4/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md b/reference/7.4/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md index 18f6c6fee450..062331c83ac5 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md @@ -30,7 +30,8 @@ To display the execution policies for each scope in the order of precedence, use The effective execution policy is determined by execution policies that are set by `Set-ExecutionPolicy` and Group Policy settings. -For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). +For more information, see +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md). ## EXAMPLES @@ -232,7 +233,7 @@ whether scripts must be digitally signed before they are run. ## RELATED LINKS -[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md) +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md) [about_Group_Policy_Settings](../Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md) diff --git a/reference/7.5/CimCmdlets/Register-CimIndicationEvent.md b/reference/7.5/CimCmdlets/Register-CimIndicationEvent.md index 788fb83baf49..59acf4efe144 100644 --- a/reference/7.5/CimCmdlets/Register-CimIndicationEvent.md +++ b/reference/7.5/CimCmdlets/Register-CimIndicationEvent.md @@ -428,4 +428,3 @@ This cmdlet is only available on Windows platforms. [New-CimSession](New-CimSession.md) [about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md) - diff --git a/reference/7.5/Microsoft.PowerShell.Core/Where-Object.md b/reference/7.5/Microsoft.PowerShell.Core/Where-Object.md index 0d0b94dc0455..3c5769aba590 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/Where-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Core/Where-Object.md @@ -251,9 +251,9 @@ particular version of Windows. Starting in Windows PowerShell 3.0, there are two different ways to construct a `Where-Object` command. -- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison operator, - and a property value. `Where-Object` returns all objects for which the scriptblock statement is - true. +- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison + operator, and a property value. `Where-Object` returns all objects for which the scriptblock + statement is true. For example, the following command gets processes where the value of the **PriorityClass** property equals `Normal`. @@ -263,9 +263,9 @@ command. All PowerShell comparison operators are valid in the scriptblock format. For more information, see [about_Comparison_Operators](./About/about_Comparison_Operators.md). -- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 `[switch]` +- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 switch parameters that represent the comparison operators. The simplified syntax is easier to read and - write than the scriptblock syntax. You can combine one of the `[switch]` parameters with the + write than the scriptblock syntax. You can combine one of the switch parameters with the **Property** and **Value** parameters to create a command that filters objects based on the values of their properties. @@ -278,7 +278,7 @@ command. As shown in the example, the parameter names **Property** and **Value** are optional. The **Property** parameter is a positional parameter mapped to position `0`. The **Value** parameter - is a positional parameter mapped to position `1`. The `[switch]` parameter, used to specify the + is a positional parameter mapped to position `1`. The switch parameter, used to specify the comparison, can be used in any position. The simplified syntax was introduced in Windows PowerShell 3.0. For more information, see diff --git a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md index 5d846928ea9f..01e222b92b31 100644 --- a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md +++ b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md @@ -7,7 +7,6 @@ online version: https://learn.microsoft.com/powershell/module/microsoft.powershe schema: 2.0.0 title: Get-Counter --- - # Get-Counter ## SYNOPSIS @@ -18,8 +17,8 @@ Gets performance counter data from local and remote computers. ### GetCounterSet (Default) ``` -Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] [-Continuous] - [-ComputerName ] [] +Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] + [-Continuous] [-ComputerName ] [] ``` ### ListSetSet diff --git a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md index e716e90268e4..e282c423e7b0 100644 --- a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md +++ b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md @@ -18,28 +18,30 @@ Gets events from event logs and event tracing log files on local and remote comp ``` Get-WinEvent [[-LogName] ] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### ListLogSet ``` -Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] [-Force] - [] +Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] + [-Force] [] ``` ### ListProviderSet ``` -Get-WinEvent [-ListProvider] [-ComputerName ] [-Credential ] - [] +Get-WinEvent [-ListProvider] [-ComputerName ] + [-Credential ] [] ``` ### GetProviderSet ``` Get-WinEvent [-ProviderName] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### FileSet @@ -150,9 +152,9 @@ with the asterisk (`*`) wildcard to display each property. ### Example 3: Configure the classic Security log -This command gets an **EventLogConfiguration** object that represents the classic **Security** log. The -object is then used to configure settings for the log, such as max file size, file path, and whether the -log is enabled. +This command gets an **EventLogConfiguration** object that represents the classic **Security** log. +The object is then used to configure settings for the log, such as max file size, file path, and +whether the log is enabled. ```powershell $log = Get-WinEvent -ListLog Security @@ -195,11 +197,12 @@ ProviderLatency : 1000 ProviderControlGuid : ``` -The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is -saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object +is saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle -access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the -`Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. +access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to +the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the +machine. ### Example 4: Get event logs from a server @@ -232,7 +235,8 @@ is a property of the object with a non-null value. This example gets objects that represent the **Application** event logs on three computers: Server01, Server02, and Server03. The `foreach` keyword is used because the **ComputerName** -parameter accepts only one value. For more information, see [about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). +parameter accepts only one value. For more information, see +[about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). ```powershell $S = 'Server01', 'Server02', 'Server03' diff --git a/reference/7.5/Microsoft.PowerShell.Diagnostics/New-WinEvent.md b/reference/7.5/Microsoft.PowerShell.Diagnostics/New-WinEvent.md index 4df109b33bd1..706ac0d11f16 100644 --- a/reference/7.5/Microsoft.PowerShell.Diagnostics/New-WinEvent.md +++ b/reference/7.5/Microsoft.PowerShell.Diagnostics/New-WinEvent.md @@ -16,8 +16,8 @@ Creates a new Windows event for the specified event provider. ## SYNTAX ``` -New-WinEvent [-ProviderName] [-Id] [-Version ] [[-Payload] ] - [] +New-WinEvent [-ProviderName] [-Id] [-Version ] + [[-Payload] ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md b/reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md index 1359a1cbfc68..92a7a43acd20 100644 --- a/reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md +++ b/reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md @@ -17,22 +17,22 @@ Creates a record of all or part of a PowerShell session to a text file. ### ByPath (Default) ``` -Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] - [-UseMinimalHeader] [-WhatIf] [-Confirm] [] +Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` Start-Transcript [[-LiteralPath] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByOutputDirectory ``` Start-Transcript [[-OutputDirectory] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,7 +92,7 @@ $hostname = hostname $version = $PSVersionTable.PSVersion.ToString() $datetime = Get-Date -F 'yyyyMMddHHmmss' $filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt" -$Transcript = (Join-Path -Path $sharePath -ChildPath $filename).ToString() +$Transcript = Join-Path -Path $sharePath -ChildPath $filename Start-Transcript ``` @@ -115,8 +115,8 @@ Transcript started, output file is C:\Users\username\Documents\.\transcripts\Pow ### Example 5: Start a transcript using a relative path on non-Windows systems -When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the path is relative -to your home directory. +When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the +path is relative to your home directory. ```powershell Start-Transcript -Path ./transcripts diff --git a/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md index 02b551afff24..49fe0143756c 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md @@ -21,18 +21,18 @@ Adds content to the specified items, such as adding words to a file. ``` Add-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath ``` Add-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ## DESCRIPTION @@ -161,7 +161,8 @@ set to `False`. ### Example 7: Use Filters with Add-Content You can specify a filter to the `Add-Content` cmdlet. When using filters to qualify the **Path** -parameter, you need to include a trailing asterisk (`*`) to indicate the contents of the path. +parameter, you need to include a trailing asterisk (`*`) to indicate the contents of the +path. The following command adds the word "Done" the content of all `*.txt` files in the `C:\Temp` directory. @@ -430,8 +431,8 @@ You can use the `Add-Content` cmdlet to change the content of any alternate data block files that are downloaded from the Internet. If you verify that a downloaded file is safe, use the `Unblock-File` cmdlet. -This parameter was introduced in PowerShell 3.0. As of PowerShell 7.2, `Add-Content` can target -alternative data streams on both files and directories. +This parameter was introduced in PowerShell 3.0. As of PowerShell 7.2, `Add-Content` can +target alternative data streams on both files and directories. ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md index 839fbeee4f3d..755d58a9784f 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md @@ -21,14 +21,16 @@ Clears the contents of an item, but does not delete the item. ``` Clear-Item [-Path] [-Force] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md index 0847399929a3..535c9dd43927 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md @@ -20,17 +20,17 @@ Clears the value of a property but does not delete the property. ### Path (Default) ``` -Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -93,12 +93,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -258,10 +258,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Clear-RecycleBin.md b/reference/7.5/Microsoft.PowerShell.Management/Clear-RecycleBin.md index 785e2fb99439..a6fa84717969 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Clear-RecycleBin.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Clear-RecycleBin.md @@ -18,7 +18,8 @@ Clears the contents of the current user's recycle bin. ### All ``` -Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] [] +Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md index 7885f374bf74..96de56f50813 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -20,25 +20,24 @@ Copies a property and value from a specified location to another location. ### Path (Default) ``` -Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Copy-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] - [-Force] [-Filter ] [-Include ] [-Exclude ] +Copy-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another -location. -For instance, you can use this cmdlet to copy one or more registry entries from one registry key to -another registry key. +location. For instance, you can use this cmdlet to copy one or more registry entries from one +registry key to another registry key. ## EXAMPLES @@ -116,12 +115,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -182,7 +181,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -281,11 +280,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md index d4ec09d99201..1604c1c2f19e 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md @@ -30,10 +30,10 @@ Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] [-Path] < ### LiteralPath ``` -Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] -LiteralPath - [-Filter ] [-Include ] [-Exclude ] [-Force] - [-Credential ] [-Delimiter ] [-Wait] [-Raw] [-Encoding ] - [-AsByteStream] [-Stream ] [] +Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] + -LiteralPath [-Filter ] [-Include ] [-Exclude ] + [-Force] [-Credential ] [-Delimiter ] [-Wait] [-Raw] + [-Encoding ] [-AsByteStream] [-Stream ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md b/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md index 77c6adf02cf1..0b908460c787 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md @@ -25,8 +25,8 @@ Get-HotFix [[-Id] ] [-ComputerName ] [-Credential ] [-ComputerName ] [-Credential ] - [] +Get-HotFix [-Description ] [-ComputerName ] + [-Credential ] [] ``` ## DESCRIPTION @@ -221,7 +221,7 @@ The `Get-HotFix` output might vary on different operating systems. ## RELATED LINKS -[about_Arrays](/powershell/module/microsoft.powershell.core/About/about_Arrays) +[about_Arrays](/powershell/module/microsoft.powershell.core/about/about_arrays) [Add-Content](Add-Content.md) diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemProperty.md index f48a5a6f9e86..b63e8f9b16d5 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemProperty.md @@ -20,15 +20,17 @@ Gets the properties of a specified item. ### Path (Default) ``` -Get-ItemProperty [-Path] [[-Name] ] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemProperty [-Path] [[-Name] ] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` Get-ItemProperty -LiteralPath [[-Name] ] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md index 293d6e797932..b0883dba52c2 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md @@ -21,14 +21,16 @@ Gets the value for one or more properties of a specified item. ``` Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION @@ -143,12 +145,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more -efficient than other parameters, because the provider applies them when the cmdlet gets the objects -rather than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/7.5/Microsoft.PowerShell.Management/Get-PSDrive.md index 79c905c33717..ac5e00f9776f 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -20,13 +20,15 @@ Gets drives in the current session. ### Name (Default) ``` -Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] [] +Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] + [] ``` ### LiteralName ``` -Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] [] +Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md index a3127ae01e74..dcdcf0d6ca45 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md @@ -20,22 +20,22 @@ Gets the services on the computer. ### Default (Default) ``` -Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] [-Include ] - [-Exclude ] [] +Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] + [-Include ] [-Exclude ] [] ``` ### DisplayName ``` -Get-Service [-DependentServices] [-RequiredServices] -DisplayName [-Include ] - [-Exclude ] [] +Get-Service [-DependentServices] [-RequiredServices] -DisplayName + [-Include ] [-Exclude ] [] ``` ### InputObject ``` -Get-Service [-DependentServices] [-RequiredServices] [-Include ] [-Exclude ] - [-InputObject ] [] +Get-Service [-DependentServices] [-RequiredServices] [-Include ] + [-Exclude ] [-InputObject ] [] ``` ## DESCRIPTION @@ -73,8 +73,8 @@ Get-Service "wmi*" ### Example 3: Display services that include a search string This example displays services with a display name that includes the word `network`. Searching the -display name finds network-related services even when the service name doesn't include `Net`, such as -xmlprov, the Network Provisioning Service. +display name finds network-related services even when the service name doesn't include `Net`, such +as xmlprov, the Network Provisioning Service. ```powershell Get-Service -DisplayName "*network*" @@ -346,8 +346,8 @@ PowerShell 6.0 introduced the following changes: - **DelayedAutoStart** - **BinaryPathName** - **StartupType** -- The command no longer includes the **ComputerName** parameter. To use this command on a remote computer, - use the `Invoke-Command` to target a remote system. +- The command no longer includes the **ComputerName** parameter. To use this command on a remote + computer, use the `Invoke-Command` to target a remote system. This cmdlet can display services only when the current user has permission to see them. If this cmdlet does not display services, you might not have permission to see them. diff --git a/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md index 822bf63d5283..012816c5c3e6 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md @@ -20,15 +20,17 @@ Performs the default action on the specified item. ### Path (Default) ``` -Invoke-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` -Invoke-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md index 06e53d5f78f0..322afbbe6974 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Move-Item.md @@ -23,16 +23,16 @@ Moves an item from one location to another. ``` Move-Item [-Path] [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` Move-Item -LiteralPath [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md index 040ed54561ad..6994c5f25ef8 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md @@ -20,16 +20,16 @@ Moves a property from one location to another. ### Path (Default) ``` -Move-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] - [-Force] [-Filter ] [-Include ] [-Exclude ] +Move-ItemProperty [-Path] [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Move-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] - [-Force] [-Filter ] [-Include ] [-Exclude ] +Move-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] ``` @@ -48,12 +48,7 @@ This command moves the Version registry value, and its data, from the "MyApp" su subkey of the `HKLM\Software\MyCompany` registry key. ```powershell -$moveParams = @{ - Path = "HKLM:\Software\MyCompany\MyApp" - Name = "Version" - Destination = "HKLM:\Software\MyCompany\NewApp" -} -Move-ItemProperty @moveParams +Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ``` ## PARAMETERS @@ -116,12 +111,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -137,9 +132,9 @@ Accept wildcard characters: True ### -Force -Forces the command to run without asking for user confirmation. Implementation varies from provider -to provider. For more information, see -[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +Forces the command to run without asking for user confirmation. +Implementation varies from provider to provider. +For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.5/Microsoft.PowerShell.Management/New-Item.md b/reference/7.5/Microsoft.PowerShell.Management/New-Item.md index 2d14c2cdf366..d67c4b4a547a 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/New-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/New-Item.md @@ -28,15 +28,15 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - All providers ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [] ``` ### pathSet (Default) - WSMan provider ``` -New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-Port ] [] ``` @@ -44,8 +44,8 @@ New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-ApplicationName ] [-Port ] [-UseSSL] [] @@ -62,8 +62,8 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - Alias provider ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-Options ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Options ] [] ``` @@ -179,7 +179,7 @@ to verify the paths of the newly created files. ### Example 7: Create a symbolic link to a file or folder -This example creates a symbolic link to the Notice.txt file in the current folder. +This example creates a symbolic link to the `Notice.txt` file in the current folder. ```powershell $link = New-Item -ItemType SymbolicLink -Path .\link -Target .\Notice.txt @@ -223,10 +223,10 @@ Mode LastWriteTime Length Name -a---- 5/1/2020 8:03 AM 0 TestFile.txt ``` -### Example 9: Use the Force parameter to overwrite existing files +### Example 9: Use the -Force parameter to overwrite existing files -This example creates a file with a value and then recreates the file using the **Force** parameter. -This overwrites the existing file, as you can see by the **Length** property. +This example creates a file with a value and then recreates the file using `-Force`. This overwrites +the existing file, as you can see by the **Length** property. ```powershell PS> New-Item ./TestFile.txt -ItemType File -Value 'This is just a test file' diff --git a/reference/7.5/Microsoft.PowerShell.Management/New-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/New-ItemProperty.md index be823c9bb886..238975ce2075 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/New-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/New-ItemProperty.md @@ -18,17 +18,17 @@ Creates a new property for an item and sets its value. ### Path (Default) ``` -New-ItemProperty [-Path] [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty [-Path] [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -New-ItemProperty -LiteralPath [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty -LiteralPath [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/7.5/Microsoft.PowerShell.Management/New-PSDrive.md index 5c7e9fadce98..b9ce70f1921b 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/7.5/Microsoft.PowerShell.Management/New-PSDrive.md @@ -21,9 +21,9 @@ Creates temporary and persistent drives that are associated with a location in a ### All ``` -New-PSDrive [-Name] [-PSProvider] [-Root] [-Description ] - [-Scope ] [-Persist] [-Credential ] [-WhatIf] [-Confirm] - [] +New-PSDrive [-Name] [-PSProvider] [-Root] + [-Description ] [-Scope ] [-Persist] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/New-Service.md b/reference/7.5/Microsoft.PowerShell.Management/New-Service.md index f8c83cb2a327..e736d3c7eab7 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/New-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/New-Service.md @@ -16,9 +16,10 @@ Creates a new Windows service. ## SYNTAX ``` -New-Service [-Name] [-BinaryPathName] [-DisplayName ] [-Description ] - [-SecurityDescriptorSddl ] [-StartupType ] [-Credential ] - [-DependsOn ] [-WhatIf] [-Confirm] [] +New-Service [-Name] [-BinaryPathName] [-DisplayName ] + [-Description ] [-SecurityDescriptorSddl ] + [-StartupType ] [-Credential ] [-DependsOn ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -76,7 +77,7 @@ Status : OK This command uses `Get-CimInstance` to get the **Win32_Service** object for the new service. This object includes the start mode and the service description. -### Example 4: Set the SecurityDescriptor of a service when creating. +### Example 4: Set the SecurityDescriptor of a service when creating This example adds the **SecurityDescriptor** of the service being created. diff --git a/reference/7.5/Microsoft.PowerShell.Management/Push-Location.md b/reference/7.5/Microsoft.PowerShell.Management/Push-Location.md index 927524389f32..8cc6ed926722 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Push-Location.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Push-Location.md @@ -26,7 +26,8 @@ Push-Location [[-Path] ] [-PassThru] [-StackName ] [] [-PassThru] [-StackName ] [] +Push-Location [-LiteralPath ] [-PassThru] [-StackName ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md index 9f460df0a757..2a3dbcc73e20 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Remove-Item.md @@ -24,47 +24,49 @@ Deletes the specified items. ### Path (Default) - FileSystem provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### LiteralPath - FileSystem provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### Path (Default) - Certificate provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### LiteralPath - Certificate provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### Path (Default) - All providers ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Remove-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Remove-ItemProperty.md index d82dcadc9aa6..e21434e3c4a9 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Remove-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Remove-ItemProperty.md @@ -22,8 +22,8 @@ Deletes the property and its value from an item. ``` Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-InformationAction ] [-InformationVariable ] [-WhatIf] [-Confirm] - [] + [-InformationAction ] [-InformationVariable ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath @@ -128,12 +128,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -276,10 +276,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/7.5/Microsoft.PowerShell.Management/Remove-PSDrive.md index f71f44a3539e..28527930820d 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -27,8 +27,8 @@ Remove-PSDrive [-Name] [-PSProvider ] [-Scope ] [-F ### LiteralName ``` -Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] [-Force] - [-WhatIf] [-Confirm] [] +Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Remove-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Remove-Service.md index b1e7f33b1c3f..003905d0f424 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Remove-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Remove-Service.md @@ -24,7 +24,8 @@ Remove-Service [-Name] [-WhatIf] [-Confirm] [] ### InputObject ``` -Remove-Service [-InputObject ] [-WhatIf] [-Confirm] [] +Remove-Service [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md index 8301804fcf0a..5b7f9a1090f5 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Rename-Item.md @@ -20,8 +20,8 @@ Renames an item in a PowerShell provider namespace. ### ByPath (Default) ``` -Rename-Item [-Path] [-NewName] [-Force] [-PassThru] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-Item [-Path] [-NewName] [-Force] [-PassThru] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath @@ -78,8 +78,8 @@ Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key -This example renames a registry key from **Advertising** to **Marketing**. When the command is complete, -the key is renamed, but the registry entries in the key are unchanged. +This example renames a registry key from **Advertising** to **Marketing**. When the command is +complete, the key is renamed, but the registry entries in the key are unchanged. ```powershell Rename-Item -Path "HKLM:\Software\MyCompany\Advertising" -NewName "Marketing" diff --git a/reference/7.5/Microsoft.PowerShell.Management/Rename-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Rename-ItemProperty.md index 2cbf606dd674..adae41eb3963 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Rename-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Rename-ItemProperty.md @@ -20,17 +20,17 @@ Renames a property of an item. ### Path (Default) ``` -Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -93,13 +93,13 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. -The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the -only installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String @@ -159,7 +159,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md index 5287aaa6aaad..c4543b3581e9 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Restart-Computer.md @@ -19,8 +19,8 @@ Restarts the operating system on local and remote computers. ``` Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] - [[-Credential]] [-Force] [-Wait] [-Timeout ] [-For ] - [-Delay ] [-WhatIf] [-Confirm] [] + [[-Credential]] [-Force] [-Wait] [-Timeout ] + [-For ] [-Delay ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,8 +42,6 @@ the native command `/sbin/shutdown`. ## EXAMPLES -## EXAMPLES - ### Example 1: Restart the local computer `Restart-Computer` restarts the local computer. @@ -390,9 +388,8 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the +- On Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine. diff --git a/reference/7.5/Microsoft.PowerShell.Management/Restart-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Restart-Service.md index 1728c297772c..9efd9b9f1807 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Restart-Service.md @@ -18,22 +18,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Restart-Service [-Force] [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Restart-Service [-Force] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Resume-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Resume-Service.md index a9820ef75db8..c4085dfb79a3 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Resume-Service.md @@ -18,22 +18,22 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Resume-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Resume-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Set-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Set-Content.md index 7830af1c6a1f..1d3aa8b96eab 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Set-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Set-Content.md @@ -22,8 +22,8 @@ Writes new content or replaces existing content in a file. ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath - FileSystem provider @@ -31,24 +31,24 @@ Set-Content [-Path] [-Value] [-PassThru] [-Filter ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### Path (Default) - All providers ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath - All providers ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Set-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Set-Item.md index 6cb3a7bbf911..215bfe32da4c 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Set-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Set-Item.md @@ -21,48 +21,50 @@ Changes the value of an item to the value specified in the command. ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### Path (Default) - Alias and Function providers ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Options ] [] ``` ### LiteralPath - Alias and Function providers ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Options ] + [] ``` ### Path (Default) - Registry provider ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Type ] [] ``` ### LiteralPath - Registry provider ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION @@ -153,12 +155,12 @@ Accept wildcard characters: True ### -Filter Specifies a filter to qualify the **Path** parameter. The -[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only -installed PowerShell provider that supports the use of filters. You can find the syntax for the -**FileSystem** filter language in -[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient -than other parameters, because the provider applies them when the cmdlet gets the objects rather -than having PowerShell filter the objects after they are retrieved. +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +provider is the only installed PowerShell provider that supports the use of filters. You can find +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +Filters are more efficient than other parameters, because the provider applies them when the cmdlet +gets the objects rather than having PowerShell filter the objects after they are retrieved. ```yaml Type: System.String diff --git a/reference/7.5/Microsoft.PowerShell.Management/Set-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Set-ItemProperty.md index 5ec503caea16..9f74ceeac358 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Set-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Set-ItemProperty.md @@ -20,65 +20,69 @@ Creates or changes the value of a property of an item. ### propertyValuePathSet (Default) - All providers ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectPathSet - All providers ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValueLiteralPathSet - All providers ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectLiteralPathSet - All providers ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValuePathSet (Default) - Registry provider ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectPathSet - Registry provider ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyValueLiteralPathSet - Registry provider ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectLiteralPathSet - Registry provider ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Set-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Set-Service.md index 056c55406978..1054215eb48a 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Set-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Set-Service.md @@ -20,15 +20,17 @@ Starts, stops, and suspends a service, and changes its properties. ``` Set-Service [-Name] [-DisplayName ] [-Credential ] [-Description ] [-StartupType ] [-Status ] - [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] + [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Set-Service [-InputObject] [-DisplayName ] [-Credential ] - [-Description ] [-StartupType ] [-SecurityDescriptorSddl ] - [-Status ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] +Set-Service [-InputObject] [-DisplayName ] + [-Credential ] [-Description ] [-StartupType ] + [-SecurityDescriptorSddl ] [-Status ] [-Force] [-PassThru] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Set-TimeZone.md b/reference/7.5/Microsoft.PowerShell.Management/Set-TimeZone.md index 2bdc2d584218..1775b788e7a1 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Set-TimeZone.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Set-TimeZone.md @@ -32,7 +32,8 @@ Set-TimeZone -Id [-PassThru] [-WhatIf] [-Confirm] [] ### InputObject ``` -Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] [] +Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Split-Path.md b/reference/7.5/Microsoft.PowerShell.Management/Split-Path.md index dd034dc44bcd..bf3d8657de75 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Split-Path.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Split-Path.md @@ -25,7 +25,8 @@ Split-Path [-Path] [-Parent] [-Resolve] [-Credential ] ### LeafSet ``` -Split-Path [-Path] -Leaf [-Resolve] [-Credential ] [] +Split-Path [-Path] -Leaf [-Resolve] [-Credential ] + [] ``` ### LeafBaseSet @@ -66,7 +67,8 @@ Split-Path [-Path] [-Resolve] -IsAbsolute [-Credential ### LiteralPathSet ``` -Split-Path -LiteralPath [-Resolve] [-Credential ] [] +Split-Path -LiteralPath [-Resolve] [-Credential ] + [] ``` ## DESCRIPTION @@ -299,8 +301,8 @@ Accept wildcard characters: False ### -NoQualifier Indicates that this cmdlet returns the path without the qualifier. For the FileSystem or registry -providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, -in the path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. +providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, in +the path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.5/Microsoft.PowerShell.Management/Start-Process.md b/reference/7.5/Microsoft.PowerShell.Management/Start-Process.md index 5b826f5afe06..6dd98e1c0dd8 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Start-Process.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Start-Process.md @@ -19,19 +19,21 @@ Starts one or more processes on the local computer. ## SYNTAX ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-Credential ] - [-WorkingDirectory ] [-LoadUserProfile] [-NoNewWindow] [-PassThru] - [-RedirectStandardError ] [-RedirectStandardInput ] - [-RedirectStandardOutput ] [-WindowStyle ] [-Wait] - [-UseNewEnvironment] [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-Credential ] [-WorkingDirectory ] [-LoadUserProfile] + [-NoNewWindow] [-PassThru] [-RedirectStandardError ] + [-RedirectStandardInput ] [-RedirectStandardOutput ] + [-WindowStyle ] [-Wait] [-UseNewEnvironment] + [-Environment ] [-WhatIf] [-Confirm] [] ``` ### UseShellExecute ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-WorkingDirectory ] - [-PassThru] [-Verb ] [-WindowStyle ] [-Wait] - [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-WorkingDirectory ] [-PassThru] [-Verb ] + [-WindowStyle ] [-Wait] [-Environment ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Start-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Start-Service.md index 1d7f704f353f..8c7fa7e7fcce 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Start-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Start-Service.md @@ -27,15 +27,15 @@ Start-Service [-InputObject] [-PassThru] [-Include [-PassThru] [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Start-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Start-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -305,8 +305,8 @@ This cmdlet is only available on Windows platforms. work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \ start failed.` -Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To use -this command on a remote computer, use the `Invoke-Command` to target a remote system. +Beginning in PowerShell 6.0, the command no longer includes the **ComputerName** parameter. To run +`Start-Service` on a remote computer, use `Invoke-Command`. ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Stop-Process.md b/reference/7.5/Microsoft.PowerShell.Management/Stop-Process.md index 588c5be2b18c..033780cac5b3 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Stop-Process.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Stop-Process.md @@ -21,13 +21,15 @@ Stops one or more running processes. ### Id (Default) ``` -Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### Name ``` -Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### InputObject diff --git a/reference/7.5/Microsoft.PowerShell.Management/Stop-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Stop-Service.md index a5915ea95496..10ae1dcbae88 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Stop-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Stop-Service.md @@ -52,7 +52,7 @@ to stop. ### Example 1: Stop a service on the local computer ```powershell -PS C:\> Stop-Service -Name "sysmonlog" +Stop-Service -Name "sysmonlog" ``` This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer. @@ -60,7 +60,7 @@ This command stops the Performance Logs and Alerts (SysmonLog) service on the lo ### Example 2: Stop a service by using the display name ```powershell -PS C:\> Get-Service -DisplayName "telnet" | Stop-Service +Get-Service -DisplayName "telnet" | Stop-Service ``` This command stops the Telnet service on the local computer. The command uses `Get-Service` to get @@ -70,8 +70,8 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes ### Example 3: Stop a service that has dependent services ```powershell -PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices -PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm +Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices +Stop-Service -Name "iisadmin" -Force -Confirm ``` This example stops the IISAdmin service on the local computer. Because stopping this service also diff --git a/reference/7.5/Microsoft.PowerShell.Management/Suspend-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Suspend-Service.md index 9d3c1356859b..e4085e6080aa 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Suspend-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Suspend-Service.md @@ -32,8 +32,8 @@ Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude < ### DisplayName ``` -Suspend-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Suspend-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -79,7 +79,7 @@ This command uses the `Get-Service` cmdlet to get an object that represents the ```powershell Get-Service | - Where-Object {$_.CanPauseAndContinue -eq "True"} | + Where-Object { $_.CanPauseAndContinue } | Suspend-Service -Confirm ``` diff --git a/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md index b9a19897f029..b934ad188470 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Test-Connection.md @@ -26,9 +26,9 @@ Test-Connection [-TargetName] [-Ping] [-IPv4] [-IPv6] [-ResolveDestin ### RepeatPing ``` -Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-MaxHops ] [-Delay ] [-BufferSize ] [-DontFragment] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-MaxHops ] [-Delay ] + [-BufferSize ] [-DontFragment] [-Quiet] [-TimeoutSeconds ] [] ``` ### TraceRoute @@ -41,16 +41,16 @@ Test-Connection [-TargetName] -Traceroute [-IPv4] [-IPv6] [-ResolveDe ### MtuSizeDetect ``` -Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] + [-Quiet] [-TimeoutSeconds ] [] ``` ### TcpPort ``` -Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-Count ] [-Delay ] [-Repeat] [-Quiet] [-TimeoutSeconds ] - [-Detailed] [] +Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-Count ] [-Delay ] [-Repeat] + [-Quiet] [-TimeoutSeconds ] [-Detailed] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Management/Test-Path.md b/reference/7.5/Microsoft.PowerShell.Management/Test-Path.md index 517dc9ee1c52..73a921372cde 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Test-Path.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Test-Path.md @@ -17,31 +17,33 @@ Determines whether all elements of a path exist. ### Path (Default) - FileSystem provider ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### LiteralPath - FileSystem provider ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### Path (Default) - All providers ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ### LiteralPath - All providers ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ## DESCRIPTION @@ -468,8 +470,7 @@ 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). - +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md b/reference/7.5/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md index 82a49b5aa7e5..094d29cabd3d 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md +++ b/reference/7.5/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md @@ -25,13 +25,15 @@ ConvertFrom-SecureString [-SecureString] [[-SecureKey] [-AsPlainText] [] +ConvertFrom-SecureString [-SecureString] [-AsPlainText] + [] ``` ### Open ``` -ConvertFrom-SecureString [-SecureString] [-Key ] [] +ConvertFrom-SecureString [-SecureString] [-Key ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Security/ConvertTo-SecureString.md b/reference/7.5/Microsoft.PowerShell.Security/ConvertTo-SecureString.md index a936dbfdc5ee..d48503544312 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/ConvertTo-SecureString.md +++ b/reference/7.5/Microsoft.PowerShell.Security/ConvertTo-SecureString.md @@ -18,7 +18,8 @@ Converts plain text or encrypted strings to secure strings. ### Secure (Default) ``` -ConvertTo-SecureString [-String] [[-SecureKey] ] [] +ConvertTo-SecureString [-String] [[-SecureKey] ] + [] ``` ### PlainText @@ -47,8 +48,8 @@ specified key, that same key must be provided as the value of the **Key** or **S of the `ConvertTo-SecureString` cmdlet. > [!NOTE] -> For more information about **SecureString** data protection, see -> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). +> Note that per [DotNet](xref:System.Security.SecureString#remarks), the +> contents of a SecureString are not encrypted on non-Windows systems. ## EXAMPLES @@ -87,8 +88,10 @@ The fourth command displays the encrypted string in the value of the `$Encrypted The fifth command uses the `ConvertTo-SecureString` cmdlet to convert the encrypted standard string in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` -variable. The sixth command displays the value of the `$Secure2` variable. The SecureString type -indicates that the command was successful. +variable. + +The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates +that the command was successful. ### Example 2: Create a secure string from an encrypted string in a file diff --git a/reference/7.5/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md b/reference/7.5/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md index 3e7f07557352..c706a9c7b8b8 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md @@ -30,17 +30,18 @@ Get-AuthenticodeSignature -LiteralPath [] ### ByContent ``` -Get-AuthenticodeSignature -SourcePathOrExtension -Content [] +Get-AuthenticodeSignature -SourcePathOrExtension -Content + [] ``` ## DESCRIPTION > **This cmdlet is only available on the Windows platform.** -The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a -file or file content as a byte array. If the file is both embedded signed and Windows catalog -signed, the Windows catalog signature is used. If the file is not signed, the information is -retrieved, but the fields are blank. +The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file +or file content as a byte array. If the file is both embedded signed and Windows catalog signed, the +Windows catalog signature is used. If the file is not signed, the information is retrieved, but the +fields are blank. ## EXAMPLES @@ -66,7 +67,8 @@ omitted. ### Example 3: Get only valid Authenticode signatures for multiple files ```powershell -Get-ChildItem $PSHOME\*.* | ForEach-Object {Get-AuthenticodeSignature $_} | +Get-ChildItem $PSHOME\*.* | + ForEach-Object {Get-AuthenticodeSignature $_} | Where-Object {$_.Status -eq "Valid"} ``` @@ -101,9 +103,9 @@ example, the file extension is specified along with the content of the file. ### -Content -Contents of a file as a byte array for which the Authenticode signature is retrieved. This -parameter must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the -contents of the file must be in Unicode (UTF-16LE) format. +Contents of a file as a byte array for which the Authenticode signature is retrieved. This parameter +must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the contents of the +file must be in Unicode (UTF-16LE) format. ```yaml Type: System.Byte[] diff --git a/reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md b/reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md index 8cc4b2e1846b..6ed249d0b1a6 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Get-Credential.md @@ -24,7 +24,8 @@ Get-Credential [[-Credential] ] [] ### MessageSet ``` -Get-Credential [-Message ] [[-UserName] ] [-Title ] [] +Get-Credential [-Message ] [[-UserName] ] [-Title ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/CimCmdlets/CimCmdlets.md b/reference/7.6/CimCmdlets/CimCmdlets.md index 3e1c8e238071..01dc51c53841 100644 --- a/reference/7.6/CimCmdlets/CimCmdlets.md +++ b/reference/7.6/CimCmdlets/CimCmdlets.md @@ -66,4 +66,3 @@ Removes one or more CIM sessions. ### [Set-CimInstance](Set-CimInstance.md) Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class. - diff --git a/reference/7.6/CimCmdlets/Register-CimIndicationEvent.md b/reference/7.6/CimCmdlets/Register-CimIndicationEvent.md index 98cda3f30ee3..bfe5074d71e8 100644 --- a/reference/7.6/CimCmdlets/Register-CimIndicationEvent.md +++ b/reference/7.6/CimCmdlets/Register-CimIndicationEvent.md @@ -7,7 +7,7 @@ no-loc: [-Forward] online version: https://learn.microsoft.com/powershell/module/cimcmdlets/register-cimindicationevent?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: -- rcie + - rcie title: Register-CimIndicationEvent --- # Register-CimIndicationEvent @@ -428,4 +428,3 @@ This cmdlet is only available on Windows platforms. [New-CimSession](New-CimSession.md) [about_WQL](../Microsoft.PowerShell.Core/About/about_WQL.md) - diff --git a/reference/7.6/Microsoft.PowerShell.Core/Where-Object.md b/reference/7.6/Microsoft.PowerShell.Core/Where-Object.md index 48e8fc41be03..022249b66e48 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/Where-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Core/Where-Object.md @@ -251,9 +251,9 @@ particular version of Windows. Starting in Windows PowerShell 3.0, there are two different ways to construct a `Where-Object` command. -- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison operator, - and a property value. `Where-Object` returns all objects for which the scriptblock statement is - true. +- **Scriptblock syntax**. You can use a scriptblock to specify the property name, a comparison + operator, and a property value. `Where-Object` returns all objects for which the scriptblock + statement is true. For example, the following command gets processes where the value of the **PriorityClass** property equals `Normal`. @@ -263,9 +263,9 @@ command. All PowerShell comparison operators are valid in the scriptblock format. For more information, see [about_Comparison_Operators](./About/about_Comparison_Operators.md). -- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 `[switch]` +- **Simplified syntax**. To enable the simplified syntax, `Where-Object` includes 31 switch parameters that represent the comparison operators. The simplified syntax is easier to read and - write than the scriptblock syntax. You can combine one of the `[switch]` parameters with the + write than the scriptblock syntax. You can combine one of the switch parameters with the **Property** and **Value** parameters to create a command that filters objects based on the values of their properties. @@ -278,7 +278,7 @@ command. As shown in the example, the parameter names **Property** and **Value** are optional. The **Property** parameter is a positional parameter mapped to position `0`. The **Value** parameter - is a positional parameter mapped to position `1`. The `[switch]` parameter, used to specify the + is a positional parameter mapped to position `1`. The switch parameter, used to specify the comparison, can be used in any position. The simplified syntax was introduced in Windows PowerShell 3.0. For more information, see diff --git a/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-Counter.md b/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-Counter.md index f8a739dd26bb..888e372d160d 100644 --- a/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-Counter.md +++ b/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-Counter.md @@ -17,8 +17,8 @@ Gets performance counter data from local and remote computers. ### GetCounterSet (Default) ``` -Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] [-Continuous] - [-ComputerName ] [] +Get-Counter [[-Counter] ] [-SampleInterval ] [-MaxSamples ] + [-Continuous] [-ComputerName ] [] ``` ### ListSetSet diff --git a/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md b/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md index cf5eabab47d2..79778167c2dd 100644 --- a/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md +++ b/reference/7.6/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md @@ -18,28 +18,30 @@ Gets events from event logs and event tracing log files on local and remote comp ``` Get-WinEvent [[-LogName] ] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### ListLogSet ``` -Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] [-Force] - [] +Get-WinEvent [-ListLog] [-ComputerName ] [-Credential ] + [-Force] [] ``` ### ListProviderSet ``` -Get-WinEvent [-ListProvider] [-ComputerName ] [-Credential ] - [] +Get-WinEvent [-ListProvider] [-ComputerName ] + [-Credential ] [] ``` ### GetProviderSet ``` Get-WinEvent [-ProviderName] [-MaxEvents ] [-ComputerName ] - [-Credential ] [-FilterXPath ] [-Force] [-Oldest] [] + [-Credential ] [-FilterXPath ] [-Force] [-Oldest] + [] ``` ### FileSet @@ -150,9 +152,9 @@ with the asterisk (`*`) wildcard to display each property. ### Example 3: Configure the classic Security log -This command gets an **EventLogConfiguration** object that represents the classic **Security** log. The -object is then used to configure settings for the log, such as max file size, file path, and whether the -log is enabled. +This command gets an **EventLogConfiguration** object that represents the classic **Security** log. +The object is then used to configure settings for the log, such as max file size, file path, and +whether the log is enabled. ```powershell $log = Get-WinEvent -ListLog Security @@ -195,11 +197,12 @@ ProviderLatency : 1000 ProviderControlGuid : ``` -The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object is -saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The +The `Get-WinEvent` cmdlet uses the **ListLog** parameter to specify the **Security** log. The object +is saved to a variable. The **MaximumSizeInBytes** property is set to 1 gigabyte on the object. The **SaveChanges** method is called to push the change to the system inside of a try block to handle -access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to the -`Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the machine. +access violations. The `Get-WinEvent` cmdlet is called again on the **Security** log and piped to +the `Format-List` cmdlet to verify that the **MaximumSizeInBytes** property has been saved on the +machine. ### Example 4: Get event logs from a server @@ -232,7 +235,8 @@ is a property of the object with a non-null value. This example gets objects that represent the **Application** event logs on three computers: Server01, Server02, and Server03. The `foreach` keyword is used because the **ComputerName** -parameter accepts only one value. For more information, see [about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). +parameter accepts only one value. For more information, see +[about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md). ```powershell $S = 'Server01', 'Server02', 'Server03' diff --git a/reference/7.6/Microsoft.PowerShell.Diagnostics/New-WinEvent.md b/reference/7.6/Microsoft.PowerShell.Diagnostics/New-WinEvent.md index ffb50b7abbfd..210e06c40663 100644 --- a/reference/7.6/Microsoft.PowerShell.Diagnostics/New-WinEvent.md +++ b/reference/7.6/Microsoft.PowerShell.Diagnostics/New-WinEvent.md @@ -16,8 +16,8 @@ Creates a new Windows event for the specified event provider. ## SYNTAX ``` -New-WinEvent [-ProviderName] [-Id] [-Version ] [[-Payload] ] - [] +New-WinEvent [-ProviderName] [-Id] [-Version ] + [[-Payload] ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Host/Start-Transcript.md b/reference/7.6/Microsoft.PowerShell.Host/Start-Transcript.md index 47367ca067ce..604f88bb60cb 100644 --- a/reference/7.6/Microsoft.PowerShell.Host/Start-Transcript.md +++ b/reference/7.6/Microsoft.PowerShell.Host/Start-Transcript.md @@ -17,22 +17,22 @@ Creates a record of all or part of a PowerShell session to a text file. ### ByPath (Default) ``` -Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] [-IncludeInvocationHeader] - [-UseMinimalHeader] [-WhatIf] [-Confirm] [] +Start-Transcript [[-Path] ] [-Append] [-Force] [-NoClobber] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` Start-Transcript [[-LiteralPath] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ### ByOutputDirectory ``` Start-Transcript [[-OutputDirectory] ] [-Append] [-Force] [-NoClobber] - [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] + [-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -115,8 +115,8 @@ Transcript started, output file is C:\Users\username\Documents\.\transcripts\Pow ### Example 5: Start a transcript using a relative path on non-Windows systems -When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the path is relative -to your home directory. +When you use a relative path with the **OutputDirectory** parameter on non-Windows systems, the +path is relative to your home directory. ```powershell Start-Transcript -Path ./transcripts diff --git a/reference/7.6/Microsoft.PowerShell.Management/Add-Content.md b/reference/7.6/Microsoft.PowerShell.Management/Add-Content.md index 71789c955404..c89c311d850c 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Add-Content.md @@ -21,18 +21,18 @@ Adds content to the specified items, such as adding words to a file. ``` Add-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath ``` Add-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ## DESCRIPTION @@ -237,7 +237,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.Management/Clear-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Clear-Item.md index d96ec84c70a9..0a0bca06d398 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Clear-Item.md @@ -20,15 +20,17 @@ Clears the contents of an item, but does not delete the item. ### Path (Default) ``` -Clear-Item [-Path] [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Clear-Item [-Path] [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` -Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Clear-Item -LiteralPath [-Force] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -182,7 +184,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -249,10 +252,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.Management/Clear-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Clear-ItemProperty.md index 66c5f26a9fd8..20eb777962d0 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Clear-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Clear-ItemProperty.md @@ -20,17 +20,17 @@ Clears the value of a property but does not delete the property. ### Path (Default) ``` -Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty [-Path] [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Clear-ItemProperty -LiteralPath [-Name] [-PassThru] [-Force] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,9 +92,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -155,7 +157,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.6/Microsoft.PowerShell.Management/Clear-RecycleBin.md b/reference/7.6/Microsoft.PowerShell.Management/Clear-RecycleBin.md index 5550fe0b47c6..289b12bd343d 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Clear-RecycleBin.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Clear-RecycleBin.md @@ -18,7 +18,8 @@ Clears the contents of the current user's recycle bin. ### All ``` -Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] [] +Clear-RecycleBin [[-DriveLetter] ] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Copy-ItemProperty.md index c9d101ea8b2f..a41138445f80 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -20,25 +20,24 @@ Copies a property and value from a specified location to another location. ### Path (Default) ``` -Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Copy-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Copy-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Copy-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another -location. -For instance, you can use this cmdlet to copy one or more registry entries from one registry key to -another registry key. +location. For instance, you can use this cmdlet to copy one or more registry entries from one +registry key to another registry key. ## EXAMPLES @@ -48,7 +47,12 @@ This command copies the property named "MyProperty" from the "MyApplication" reg "MyApplicationRev2" registry key. ```powershell -Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" +$copyParams = @{ + Path = "MyApplication" + Destination = "HKLM:\Software\MyApplicationRev2" + Name = "MyProperty" +} +Copy-ItemProperty @copyParams ``` ## PARAMETERS @@ -110,9 +114,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -174,7 +180,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md index 6a276e8627d3..16597ba07b06 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md @@ -30,10 +30,10 @@ Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] [-Path] < ### LiteralPath ``` -Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] -LiteralPath - [-Filter ] [-Include ] [-Exclude ] [-Force] - [-Credential ] [-Delimiter ] [-Wait] [-Raw] [-Encoding ] - [-AsByteStream] [-Stream ] [] +Get-Content [-ReadCount ] [-TotalCount ] [-Tail ] + -LiteralPath [-Filter ] [-Include ] [-Exclude ] + [-Force] [-Credential ] [-Delimiter ] [-Wait] [-Raw] + [-Encoding ] [-AsByteStream] [-Stream ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-HotFix.md b/reference/7.6/Microsoft.PowerShell.Management/Get-HotFix.md index bdaca620bc9c..8070262df946 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-HotFix.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-HotFix.md @@ -25,8 +25,8 @@ Get-HotFix [[-Id] ] [-ComputerName ] [-Credential ] [-ComputerName ] [-Credential ] - [] +Get-HotFix [-Description ] [-ComputerName ] + [-Credential ] [] ``` ## DESCRIPTION @@ -60,7 +60,12 @@ The `Get-HotFix` command uses parameters to get hotfixes installed on remote com are filtered by a specified description string. ```powershell -Get-HotFix -Description Security* -ComputerName Server01, Server02 -Credential Domain01\admin01 +$hotFixParams = @{ + Description = "Security*" + ComputerName = "Server01", "Server02" + Credential = "Domain01\admin01" +} +Get-HotFix @hotFixParams ``` `Get-HotFix` filters the output with the **Description** parameter and the string **Security** that diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Get-Item.md index ca5e1107aa0b..ec16cf726f96 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-Item.md @@ -172,7 +172,8 @@ In PowerShell 6.2, an alternate view was added to get hardlink information. To g information, pipe the output to `Format-Table -View childrenWithHardlink` ```powershell -Get-Item C:\Windows\System32\ntoskrnl.exe | Format-Table -view childrenWithHardLink +Get-Item C:\Windows\System32\ntoskrnl.exe | + Format-Table -View childrenWithHardLink ``` ```Output @@ -443,7 +444,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Get-ItemProperty.md index ee399521da41..50c578af8589 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-ItemProperty.md @@ -20,15 +20,17 @@ Gets the properties of a specified item. ### Path (Default) ``` -Get-ItemProperty [-Path] [[-Name] ] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemProperty [-Path] [[-Name] ] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` Get-ItemProperty -LiteralPath [[-Name] ] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md b/reference/7.6/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md index c0122cb70092..d13bd17f7469 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md @@ -20,15 +20,17 @@ Gets the value for one or more properties of a specified item. ### Path (Default) ``` -Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemPropertyValue [[-Path] ] [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ### LiteralPath ``` -Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [] +Get-ItemPropertyValue -LiteralPath [-Name] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [] ``` ## DESCRIPTION @@ -41,8 +43,8 @@ parameters. ### Example 1: Get the value of the ProductID property -This command gets the value of the **ProductID** property of the "\SOFTWARE\Microsoft\Windows -NT\CurrentVersion" object in the Windows Registry provider. +This command gets the value of the **ProductID** property of the +`\SOFTWARE\Microsoft\Windows NT\CurrentVersion` object in the Windows Registry provider. ```powershell Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductID @@ -72,7 +74,7 @@ This command gets the values of the **LastWriteTime**, **CreationTime**, and **R a folder. The property values are returned in the order in which you specified the property names. ```powershell -Get-ItemPropertyValue -Path 'C:\Program Files\PowerShell' -Name LastWriteTime,CreationTime,Root +Get-ItemPropertyValue -Path 'C:\Program Files\PowerShell' -Name LastWriteTime, CreationTime, Root ``` ```output @@ -142,9 +144,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -187,7 +191,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -236,10 +241,10 @@ Accept wildcard characters: True ### 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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -251,8 +256,8 @@ You can pipe a string that contains a path to this cmdlet. ### System.Management.Automation.PSObject -This cmdlet returns an object for each item property value that it gets. -The object type depends on the property value that is retrieved. +This cmdlet returns an object for each item property value that it gets. The object type depends on +the property value that is retrieved. ## NOTES diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-PSDrive.md b/reference/7.6/Microsoft.PowerShell.Management/Get-PSDrive.md index a9a54b807abb..7f44d38eb4be 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-PSDrive.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-PSDrive.md @@ -20,13 +20,15 @@ Gets drives in the current session. ### Name (Default) ``` -Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] [] +Get-PSDrive [[-Name] ] [-Scope ] [-PSProvider ] + [] ``` ### LiteralName ``` -Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] [] +Get-PSDrive [-LiteralName] [-Scope ] [-PSProvider ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Get-Service.md index 3976e8198296..392ed228b5f2 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-Service.md @@ -20,22 +20,22 @@ Gets the services on the computer. ### Default (Default) ``` -Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] [-Include ] - [-Exclude ] [] +Get-Service [[-Name] ] [-DependentServices] [-RequiredServices] + [-Include ] [-Exclude ] [] ``` ### DisplayName ``` -Get-Service [-DependentServices] [-RequiredServices] -DisplayName [-Include ] - [-Exclude ] [] +Get-Service [-DependentServices] [-RequiredServices] -DisplayName + [-Include ] [-Exclude ] [] ``` ### InputObject ``` -Get-Service [-DependentServices] [-RequiredServices] [-Include ] [-Exclude ] - [-InputObject ] [] +Get-Service [-DependentServices] [-RequiredServices] [-Include ] + [-Exclude ] [-InputObject ] [] ``` ## DESCRIPTION @@ -73,8 +73,8 @@ Get-Service "wmi*" ### Example 3: Display services that include a search string This example displays services with a display name that includes the word `network`. Searching the -display name finds network-related services even when the service name doesn't include `Net`, such as -xmlprov, the Network Provisioning Service. +display name finds network-related services even when the service name doesn't include `Net`, such +as xmlprov, the Network Provisioning Service. ```powershell Get-Service -DisplayName "*network*" @@ -346,8 +346,8 @@ PowerShell 6.0 introduced the following changes: - **DelayedAutoStart** - **BinaryPathName** - **StartupType** -- The command no longer includes the **ComputerName** parameter. To use this command on a remote computer, - use the `Invoke-Command` to target a remote system. +- The command no longer includes the **ComputerName** parameter. To use this command on a remote + computer, use the `Invoke-Command` to target a remote system. This cmdlet can display services only when the current user has permission to see them. If this cmdlet does not display services, you might not have permission to see them. diff --git a/reference/7.6/Microsoft.PowerShell.Management/Invoke-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Invoke-Item.md index 064353983652..bbdc130a362e 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Invoke-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Invoke-Item.md @@ -20,15 +20,17 @@ Performs the default action on the specified item. ### Path (Default) ``` -Invoke-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ### LiteralPath ``` -Invoke-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Credential ] [-WhatIf] [-Confirm] [] +Invoke-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md index 51de86e9fa7f..87b3f38d269c 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Move-Item.md @@ -23,16 +23,16 @@ Moves an item from one location to another. ``` Move-Item [-Path] [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` Move-Item -LiteralPath [[-Destination] ] [-Force] [-Filter ] - [-Include ] [-Exclude ] [-PassThru] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-PassThru] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -48,7 +48,6 @@ If the specified destination path resolves to an existing non-container item, or the target name already exists, this cmdlet raises an error. To overwrite an existing item, use the **Force** parameter. When the destination is an existing container (such as a directory), the item is moved into that container, if supported by the provider. -provider. ## EXAMPLES diff --git a/reference/7.6/Microsoft.PowerShell.Management/Move-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Move-ItemProperty.md index a9611752c01b..0aaff2f43cf9 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Move-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Move-ItemProperty.md @@ -20,17 +20,17 @@ Moves a property from one location to another. ### Path (Default) ``` -Move-ItemProperty [-Path] [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Move-ItemProperty [-Path] [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Move-ItemProperty -LiteralPath [-Name] [-Destination] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Move-ItemProperty -LiteralPath [-Name] [-Destination] + [-PassThru] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -110,9 +110,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -173,7 +175,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -272,10 +275,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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 @@ -302,7 +305,8 @@ PowerShell includes the following aliases for `Move-ItemProperty`: - `mp` This cmdlet is designed to work with the data exposed by any provider. To list the providers -available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). +available in your session, type `Get-PSProvider`. For more information, see +[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Management/New-Item.md b/reference/7.6/Microsoft.PowerShell.Management/New-Item.md index d01c969acfc7..0ed09a0b2a80 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/New-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/New-Item.md @@ -28,15 +28,15 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - All providers ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [] ``` ### pathSet (Default) - WSMan provider ``` -New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-Port ] [] ``` @@ -44,8 +44,8 @@ New-Item [-Path] -ConnectionURI [-ItemType ] [-Value ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-OptionSet ] [-Authentication ] [-CertificateThumbprint ] [-SessionOption ] [-ApplicationName ] [-Port ] [-UseSSL] [] @@ -62,8 +62,8 @@ New-Item [-Path] [-ItemType ] [-Value ] [-Force] ### nameSet - Alias provider ``` -New-Item [[-Path] ] -Name [-ItemType ] [-Value ] [-Force] - [-Credential ] [-WhatIf] [-Confirm] [-Options ] +New-Item [[-Path] ] -Name [-ItemType ] [-Value ] + [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Options ] [] ``` @@ -112,7 +112,8 @@ profile path, even when the directories in the path do not exist. After you create a profile, you can enter aliases, functions, and scripts in the profile to customize your shell. -For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) +For more information, see +[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) and [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md). ```powershell @@ -178,7 +179,7 @@ to verify the paths of the newly created files. ### Example 7: Create a symbolic link to a file or folder -This example creates a symbolic link to the Notice.txt file in the current folder. +This example creates a symbolic link to the `Notice.txt` file in the current folder. ```powershell $link = New-Item -ItemType SymbolicLink -Path .\link -Target .\Notice.txt @@ -244,9 +245,9 @@ Mode LastWriteTime Length Name ``` > [!NOTE] -> When using `New-Item` with the `-Force` switch to create registry keys, the command will behave +> When using `New-Item` with the **Force** parameter to create registry keys, the command behaves > the same as when overwriting a file. If the registry key already exists, the key and all -> properties and values will be overwritten with an empty registry key. +> properties and values are overwritten with an empty registry key. ## PARAMETERS diff --git a/reference/7.6/Microsoft.PowerShell.Management/New-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/New-ItemProperty.md index 22e4d5f9fce9..010b190411e6 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/New-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/New-ItemProperty.md @@ -18,17 +18,17 @@ Creates a new property for an item and sets its value. ### Path (Default) ``` -New-ItemProperty [-Path] [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty [-Path] [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -New-ItemProperty -LiteralPath [-Name] [-PropertyType ] [-Value ] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] [-WhatIf] - [-Confirm] [] +New-ItemProperty -LiteralPath [-Name] [-PropertyType ] + [-Value ] [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/New-PSDrive.md b/reference/7.6/Microsoft.PowerShell.Management/New-PSDrive.md index b204dc42b8b8..d999d4c29912 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/New-PSDrive.md +++ b/reference/7.6/Microsoft.PowerShell.Management/New-PSDrive.md @@ -21,9 +21,9 @@ Creates temporary and persistent drives that are associated with a location in a ### All ``` -New-PSDrive [-Name] [-PSProvider] [-Root] [-Description ] - [-Scope ] [-Persist] [-Credential ] [-WhatIf] [-Confirm] - [] +New-PSDrive [-Name] [-PSProvider] [-Root] + [-Description ] [-Scope ] [-Persist] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/New-Service.md b/reference/7.6/Microsoft.PowerShell.Management/New-Service.md index 33a15cb364ab..fcfbaa63e9d1 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/New-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/New-Service.md @@ -16,9 +16,10 @@ Creates a new Windows service. ## SYNTAX ``` -New-Service [-Name] [-BinaryPathName] [-DisplayName ] [-Description ] - [-SecurityDescriptorSddl ] [-StartupType ] [-Credential ] - [-DependsOn ] [-WhatIf] [-Confirm] [] +New-Service [-Name] [-BinaryPathName] [-DisplayName ] + [-Description ] [-SecurityDescriptorSddl ] + [-StartupType ] [-Credential ] [-DependsOn ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -76,7 +77,7 @@ Status : OK This command uses `Get-CimInstance` to get the **Win32_Service** object for the new service. This object includes the start mode and the service description. -### Example 4: Set the SecurityDescriptor of a service when creating. +### Example 4: Set the SecurityDescriptor of a service when creating This example adds the **SecurityDescriptor** of the service being created. diff --git a/reference/7.6/Microsoft.PowerShell.Management/Push-Location.md b/reference/7.6/Microsoft.PowerShell.Management/Push-Location.md index e1ae11f182b7..d473ced88862 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Push-Location.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Push-Location.md @@ -26,7 +26,8 @@ Push-Location [[-Path] ] [-PassThru] [-StackName ] [] [-PassThru] [-StackName ] [] +Push-Location [-LiteralPath ] [-PassThru] [-StackName ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md index 6e233fd54a8c..92501b43bbeb 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Remove-Item.md @@ -24,47 +24,49 @@ Deletes the specified items. ### Path (Default) - FileSystem provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### LiteralPath - FileSystem provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-Stream ] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-Stream ] [] ``` ### Path (Default) - Certificate provider ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### LiteralPath - Certificate provider ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [-DeleteKey] - [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [-DeleteKey] [] ``` ### Path (Default) - All providers ``` -Remove-Item [-Path] [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item [-Path] [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Remove-Item -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-Recurse] [-Force] [-Credential ] [-WhatIf] [-Confirm] [] +Remove-Item -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-Recurse] [-Force] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -371,7 +373,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -457,8 +459,8 @@ Accept wildcard characters: True Prompts you for confirmation before running the cmdlet. For more information, see the following articles: -- [about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) -- [about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +- [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) +- [about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) ```yaml Type: System.Management.Automation.SwitchParameter @@ -550,6 +552,6 @@ design. [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) -[about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) +[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) -[about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +[about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) diff --git a/reference/7.6/Microsoft.PowerShell.Management/Remove-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Remove-ItemProperty.md index f8366c287a53..1b199d4288e8 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Remove-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Remove-ItemProperty.md @@ -20,9 +20,10 @@ Deletes the property and its value from an item. ### Path (Default) ``` -Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-InformationAction ] - [-InformationVariable ] [-WhatIf] [-Confirm] [] +Remove-ItemProperty [-Path] [-Name] [-Force] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] + [-InformationAction ] [-InformationVariable ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath @@ -126,9 +127,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -189,7 +192,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.6/Microsoft.PowerShell.Management/Remove-PSDrive.md b/reference/7.6/Microsoft.PowerShell.Management/Remove-PSDrive.md index 8be7ae551d5b..e471ab896fa1 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Remove-PSDrive.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Remove-PSDrive.md @@ -27,8 +27,8 @@ Remove-PSDrive [-Name] [-PSProvider ] [-Scope ] [-F ### LiteralName ``` -Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] [-Force] - [-WhatIf] [-Confirm] [] +Remove-PSDrive [-LiteralName] [-PSProvider ] [-Scope ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Remove-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Remove-Service.md index 4eb53950254e..c8c9eaec61dd 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Remove-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Remove-Service.md @@ -24,7 +24,8 @@ Remove-Service [-Name] [-WhatIf] [-Confirm] [] ### InputObject ``` -Remove-Service [-InputObject ] [-WhatIf] [-Confirm] [] +Remove-Service [-InputObject ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Rename-Computer.md b/reference/7.6/Microsoft.PowerShell.Management/Rename-Computer.md index b5136330b7b4..4623d3791dcd 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Rename-Computer.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Rename-Computer.md @@ -17,16 +17,16 @@ Renames a computer. ``` Rename-Computer [-ComputerName ] [-PassThru] [-DomainCredential ] - [-LocalCredential ] [-NewName] [-Force] [-Restart] [-WsmanAuthentication ] - [-WhatIf] [-Confirm] [] + [-LocalCredential ] [-NewName] [-Force] [-Restart] + [-WsmanAuthentication ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION > **This cmdlet is only available on the Windows platform.** -The `Rename-Computer` cmdlet renames the local computer or a remote computer. -It renames one computer in each command. +The `Rename-Computer` cmdlet renames the local computer or a remote computer. It renames one +computer in each command. This cmdlet was introduced in Windows PowerShell 3.0. @@ -51,7 +51,13 @@ computers in the domain. The **Force** parameter suppresses the confirmation prompt. ```powershell -Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force +$renameParams = @{ + ComputerName = "Srv01" + NewName = "Server001" + DomainCredential = "Domain01\Admin01" + Force = $true +} +Rename-Computer @renameParams ``` ## PARAMETERS @@ -215,7 +221,8 @@ WSMan protocol. The acceptable values for this parameter are: The default value is **Default**. -For more information about the values of this parameter, see [AuthenticationMechanism Enumeration](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +For more information about the values of this parameter, see +[AuthenticationMechanism Enumeration](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user @@ -278,7 +285,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md index a74bf7f2c7a9..ec219bc4c47e 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Rename-Item.md @@ -20,8 +20,8 @@ Renames an item in a PowerShell provider namespace. ### ByPath (Default) ``` -Rename-Item [-Path] [-NewName] [-Force] [-PassThru] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-Item [-Path] [-NewName] [-Force] [-PassThru] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath @@ -78,8 +78,8 @@ Use the `Move-Item` cmdlet, instead. ### Example 3: Rename a registry key -This example renames a registry key from **Advertising** to **Marketing**. When the command is complete, -the key is renamed, but the registry entries in the key are unchanged. +This example renames a registry key from **Advertising** to **Marketing**. When the command is +complete, the key is renamed, but the registry entries in the key are unchanged. ```powershell Rename-Item -Path "HKLM:\Software\MyCompany\Advertising" -NewName "Marketing" diff --git a/reference/7.6/Microsoft.PowerShell.Management/Rename-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Rename-ItemProperty.md index 9849ad1c8118..3ff6561128ae 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Rename-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Rename-ItemProperty.md @@ -20,17 +20,17 @@ Renames a property of an item. ### Path (Default) ``` -Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty [-Path] [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### LiteralPath ``` -Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Rename-ItemProperty -LiteralPath [-Name] [-NewName] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -93,9 +93,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -156,7 +158,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String @@ -271,10 +274,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.Management/Restart-Computer.md b/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md index 118f8e8ad646..cd05e4f12e3b 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Restart-Computer.md @@ -19,8 +19,8 @@ Restarts the operating system on local and remote computers. ``` Restart-Computer [-WsmanAuthentication ] [[-ComputerName] ] - [[-Credential]] [-Force] [-Wait] [-Timeout ] [-For ] - [-Delay ] [-WhatIf] [-Confirm] [] + [[-Credential]] [-Force] [-Wait] [-Timeout ] + [-For ] [-Delay ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -42,8 +42,6 @@ the native command `/sbin/shutdown`. ## EXAMPLES -## EXAMPLES - ### Example 1: Restart the local computer `Restart-Computer` restarts the local computer. @@ -390,9 +388,8 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the +- On Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine. diff --git a/reference/7.6/Microsoft.PowerShell.Management/Restart-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Restart-Service.md index 8b0033a5107b..30009593ce53 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Restart-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Restart-Service.md @@ -18,22 +18,22 @@ Stops and then starts one or more services. ### InputObject (Default) ``` -Restart-Service [-Force] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Restart-Service [-Force] [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Restart-Service [-Force] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Restart-Service [-Force] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Resume-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Resume-Service.md index 17211fd4f8e3..287f553e4da6 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Resume-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Resume-Service.md @@ -18,22 +18,22 @@ Resumes one or more suspended (paused) services. ### InputObject (Default) ``` -Resume-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Resume-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Resume-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Resume-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Resume-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Set-Content.md b/reference/7.6/Microsoft.PowerShell.Management/Set-Content.md index aca863e430a6..969336776e0c 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Set-Content.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Set-Content.md @@ -22,8 +22,8 @@ Writes new content or replaces existing content in a file. ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### LiteralPath - FileSystem provider @@ -31,24 +31,24 @@ Set-Content [-Path] [-Value] [-PassThru] [-Filter ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-Force] [-Credential ] - [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] [-Stream ] - [] + [-WhatIf] [-Confirm] [-NoNewline] [-Encoding ] [-AsByteStream] + [-Stream ] [] ``` ### Path (Default) - All providers ``` Set-Content [-Path] [-Value] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ### LiteralPath - All providers ``` Set-Content [-Value] -LiteralPath [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Force] [-Credential ] [-WhatIf] - [-Confirm] [] + [-Include ] [-Exclude ] [-Force] [-Credential ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Set-Item.md b/reference/7.6/Microsoft.PowerShell.Management/Set-Item.md index a0dbdaa30f78..702703073b55 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Set-Item.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Set-Item.md @@ -20,48 +20,51 @@ Changes the value of an item to the value specified in the command. ### Path (Default) - All providers ``` -Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] [-Include ] - [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] [] +Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [] ``` ### LiteralPath - All providers ``` -Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-Item -LiteralPath [[-Value] ] [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### Path (Default) - Alias and Function providers ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Options ] [] ``` ### LiteralPath - Alias and Function providers ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Options ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Options ] + [] ``` ### Path (Default) - Registry provider ``` Set-Item [-Path] [[-Value] ] [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] + [-Include ] [-Exclude ] [-Credential ] [-WhatIf] + [-Confirm] [-Type ] [] ``` ### LiteralPath - Registry provider ``` -Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-Credential ] [-WhatIf] [-Confirm] - [-Type ] [] +Set-Item [[-Value] ] -LiteralPath [-Force] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION @@ -92,7 +95,9 @@ Set-Item -Path Env:UserRole -Value "Administrator" This command changes the prompt function so that it displays the time before the path. ```powershell -Set-Item -Path Function:prompt -Value {'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> '} +Set-Item -Path Function:prompt -Value { + 'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> ' +} ``` ### Example 4: Set options for your prompt function @@ -149,9 +154,11 @@ Accept wildcard characters: True ### -Filter -Specifies a filter to qualify the **Path** parameter. The [FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) +Specifies a filter to qualify the **Path** parameter. The +[FileSystem](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md) provider is the only installed PowerShell provider that supports the use of filters. You can find -the syntax for the **FileSystem** filter language in [about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). +the syntax for the **FileSystem** filter language in +[about_Wildcards](../Microsoft.PowerShell.Core/About/about_Wildcards.md). Filters are more efficient than other parameters, because the provider applies them when the cmdlet gets the objects rather than having PowerShell filter the objects after they are retrieved. @@ -214,7 +221,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. -For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -400,16 +408,17 @@ PowerShell includes the following aliases for `Set-Item`: - All platforms: - `si` -- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in - the file system, use the `Set-Content` cmdlet. -- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of a - registry key. +- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items + in the file system, use the `Set-Content` cmdlet. +- In the Registry drives, `HKLM:` and `HKCU:`, `Set-Item` changes the data in the (Default) value of + a registry key. - To create and change the names of registry keys, use the `New-Item` and `Rename-Item` cmdlet. - - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, and - `Rename-ItemProperty` cmdlets. + - To change the names and data in registry values, use the `New-ItemProperty`, `Set-ItemProperty`, + and `Rename-ItemProperty` cmdlets. - `Set-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. - For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). + For more information, see + [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md). ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Management/Set-ItemProperty.md b/reference/7.6/Microsoft.PowerShell.Management/Set-ItemProperty.md index e62414178ab8..e197aec5095a 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Set-ItemProperty.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Set-ItemProperty.md @@ -20,65 +20,69 @@ Creates or changes the value of a property of an item. ### propertyValuePathSet (Default) - All providers ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectPathSet - All providers ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValueLiteralPathSet - All providers ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyPSObjectLiteralPathSet - All providers ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [] ``` ### propertyValuePathSet (Default) - Registry provider ``` -Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Path] [-Name] [-Value] [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectPathSet - Registry provider ``` Set-ItemProperty [-Path] -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyValueLiteralPathSet - Registry provider ``` -Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] +Set-ItemProperty [-Name] [-Value] -LiteralPath [-PassThru] + [-Force] [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ### propertyPSObjectLiteralPathSet - Registry provider ``` Set-ItemProperty -LiteralPath -InputObject [-PassThru] [-Force] - [-Filter ] [-Include ] [-Exclude ] [-Credential ] - [-WhatIf] [-Confirm] [-Type ] [] + [-Filter ] [-Include ] [-Exclude ] + [-Credential ] [-WhatIf] [-Confirm] [-Type ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Set-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Set-Service.md index c6bdb80b394e..bed446c11e31 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Set-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Set-Service.md @@ -20,15 +20,17 @@ Starts, stops, and suspends a service, and changes its properties. ``` Set-Service [-Name] [-DisplayName ] [-Credential ] [-Description ] [-StartupType ] [-Status ] - [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] + [-SecurityDescriptorSddl ] [-Force] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Set-Service [-InputObject] [-DisplayName ] [-Credential ] - [-Description ] [-StartupType ] [-SecurityDescriptorSddl ] - [-Status ] [-Force] [-PassThru] [-WhatIf] [-Confirm] [] +Set-Service [-InputObject] [-DisplayName ] + [-Credential ] [-Description ] [-StartupType ] + [-SecurityDescriptorSddl ] [-Status ] [-Force] [-PassThru] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Set-TimeZone.md b/reference/7.6/Microsoft.PowerShell.Management/Set-TimeZone.md index 48ba04038075..ce2bdc20826b 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Set-TimeZone.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Set-TimeZone.md @@ -32,7 +32,8 @@ Set-TimeZone -Id [-PassThru] [-WhatIf] [-Confirm] [] ### InputObject ``` -Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] [] +Set-TimeZone [-InputObject] [-PassThru] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Split-Path.md b/reference/7.6/Microsoft.PowerShell.Management/Split-Path.md index 28fd75cb5db2..11552017df3b 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Split-Path.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Split-Path.md @@ -25,7 +25,8 @@ Split-Path [-Path] [-Parent] [-Resolve] [-Credential ] ### LeafSet ``` -Split-Path [-Path] -Leaf [-Resolve] [-Credential ] [] +Split-Path [-Path] -Leaf [-Resolve] [-Credential ] + [] ``` ### LeafBaseSet @@ -66,7 +67,8 @@ Split-Path [-Path] [-Resolve] -IsAbsolute [-Credential ### LiteralPathSet ``` -Split-Path -LiteralPath [-Resolve] [-Credential ] [] +Split-Path -LiteralPath [-Resolve] [-Credential ] + [] ``` ## DESCRIPTION @@ -299,8 +301,8 @@ Accept wildcard characters: False ### -NoQualifier Indicates that this cmdlet returns the path without the qualifier. For the FileSystem or registry -providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, in the -path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. +providers, the qualifier is the drive of the provider path, such as `C:` or `HKCU:`. For example, in +the path `C:\Test\Logs\Pass1.log`, it returns only `\Test\Logs\Pass1.log`. ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.6/Microsoft.PowerShell.Management/Start-Process.md b/reference/7.6/Microsoft.PowerShell.Management/Start-Process.md index c9f7db4c3563..cb1e0c949456 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Start-Process.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Start-Process.md @@ -19,19 +19,21 @@ Starts one or more processes on the local computer. ## SYNTAX ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-Credential ] - [-WorkingDirectory ] [-LoadUserProfile] [-NoNewWindow] [-PassThru] - [-RedirectStandardError ] [-RedirectStandardInput ] - [-RedirectStandardOutput ] [-WindowStyle ] [-Wait] - [-UseNewEnvironment] [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-Credential ] [-WorkingDirectory ] [-LoadUserProfile] + [-NoNewWindow] [-PassThru] [-RedirectStandardError ] + [-RedirectStandardInput ] [-RedirectStandardOutput ] + [-WindowStyle ] [-Wait] [-UseNewEnvironment] + [-Environment ] [-WhatIf] [-Confirm] [] ``` ### UseShellExecute ``` -Start-Process [-FilePath] [[-ArgumentList] ] [-WorkingDirectory ] - [-PassThru] [-Verb ] [-WindowStyle ] [-Wait] - [-Environment ] [-WhatIf] [-Confirm] [] +Start-Process [-FilePath] [[-ArgumentList] ] + [-WorkingDirectory ] [-PassThru] [-Verb ] + [-WindowStyle ] [-Wait] [-Environment ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Start-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Start-Service.md index cd9a39bb274d..0597d19c4166 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Start-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Start-Service.md @@ -20,22 +20,22 @@ Starts one or more stopped services. ### InputObject (Default) ``` -Start-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Start-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Start-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Start-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Start-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Stop-Process.md b/reference/7.6/Microsoft.PowerShell.Management/Stop-Process.md index 45dea9fdd690..3d6e862f64e5 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Stop-Process.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Stop-Process.md @@ -21,19 +21,22 @@ Stops one or more running processes. ### Id (Default) ``` -Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-Id] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### Name ``` -Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process -Name [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### InputObject ``` -Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Stop-Process [-InputObject] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -50,8 +53,8 @@ you are not prompted for confirmation unless you specify the **Confirm** paramet ### Example 1: Stop all instances of a process -``` -PS C:\> Stop-Process -Name "notepad" +```powershell +Stop-Process -Name "notepad" ``` This command stops all instances of the Notepad process on the computer. Each instance of Notepad @@ -62,7 +65,7 @@ list the process IDs of each instance of Notepad. ### Example 2: Stop a specific instance of a process ```powershell -PS C:\> Stop-Process -Id 3952 -Confirm -PassThru +Stop-Process -Id 3952 -Confirm -PassThru ``` ```Output @@ -133,7 +136,6 @@ Performing operation 'Stop-Process' on Target 'lsass(596)' ```powershell [ADMIN]: PS> Get-Process -Name "lsass" | Stop-Process -Force -[ADMIN]: PS> ``` These commands show the effect of using **Force** to stop a process that is not owned by the user. @@ -274,7 +276,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.Management/Stop-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Stop-Service.md index 527f96ce807e..8aa7d6f89246 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Stop-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Stop-Service.md @@ -20,22 +20,22 @@ Stops one or more running services. ### InputObject (Default) ``` -Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-InputObject] [-PassThru] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-Name] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -52,7 +52,7 @@ to stop. ### Example 1: Stop a service on the local computer ```powershell -PS C:\> Stop-Service -Name "sysmonlog" +Stop-Service -Name "sysmonlog" ``` This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer. @@ -60,7 +60,7 @@ This command stops the Performance Logs and Alerts (SysmonLog) service on the lo ### Example 2: Stop a service by using the display name ```powershell -PS C:\> Get-Service -DisplayName "telnet" | Stop-Service +Get-Service -DisplayName "telnet" | Stop-Service ``` This command stops the Telnet service on the local computer. The command uses `Get-Service` to get @@ -70,8 +70,8 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes ### Example 3: Stop a service that has dependent services ```powershell -PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices -PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm +Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices +Stop-Service -Name "iisadmin" -Force -Confirm ``` This example stops the IISAdmin service on the local computer. Because stopping this service also diff --git a/reference/7.6/Microsoft.PowerShell.Management/Suspend-Service.md b/reference/7.6/Microsoft.PowerShell.Management/Suspend-Service.md index 25847d8f1a1f..abd07a297607 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Suspend-Service.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Suspend-Service.md @@ -18,22 +18,22 @@ Suspends (pauses) one or more running services. ### InputObject (Default) ``` -Suspend-Service [-InputObject] [-PassThru] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [] +Suspend-Service [-InputObject] [-PassThru] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### Default ``` -Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Suspend-Service [-Name] [-PassThru] [-Include ] [-Exclude ] + [-WhatIf] [-Confirm] [] ``` ### DisplayName ``` -Suspend-Service [-PassThru] -DisplayName [-Include ] [-Exclude ] [-WhatIf] - [-Confirm] [] +Suspend-Service [-PassThru] -DisplayName [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md b/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md index 316160eed6a3..614c1cb90d10 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Test-Connection.md @@ -26,9 +26,9 @@ Test-Connection [-TargetName] [-Ping] [-IPv4] [-IPv6] [-ResolveDestin ### RepeatPing ``` -Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-MaxHops ] [-Delay ] [-BufferSize ] [-DontFragment] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -Repeat [-Ping] [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-MaxHops ] [-Delay ] + [-BufferSize ] [-DontFragment] [-Quiet] [-TimeoutSeconds ] [] ``` ### TraceRoute @@ -41,16 +41,16 @@ Test-Connection [-TargetName] -Traceroute [-IPv4] [-IPv6] [-ResolveDe ### MtuSizeDetect ``` -Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] [-Quiet] - [-TimeoutSeconds ] [] +Test-Connection [-TargetName] -MtuSize [-IPv4] [-IPv6] [-ResolveDestination] + [-Quiet] [-TimeoutSeconds ] [] ``` ### TcpPort ``` -Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] [-ResolveDestination] - [-Source ] [-Count ] [-Delay ] [-Repeat] [-Quiet] [-TimeoutSeconds ] - [-Detailed] [] +Test-Connection [-TargetName] -TcpPort [-IPv4] [-IPv6] + [-ResolveDestination] [-Source ] [-Count ] [-Delay ] [-Repeat] + [-Quiet] [-TimeoutSeconds ] [-Detailed] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Management/Test-Path.md b/reference/7.6/Microsoft.PowerShell.Management/Test-Path.md index b7ecb7c92068..1cdcd90602ee 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Test-Path.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Test-Path.md @@ -17,31 +17,33 @@ Determines whether all elements of a path exist. ### Path (Default) - FileSystem provider ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### LiteralPath - FileSystem provider ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] [-OlderThan ] [-NewerThan ] [] ``` ### Path (Default) - All providers ``` -Test-Path [-Path] [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path [-Path] [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ### LiteralPath - All providers ``` -Test-Path -LiteralPath [-Filter ] [-Include ] [-Exclude ] - [-PathType ] [-IsValid] [-Credential ] [] +Test-Path -LiteralPath [-Filter ] [-Include ] + [-Exclude ] [-PathType ] [-IsValid] [-Credential ] + [] ``` ## DESCRIPTION @@ -315,8 +317,8 @@ exist. PowerShell returns false because it doesn't know which drive provider to > A breaking change in the Path APIs was introduced in .NET 2.1. Those methods no longer check for > invalid path characters. This change caused a regression in PowerShell where the **IsValid** check > no longer tests for invalid characters. The regression will be addressed in a future release. For -> more information, -> see [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). +> more information, see +> [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.6/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md b/reference/7.6/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md index 4b6c773e108e..1f0836173977 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md +++ b/reference/7.6/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md @@ -18,19 +18,22 @@ Converts a secure string to an encrypted standard string. ### Secure (Default) ``` -ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] [] +ConvertFrom-SecureString [-SecureString] [[-SecureKey] ] + [] ``` ### AsPlainText ``` -ConvertFrom-SecureString [-SecureString] [-AsPlainText] [] +ConvertFrom-SecureString [-SecureString] [-AsPlainText] + [] ``` ### Open ``` -ConvertFrom-SecureString [-SecureString] [-Key ] [] +ConvertFrom-SecureString [-SecureString] [-Key ] + [] ``` ## DESCRIPTION @@ -47,8 +50,8 @@ key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the representation. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the -> contents of a SecureString are not encrypted on non-Windows systems. +> For more information about **SecureString** data protection, see +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). ## EXAMPLES @@ -173,7 +176,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.Security/ConvertTo-SecureString.md b/reference/7.6/Microsoft.PowerShell.Security/ConvertTo-SecureString.md index b69575534db3..eef3a4960802 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/ConvertTo-SecureString.md +++ b/reference/7.6/Microsoft.PowerShell.Security/ConvertTo-SecureString.md @@ -18,7 +18,8 @@ Converts plain text or encrypted strings to secure strings. ### Secure (Default) ``` -ConvertTo-SecureString [-String] [[-SecureKey] ] [] +ConvertTo-SecureString [-String] [[-SecureKey] ] + [] ``` ### PlainText @@ -47,7 +48,7 @@ specified key, that same key must be provided as the value of the **Key** or **S of the `ConvertTo-SecureString` cmdlet. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the +> Note that per [DotNet](xref:System.Security.SecureString#remarks), the > contents of a SecureString are not encrypted on non-Windows systems. ## EXAMPLES @@ -86,13 +87,16 @@ variable. The fourth command displays the encrypted string in the value of the `$Encrypted` variable. The fifth command uses the `ConvertTo-SecureString` cmdlet to convert the encrypted standard string -in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` variable. -The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates that -the command was successful. +in the `$Encrypted` variable back into a secure string. It saves the result in the `$Secure2` +variable. + +The sixth command displays the value of the `$Secure2` variable. The SecureString type indicates +that the command was successful. ### Example 2: Create a secure string from an encrypted string in a file -This example shows how to create a secure string from an encrypted standard string that is saved in a file. +This example shows how to create a secure string from an encrypted standard string that is saved in +a file. ```powershell $Secure = Read-Host -AsSecureString diff --git a/reference/7.6/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md b/reference/7.6/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md index 7948d9394999..d23a2969e407 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md @@ -30,19 +30,18 @@ Get-AuthenticodeSignature -LiteralPath [] ### ByContent ``` -Get-AuthenticodeSignature -SourcePathOrExtension -Content [] +Get-AuthenticodeSignature -SourcePathOrExtension -Content + [] ``` ## DESCRIPTION > **This cmdlet is only available on the Windows platform.** -The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a -file or file content as a byte array. -If the file is both embedded signed and Windows catalog signed, -the Windows catalog signature is used. -If the file is not signed, the information is retrieved, but -the fields are blank. +The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file +or file content as a byte array. If the file is both embedded signed and Windows catalog signed, the +Windows catalog signature is used. If the file is not signed, the information is retrieved, but the +fields are blank. ## EXAMPLES @@ -62,7 +61,8 @@ Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1 ``` This command gets information about the Authenticode signature for the four files listed at the -command line. In this example, the name of the **FilePath** parameter, which is optional, is omitted. +command line. In this example, the name of the **FilePath** parameter, which is optional, is +omitted. ### Example 3: Get only valid Authenticode signatures for multiple files @@ -89,7 +89,11 @@ selects only the signature objects with a status of Valid. ### Example 4: Get the Authenticode signature for a file content specified as byte array ```powershell -Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePathorExtension ps1 +$authenticodeSignatureParams = @{ + Content = (Get-Content foo.ps1 -AsByteStream) + SourcePathorExtension = "ps1" +} +Get-AuthenticodeSignature @authenticodeSignatureParams ``` This command gets information about the Authenticode signature for the content of a file. In this @@ -99,9 +103,9 @@ example, the file extension is specified along with the content of the file. ### -Content -Contents of a file as a byte array for which the Authenticode signature is retrieved. This -parameter must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the -contents of the file must be in Unicode (UTF-16LE) format. +Contents of a file as a byte array for which the Authenticode signature is retrieved. This parameter +must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the contents of the +file must be in Unicode (UTF-16LE) format. ```yaml Type: System.Byte[] @@ -174,7 +178,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Security/Get-Credential.md b/reference/7.6/Microsoft.PowerShell.Security/Get-Credential.md index 50f8818830e9..277b11578b9e 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Get-Credential.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Get-Credential.md @@ -24,7 +24,8 @@ Get-Credential [[-Credential] ] [] ### MessageSet ``` -Get-Credential [-Message ] [[-UserName] ] [-Title ] [] +Get-Credential [-Message ] [[-UserName] ] [-Title ] + [] ``` ## DESCRIPTION @@ -73,7 +74,8 @@ object. ### Example 3 ```powershell -$Credential = $Host.UI.PromptForCredential("Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") +$Credential = $Host.UI.PromptForCredential( + "Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") ``` This command uses the **PromptForCredential** method to prompt the user for their user name and @@ -84,7 +86,7 @@ use **PromptForCredential**, you can specify the caption, messages, and user nam prompt. For more information, see the -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) documentation in the SDK. ### Example 4 @@ -95,7 +97,11 @@ This example demonstrates how to create a credential object identical to the one ```powershell $User = "Domain01\User01" $PWord = Read-Host -Prompt 'Enter a Password' -AsSecureString -$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord +$credentialParams = @{ + TypeName = 'System.Management.Automation.PSCredential' + ArgumentList = $User, $PWord +} +$Credential = New-Object @credentialParams ``` The first command assigns the username to the `$User` variable. Ensure the value follows @@ -111,7 +117,11 @@ stored in the `$User` and `$PWord` variables. ### Example 5 ```powershell -Get-Credential -Message "Credential are required for access to the \\Server1\Scripts file share." -User Server01\PowerUser +$credentialParams = @{ + Message = "Credential are required for access to the \\Server1\Scripts file share." + UserName = "Server01\PowerUser" +} +Get-Credential @credentialParams ``` ```Output @@ -127,13 +137,14 @@ user why credentials are needed and gives them confidence that the request is le ### Example 6 ```powershell -Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02} +Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Credential Domain01\User02} ``` ```Output PowerShell Credential Request : PowerShell Credential Request -Warning: This credential is being requested by a script or application on the SERVER01 remote computer. -Enter your credentials only if you trust the remote computer and the application or script requesting it. +Warning: This credential is being requested by a script or application on the SERVER01 remote +computer. Enter your credentials only if you trust the remote computer and the application or script +requesting it. Enter your credentials. Password for user Domain01\User02: *************** @@ -162,8 +173,8 @@ this parameter, you're prompted for a user name and a password. Starting in PowerShell 3.0, if you enter a user name without a domain, `Get-Credential` no longer inserts a backslash before the name. -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 @@ -268,4 +279,4 @@ and `New-PSDrive` cmdlets. ## RELATED LINKS -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) diff --git a/reference/7.6/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md b/reference/7.6/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md index 4d5d81ef270e..e49c23e9db50 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md @@ -30,7 +30,8 @@ To display the execution policies for each scope in the order of precedence, use The effective execution policy is determined by execution policies that are set by `Set-ExecutionPolicy` and Group Policy settings. -For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). +For more information, see +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md). ## EXAMPLES @@ -232,7 +233,7 @@ whether scripts must be digitally signed before they are run. ## RELATED LINKS -[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md) +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md) [about_Group_Policy_Settings](../Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md) diff --git a/reference/7.7/CimCmdlets/Register-CimIndicationEvent.md b/reference/7.7/CimCmdlets/Register-CimIndicationEvent.md index 0c26179cbf85..7d4a7c56ef36 100644 --- a/reference/7.7/CimCmdlets/Register-CimIndicationEvent.md +++ b/reference/7.7/CimCmdlets/Register-CimIndicationEvent.md @@ -7,7 +7,7 @@ no-loc: [-Forward] online version: https://learn.microsoft.com/powershell/module/cimcmdlets/register-cimindicationevent?view=powershell-7.7&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: -- rcie + - rcie title: Register-CimIndicationEvent --- # Register-CimIndicationEvent diff --git a/reference/7.7/Microsoft.PowerShell.Management/Add-Content.md b/reference/7.7/Microsoft.PowerShell.Management/Add-Content.md index d4b7d5385e6a..79f405943fb7 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Add-Content.md @@ -237,7 +237,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.Management/Clear-Item.md b/reference/7.7/Microsoft.PowerShell.Management/Clear-Item.md index 802c8a493a08..9edf36011da6 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Clear-Item.md @@ -252,10 +252,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.7/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/7.7/Microsoft.PowerShell.Management/Copy-ItemProperty.md index d32d7e620e2c..8fa5ad74c675 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -36,9 +36,8 @@ Copy-ItemProperty -LiteralPath [-Name] [-Destination] [!NOTE] -> When using `New-Item` with the `-Force` switch to create registry keys, the command will behave +> When using `New-Item` with the **Force** parameter to create registry keys, the command behaves > the same as when overwriting a file. If the registry key already exists, the key and all -> properties and values will be overwritten with an empty registry key. +> properties and values are overwritten with an empty registry key. ## PARAMETERS diff --git a/reference/7.7/Microsoft.PowerShell.Management/Remove-Item.md b/reference/7.7/Microsoft.PowerShell.Management/Remove-Item.md index cda55de92e58..95c3bb4cf6bf 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Remove-Item.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Remove-Item.md @@ -373,7 +373,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -459,8 +459,8 @@ Accept wildcard characters: True Prompts you for confirmation before running the cmdlet. For more information, see the following articles: -- [about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) -- [about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +- [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) +- [about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) ```yaml Type: System.Management.Automation.SwitchParameter @@ -552,6 +552,6 @@ design. [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) -[about_Preference_Variables](../microsoft.powershell.core/about/about_preference_variables.md#confirmpreference) +[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md#confirmpreference) -[about_Functions_CmdletBindingAttribute](../microsoft.powershell.core/about/about_functions_cmdletbindingattribute.md?#confirmimpact) +[about_Functions_CmdletBindingAttribute](../Microsoft.PowerShell.Core/About/about_Functions_CmdletBindingAttribute.md#confirmimpact) diff --git a/reference/7.7/Microsoft.PowerShell.Management/Rename-Computer.md b/reference/7.7/Microsoft.PowerShell.Management/Rename-Computer.md index f2ec40f27698..1e01e2053ac9 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Rename-Computer.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Rename-Computer.md @@ -25,8 +25,8 @@ Rename-Computer [-ComputerName ] [-PassThru] [-DomainCredential **This cmdlet is only available on the Windows platform.** -The `Rename-Computer` cmdlet renames the local computer or a remote computer. -It renames one computer in each command. +The `Rename-Computer` cmdlet renames the local computer or a remote computer. It renames one +computer in each command. This cmdlet was introduced in Windows PowerShell 3.0. @@ -51,7 +51,13 @@ computers in the domain. The **Force** parameter suppresses the confirmation prompt. ```powershell -Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force +$renameParams = @{ + ComputerName = "Srv01" + NewName = "Server001" + DomainCredential = "Domain01\Admin01" + Force = $true +} +Rename-Computer @renameParams ``` ## PARAMETERS @@ -216,7 +222,7 @@ WSMan protocol. The acceptable values for this parameter are: The default value is **Default**. For more information about the values of this parameter, see -[AuthenticationMechanism Enumeration](/dotnet/api/system.management.automation.runspaces.authenticationmechanism). +[AuthenticationMechanism Enumeration](xref:System.Management.Automation.Runspaces.AuthenticationMechanism). > [!WARNING] > Credential Security Service Provider (CredSSP) authentication, in which the user @@ -279,7 +285,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.7/Microsoft.PowerShell.Management/Rename-ItemProperty.md b/reference/7.7/Microsoft.PowerShell.Management/Rename-ItemProperty.md index 553bbe08171e..92eeabf5aaf9 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Rename-ItemProperty.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Rename-ItemProperty.md @@ -159,7 +159,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String @@ -274,10 +274,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](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +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.7/Microsoft.PowerShell.Management/Restart-Computer.md b/reference/7.7/Microsoft.PowerShell.Management/Restart-Computer.md index 174330f889c7..02c9fd060b5c 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Restart-Computer.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Restart-Computer.md @@ -388,9 +388,8 @@ This cmdlet returns no output. ## NOTES -- In Windows, `Restart-Computer` uses the +- On Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) - of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem) class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine. diff --git a/reference/7.7/Microsoft.PowerShell.Management/Set-Item.md b/reference/7.7/Microsoft.PowerShell.Management/Set-Item.md index c06bfcb301bd..7747533df357 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Set-Item.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Set-Item.md @@ -95,7 +95,9 @@ Set-Item -Path Env:UserRole -Value "Administrator" This command changes the prompt function so that it displays the time before the path. ```powershell -Set-Item -Path Function:prompt -Value {'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> '} +Set-Item -Path Function:prompt -Value { + 'PS '+ (Get-Date -Format t) + " " + (Get-Location) + '> ' +} ``` ### Example 4: Set options for your prompt function diff --git a/reference/7.7/Microsoft.PowerShell.Management/Stop-Process.md b/reference/7.7/Microsoft.PowerShell.Management/Stop-Process.md index 1fced9fb521f..9f269aeee4c2 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Stop-Process.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Stop-Process.md @@ -53,8 +53,8 @@ you are not prompted for confirmation unless you specify the **Confirm** paramet ### Example 1: Stop all instances of a process -``` -PS C:\> Stop-Process -Name "notepad" +```powershell +Stop-Process -Name "notepad" ``` This command stops all instances of the Notepad process on the computer. Each instance of Notepad @@ -65,7 +65,7 @@ list the process IDs of each instance of Notepad. ### Example 2: Stop a specific instance of a process ```powershell -PS C:\> Stop-Process -Id 3952 -Confirm -PassThru +Stop-Process -Id 3952 -Confirm -PassThru ``` ```Output @@ -136,7 +136,6 @@ Performing operation 'Stop-Process' on Target 'lsass(596)' ```powershell [ADMIN]: PS> Get-Process -Name "lsass" | Stop-Process -Force -[ADMIN]: PS> ``` These commands show the effect of using **Force** to stop a process that is not owned by the user. diff --git a/reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md b/reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md index fc8464df81e2..8fa08e9bc550 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Stop-Service.md @@ -52,7 +52,7 @@ to stop. ### Example 1: Stop a service on the local computer ```powershell -PS C:\> Stop-Service -Name "sysmonlog" +Stop-Service -Name "sysmonlog" ``` This command stops the Performance Logs and Alerts (SysmonLog) service on the local computer. @@ -60,7 +60,7 @@ This command stops the Performance Logs and Alerts (SysmonLog) service on the lo ### Example 2: Stop a service by using the display name ```powershell -PS C:\> Get-Service -DisplayName "telnet" | Stop-Service +Get-Service -DisplayName "telnet" | Stop-Service ``` This command stops the Telnet service on the local computer. The command uses `Get-Service` to get @@ -70,8 +70,8 @@ an object that represents the Telnet service. The pipeline operator (`|`) pipes ### Example 3: Stop a service that has dependent services ```powershell -PS C:\> Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices -PS C:\> Stop-Service -Name "iisadmin" -Force -Confirm +Get-Service -Name "iisadmin" | Format-List -Property Name, DependentServices +Stop-Service -Name "iisadmin" -Force -Confirm ``` This example stops the IISAdmin service on the local computer. Because stopping this service also diff --git a/reference/7.7/Microsoft.PowerShell.Management/Test-Path.md b/reference/7.7/Microsoft.PowerShell.Management/Test-Path.md index 5d8707139fb8..d9d7d750d040 100644 --- a/reference/7.7/Microsoft.PowerShell.Management/Test-Path.md +++ b/reference/7.7/Microsoft.PowerShell.Management/Test-Path.md @@ -317,8 +317,8 @@ exist. PowerShell returns false because it doesn't know which drive provider to > A breaking change in the Path APIs was introduced in .NET 2.1. Those methods no longer check for > invalid path characters. This change caused a regression in PowerShell where the **IsValid** check > no longer tests for invalid characters. The regression will be addressed in a future release. For -> more information, -> see [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). +> more information, see +> [Breaking changes in .NET Core 2.1](/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters). ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/reference/7.7/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md b/reference/7.7/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md index de81b78a9cc8..cde96175c7d9 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md +++ b/reference/7.7/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md @@ -50,8 +50,8 @@ key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the representation. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the -> contents of a SecureString are not encrypted on non-Windows systems. +> For more information about **SecureString** data protection, see +> [How secure is SecureString?](xref:System.Security.SecureString#how-secure-is-securestring). ## EXAMPLES diff --git a/reference/7.7/Microsoft.PowerShell.Security/ConvertTo-SecureString.md b/reference/7.7/Microsoft.PowerShell.Security/ConvertTo-SecureString.md index c757ed45e69c..1de9809884b8 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/ConvertTo-SecureString.md +++ b/reference/7.7/Microsoft.PowerShell.Security/ConvertTo-SecureString.md @@ -48,7 +48,7 @@ specified key, that same key must be provided as the value of the **Key** or **S of the `ConvertTo-SecureString` cmdlet. > [!NOTE] -> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the +> Note that per [DotNet](xref:System.Security.SecureString#remarks), the > contents of a SecureString are not encrypted on non-Windows systems. ## EXAMPLES diff --git a/reference/7.7/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md b/reference/7.7/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md index 604c430d2381..55a015d29704 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md +++ b/reference/7.7/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md @@ -38,12 +38,10 @@ Get-AuthenticodeSignature -SourcePathOrExtension -Content > **This cmdlet is only available on the Windows platform.** -The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a -file or file content as a byte array. -If the file is both embedded signed and Windows catalog signed, -the Windows catalog signature is used. -If the file is not signed, the information is retrieved, but -the fields are blank. +The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file +or file content as a byte array. If the file is both embedded signed and Windows catalog signed, the +Windows catalog signature is used. If the file is not signed, the information is retrieved, but the +fields are blank. ## EXAMPLES @@ -63,7 +61,8 @@ Get-AuthenticodeSignature test.ps1, test1.ps1, sign-file.ps1, makexml.ps1 ``` This command gets information about the Authenticode signature for the four files listed at the -command line. In this example, the name of the **FilePath** parameter, which is optional, is omitted. +command line. In this example, the name of the **FilePath** parameter, which is optional, is +omitted. ### Example 3: Get only valid Authenticode signatures for multiple files @@ -90,7 +89,11 @@ selects only the signature objects with a status of Valid. ### Example 4: Get the Authenticode signature for a file content specified as byte array ```powershell -Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePathorExtension ps1 +$authenticodeSignatureParams = @{ + Content = (Get-Content foo.ps1 -AsByteStream) + SourcePathorExtension = "ps1" +} +Get-AuthenticodeSignature @authenticodeSignatureParams ``` This command gets information about the Authenticode signature for the content of a file. In this @@ -100,9 +103,9 @@ example, the file extension is specified along with the content of the file. ### -Content -Contents of a file as a byte array for which the Authenticode signature is retrieved. This -parameter must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the -contents of the file must be in Unicode (UTF-16LE) format. +Contents of a file as a byte array for which the Authenticode signature is retrieved. This parameter +must be used with **SourcePathOrExtension** parameter. Prior to PowerShell 7.4, the contents of the +file must be in Unicode (UTF-16LE) format. ```yaml Type: System.Byte[] @@ -175,7 +178,7 @@ 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). +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.7/Microsoft.PowerShell.Security/Get-Credential.md b/reference/7.7/Microsoft.PowerShell.Security/Get-Credential.md index 23327f66cee1..669817bf90a8 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/Get-Credential.md +++ b/reference/7.7/Microsoft.PowerShell.Security/Get-Credential.md @@ -74,7 +74,8 @@ object. ### Example 3 ```powershell -$Credential = $Host.UI.PromptForCredential("Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") +$Credential = $Host.UI.PromptForCredential( + "Need credentials", "Please enter your user name and password.", "", "NetBiosUserName") ``` This command uses the **PromptForCredential** method to prompt the user for their user name and @@ -85,7 +86,7 @@ use **PromptForCredential**, you can specify the caption, messages, and user nam prompt. For more information, see the -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) documentation in the SDK. ### Example 4 @@ -96,7 +97,11 @@ This example demonstrates how to create a credential object identical to the one ```powershell $User = "Domain01\User01" $PWord = Read-Host -Prompt 'Enter a Password' -AsSecureString -$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord +$credentialParams = @{ + TypeName = 'System.Management.Automation.PSCredential' + ArgumentList = $User, $PWord +} +$Credential = New-Object @credentialParams ``` The first command assigns the username to the `$User` variable. Ensure the value follows @@ -112,7 +117,11 @@ stored in the `$User` and `$PWord` variables. ### Example 5 ```powershell -Get-Credential -Message "Credential are required for access to the \\Server1\Scripts file share." -User Server01\PowerUser +$credentialParams = @{ + Message = "Credential are required for access to the \\Server1\Scripts file share." + UserName = "Server01\PowerUser" +} +Get-Credential @credentialParams ``` ```Output @@ -128,13 +137,14 @@ user why credentials are needed and gives them confidence that the request is le ### Example 6 ```powershell -Invoke-Command -ComputerName Server01 {Get-Credential Domain01\User02} +Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Credential Domain01\User02} ``` ```Output PowerShell Credential Request : PowerShell Credential Request -Warning: This credential is being requested by a script or application on the SERVER01 remote computer. -Enter your credentials only if you trust the remote computer and the application or script requesting it. +Warning: This credential is being requested by a script or application on the SERVER01 remote +computer. Enter your credentials only if you trust the remote computer and the application or script +requesting it. Enter your credentials. Password for user Domain01\User02: *************** @@ -163,8 +173,8 @@ this parameter, you're prompted for a user name and a password. Starting in PowerShell 3.0, if you enter a user name without a domain, `Get-Credential` no longer inserts a backslash before the name. -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 @@ -269,4 +279,4 @@ and `New-PSDrive` cmdlets. ## RELATED LINKS -[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential) +[PromptForCredential](xref:System.Management.Automation.Host.PSHostUserInterface.PromptForCredential%2A) diff --git a/reference/7.7/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md b/reference/7.7/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md index eef0cd99ab92..24c914e23308 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md +++ b/reference/7.7/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md @@ -31,7 +31,7 @@ The effective execution policy is determined by execution policies that are set `Set-ExecutionPolicy` and Group Policy settings. For more information, see -[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md). ## EXAMPLES @@ -233,7 +233,7 @@ whether scripts must be digitally signed before they are run. ## RELATED LINKS -[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md) +[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md) [about_Group_Policy_Settings](../Microsoft.PowerShell.Core/About/about_Group_Policy_Settings.md)