diff --git a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md index 341da714c7fe..51ee282b6365 100644 --- a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md +++ b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-Counter.md @@ -171,7 +171,9 @@ In this example, `Start-Job` runs a `Get-Counter` command as a background job on To view the performance counter output from the job, use the `Receive-Job` cmdlet. ```powershell -Start-Job -ScriptBlock {Get-Counter -Counter "\LogicalDisk(_Total)\% Free Space" -MaxSamples 1000} +Start-Job -ScriptBlock { + Get-Counter -Counter "\LogicalDisk(_Total)\% Free Space" -MaxSamples 1000 +} ``` ```Output @@ -262,7 +264,8 @@ The pipeline is used with the `Where-Object` cmdlet to find a subset of the path counter sets complete list of counter paths, remove the pipeline (`|`) and `Where-Object` command. The `$_` is an automatic variable for the current object in the pipeline. -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). ```powershell (Get-Counter -ListSet Memory).Paths | Where-Object { $_ -like "*Cache*" } @@ -659,4 +662,4 @@ In PowerShell 7, when using the **ListSet** parameter, `Get-Counter` can't retri [Start-Job](../Microsoft.PowerShell.Core/Start-Job.md) -[Where-Object](..//Microsoft.PowerShell.Core/Where-Object.md) +[Where-Object](../Microsoft.PowerShell.Core/Where-Object.md) diff --git a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md index 119e5cdc8cc2..cf8d9f6aa6e8 100644 --- a/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md +++ b/reference/7.5/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md @@ -151,9 +151,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 @@ -196,17 +196,18 @@ 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 This command only gets event logs on the local computer that contain events. It's possible for a log's **RecordCount** to be null or zero. The example uses the `$_` variable. For more information, -see [about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md). +see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). ```powershell Get-WinEvent -ListLog * -ComputerName localhost | Where-Object { $_.RecordCount } @@ -233,7 +234,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' @@ -345,7 +347,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 @@ -505,7 +508,7 @@ is required. ```powershell Get-WinEvent -Path 'C:\Tracing\TraceLog.etl' -Oldest | - Sort-Object -Property TimeCreated -Descending | + Sort-Object -Property TimeCreated -Descending | Select-Object -First 100 ``` @@ -526,7 +529,7 @@ 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' } + Where-Object { $_.Id -eq '403' } ``` The `Get-WinEvent` cmdlet gets log information from the archived files. The **Path** parameter uses @@ -573,8 +576,9 @@ Get-WinEvent -LogName 'Windows PowerShell' -FilterXPath $XPath This example uses the **FilterHashtable** parameter to get events from the **Application** log. The hash table uses **key/value** pairs. For more information about the **FilterHashtable** parameter, -see [Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/Creating-Get-WinEvent-queries-with-FilterHashtable). -For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/about/about_hash_tables.md). +see [Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/creating-get-winevent-queries-with-filterhashtable). +For more information about hash tables, see +[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md). ```powershell $Date = (Get-Date).AddDays(-2) @@ -739,8 +743,9 @@ Help. Use an XML query to create a complex query that contains several XPath statements. The XML format also allows you to use a **Suppress XML** element that excludes events from the query. For more -information about the XML schema for event log queries, see [Query Schema](/windows/win32/wes/queryschema-schema) -and the XML Event Queries section of [Event Selection](/previous-versions/aa385231(v=vs.85)). +information about the XML schema for event log queries, see +[Query Schema](/windows/win32/wes/queryschema-schema) and the XML Event Queries section of +[Event Selection](/previous-versions/aa385231(v=vs.85)). You may also create a **Suppress** element using the **FilterHashtable** parameter. @@ -760,7 +765,8 @@ Accept wildcard characters: False Specifies an XPath query that this cmdlet select events from one or more logs. -For more information about the XPath language, see [XPath Reference](/previous-versions/dotnet/netframework-4.0/ms256115(v=vs.100)) +For more information about the XPath language, see +[XPath Reference](/previous-versions/dotnet/netframework-4.0/ms256115(v=vs.100)) and the Selection Filters section of [Event Selection](/previous-versions/aa385231(v=vs.85)). ```yaml @@ -841,8 +847,8 @@ cmdlet. > [!NOTE] > PowerShell does not limit the amount of logs you can request. However, the `Get-WinEvent` cmdlet > queries the Windows API which has a limit of 256. This can make it difficult to filter through all -> of your logs at one time. You can work around this by using a `foreach` loop to iterate through each -> log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.LogName }` +> of your logs at one time. You can work around this by using a `foreach` loop to iterate through +> each log like this: `Get-WinEvent -ListLog * | ForEach-Object{ Get-WinEvent -LogName $_.LogName }` ```yaml Type: System.String[] @@ -939,7 +945,8 @@ Accept wildcard characters: True 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 @@ -980,13 +987,13 @@ Environment (Windows PE). ## RELATED LINKS -[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md) +[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md) -[about_Foreach](../Microsoft.PowerShell.Core/about/about_Foreach.md) +[about_Foreach](../Microsoft.PowerShell.Core/About/about_Foreach.md) -[about_Hash_Tables](../Microsoft.PowerShell.Core/about/about_hash_tables.md) +[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md) -[Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/Creating-Get-WinEvent-queries-with-FilterHashtable) +[Creating Get-WinEvent queries with FilterHashtable](/powershell/scripting/samples/creating-get-winevent-queries-with-filterhashtable) [Format-Table](../Microsoft.PowerShell.Utility/Format-Table.md) diff --git a/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md index 3b4b5d5f4c4a..4510a4b416b2 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Add-Content.md @@ -159,8 +159,7 @@ 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. @@ -235,7 +234,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. @@ -429,8 +428,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 3716aebfc926..c23cab9eb445 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Clear-Item.md @@ -18,15 +18,15 @@ 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 @@ -180,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[] @@ -247,10 +248,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.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md index a09e71d807e5..c201f8d06ef1 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Clear-ItemProperty.md @@ -90,11 +90,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 @@ -153,7 +155,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[] @@ -253,10 +256,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.5/Microsoft.PowerShell.Management/Copy-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Copy-Item.md index 4f9c356f0eca..3ffa62fab2e0 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Copy-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Copy-Item.md @@ -118,7 +118,11 @@ operation, the command changes the item name from `Get-Widget.ps1` to `Get-Widge can be safely attached to email messages. ```powershell -Copy-Item "\\Server01\Share\Get-Widget.ps1" -Destination "\\Server12\ScriptArchive\Get-Widget.ps1.txt" +$copyParams = @{ + Path = "\\Server01\Share\Get-Widget.ps1" + Destination = "\\Server12\ScriptArchive\Get-Widget.ps1.txt" +} +Copy-Item @copyParams ``` ### Example 5: Copy a file to a remote computer @@ -176,7 +180,12 @@ The `Copy-Item` cmdlet copies `scriptingexample.ps1` from the `D:\Folder004` fol ```powershell $Session = New-PSSession -ComputerName "Server04" -Credential "Contoso\User01" -Copy-Item "D:\Folder004\scriptingexample.ps1" -Destination "C:\Folder004_Copy\scriptingexample_copy.ps1" -ToSession $Session +$copyParams = @{ + Path = "D:\Folder004\scriptingexample.ps1" + Destination = "C:\Folder004_Copy\scriptingexample_copy.ps1" + ToSession = $Session +} +Copy-Item @copyParams ``` ### Example 9: Copy a remote file to the local computer @@ -221,7 +230,13 @@ copied with their file trees intact. ```powershell $Session = New-PSSession -ComputerName "Server01" -Credential "Contoso\User01" -Copy-Item "C:\MyRemoteData\scripts" -Destination "D:\MyLocalData\scripts" -FromSession $Session -Recurse +$copyParams = @{ + Path = "C:\MyRemoteData\scripts" + Destination = "D:\MyLocalData\scripts" + FromSession = $Session + Recurse = $true +} +Copy-Item @copyParams ``` ### Example 12: Recursively copy files from a folder tree into the current folder @@ -536,7 +551,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.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md index 46e1732e1246..ab93449ce631 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Copy-ItemProperty.md @@ -26,9 +26,9 @@ Copy-ItemProperty [-Path] [-Name] [-Destination] [- ### 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 @@ -46,7 +46,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 @@ -108,11 +113,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 @@ -172,7 +179,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 +279,11 @@ 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.5/Microsoft.PowerShell.Management/Debug-Process.md b/reference/7.5/Microsoft.PowerShell.Management/Debug-Process.md index 42991a6b44c9..b10d78b6e489 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Debug-Process.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Debug-Process.md @@ -238,7 +238,7 @@ This cmdlet returns no output. This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see -[AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library. +[AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in Microsoft Learn. ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-ChildItem.md b/reference/7.5/Microsoft.PowerShell.Management/Get-ChildItem.md index 7ea98df8fbdd..eef880f55ba7 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-ChildItem.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-ChildItem.md @@ -11,7 +11,6 @@ title: Get-ChildItem # Get-ChildItem ## SYNOPSIS - Gets the items and child items in one or more specified locations. ## SYNTAX @@ -124,7 +123,7 @@ as follows: - `s` (system) For more information about the mode flags, see -[about_Filesystem_Provider](../microsoft.powershell.core/about/about_filesystem_provider.md#attributes-flagsexpression). +[about_Filesystem_Provider](../Microsoft.PowerShell.Core/About/about_Filesystem_Provider.md#attributes-flagsexpression). ### Example 2: Get child item names in a directory @@ -346,8 +345,8 @@ authority. Get-ChildItem -Path Cert:\* -Recurse -CodeSigningCert ``` -For more information about the Certificate provider and the `Cert:` drive, -see [about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md). +For more information about the Certificate provider and the `Cert:` drive, see +[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md). ### Example 8: Get items using the Depth parameter @@ -437,7 +436,7 @@ filesystem object returned by `Get-ChildItem` and is displayed in the default ou ```powershell PS D:\> New-Item -ItemType Junction -Name tmp -Target $env:TEMP -PS D:\> Get-ChildItem | Select-Object name,LinkTarget +PS D:\> Get-ChildItem | Select-Object name, LinkTarget Name LinkTarget ---- ---------- @@ -508,7 +507,8 @@ The **Attributes** parameter supports the following properties: - **System** - **Temporary** -For a description of these attributes, see the [FileAttributes Enumeration](/dotnet/api/system.io.fileattributes). +For a description of these attributes, see the [FileAttributes](xref:System.IO.FileAttributes) +enumeration. To combine attributes, use the following operators: @@ -863,7 +863,8 @@ typed. No characters are interpreted as wildcards. If the path includes escape c it in single quotation marks. Single quotation marks tell PowerShell to not 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[] @@ -1074,7 +1075,7 @@ providers available in your session, type `Get-PSProvider`. For more information [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md) -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md) +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md) [about_Registry_Provider](../Microsoft.PowerShell.Core/About/about_Registry_Provider.md) diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md index 70befdee0283..ef9a7de07a09 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md @@ -50,7 +50,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 ``` @@ -129,7 +131,8 @@ to create sample content in a file named `Stream.txt`. ```powershell Set-Content -Path .\Stream.txt -Value 'This is the content of the Stream.txt file' -# Specify a wildcard to the Stream parameter to display all streams of the recently created file. +# Specify a wildcard to the Stream parameter to display all streams of the recently +# created file. Get-Item -Path .\Stream.txt -Stream * ``` @@ -168,7 +171,8 @@ This is the content of the Stream.txt file ``` ```powershell -# Use the Stream parameter of Add-Content to create a new Stream containing sample content. +# Use the Stream parameter of Add-Content to create a new Stream containing sample +# content. $addContentSplat = @{ Path = '.\Stream.txt' Stream = 'NewStream' @@ -212,7 +216,7 @@ Added a stream named NewStream to Stream.txt ``` The **Stream** parameter is a dynamic parameter of the -[FileSystem provider](../microsoft.powershell.core/about/about_filesystem_provider.md#stream-string). +[FileSystem provider](../Microsoft.PowerShell.Core/About/about_Filesystem_Provider.md#stream-string). By default `Get-Content` only retrieves data from the default, or `:$DATA` stream. **Streams** can be used to store hidden data such as attributes, security settings, or other data. They can also be stored on directories without being child items. @@ -374,7 +378,7 @@ This parameter is available only in file system drives. 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. @@ -486,7 +490,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/Get-HotFix.md b/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md index c5e0a4edaaf9..2f0dfe15bc2d 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-HotFix.md @@ -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 @@ -216,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-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Item.md index 60432161f271..e483e8b1b3fb 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Item.md @@ -170,7 +170,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 @@ -441,7 +442,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.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md index c34c7ce53118..bf49c8478f7c 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md @@ -18,15 +18,15 @@ 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 @@ -39,8 +39,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 @@ -70,7 +70,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 @@ -140,11 +140,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 @@ -185,7 +187,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[] @@ -234,10 +237,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 @@ -249,8 +252,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.5/Microsoft.PowerShell.Management/Get-Service.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md index 5015a7184dd4..2285cb505033 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Service.md @@ -71,8 +71,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*" @@ -106,10 +106,10 @@ Status is only one property of service objects. To see all of the properties, ty This example gets services that have dependent services. ```powershell -Get-Service | - Where-Object {$_.DependentServices} | +Get-Service | Where-Object {$_.DependentServices} | Format-List -Property Name, DependentServices, @{ - Label="NoOfDependentServices"; Expression={$_.DependentServices.Count} + Label="NoOfDependentServices" + Expression={$_.DependentServices.Count} } ``` @@ -138,7 +138,7 @@ This example shows that when you sort services in ascending order by the value o property, stopped services appear before running services. This happens because the value of **Status** is an enumeration, in which `Stopped` has a value of `1`, and `Running` has a value of `4`. For more information, see -[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus). +[ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus). To list running services first, use the **Descending** parameter of the `Sort-Object` cmdlet. @@ -360,8 +360,7 @@ When you sort in ascending order by status value, `Stopped` services appear befo services. The **Status** property of a service is an enumerated value in which the names of the statuses represent integer values. The sort is based on the integer value, not the name. `Running` appears before `Stopped` because `Stopped` has a value of `1`, and `Running` has a value of `4`. For -more information, see -[ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus). +more information, see [ServiceControllerStatus](xref:System.ServiceProcess.ServiceControllerStatus). ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md b/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md index d2b3a8a28a55..935d98778d14 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Invoke-Item.md @@ -147,7 +147,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[] @@ -216,7 +217,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.5/Microsoft.PowerShell.Management/Join-Path.md b/reference/7.5/Microsoft.PowerShell.Management/Join-Path.md index f6873c7aecad..09c325a8808e 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Join-Path.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Join-Path.md @@ -29,7 +29,7 @@ The provider supplies the path delimiters. ### Example 1: Combine a path with a child path ```powershell -PS C:\> Join-Path -Path "path" -ChildPath "childpath" +Join-Path -Path "path" -ChildPath "childpath" ``` ```output @@ -44,7 +44,7 @@ the paths. ### Example 2: Combine paths that already contain directory separators ```powershell -PS C:\> Join-Path -Path "path\" -ChildPath "\childpath" +Join-Path -Path "path\" -ChildPath "\childpath" ``` ```output @@ -103,7 +103,7 @@ This command uses `Join-Path` to combine multiple path roots with a child path. ### Example 6: Combine the roots of a file system drive with a child path ```powershell -Get-PSDrive -PSProvider filesystem | ForEach-Object {$_.root} | Join-Path -ChildPath "Subdir" +Get-PSDrive -PSProvider filesystem | ForEach-Object {$_.Root} | Join-Path -ChildPath "Subdir" ``` ```output @@ -111,8 +111,8 @@ C:\Subdir D:\Subdir ``` -This command combines the roots of each PowerShell file system drive in the console with the `Subdir` -child path. +This command combines the roots of each PowerShell file system drive in the console with the +`Subdir` child path. The command uses the `Get-PSDrive` cmdlet to get the PowerShell drives supported by the FileSystem provider. The `ForEach-Object` statement selects only the **Root** property of the **PSDriveInfo** diff --git a/reference/7.5/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.md b/reference/7.5/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.md index 5fc6df0a4b3e..4cedaebce1e7 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Microsoft.PowerShell.Management.md @@ -60,7 +60,8 @@ Gets the items and child items in one or more specified locations. ### [Get-Clipboard](Get-Clipboard.md) -Gets the contents of the clipboard. [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path. +Gets the contents of the clipboard. +[!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path. ### [Get-ComputerInfo](Get-ComputerInfo.md) diff --git a/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md b/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md index 603ded06936e..19432ea1e3c5 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Move-ItemProperty.md @@ -18,17 +18,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 @@ -46,7 +46,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" +$moveParams = @{ + Path = "HKLM:\Software\MyCompany\MyApp" + Name = "Version" + Destination = "HKLM:\Software\MyCompany\NewApp" +} +Move-ItemProperty @moveParams ``` ## PARAMETERS @@ -108,11 +113,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 @@ -128,9 +135,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 @@ -171,7 +178,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[] @@ -270,10 +278,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 @@ -300,7 +308,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.5/Microsoft.PowerShell.Management/New-Item.md b/reference/7.5/Microsoft.PowerShell.Management/New-Item.md index d67d2f066969..1991cbb25341 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/New-Item.md +++ b/reference/7.5/Microsoft.PowerShell.Management/New-Item.md @@ -108,7 +108,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 @@ -218,10 +219,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 `-Force`. 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 the **Force** parameter. +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' @@ -240,9 +241,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