diff --git a/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md b/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md index 301b101234f..9a4ef503036 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md @@ -17,21 +17,22 @@ Encrypts content by using the Cryptographic Message Syntax format. ### ByContent (Default) ``` -Protect-CmsMessage [-To] [-Content] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-Content] + [[-OutFile] ] [] ``` ### ByPath ``` -Protect-CmsMessage [-To] [-Path] [[-OutFile] ] [] +Protect-CmsMessage [-To] [-Path] [[-OutFile] ] + [] ``` ### ByLiteralPath ``` -Protect-CmsMessage [-To] [-LiteralPath] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-LiteralPath] + [[-OutFile] ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Security/Set-Acl.md b/reference/5.1/Microsoft.PowerShell.Security/Set-Acl.md index 9a45ea7c458..fcdc168103a 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Set-Acl.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Set-Acl.md @@ -18,24 +18,25 @@ Changes the security descriptor of a specified item, such as a file or a registr ### ByPath (Default) ``` -Set-Acl [-Path] [-AclObject] [[-CentralAccessPolicy] ] [-ClearCentralAccessPolicy] - [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [-UseTransaction] [] +Set-Acl [-Path] [-AclObject] [[-CentralAccessPolicy] ] + [-ClearCentralAccessPolicy] [-PassThru] [-Filter ] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ### ByInputObject ``` -Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [-UseTransaction] [] +Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [-UseTransaction] + [] ``` ### ByLiteralPath ``` Set-Acl -LiteralPath [-AclObject] [[-CentralAccessPolicy] ] - [-ClearCentralAccessPolicy] [-PassThru] [-Filter ] [-Include ] [-Exclude ] - [-WhatIf] [-Confirm] [-UseTransaction] [] + [-ClearCentralAccessPolicy] [-PassThru] [-Filter ] [-Include ] + [-Exclude ] [-WhatIf] [-Confirm] [-UseTransaction] [] ``` ## DESCRIPTION @@ -129,20 +130,20 @@ Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl These commands disable access inheritance from parent folders, while still preserving the existing inherited access rules. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. Next, variables are created to convert the inherited access rules to explicit access rules. To protect the access rules associated with this from inheritance, set the `$isProtected` variable to `$true`. To allow inheritance, set `$isProtected` to `$false`. For more information, see -[set access rule protection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection). +[set access rule protection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A). Set the `$preserveInheritance` variable to `$true` to preserve inherited access rules or `$false` to remove inherited access rules. Then the access rule protection is updated using the **SetAccessRuleProtection()** method. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the ACLs of the Dog.txt that were inherited from the Pets folder will be applied directly -to Dog.txt, and new access policies added to Pets will not change the access to Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor to `Dog.txt`. When the command +completes, the ACLs of the `Dog.txt` that were inherited from the Pets folder will be applied directly +to `Dog.txt`, and new access policies added to Pets will not change the access to `Dog.txt`. ### Example 5: Grant Administrators Full Control of the file @@ -154,29 +155,33 @@ $fileSystemRights = "FullControl" $type = "Allow" # Create new rule $fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type -$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList +$newParams = @{ + TypeName = 'System.Security.AccessControl.FileSystemAccessRule' + ArgumentList = $fileSystemAccessRuleArgumentList +} +$fileSystemAccessRule = New-Object @newParams # Apply new rule $NewAcl.SetAccessRule($fileSystemAccessRule) Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl ``` -This command will grant the **BUILTIN\Administrators** group Full control of the Dog.txt file. +This command will grant the **BUILTIN\Administrators** group Full control of the `Dog.txt` file. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -Next variables are created to grant the **BUILTIN\Administrators** group full control of the Dog.txt -file. The `$identity` variable set to the name of a -[user account](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor). The +Next variables are created to grant the **BUILTIN\Administrators** group full control of the +`Dog.txt` file. The `$identity` variable set to the name of a +[user account](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A). The `$fileSystemRights` variable set to FullControl, and can be any one of the -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) values that specifies -the type of operation associated with the access rule. The `$type` variable set to "Allow" to -specifies whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable -is an argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) values that specifies the +type of operation associated with the access rule. The `$type` variable set to "Allow" to specifies +whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable is an +argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new **FileSystemAccessRule** object is created, and the **FileSystemAccessRule** object is passed to the **SetAccessRule()** method, adds the new access rule. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the **BUILTIN\Administrators** group will have full control of the Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor of to `Dog.txt`. When the command +completes, the **BUILTIN\Administrators** group will have full control of the `Dog.txt`. ## PARAMETERS @@ -364,7 +369,7 @@ Changes the security descriptor of the specified item. Enter the path to an item a file or registry key. Wildcards are permitted. If you pass a security object to `Set-Acl` (either by using the **AclObject** or -**SecurityDescriptor** parameters or by passing a security object from Get-Acl to `Set-Acl`), and +**SecurityDescriptor** parameters or by passing a security object from `Get-Acl` to `Set-Acl`), and you omit the **Path** parameter (name and value), `Set-Acl` uses the path that is included in the security object. @@ -467,8 +472,8 @@ can use it to change the security descriptors of files, directories, and registr [Get-Acl](Get-Acl.md) -[FileSystemAccessRule](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor) +[FileSystemAccessRule](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A) -[ObjectSecurity.SetAccessRuleProtection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection) +[ObjectSecurity.SetAccessRuleProtection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A) -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) diff --git a/reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md b/reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md index ccdb1928542..8913f001cc6 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md @@ -18,14 +18,15 @@ Sets the PowerShell execution policies for Windows computers. ### All ``` -Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] [-Force] - [-WhatIf] [-Confirm] [] +Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION The `Set-ExecutionPolicy` cmdlet changes PowerShell execution policies for Windows computers. For -more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). +more information, see +[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md). An execution policy is part of the PowerShell security strategy. Execution policies determine whether you can load configuration files, such as your PowerShell profile, or run scripts. And, diff --git a/reference/5.1/Microsoft.PowerShell.Security/Test-FileCatalog.md b/reference/5.1/Microsoft.PowerShell.Security/Test-FileCatalog.md index e1729fe342f..ba237db5bce 100644 --- a/reference/5.1/Microsoft.PowerShell.Security/Test-FileCatalog.md +++ b/reference/5.1/Microsoft.PowerShell.Security/Test-FileCatalog.md @@ -19,8 +19,8 @@ This cmdlet is only supported on Windows. ## SYNTAX ``` -Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-Path] ] - [-WhatIf] [-Confirm] [] +Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] + [[-Path] ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -28,7 +28,7 @@ Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-To] ] [-IncludeC ### ByLiteralPath ``` -Unprotect-CmsMessage [-LiteralPath] [[-To] ] [-IncludeContext] - [] +Unprotect-CmsMessage [-LiteralPath] [[-To] ] + [-IncludeContext] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Add-Type.md b/reference/5.1/Microsoft.PowerShell.Utility/Add-Type.md index 8a5ad59a88c..eb9ff24ae81 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Add-Type.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Add-Type.md @@ -731,7 +731,7 @@ Otherwise, the command fails. The **CodeDomProvider** class for some languages, such as IronPython and J#, doesn't generate output. As a result, types written in these languages can't be used with `Add-Type`. -This cmdlet is based on the Microsoft .NET Framework [CodeDomProvider Class](/dotnet/api/system.codedom.compiler.codedomprovider). +This cmdlet is based on the Microsoft .NET Framework [CodeDomProvider Class](xref:System.CodeDom.Compiler.CodeDomProvider). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Clear-Variable.md b/reference/5.1/Microsoft.PowerShell.Utility/Clear-Variable.md index 48614fe925d..0a7f358990a 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Clear-Variable.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Clear-Variable.md @@ -18,8 +18,8 @@ Deletes the value of a variable. ## SYNTAX ``` -Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-PassThru] - [-Scope ] [-WhatIf] [-Confirm] [] +Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -165,7 +165,8 @@ The acceptable values for this parameter are: - `Script` You can also use a number relative to the current scope (0 through the number of scopes, where 0 is -the current scope and 1 is its parent). Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +the current scope and 1 is its parent). Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -215,7 +216,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -236,7 +238,7 @@ the cleared variable. ## NOTES -Windows PowerShell includes the following aliases for `Clear-Variable`: +PowerShell includes the following aliases for `Clear-Variable`: - `clv` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 440cd3aaa96..5f1edb60ddf 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -26,7 +26,8 @@ ConvertFrom-Csv [-InputObject] [[-Delimiter] ] [-Header -UseCulture [-Header ] [] +ConvertFrom-Csv [-InputObject] -UseCulture [-Header ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md index f99a4fbb8cd..64418205ac9 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md @@ -84,7 +84,8 @@ that can be managed in PowerShell. ```powershell # Ensures that Invoke-WebRequest uses TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | ConvertFrom-Json +$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | + ConvertFrom-Json ``` You can also use the `Invoke-RestMethod` cmdlet, which automatically converts JSON content to @@ -147,7 +148,7 @@ You can pipe a JSON string to `ConvertFrom-Json`. ## NOTES The `ConvertFrom-Json` cmdlet is implemented using the -[JavaScriptSerializer class](/dotnet/api/system.web.script.serialization.javascriptserializer). +[JavaScriptSerializer class](xref:System.Web.Script.Serialization.JavaScriptSerializer). The **PSObject** type maintains the order of the properties as presented in the JSON string. While the key-value pairs are added to the **Hashtable** in the order presented in the JSON string, diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index 4d1a7be9232..ffc7923a087 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -53,7 +53,7 @@ ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. @@ -64,18 +64,29 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry ```powershell $acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\ +ConvertFrom-SddlString -Sddl $acl.Sddl | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -ConvertFrom-SddlString -Sddl $acl.Sddl | ForEach-Object {$_.DiscretionaryAcl[0]} - -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, +FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, +TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +``` -ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | ForEach-Object {$_.DiscretionaryAcl[0]} +```powershell +ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, +EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, +ReadPermissions, SetValue, TakeOwnership, WriteKey) ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. @@ -92,11 +103,14 @@ $user = [adsi]"LDAP://CN=username,CN=Users,DC=domain,DC=com" ConvertFrom-SddlString $user.psbase.ObjectSecurity.Sddl -Type ActiveDirectoryRights ``` -The first command uses Active Directory Service Interfaces (ADSI) to get the user object and saves it in the variable. +The first command uses Active Directory Service Interfaces (ADSI) to get the user object and saves +it in the variable. -The second command uses the `ConvertFrom-SddlString` cmdlet to get text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. +The second command uses the `ConvertFrom-SddlString` cmdlet to get text representation of the SDDL +string, contained in the Sddl property of the object representing the security descriptor. -It uses the `-Type` parameter to specify that SDDL string represents an Active Directory security descriptor. +It uses the `-Type` parameter to specify that SDDL string represents an Active Directory security +descriptor. ## PARAMETERS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md index 943f69636df..5d80be96742 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md @@ -26,7 +26,8 @@ ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-NoTypeInformatio ### UseCulture ``` -ConvertTo-Csv [-InputObject] [-UseCulture] [-NoTypeInformation] [] +ConvertTo-Csv [-InputObject] [-UseCulture] [-NoTypeInformation] + [] ``` ## DESCRIPTION @@ -147,7 +148,7 @@ Accept wildcard characters: False ### -NoTypeInformation -Removes the **#TYPE** information header from the output. This parameter became the default in +Removes the `#TYPE` information header from the output. This parameter became the default in PowerShell 6.0 and is included for backwards compatibility. ```yaml diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md index 70901fcb7c6..3c65d6637fc 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md @@ -18,15 +18,16 @@ Converts .NET objects into HTML that can be displayed in a Web browser. ``` ConvertTo-Html [-InputObject ] [[-Property] ] [[-Body] ] - [[-Head] ] [[-Title] ] [-As ] [-CssUri ] [-PostContent ] - [-PreContent ] [] + [[-Head] ] [[-Title] ] [-As ] [-CssUri ] + [-PostContent ] [-PreContent ] [] ``` ### Fragment ``` -ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] [-Fragment] - [-PostContent ] [-PreContent ] [] +ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] + [-Fragment] [-PostContent ] [-PreContent ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md index 6093e0916dd..48e3990f08b 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md @@ -206,7 +206,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 @@ -223,7 +223,7 @@ This cmdlet returns a string representing the input object converted to a JSON s ## NOTES The `ConvertTo-Json` cmdlet is implemented using the -[JavaScriptSerializer class](/dotnet/api/system.web.script.serialization.javascriptserializer). +[JavaScriptSerializer class](xref:System.Web.Script.Serialization.JavaScriptSerializer). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md index 05456e82f40..c8e617fdd6b 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md @@ -16,8 +16,8 @@ Creates an XML-based representation of an object. ## SYNTAX ``` -ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] [-As ] - [] +ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] + [-As ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md b/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md index e60928f1028..6da48e1090f 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md @@ -20,13 +20,15 @@ Disables the breakpoints in the current console. ### Breakpoint (Default) ``` -Disable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm] [] +Disable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm] + [] ``` ### Id ``` -Disable-PSBreakpoint [-PassThru] [-Id] [-WhatIf] [-Confirm] [] +Disable-PSBreakpoint [-PassThru] [-Id] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -42,7 +44,7 @@ when you create them using the `Set-PSBreakpoint` cmdlet. A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see -[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md). +[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md). ## EXAMPLES diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md b/reference/5.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md index 2e57befc4da..0bc2c360a52 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md @@ -41,7 +41,8 @@ Disable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md b/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md index a3803f0d215..192d595ac59 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md @@ -20,14 +20,15 @@ Enables the breakpoints in the current console. ### Id (Default) ``` -Enable-PSBreakpoint [-PassThru] [-Id] [-WhatIf] [-Confirm] [] +Enable-PSBreakpoint [-PassThru] [-Id] [-WhatIf] [-Confirm] + [] ``` ### Breakpoint ``` -Enable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm] - [] +Enable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md b/reference/5.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md index 330b736b74c..96b6b3ddb10 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md @@ -41,7 +41,8 @@ Enable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md index ebf255ddcdb..5b831ab6dac 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md @@ -20,17 +20,17 @@ Exports information about currently defined aliases to a file. ### ByPath (Default) ``` -Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] [-Append] - [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] + [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Alias -LiteralPath [[-Name] ] [-PassThru] [-As ] - [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias -LiteralPath [[-Name] ] [-PassThru] + [-As ] [-Append] [-Force] [-NoClobber] [-Description ] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,52 +47,52 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "alias.csv" +Export-Alias -Path Alias.csv ``` -This command exports current alias information to a file named Alias.csv in the current directory. +This command exports current alias information to a file named `Alias.csv` in the current directory. ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "alias.csv" -NoClobber +Export-Alias -Path Alias.csv -NoClobber ``` -This command exports the aliases in the current session to an Alias.csv file. +This command exports the aliases in the current session to an `Alias.csv` file. -Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already +Because the **NoClobber** parameter is specified, the command will fail if an `Alias.csv` file already exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path Alias.csv -Append -Description "Appended Aliases" -Force ``` -This command appends the aliases in the current session to the Alias.csv file. +This command appends the aliases in the current session to the `Alias.csv` file. The command uses the **Description** parameter to add a description to the comments at the top of the file. -The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if +The command also uses the **Force** parameter to overwrite any existing `Alias.csv` files, even if they have the read-only attribute. ### Example 4: Export aliases as a script ```powershell -Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) +Export-Alias -Path Alias.ps1 -As Script +Add-Content -Path $PROFILE -Value (Get-Content Alias.ps1) $S = New-PSSession -ComputerName Server01 -Invoke-Command -Session $S -FilePath .\alias.ps1 +Invoke-Command -Session $S -FilePath .\Alias.ps1 ``` This example shows how to use the script file format that `Export-Alias` generates. -The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As** +The first command exports the aliases in the session to the `Alias.ps1` file. It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias. -The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. +The second command adds the aliases in the `Alias.ps1` file to the CurrentUser-CurrentHost profile. The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see @@ -196,7 +196,7 @@ to interpret any characters as escape sequences. ```yaml Type: System.String Parameter Sets: ByLiteralPath -Aliases: PSPath +Aliases: PSPath, LP Required: True Position: Named @@ -365,7 +365,7 @@ the alias. ## NOTES -Windows PowerShell includes the following aliases for `Export-Alias`: +PowerShell includes the following aliases for `Export-Alias`: - `epal` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md index 125d17dd373..a2d57de0af1 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -18,15 +18,15 @@ Creates an XML-based representation of an object or objects and stores it in a f ### ByPath (Default) ``` -Export-Clixml [-Path] -InputObject [-Depth ] [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Path] -InputObject [-Depth ] [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Clixml -LiteralPath -InputObject [-Depth ] [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml -LiteralPath -InputObject [-Depth ] [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md index 29cdca82065..6748a978cb9 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md @@ -22,17 +22,17 @@ file. ### Delimiter (Default) ``` -Export-Csv [[-Path] ] [[-Delimiter] ] -InputObject [-LiteralPath ] - [-Force] [-NoClobber] [-Encoding ] [-Append] [-NoTypeInformation] [-WhatIf] [-Confirm] - [] +Export-Csv [[-Path] ] [[-Delimiter] ] -InputObject + [-LiteralPath ] [-Force] [-NoClobber] [-Encoding ] [-Append] + [-NoTypeInformation] [-WhatIf] [-Confirm] [] ``` ### UseCulture ``` -Export-Csv [[-Path] ] -InputObject [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [-UseCulture] [-NoTypeInformation] [-WhatIf] [-Confirm] - [] +Export-Csv [[-Path] ] -InputObject [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [-UseCulture] [-NoTypeInformation] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -178,13 +178,13 @@ This example describes how to export objects to a CSV file and use the **Append* objects to an existing file. ```powershell -$AppService = Get-Service -DisplayName *Application* | +$AppService = Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status $AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation Get-Content -Path .\Services.Csv -$WinService = Get-Service -DisplayName *Windows* | +$WinService = Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status $WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append @@ -226,7 +226,7 @@ unexpected output is received, troubleshoot the pipeline syntax. ```powershell Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear | Export-Csv -Path .\DateTime.csv -NoTypeInformation - + Get-Content -Path .\DateTime.csv ``` diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-FormatData.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-FormatData.md index bfca8c8976a..0d083107644 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-FormatData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-FormatData.md @@ -17,26 +17,26 @@ Saves formatting data from the current session in a formatting file. ### ByPath (Default) ``` -Export-FormatData -InputObject -Path [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -Path [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ### ByLiteralPath ``` -Export-FormatData -InputObject -LiteralPath [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -LiteralPath [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ## DESCRIPTION -The `Export-FormatData` cmdlet creates Windows PowerShell formatting files (`format.ps1xml`) from -the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that +The `Export-FormatData` cmdlet creates PowerShell formatting files (`format.ps1xml`) from the +formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that `Get-FormatData` returns and saves them in a file in XML format. -Windows PowerShell uses the data in formatting files (`format.ps1xml`) to generate the default -display of Microsoft .NET Framework objects in the session. You can view and edit the formatting -files and use the Update-FormatData cmdlet to add the formatting data to a session. +PowerShell uses the data in formatting files (`format.ps1xml`) to generate the default display of +Microsoft .NET Framework objects in the session. You can view and edit the formatting files and +use the Update-FormatData cmdlet to add the formatting data to a session. For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md index c7a3532417e..bdcbb8acd22 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -68,8 +68,24 @@ formatting data into the Server01 module. This example exports all of the `Get` and `Set` commands from a server. ```powershell -$S = New-PSSession -ConnectionUri https://exchange.microsoft.com/mailbox -Credential exchangeadmin01@hotmail.com -Authentication Negotiate -Export-PSSession -Session $S -Module exch* -CommandName Get-*, Set-* -FormatTypeName * -OutputModule $PSHOME\Modules\Exchange -Encoding ascii +$credential = Get-Credential -UserName 'exchangeadmin01@contoso.com' -Message 'Enter Exchange credentials' +$newSession = @{ + ConnectionUri = 'https://exchange.microsoft.com/mailbox' + Credential = $credential + Authentication = 'Negotiate' +} +$S = New-PSSession @newSession + +$exportSession = @{ + Session = $S + Module = 'exch*' + CommandName = 'Get-*', 'Set-*' + FormatTypeName = '*' + OutputModule = "$PSHOME\Modules\Exchange" + Encoding = 'ascii' +} + +Export-PSSession @exportSession ``` These commands export the `Get` and `Set` commands from a Microsoft Exchange Server snap-in on a @@ -84,8 +100,22 @@ the local computer. The cmdlets from the module are added to the current session be used. ```powershell -$S = New-PSSession -ComputerName Server01 -Credential Server01\User01 -Export-PSSession -Session $S -OutputModule TestCmdlets -Type Cmdlet -CommandName *test* -FormatTypeName * +$credential = Get-Credential -UserName 'Server01\User01' -Message 'Enter credentials for Server01' +$newSession = @{ + ComputerName = 'Server01' + Credential = $credential +} +$S = New-PSSession @newSession + +$exportSession = @{ + Session = $S + OutputModule = 'TestCmdlets' + Type = 'Cmdlet' + CommandName = '*test*' + FormatTypeName = '*' +} +Export-PSSession @exportSession + Remove-PSSession $S Import-Module TestCmdlets Get-Help Test* @@ -263,7 +293,8 @@ The acceptable values for this parameter are as follows: (`$Env:PATH`). - `Filter` and `Function`: All PowerShell functions. - `Script` Script files accessible in the current session. -- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). +- `Workflow` A PowerShell workflow. For more information, see + [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). These values are defined as a flag-based enumeration. You can combine multiple values together to set multiple flags using this parameter. The values can be passed to the **CommandType** parameter diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md index c9e0bf97e42..c93e0c1f9f1 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md @@ -17,9 +17,9 @@ Uses a customized view to format the output. ## SYNTAX ``` -Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-Hex.md index 8f59e4bbf2b..823ed3524c0 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-Hex.md @@ -33,7 +33,8 @@ Format-Hex -LiteralPath [] ### ByInputObject ``` -Format-Hex -InputObject [-Encoding ] [-Raw] [] +Format-Hex -InputObject [-Encoding ] [-Raw] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md index 32437f1eb75..2089f7d95ed 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md @@ -17,9 +17,9 @@ Formats the output as a list of properties in which each property appears on a n ## SYNTAX ``` -Format-List [[-Property] ] [-GroupBy ] [-View ] [-ShowError] - [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-List [[-Property] ] [-GroupBy ] [-View ] + [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md index be4d5776778..f9ef96e5333 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md @@ -17,9 +17,9 @@ Formats objects as a wide table that displays only one property of each object. ## SYNTAX ``` -Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Alias.md index 6962d479e50..94a93258777 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Alias.md @@ -20,13 +20,15 @@ Gets the aliases for the current session. ### Default (Default) ``` -Get-Alias [[-Name] ] [-Exclude ] [-Scope ] [] +Get-Alias [[-Name] ] [-Exclude ] [-Scope ] + [] ``` ### Definition ``` -Get-Alias [-Exclude ] [-Scope ] [-Definition ] [] +Get-Alias [-Exclude ] [-Scope ] [-Definition ] + [] ``` ## DESCRIPTION @@ -182,7 +184,8 @@ are: - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -`Local` is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +`Local` is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -200,7 +203,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md index 9ca2132c972..d49ea4ac30d 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md @@ -18,17 +18,17 @@ Gets the current date and time. ### net (Default) ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [] ``` ### UFormat ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-UFormat ] [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-UFormat ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md index a63782e2038..598a0b6f284 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md @@ -16,7 +16,8 @@ Gets the formatting data in the current session. ## SYNTAX ``` -Get-FormatData [[-TypeName] ] [-PowerShellVersion ] [] +Get-FormatData [[-TypeName] ] [-PowerShellVersion ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Host.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Host.md index 8a49d29cacc..c8f11471abe 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Host.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Host.md @@ -255,7 +255,8 @@ in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variab objects that the CurrentCulture and CurrentUICulture properties of the host object contain. You can use these features interchangeably. -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). ## RELATED LINKS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md index 23f33a2b434..d6e428ea0a5 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md @@ -41,7 +41,8 @@ Get-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-TraceSource.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-TraceSource.md index b52969ed0f8..adece32cb70 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-TraceSource.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-TraceSource.md @@ -69,7 +69,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 diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-TypeData.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-TypeData.md index ea821162b01..56c7946f4de 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-TypeData.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-TypeData.md @@ -99,9 +99,9 @@ else { The command uses the `Get-TypeData` cmdlet to get the extended type data for the **System.DataTime** type. The command gets the **Members** property of the **TypeData** object. -The **Members** property contains a hash table of properties and methods that are defined by extended -type data. Each key in the Members hash table is a property or method name and each value is the -definition of the property or method value. +The **Members** property contains a hash table of properties and methods that are defined by +extended type data. Each key in the Members hash table is a property or method name and each value +is the definition of the property or method value. The command gets the **DateTime** key in **Members** and its **GetScriptBlock** property value. diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Get-Variable.md b/reference/5.1/Microsoft.PowerShell.Utility/Get-Variable.md index 7b891f692e9..f5a3368c3de 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Get-Variable.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Get-Variable.md @@ -18,8 +18,8 @@ Gets the variables in the current console. ## SYNTAX ``` -Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] [-Scope ] - [] +Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] + [-Scope ] [] ``` ## DESCRIPTION @@ -168,7 +168,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS @@ -180,7 +181,7 @@ You can pipe a string that contains the variable name to this cmdlet. ### System.Management.Automation.PSVariable -By default, this cmdlet returns a **AutomationPSVariable** object for each variable that it gets. +By default, this cmdlet returns an **AutomationPSVariable** object for each variable that it gets. The object type depends on the variable. ### System.Object[] diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-Alias.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-Alias.md index e5126c5c94d..3aeda8a03d7 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-Alias.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-Alias.md @@ -20,22 +20,24 @@ Imports an alias list from a file. ### ByPath (Default) ``` -Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` -Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] +Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION The `Import-Alias` cmdlet imports an alias list from a file. -Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite existing aliases by default. -To overwrite an existing alias, after assuring that the contents of the alias file is safe, use the **Force** parameter. +Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite +existing aliases by default. To overwrite an existing alias, after assuring that the contents of the +alias file is safe, use the **Force** parameter. ## EXAMPLES @@ -47,16 +49,22 @@ Import-Alias test.txt This command imports alias information from a file named test.txt. +### Example 2: Get a list of defined aliases and their options + +Use the following command to display information about the currently-defined aliases: + +```powershell +Get-Alias | Select-Object Name, Options +``` + +If the corresponding alias is read-only, it will be displayed in the value of the **Options** +property. + ## PARAMETERS ### -Force Allows the cmdlet to import an alias that is already defined or is read only. -You can use the following command to display information about the currently-defined aliases: - -`Get-Alias | Select-Object Name, Options` - -If the corresponding alias is read-only, it will be displayed in the value of the **Options** property. ```yaml Type: System.Management.Automation.SwitchParameter @@ -72,11 +80,10 @@ Accept wildcard characters: False ### -LiteralPath -Specifies the path to a file that includes exported alias information. -Unlike the **Path** parameter, the value of the **LiteralPath** parameter 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 a file that includes exported alias information. Unlike the **Path** +parameter, the value of the **LiteralPath** parameter 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 @@ -132,7 +139,8 @@ The acceptable values for this parameter are: - Global - Local - Script -- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) +- A number relative to the current scope (0 through the number of scopes, where 0 is the current + scope and 1 is its parent) The default is Local. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). @@ -184,7 +192,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md index 6a8c3d54697..0be1cf133fe 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -25,8 +25,8 @@ Import-Clixml [-Path] [-IncludeTotalCount] [-Skip ] [-First < ### ByLiteralPath ``` -Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] [-First ] - [] +Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] + [-First ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md b/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md index 55dfdfaf5ac..c165d15edd7 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md @@ -21,15 +21,15 @@ Creates table-like custom objects from the items in a character-separated value ### Delimiter (Default) ``` -Import-Csv [[-Path] ] [[-Delimiter] ] [-LiteralPath ] [-Header ] - [-Encoding ] [] +Import-Csv [[-Path] ] [[-Delimiter] ] [-LiteralPath ] + [-Header ] [-Encoding ] [] ``` ### UseCulture ``` -Import-Csv [[-Path] ] -UseCulture [-LiteralPath ] [-Header ] - [-Encoding ] [] +Import-Csv [[-Path] ] -UseCulture [-LiteralPath ] + [-Header ] [-Encoding ] [] ``` ## DESCRIPTION diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md b/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md index 2e2b57c977c..1e1d5516c8f 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md @@ -217,7 +217,7 @@ Accept wildcard characters: False Indicates that the cmdlet counts the number of characters in the input objects. > [!NOTE] -> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across* +> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_ > input objects. See Example 7. ```yaml @@ -277,7 +277,7 @@ Accept wildcard characters: False Indicates that the cmdlet counts the number of lines in the input objects. > [!NOTE] -> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across* +> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_ > input objects. See Example 7. ```yaml @@ -362,7 +362,7 @@ Accept wildcard characters: False Indicates that the cmdlet counts the number of words in the input objects. > [!NOTE] -> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across* +> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_ > input objects. See Example 7. ```yaml @@ -381,7 +381,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/Get-PfxCertificate.md b/reference/7.4/Microsoft.PowerShell.Security/Get-PfxCertificate.md index 796d6e7338d..0cc561c73f8 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Get-PfxCertificate.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Get-PfxCertificate.md @@ -17,15 +17,15 @@ Gets information about PFX certificate files on the computer. ### ByPath (Default) ``` -Get-PfxCertificate [-FilePath] [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate [-FilePath] [-Password ] + [-NoPromptForPassword] [] ``` ### ByLiteralPath ``` -Get-PfxCertificate -LiteralPath [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate -LiteralPath [-Password ] + [-NoPromptForPassword] [] ``` ## DESCRIPTION @@ -169,4 +169,3 @@ certificate file is not password protected, the value of the **Authentication** [Get-AuthenticodeSignature](Get-AuthenticodeSignature.md) [Set-AuthenticodeSignature](Set-AuthenticodeSignature.md) - diff --git a/reference/7.4/Microsoft.PowerShell.Security/Protect-CmsMessage.md b/reference/7.4/Microsoft.PowerShell.Security/Protect-CmsMessage.md index afe9398310f..e504e19947b 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Protect-CmsMessage.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Protect-CmsMessage.md @@ -17,21 +17,22 @@ Encrypts content by using the Cryptographic Message Syntax format. ### ByContent (Default) ``` -Protect-CmsMessage [-To] [-Content] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-Content] + [[-OutFile] ] [] ``` ### ByPath ``` -Protect-CmsMessage [-To] [-Path] [[-OutFile] ] [] +Protect-CmsMessage [-To] [-Path] [[-OutFile] ] + [] ``` ### ByLiteralPath ``` -Protect-CmsMessage [-To] [-LiteralPath] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-LiteralPath] + [[-OutFile] ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Security/Set-Acl.md b/reference/7.4/Microsoft.PowerShell.Security/Set-Acl.md index e40a99d123a..ed40bc36f4d 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Set-Acl.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Set-Acl.md @@ -18,22 +18,24 @@ Changes the security descriptor of a specified item, such as a file or a registr ### ByPath (Default) ``` -Set-Acl [-Path] [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl [-Path] [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] + [] ``` ### ByInputObject ``` -Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Set-Acl -LiteralPath [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] - [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl -LiteralPath [-AclObject] [-ClearCentralAccessPolicy] + [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -129,20 +131,20 @@ Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl These commands disable access inheritance from parent folders, while still preserving the existing inherited access rules. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. Next, variables are created to convert the inherited access rules to explicit access rules. To protect the access rules associated with this from inheritance, set the `$isProtected` variable to `$true`. To allow inheritance, set `$isProtected` to `$false`. For more information, see -[set access rule protection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection). +[set access rule protection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A). Set the `$preserveInheritance` variable to `$true` to preserve inherited access rules or `$false` to remove inherited access rules. Then the access rule protection is updated using the **SetAccessRuleProtection()** method. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the ACLs of the Dog.txt that were inherited from the Pets folder will be applied directly -to Dog.txt, and new access policies added to Pets will not change the access to Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor of to `Dog.txt`. When the command +completes, the ACLs of the `Dog.txt` that were inherited from the Pets folder will be applied directly +to `Dog.txt`, and new access policies added to Pets will not change the access to `Dog.txt`. ### Example 5: Grant Administrators Full Control of the file @@ -154,29 +156,33 @@ $fileSystemRights = "FullControl" $type = "Allow" # Create new rule $fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type -$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList +$newParams = @{ + TypeName = 'System.Security.AccessControl.FileSystemAccessRule' + ArgumentList = $fileSystemAccessRuleArgumentList +} +$fileSystemAccessRule = New-Object @newParams # Apply new rule $NewAcl.SetAccessRule($fileSystemAccessRule) Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl ``` -This command will grant the **BUILTIN\Administrators** group Full control of the Dog.txt file. +This command will grant the **BUILTIN\Administrators** group Full control of the `Dog.txt` file. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -Next variables are created to grant the **BUILTIN\Administrators** group full control of the Dog.txt -file. The `$identity` variable set to the name of a -[user account](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor). The +Next variables are created to grant the **BUILTIN\Administrators** group full control of the +`Dog.txt` file. The `$identity` variable set to the name of a +[user account](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A). The `$fileSystemRights` variable set to FullControl, and can be any one of the -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) values that specifies -the type of operation associated with the access rule. The `$type` variable set to "Allow" to -specifies whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable -is an argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) values that specifies the +type of operation associated with the access rule. The `$type` variable set to "Allow" to specifies +whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable is an +argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new **FileSystemAccessRule** object is created, and the **FileSystemAccessRule** object is passed to the **SetAccessRule()** method, adds the new access rule. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the **BUILTIN\Administrators** group will have full control of the Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor of to `Dog.txt`. When the command +completes, the **BUILTIN\Administrators** group will have full control of the `Dog.txt`. ## PARAMETERS @@ -213,7 +219,7 @@ This parameter was introduced in Windows PowerShell 3.0. ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: ByPath, ByLiteralPath -Aliases: +Aliases: PSPath, LP Required: False Position: Named @@ -341,7 +347,7 @@ Changes the security descriptor of the specified item. Enter the path to an item a file or registry key. Wildcards are permitted. If you pass a security object to `Set-Acl` (either by using the **AclObject** or -**SecurityDescriptor** parameters or by passing a security object from Get-Acl to `Set-Acl`), and +**SecurityDescriptor** parameters or by passing a security object from `Get-Acl` to `Set-Acl`), and you omit the **Path** parameter (name and value), `Set-Acl` uses the path that is included in the security object. @@ -428,8 +434,8 @@ can use it to change the security descriptors of files, directories, and registr [Get-Acl](Get-Acl.md) -[FileSystemAccessRule](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor) +[FileSystemAccessRule](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A) -[ObjectSecurity.SetAccessRuleProtection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection) +[ObjectSecurity.SetAccessRuleProtection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A) -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) diff --git a/reference/7.4/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md b/reference/7.4/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md index 4a9295aa98a..250a7bae563 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md @@ -18,8 +18,8 @@ Sets the PowerShell execution policies for Windows computers. ### All ``` -Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] [-Force] - [-WhatIf] [-Confirm] [] +Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Security/Test-FileCatalog.md b/reference/7.4/Microsoft.PowerShell.Security/Test-FileCatalog.md index ae270c4d906..5b8d2152c1d 100644 --- a/reference/7.4/Microsoft.PowerShell.Security/Test-FileCatalog.md +++ b/reference/7.4/Microsoft.PowerShell.Security/Test-FileCatalog.md @@ -19,8 +19,8 @@ This cmdlet is only supported on Windows. ## SYNTAX ``` -Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-Path] ] - [-WhatIf] [-Confirm] [] +Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] + [[-Path] ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -30,7 +30,7 @@ Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-To] ] [-IncludeC ### ByLiteralPath ``` -Unprotect-CmsMessage [-LiteralPath] [[-To] ] [-IncludeContext] - [] +Unprotect-CmsMessage [-LiteralPath] [[-To] ] + [-IncludeContext] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Add-Type.md b/reference/7.4/Microsoft.PowerShell.Utility/Add-Type.md index 3ed96b08c37..7d7a1da13ca 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Add-Type.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Add-Type.md @@ -18,8 +18,9 @@ Adds a Microsoft .NET class to a PowerShell session. ### FromSource (Default) ``` -Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] +Add-Type [-TypeDefinition] [-Language ] + [-ReferencedAssemblies ] [-OutputAssembly ] + [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] [] ``` @@ -28,24 +29,24 @@ Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblie ``` Add-Type [-Name] [-MemberDefinition] [-Namespace ] [-UsingNamespace ] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] - [-CompilerOptions ] [] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromPath ``` Add-Type [-Path] [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] + [-OutputType ] [-PassThru] [-IgnoreWarnings] + [-CompilerOptions ] [] ``` ### FromLiteralPath ``` -Add-Type -LiteralPath [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] +Add-Type -LiteralPath [-ReferencedAssemblies ] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromAssemblyName @@ -451,7 +452,7 @@ Accept wildcard characters: True Specifies the output type of the output assembly. By default, no output type is specified. This parameter is valid only when an output assembly is specified in the command. For more information about the values, see -[OutputAssemblyType Enumeration](/dotnet/api/microsoft.powershell.commands.outputassemblytype). +[OutputAssemblyType Enumeration](xref:Microsoft.PowerShell.Commands.OutputAssemblyType). The acceptable values for this parameter are as follows: @@ -541,7 +542,7 @@ Accept wildcard characters: False Specifies the source code that contains the type definitions. Enter the source code in a string or here-string, or enter a variable that contains the source code. For more information about -here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/about/about_Quoting_Rules.md). +here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). Include a namespace declaration in your type definition. If you omit the namespace declaration, your type might have the same name as another type or the shortcut for another type, causing an @@ -628,7 +629,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't be loaded autom ## RELATED LINKS -[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md) +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md) @@ -636,7 +637,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't be loaded autom [New-Object](New-Object.md) -[OutputAssemblyType](/dotnet/api/microsoft.powershell.commands.outputassemblytype) +[OutputAssemblyType](xref:Microsoft.PowerShell.Commands.OutputAssemblyType) [Platform Invoke (P/Invoke)](/dotnet/standard/native-interop/pinvoke) diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Clear-Variable.md b/reference/7.4/Microsoft.PowerShell.Utility/Clear-Variable.md index 08996af3650..bfc0b51cf21 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Clear-Variable.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Clear-Variable.md @@ -18,8 +18,8 @@ Deletes the value of a variable. ## SYNTAX ``` -Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-PassThru] - [-Scope ] [-WhatIf] [-Confirm] [] +Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -41,7 +41,7 @@ This command removes the value of global variables that have names that begin wi ### Example 2: Clear a variable in a child scope but not the parent scope ```powershell -$a=3 +$a = 3 &{ Clear-Variable a } $a ``` @@ -165,7 +165,8 @@ The acceptable values for this parameter are: - `Script` You can also use a number relative to the current scope (0 through the number of scopes, where 0 is -the current scope and 1 is its parent). Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +the current scope and 1 is its parent). Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -215,7 +216,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 7032af9335c..1f7d49329a9 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -10,7 +10,6 @@ title: ConvertFrom-Csv # ConvertFrom-Csv ## SYNOPSIS - Converts object properties in character-separated value (CSV) format into CSV versions of the original objects. @@ -26,7 +25,8 @@ ConvertFrom-Csv [[-Delimiter] ] [-InputObject] [-Header [-Header ] [] +ConvertFrom-Csv -UseCulture [-InputObject] [-Header ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Json.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Json.md index 506a4577598..fda2acad377 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Json.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Json.md @@ -16,7 +16,8 @@ Converts a JSON-formatted string to a custom object or a hash table. ## SYNTAX ``` -ConvertFrom-Json [-InputObject] [-AsHashtable] [-Depth ] [-NoEnumerate] [] +ConvertFrom-Json [-InputObject] [-AsHashtable] [-Depth ] [-NoEnumerate] + [] ``` ## DESCRIPTION @@ -84,7 +85,8 @@ that can be managed in PowerShell. ```powershell # Ensures that Invoke-WebRequest uses TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | ConvertFrom-Json +$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | + ConvertFrom-Json ``` You can also use the `Invoke-RestMethod` cmdlet, which automatically converts JSON content to diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md index 3769926562b..6a8e200e9d8 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md @@ -11,8 +11,7 @@ title: ConvertFrom-Markdown # ConvertFrom-Markdown ## SYNOPSIS -Convert the contents of a string or a file to a **MarkdownInfo** -object. +Convert the contents of a string or a file to a **MarkdownInfo** object. ## SYNTAX @@ -161,7 +160,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 @@ -178,4 +178,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Markdown Parser](https://github.com/lunet-io/markdig) [ANSI escape code](https://wikipedia.org/wiki/ANSI_escape_code) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index 639d59620f6..b86ae2c3ed8 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -18,7 +18,8 @@ Converts a SDDL string to a custom object. ### All ``` -ConvertFrom-SddlString [-Sddl] [-Type ] [] +ConvertFrom-SddlString [-Sddl] [-Type ] + [] ``` ## DESCRIPTION @@ -57,7 +58,7 @@ ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. @@ -68,18 +69,29 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry ```powershell $acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\ +ConvertFrom-SddlString -Sddl $acl.Sddl | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -ConvertFrom-SddlString -Sddl $acl.Sddl | ForEach-Object {$_.DiscretionaryAcl[0]} - -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, +FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, +TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +``` -ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | ForEach-Object {$_.DiscretionaryAcl[0]} +```powershell +ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, +EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, +ReadPermissions, SetValue, TakeOwnership, WriteKey) ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Csv.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Csv.md index 08c91d2de45..695e5ea6cfc 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Csv.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Csv.md @@ -11,7 +11,6 @@ title: ConvertTo-Csv # ConvertTo-Csv ## SYNOPSIS - Converts .NET objects into a series of character-separated value (CSV) strings. ## SYNTAX @@ -27,8 +26,9 @@ ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-IncludeTypeInfor ### UseCulture ``` -ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [] +ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [] ``` ## DESCRIPTION @@ -90,7 +90,8 @@ This example converts the Windows event log for PowerShell to a series of CSV st ```powershell (Get-Culture).TextInfo.ListSeparator -Get-WinEvent -LogName 'PowerShellCore/Operational' | ConvertTo-Csv -UseCulture -NoTypeInformation +Get-WinEvent -LogName 'PowerShellCore/Operational' | + ConvertTo-Csv -UseCulture -NoTypeInformation ``` ```Output diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Html.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Html.md index 98f808d2471..b8f959aad31 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Html.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Html.md @@ -18,16 +18,16 @@ Converts .NET objects into HTML that can be displayed in a Web browser. ``` ConvertTo-Html [-InputObject ] [[-Property] ] [[-Body] ] - [[-Head] ] [[-Title] ] [-As ] [-CssUri ] [-PostContent ] - [-PreContent ] [-Meta ] [-Charset ] [-Transitional] - [] + [[-Head] ] [[-Title] ] [-As ] [-CssUri ] + [-PostContent ] [-PreContent ] [-Meta ] + [-Charset ] [-Transitional] [] ``` ### Fragment ``` -ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] [-Fragment] - [-PostContent ] [-PreContent ] [] +ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] + [-Fragment] [-PostContent ] [-PreContent ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Json.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Json.md index 769dc423c26..dd3de392d95 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Json.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Json.md @@ -31,14 +31,14 @@ property values, and the methods are removed. > As of PowerShell 7.2, Extended Type System properties of **DateTime** and **String** objects are > no longer serialized and only the simple object is converted to JSON format -You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON object, -which is easily managed in PowerShell. +You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON +object, which is easily managed in PowerShell. Many web sites use JSON instead of XML to serialize data for communication between servers and web-based apps. -As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds the -depth specified for the command. This prevents unwanted data loss when converting objects. +As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds +the depth specified for the command. This prevents unwanted data loss when converting objects. As of PowerShell 7.5, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON numbers. @@ -207,8 +207,8 @@ Accept wildcard characters: False ### -Depth Specifies how many levels of contained objects are included in the JSON representation. The value -can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a warning if -the number of levels in an input object exceeds this number. +can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a +warning if the number of levels in an input object exceeds this number. ```yaml Type: System.Int32 @@ -246,9 +246,9 @@ characters (like newline) are escaped. Acceptable values are: -- `Default` - Only control characters are escaped. -- `EscapeNonAscii` - All non-ASCII and control characters are escaped. -- `EscapeHtml` - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. +- Default - Only control characters are escaped. +- EscapeNonAscii - All non-ASCII and control characters are escaped. +- EscapeHtml - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. This parameter was introduced in PowerShell 6.2. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Xml.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Xml.md index d9795836b61..6d8c7505ff1 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Xml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Xml.md @@ -16,8 +16,8 @@ Creates an XML-based representation of an object. ## SYNTAX ``` -ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] [-As ] - [] +ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] + [-As ] [] ``` ## DESCRIPTION @@ -30,10 +30,10 @@ When you pipe multiple objects to `ConvertTo-Xml` or use the **InputObject** par multiple objects, `ConvertTo-Xml` returns a single, in-memory XML document that includes representations of all the objects. -This cmdlet is similar to [Export-Clixml](./Export-Clixml.md) except that `Export-Clixml` stores the +This cmdlet is similar to [Export-Clixml](Export-Clixml.md) except that `Export-Clixml` stores the resulting XML in a [Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) -file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md). `ConvertTo-Xml` +file that can be reimported as objects with [Import-Clixml](Import-Clixml.md). `ConvertTo-Xml` returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` doesn't have an option to convert objects to CLI XML. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Debug-Runspace.md b/reference/7.4/Microsoft.PowerShell.Utility/Debug-Runspace.md index 6ee1e3f3606..220f29aab98 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Debug-Runspace.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Debug-Runspace.md @@ -18,7 +18,8 @@ Starts an interactive debugging session with a runspace. ### RunspaceParameterSet (Default) ``` -Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] [] +Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] + [] ``` ### NameParameterSet diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md b/reference/7.4/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md index a8c96bf11d4..56557b2172f 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md @@ -27,8 +27,8 @@ Disable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confir ### Id ``` -Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -44,7 +44,7 @@ when you create them using the `Set-PSBreakpoint` cmdlet. A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see -[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md). +[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md). ## EXAMPLES diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md b/reference/7.4/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md index 43d26776007..b275a10300e 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md @@ -41,7 +41,8 @@ Disable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION @@ -180,4 +181,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Enable-RunspaceDebug](Enable-RunspaceDebug.md) [Get-RunspaceDebug](Get-RunspaceDebug.md) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md b/reference/7.4/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md index 53126b72fbe..d613b34ee5d 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md @@ -27,8 +27,8 @@ Enable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm ### Id ``` -Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md b/reference/7.4/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md index c5bc1d43849..c80ecb27b8a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md @@ -41,7 +41,8 @@ Enable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md index f97163d1cc7..9c4a33dda3f 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-Alias.md @@ -20,17 +20,17 @@ Exports information about currently defined aliases to a file. ### ByPath (Default) ``` -Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] [-Append] - [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] + [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Alias -LiteralPath [[-Name] ] [-PassThru] [-As ] - [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias -LiteralPath [[-Name] ] [-PassThru] + [-As ] [-Append] [-Force] [-NoClobber] [-Description ] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,52 +47,52 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "alias.csv" +Export-Alias -Path Alias.csv ``` -This command exports current alias information to a file named Alias.csv in the current directory. +This command exports current alias information to a file named `Alias.csv` in the current directory. ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "alias.csv" -NoClobber +Export-Alias -Path Alias.csv -NoClobber ``` -This command exports the aliases in the current session to an Alias.csv file. +This command exports the aliases in the current session to an `Alias.csv` file. -Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already +Because the **NoClobber** parameter is specified, the command will fail if an `Alias.csv` file already exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path Alias.csv -Append -Description "Appended Aliases" -Force ``` -This command appends the aliases in the current session to the Alias.csv file. +This command appends the aliases in the current session to the `Alias.csv` file. The command uses the **Description** parameter to add a description to the comments at the top of the file. -The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if +The command also uses the **Force** parameter to overwrite any existing `Alias.csv` files, even if they have the read-only attribute. ### Example 4: Export aliases as a script ```powershell -Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) +Export-Alias -Path Alias.ps1 -As Script +Add-Content -Path $PROFILE -Value (Get-Content Alias.ps1) $S = New-PSSession -ComputerName Server01 -Invoke-Command -Session $S -FilePath .\alias.ps1 +Invoke-Command -Session $S -FilePath .\Alias.ps1 ``` This example shows how to use the script file format that `Export-Alias` generates. -The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As** +The first command exports the aliases in the session to the `Alias.ps1` file. It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias. -The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. +The second command adds the aliases in the `Alias.ps1` file to the CurrentUser-CurrentHost profile. The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md index 6694dca768c..36c1bae55ea 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -18,21 +18,21 @@ Creates an XML-based representation of an object or objects and stores it in a f ### ByPath (Default) ``` -Export-Clixml [-Depth ] [-Path] -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] [-Path] -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The `Export-Clixml` cmdlet serialized an object into a Common Language Infrastructure (CLI) -XML-based representation stores it in a file. You can then use the `Import-Clixml` cmdlet to +The `Export-Clixml` cmdlet serializes an object into a Common Language Infrastructure (CLI) +XML-based representation and stores it in a file. You can then use the `Import-Clixml` cmdlet to recreate the saved object based on the contents of that file. For more information about CLI, see [Language independence](/dotnet/standard/language-independence). @@ -192,7 +192,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-Csv.md index d102d002f31..80b15444aee 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-Csv.md @@ -22,19 +22,19 @@ file. ### Delimiter (Default) ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [[-Delimiter] ] [-IncludeTypeInformation] - [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] - [-Confirm] [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [[-Delimiter] ] + [-IncludeTypeInformation] [-NoTypeInformation] [-QuoteFields ] + [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] [] ``` ### UseCulture ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] - [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -56,7 +56,7 @@ file. ```powershell Get-Process -Name WmiPrvSE | - Select-Object -Property BasePriority,Id,SessionId,WorkingSet | + Select-Object -Property BasePriority, Id, SessionId, WorkingSet | Export-Csv -Path .\WmiData.csv -NoTypeInformation Import-Csv -Path .\WmiData.csv ``` @@ -181,13 +181,13 @@ This example describes how to export objects to a CSV file and use the **Append* objects to an existing file. ```powershell -$AppService = Get-Service -DisplayName *Application* | +$AppService = Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status $AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation Get-Content -Path .\Services.Csv -$WinService = Get-Service -DisplayName *Windows* | +$WinService = Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status $WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append @@ -366,7 +366,7 @@ the file located in the current directory. This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv +Get-Date | Export-Csv -QuoteFields "DateTime", "Date" -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -380,7 +380,7 @@ DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thur This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv +Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -402,7 +402,7 @@ $person1 = @{ $person2 = @{ Name = 'Jane Smith' - Number = 1 + Number = 2 } $allPeople = $person1, $person2 @@ -504,7 +504,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-FormatData.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-FormatData.md index bb993a21602..5fded4c4b4b 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-FormatData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-FormatData.md @@ -17,15 +17,15 @@ Saves formatting data from the current session in a formatting file. ### ByPath (Default) ``` -Export-FormatData -InputObject -Path [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -Path [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ### ByLiteralPath ``` -Export-FormatData -InputObject -LiteralPath [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -LiteralPath [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.4/Microsoft.PowerShell.Utility/Export-PSSession.md index 59895b8cd4c..d5d1a1b5440 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -12,7 +12,6 @@ title: Export-PSSession # Export-PSSession ## SYNOPSIS - Exports commands from another session and saves them in a PowerShell module. ## SYNTAX @@ -22,9 +21,9 @@ Exports commands from another session and saves them in a PowerShell module. ``` Export-PSSession [-OutputModule] [-Force] [-Encoding ] [[-CommandName] ] [-AllowClobber] [-ArgumentList ] - [-CommandType ] [-Module ] [-FullyQualifiedModule ] - [[-FormatTypeName] ] [-Certificate ] [-Session] - [] + [-CommandType ] [-Module ] + [-FullyQualifiedModule ] [[-FormatTypeName] ] + [-Certificate ] [-Session] [] ``` ## DESCRIPTION @@ -293,7 +292,8 @@ The acceptable values for this parameter are as follows: (`$Env:PATH`). - `Filter` and `Function`: All PowerShell functions. - `Script` Script files accessible in the current session. -- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). +- `Workflow` A PowerShell workflow. For more information, see + [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). These values are defined as a flag-based enumeration. You can combine multiple values together to set multiple flags using this parameter. The values can be passed to the **CommandType** parameter diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-Custom.md index 2315eccb962..3d8d546d368 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-Custom.md @@ -17,9 +17,9 @@ Uses a customized view to format the output. ## SYNTAX ``` -Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-Hex.md index eac4f382e81..78ffcbdf4cc 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-Hex.md @@ -13,7 +13,6 @@ title: Format-Hex # Format-Hex ## SYNOPSIS - Displays a file or other input as hexadecimal. ## SYNTAX @@ -33,8 +32,8 @@ Format-Hex -LiteralPath [-Count ] [-Offset ] [ [-Encoding ] [-Count ] [-Offset ] [-Raw] - [] +Format-Hex -InputObject [-Encoding ] [-Count ] + [-Offset ] [-Raw] [] ``` ## DESCRIPTION @@ -109,7 +108,8 @@ It will pass each object through the Pipeline and process individually. However, data, and the adjacent object is also numeric, it will group them into a single output block. ```powershell -'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | Format-Hex +'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | + Format-Hex ``` ```Output @@ -199,7 +199,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. @@ -261,7 +261,8 @@ Specifies the complete path to a file. The value of **LiteralPath** is used exac This parameter does not accept wildcard characters. To specify multiple paths to files, separate the paths with a comma. If the **LiteralPath** parameter includes escape characters, enclose the path in single quotation marks. PowerShell does not interpret any characters in a single quoted string as -escape sequences. For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +escape sequences. For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -332,7 +333,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md index a02b1e02588..f8d788ee5cf 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-List.md @@ -17,8 +17,8 @@ Formats the output as a list of properties in which each property appears on a n ## SYNTAX ``` -Format-List [[-Property] ] [-GroupBy ] [-View ] [-ShowError] - [-DisplayError] [-Force] [-Expand ] [-InputObject ] +Format-List [[-Property] ] [-GroupBy ] [-View ] + [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] [] ``` diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-Table.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-Table.md index 2228a0e4dc0..8cb34e3af63 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-Table.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-Table.md @@ -278,12 +278,12 @@ Accept wildcard characters: False Specifies the format of the collection object and the objects in the collection. This parameter is designed to format objects that support the [ICollection](xref:System.Collections.ICollection)([System.Collections](xref:System.Collections)) -interface. The default value is **EnumOnly**. -The acceptable values for this parameter are as follows: +interface. The default value is **EnumOnly**. The acceptable values for this parameter are as +follows: -- **EnumOnly**: Displays the properties of the objects in the collection. -- **CoreOnly**: Displays the properties of the collection object. -- **Both**: Displays the properties of the collection object and the properties of objects in the +- `EnumOnly`: Displays the properties of the objects in the collection. +- `CoreOnly`: Displays the properties of the collection object. +- `Both`: Displays the properties of the collection object and the properties of objects in the collection. ```yaml diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Format-Wide.md b/reference/7.4/Microsoft.PowerShell.Utility/Format-Wide.md index 294b3ded8e2..5319a4e704a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Format-Wide.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Format-Wide.md @@ -17,9 +17,9 @@ Formats objects as a wide table that displays only one property of each object. ## SYNTAX ``` -Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Alias.md index f5094a9cccc..4204c9d0bfc 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Alias.md @@ -20,13 +20,15 @@ Gets the aliases for the current session. ### Default (Default) ``` -Get-Alias [[-Name] ] [-Exclude ] [-Scope ] [] +Get-Alias [[-Name] ] [-Exclude ] [-Scope ] + [] ``` ### Definition ``` -Get-Alias [-Exclude ] [-Scope ] [-Definition ] [] +Get-Alias [-Exclude ] [-Scope ] [-Definition ] + [] ``` ## DESCRIPTION @@ -182,7 +184,8 @@ are: - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -`Local` is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +`Local` is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -200,7 +203,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Date.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Date.md index 26212759120..8e57d208d5d 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Date.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Date.md @@ -18,33 +18,33 @@ Gets the current date and time. ### DateAndFormat (Default) ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### DateAndUFormat ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ### UnixTimeSecondsAndFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### UnixTimeSecondsAndUFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Error.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Error.md index f73943cdc95..c8767ae049a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Error.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Error.md @@ -13,7 +13,6 @@ title: Get-Error # Get-Error ## SYNOPSIS - Gets and displays the most recent error messages from the current session. ## SYNTAX @@ -157,7 +156,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-FormatData.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-FormatData.md index 1110538fb9d..a32201b3f06 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-FormatData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-FormatData.md @@ -16,7 +16,8 @@ Gets the formatting data in the current session. ## SYNTAX ``` -Get-FormatData [[-TypeName] ] [-PowerShellVersion ] [] +Get-FormatData [[-TypeName] ] [-PowerShellVersion ] + [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Host.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Host.md index f1d1622aeb9..4b5e3e3d99e 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Host.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Host.md @@ -234,7 +234,8 @@ use these features interchangeably. > variable. For more information, see > [about_ANSI_Terminals](../Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md). -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). ## RELATED LINKS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md index 86b35e74f7d..db1974b9359 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md @@ -26,19 +26,22 @@ Get-PSBreakpoint [[-Script] ] [-Runspace ] [] -Command [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Command [-Runspace ] + [] ``` ### Variable ``` -Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] + [] ``` ### Type ``` -Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] + [] ``` ### Id diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md index 8eafcff7ba7..9a567446d22 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Random.md @@ -25,7 +25,8 @@ Get-Random [-SetSeed ] [[-Maximum] ] [-Minimum ] [-Count ### RandomListItemParameterSet ``` -Get-Random [-SetSeed ] [-InputObject] [-Count ] [] +Get-Random [-SetSeed ] [-InputObject] [-Count ] + [] ``` ### ShuffleParameterSet diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md index 66ec317931b..f56f97b9d14 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md @@ -41,7 +41,8 @@ Get-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION @@ -178,4 +179,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Disable-RunspaceDebug](Disable-RunspaceDebug.md) [Enable-RunspaceDebug](Enable-RunspaceDebug.md) - diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md index 81f4bdcbbc2..dceaeb056bd 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-SecureRandom.md @@ -18,7 +18,8 @@ Gets a random number, or selects objects randomly from a collection. ### RandomNumberParameterSet (Default) ``` -Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] [] +Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] + [] ``` ### RandomListItemParameterSet @@ -205,8 +206,8 @@ In this example, the **InputObject** parameter specifies an array that contains Get-SecureRandom -InputObject @('a','',$null) ``` -`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a blank -line and `$null` returns to a PowerShell prompt. +`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a +blank line and `$null` returns to a PowerShell prompt. ## PARAMETERS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-TraceSource.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-TraceSource.md index e7d87f760ab..fa419def040 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-TraceSource.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-TraceSource.md @@ -69,7 +69,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 diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-TypeData.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-TypeData.md index 14c0a3ce492..253e0fd1a4e 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-TypeData.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-TypeData.md @@ -99,9 +99,9 @@ else { The command uses the `Get-TypeData` cmdlet to get the extended type data for the **System.DataTime** type. The command gets the **Members** property of the **TypeData** object. -The **Members** property contains a hash table of properties and methods that are defined by extended -type data. Each key in the Members hash table is a property or method name and each value is the -definition of the property or method value. +The **Members** property contains a hash table of properties and methods that are defined by +extended type data. Each key in the Members hash table is a property or method name and each value +is the definition of the property or method value. The command gets the **DateTime** key in **Members** and its **GetScriptBlock** property value. diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Get-Variable.md b/reference/7.4/Microsoft.PowerShell.Utility/Get-Variable.md index a9b5a6a1445..0c4127067ac 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Get-Variable.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Get-Variable.md @@ -18,8 +18,8 @@ Gets the variables in the current console. ## SYNTAX ``` -Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] [-Scope ] - [] +Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] + [-Scope ] [] ``` ## DESCRIPTION @@ -168,7 +168,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS @@ -180,7 +181,7 @@ You can pipe a string that contains the variable name to this cmdlet. ### System.Management.Automation.PSVariable -By default, this cmdlet returns a **AutomationPSVariable** object for each variable that it gets. +By default, this cmdlet returns an **AutomationPSVariable** object for each variable that it gets. The object type depends on the variable. ### System.Object[] diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-Alias.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-Alias.md index 618534055f9..e80aa22f640 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-Alias.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-Alias.md @@ -20,22 +20,24 @@ Imports an alias list from a file. ### ByPath (Default) ``` -Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` -Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] +Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION The `Import-Alias` cmdlet imports an alias list from a file. -Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite existing aliases by default. -To overwrite an existing alias, after assuring that the contents of the alias file is safe, use the **Force** parameter. +Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite +existing aliases by default. To overwrite an existing alias, after assuring that the contents of the +alias file is safe, use the **Force** parameter. ## EXAMPLES @@ -47,16 +49,22 @@ Import-Alias test.txt This command imports alias information from a file named test.txt. +### Example 2: Get a list of defined aliases and their options + +Use the following command to display information about the currently-defined aliases: + +```powershell +Get-Alias | Select-Object Name, Options +``` + +If the corresponding alias is read-only, it will be displayed in the value of the **Options** +property. + ## PARAMETERS ### -Force Allows the cmdlet to import an alias that is already defined or is read only. -You can use the following command to display information about the currently-defined aliases: - -`Get-Alias | Select-Object Name, Options` - -If the corresponding alias is read-only, it will be displayed in the value of the **Options** property. ```yaml Type: System.Management.Automation.SwitchParameter @@ -72,11 +80,10 @@ Accept wildcard characters: False ### -LiteralPath -Specifies the path to a file that includes exported alias information. -Unlike the **Path** parameter, the value of the **LiteralPath** parameter 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 a file that includes exported alias information. Unlike the **Path** +parameter, the value of the **LiteralPath** parameter 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 @@ -132,7 +139,8 @@ The acceptable values for this parameter are: - Global - Local - Script -- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) +- A number relative to the current scope (0 through the number of scopes, where 0 is the current + scope and 1 is its parent) The default is Local. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). @@ -184,7 +192,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md index 27e453b057b..64527c7dc56 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -25,8 +25,8 @@ Import-Clixml [-Path] [-IncludeTotalCount] [-Skip ] [-First < ### ByLiteralPath ``` -Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] [-First ] - [] +Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] + [-First ] [] ``` ## DESCRIPTION diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Import-Csv.md b/reference/7.4/Microsoft.PowerShell.Utility/Import-Csv.md index 451f034bf86..5adb926b79a 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Import-Csv.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Import-Csv.md @@ -13,7 +13,6 @@ title: Import-Csv # Import-Csv ## SYNOPSIS - Creates table-like custom objects from the items in a character-separated value (CSV) file. ## SYNTAX @@ -21,15 +20,15 @@ Creates table-like custom objects from the items in a character-separated value ### DelimiterPath (Default) ``` -Import-Csv [[-Delimiter] ] [-Path] [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] [-Path] [-Header ] + [-Encoding ] [] ``` ### DelimiterLiteralPath ``` -Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] + [-Encoding ] [] ``` ### CulturePath diff --git a/reference/7.4/Microsoft.PowerShell.Utility/Measure-Object.md b/reference/7.4/Microsoft.PowerShell.Utility/Measure-Object.md index 6df37ec537d..f39f347ff59 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/Measure-Object.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/Measure-Object.md @@ -20,15 +20,16 @@ objects, such as files of text. ### GenericMeasure (Default) ``` -Measure-Object [[-Property] ] [-InputObject ] [-StandardDeviation] - [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] [] +Measure-Object [[-Property] ] [-InputObject ] + [-StandardDeviation] [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] + [] ``` ### TextMeasure ``` -Measure-Object [[-Property] ] [-InputObject ] [-Line] [-Word] - [-Character] [-IgnoreWhiteSpace] [] +Measure-Object [[-Property] ] [-InputObject ] [-Line] + [-Word] [-Character] [-IgnoreWhiteSpace] [] ``` ## DESCRIPTION @@ -529,7 +530,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Security/Get-PfxCertificate.md b/reference/7.5/Microsoft.PowerShell.Security/Get-PfxCertificate.md index 3daf8ff0f2e..7a529f6e527 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Get-PfxCertificate.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Get-PfxCertificate.md @@ -17,15 +17,15 @@ Gets information about PFX certificate files on the computer. ### ByPath (Default) ``` -Get-PfxCertificate [-FilePath] [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate [-FilePath] [-Password ] + [-NoPromptForPassword] [] ``` ### ByLiteralPath ``` -Get-PfxCertificate -LiteralPath [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate -LiteralPath [-Password ] + [-NoPromptForPassword] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Security/Protect-CmsMessage.md b/reference/7.5/Microsoft.PowerShell.Security/Protect-CmsMessage.md index 1258d512fde..aa7143834bc 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Protect-CmsMessage.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Protect-CmsMessage.md @@ -17,21 +17,22 @@ Encrypts content by using the Cryptographic Message Syntax format. ### ByContent (Default) ``` -Protect-CmsMessage [-To] [-Content] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-Content] + [[-OutFile] ] [] ``` ### ByPath ``` -Protect-CmsMessage [-To] [-Path] [[-OutFile] ] [] +Protect-CmsMessage [-To] [-Path] [[-OutFile] ] + [] ``` ### ByLiteralPath ``` -Protect-CmsMessage [-To] [-LiteralPath] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-LiteralPath] + [[-OutFile] ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Security/Set-Acl.md b/reference/7.5/Microsoft.PowerShell.Security/Set-Acl.md index 0711203c981..5cb6c6f0e87 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Set-Acl.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Set-Acl.md @@ -33,9 +33,9 @@ Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] - [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] - [] +Set-Acl -LiteralPath [-AclObject] [-ClearCentralAccessPolicy] + [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -60,18 +60,18 @@ $DogACL = Get-Acl -Path "C:\Dog.txt" Set-Acl -Path "C:\Cat.txt" -AclObject $DogACL ``` -These commands copy the values from the security descriptor of the `Dog.txt` file to the security -descriptor of the Cat.txt file. When the commands complete, the security descriptors of the -`Dog.txt` and Cat.txt files are identical. +These commands copy the values from the security descriptor of the Dog.txt file to the security +descriptor of the Cat.txt file. When the commands complete, the security descriptors of the Dog.txt +and Cat.txt files are identical. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -The assignment operator (`=`) stores the security descriptor in the value of the `$DogACL` variable. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The assignment operator (`=`) stores the security descriptor in the value of the $DogACL variable. The second command uses `Set-Acl` to change the values in the ACL of Cat.txt to the values in `$DogACL`. The value of the **Path** parameter is the path to the Cat.txt file. The value of the **AclObject** -parameter is the model ACL, in this case, the ACL of `Dog.txt` as saved in the `$DogACL` variable. +parameter is the model ACL, in this case, the ACL of Dog.txt as saved in the `$DogACL` variable. ### Example 2: Use the pipeline operator to pass a descriptor @@ -83,12 +83,12 @@ This command is almost the same as the command in the previous example, except t pipeline operator (`|`) to send the security descriptor from a `Get-Acl` command to a `Set-Acl` command. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -The pipeline operator (`|`) passes an object that represents the `Dog.txt` security descriptor to -the `Set-Acl` cmdlet. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. The +pipeline operator (`|`) passes an object that represents the Dog.txt security descriptor to the +`Set-Acl` cmdlet. -The second command uses `Set-Acl` to apply the security descriptor of `Dog.txt` to Cat.txt. -When the command completes, the ACLs of the `Dog.txt` and Cat.txt files are identical. +The second command uses `Set-Acl` to apply the security descriptor of Dog.txt to Cat.txt. +When the command completes, the ACLs of the Dog.txt and Cat.txt files are identical. ### Example 3: Apply a security descriptor to multiple files @@ -97,8 +97,8 @@ $NewAcl = Get-Acl File0.txt Get-ChildItem -Path "C:\temp" -Recurse -Include "*.txt" -Force | Set-Acl -AclObject $NewAcl ``` -These commands apply the security descriptors in the File0.txt file to all text files in the -`C:\Temp` directory and all of its subdirectories. +These commands apply the security descriptors in the File0.txt file to all text files in the `C:\Temp` +directory and all of its subdirectories. The first command gets the security descriptor of the File0.txt file in the current directory and uses the assignment operator (`=`) to store it in the `$NewACL` variable. diff --git a/reference/7.5/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md b/reference/7.5/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md index cde2e45a986..2b95abddc81 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md @@ -18,8 +18,8 @@ Sets the PowerShell execution policies for Windows computers. ### All ``` -Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] [-Force] - [-WhatIf] [-Confirm] [] +Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md b/reference/7.5/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md index 65053de5dd1..33f8193f2de 100644 --- a/reference/7.5/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md +++ b/reference/7.5/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md @@ -39,8 +39,8 @@ Unprotect-CmsMessage [-Path] [[-To] ] [-IncludeC ### ByLiteralPath ``` -Unprotect-CmsMessage [-LiteralPath] [[-To] ] [-IncludeContext] - [] +Unprotect-CmsMessage [-LiteralPath] [[-To] ] + [-IncludeContext] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 82bab5b3cbb..193ac995a85 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -10,7 +10,6 @@ title: ConvertFrom-Csv # ConvertFrom-Csv ## SYNOPSIS - Converts object properties in character-separated value (CSV) format into CSV versions of the original objects. @@ -26,7 +25,8 @@ ConvertFrom-Csv [[-Delimiter] ] [-InputObject] [-Header [-Header ] [] +ConvertFrom-Csv -UseCulture [-InputObject] [-Header ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md index 1f35df5063a..ec45f38fa75 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Json.md @@ -129,10 +129,8 @@ This command shows an example where the `-NoEnumerate` switch is used to round-t JSON array. ```powershell -Write-Output "With -NoEnumerate: $('[1]' | ConvertFrom-Json -NoEnumerate | - ConvertTo-Json -Compress)" -Write-Output "Without -NoEnumerate: $('[1]' | ConvertFrom-Json | - ConvertTo-Json -Compress)" +Write-Output "With -NoEnumerate: $('[1]' | ConvertFrom-Json -NoEnumerate | ConvertTo-Json -Compress)" +Write-Output "Without -NoEnumerate: $('[1]' | ConvertFrom-Json | ConvertTo-Json -Compress)" ``` ```Output diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index c5367d92720..2e88f04131b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -69,20 +69,25 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry ```powershell $acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\ - -ConvertFrom-SddlString -Sddl $acl.Sddl | ForEach-Object {$_.DiscretionaryAcl[0]} +ConvertFrom-SddlString -Sddl $acl.Sddl | + ForEach-Object {$_.DiscretionaryAcl[0]} ``` ```Output -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, +FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, +TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) ``` ```powershell -ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | ForEach-Object {$_.DiscretionaryAcl[0]} +ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | + ForEach-Object {$_.DiscretionaryAcl[0]} ``` ```Output -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey) +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, +EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, +ReadPermissions, SetValue, TakeOwnership, WriteKey) ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md index 6680c935b61..7b80d8f9e70 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Csv.md @@ -11,7 +11,6 @@ title: ConvertTo-Csv # ConvertTo-Csv ## SYNOPSIS - Converts .NET objects into a series of character-separated value (CSV) strings. ## SYNTAX diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md index 696db12d2d0..9429577b3ec 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertTo-Json.md @@ -31,14 +31,14 @@ property values, and the methods are removed. > As of PowerShell 7.2, Extended Type System properties of **DateTime** and **String** objects are > no longer serialized and only the simple object is converted to JSON format -You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON object, -which is easily managed in PowerShell. +You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON +object, which is easily managed in PowerShell. Many web sites use JSON instead of XML to serialize data for communication between servers and web-based apps. -As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds the -depth specified for the command. This prevents unwanted data loss when converting objects. +As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds +the depth specified for the command. This prevents unwanted data loss when converting objects. As of PowerShell 7.5, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON numbers. @@ -207,8 +207,8 @@ Accept wildcard characters: False ### -Depth Specifies how many levels of contained objects are included in the JSON representation. The value -can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a warning if -the number of levels in an input object exceeds this number. +can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a +warning if the number of levels in an input object exceeds this number. ```yaml Type: System.Int32 @@ -246,9 +246,9 @@ characters (like newline) are escaped. Acceptable values are: -- `Default` - Only control characters are escaped. -- `EscapeNonAscii` - All non-ASCII and control characters are escaped. -- `EscapeHtml` - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. +- Default - Only control characters are escaped. +- EscapeNonAscii - All non-ASCII and control characters are escaped. +- EscapeHtml - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. This parameter was introduced in PowerShell 6.2. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md index 97ba2f71846..c374925bcda 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md @@ -47,52 +47,52 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "Alias.csv" +Export-Alias -Path Alias.csv ``` -This command exports current alias information to a file named Alias.csv in the current directory. +This command exports current alias information to a file named `Alias.csv` in the current directory. ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "Alias.csv" -NoClobber +Export-Alias -Path Alias.csv -NoClobber ``` -This command exports the aliases in the current session to an Alias.csv file. +This command exports the aliases in the current session to an `Alias.csv` file. -Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already +Because the **NoClobber** parameter is specified, the command will fail if an `Alias.csv` file already exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "Alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path Alias.csv -Append -Description "Appended Aliases" -Force ``` -This command appends the aliases in the current session to the Alias.csv file. +This command appends the aliases in the current session to the `Alias.csv` file. The command uses the **Description** parameter to add a description to the comments at the top of the file. -The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if +The command also uses the **Force** parameter to overwrite any existing `Alias.csv` files, even if they have the read-only attribute. ### Example 4: Export aliases as a script ```powershell -Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) +Export-Alias -Path Alias.ps1 -As Script +Add-Content -Path $PROFILE -Value (Get-Content Alias.ps1) $S = New-PSSession -ComputerName Server01 -Invoke-Command -Session $S -FilePath .\alias.ps1 +Invoke-Command -Session $S -FilePath .\Alias.ps1 ``` This example shows how to use the script file format that `Export-Alias` generates. -The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As** +The first command exports the aliases in the session to the `Alias.ps1` file. It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias. -The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. +The second command adds the aliases in the `Alias.ps1` file to the CurrentUser-CurrentHost profile. The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md index 9482644e2f3..000e39cdd8e 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md @@ -181,13 +181,15 @@ This example describes how to export objects to a CSV file and use the **Append* objects to an existing file. ```powershell -$AppService = (Get-Service -DisplayName *Application* | - Select-Object -Property DisplayName, Status) +$AppService = Get-Service -DisplayName *Application* | + Select-Object -Property DisplayName, Status + $AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation Get-Content -Path .\Services.Csv -$WinService = (Get-Service -DisplayName *Windows* | - Select-Object -Property DisplayName, Status) +$WinService = Get-Service -DisplayName *Windows* | + Select-Object -Property DisplayName, Status + $WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append Get-Content -Path .\Services.Csv ``` @@ -227,6 +229,7 @@ unexpected output is received, troubleshoot the pipeline syntax. ```powershell Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear | Export-Csv -Path .\DateTime.csv -NoTypeInformation + Get-Content -Path .\DateTime.csv ``` @@ -238,6 +241,7 @@ Get-Content -Path .\DateTime.csv ```powershell Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear | Export-Csv -Path .\FTDateTime.csv -NoTypeInformation + Get-Content -Path .\FTDateTime.csv ``` @@ -362,7 +366,7 @@ the file located in the current directory. This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv +Get-Date | Export-Csv -QuoteFields "DateTime", "Date" -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md index dd220d0add7..74001c70de5 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -12,7 +12,6 @@ title: Export-PSSession # Export-PSSession ## SYNOPSIS - Exports commands from another session and saves them in a PowerShell module. ## SYNTAX @@ -293,7 +292,8 @@ The acceptable values for this parameter are as follows: (`$Env:PATH`). - `Filter` and `Function`: All PowerShell functions. - `Script` Script files accessible in the current session. -- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). +- `Workflow` A PowerShell workflow. For more information, see + [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). These values are defined as a flag-based enumeration. You can combine multiple values together to set multiple flags using this parameter. The values can be passed to the **CommandType** parameter diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md index 0d9366e655a..0e894aa29ed 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md @@ -262,7 +262,7 @@ This parameter does not accept wildcard characters. To specify multiple paths to paths with a comma. If the **LiteralPath** parameter includes escape characters, enclose the path in single quotation marks. PowerShell does not interpret any characters in a single quoted string 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.Utility/Format-List.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md index a0019e5b86d..773c12bc40f 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md @@ -17,8 +17,8 @@ Formats the output as a list of properties in which each property appears on a n ## SYNTAX ``` -Format-List [[-Property] ] [-GroupBy ] [-View ] [-ShowError] - [-DisplayError] [-Force] [-Expand ] [-InputObject ] +Format-List [[-Property] ] [-GroupBy ] [-View ] + [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] [] ``` diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md index 4573e1cafb7..682d7d3ae37 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md @@ -278,12 +278,12 @@ Accept wildcard characters: False Specifies the format of the collection object and the objects in the collection. This parameter is designed to format objects that support the [ICollection](xref:System.Collections.ICollection)([System.Collections](xref:System.Collections)) -interface. The default value is **EnumOnly**. -The acceptable values for this parameter are as follows: +interface. The default value is **EnumOnly**. The acceptable values for this parameter are as +follows: -- **EnumOnly**: Displays the properties of the objects in the collection. -- **CoreOnly**: Displays the properties of the collection object. -- **Both**: Displays the properties of the collection object and the properties of objects in the +- `EnumOnly`: Displays the properties of the objects in the collection. +- `CoreOnly`: Displays the properties of the collection object. +- `Both`: Displays the properties of the collection object and the properties of objects in the collection. ```yaml diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md index 0e23cdd72ef..a4231fa83ca 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md @@ -17,9 +17,9 @@ Formats objects as a wide table that displays only one property of each object. ## SYNTAX ``` -Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md index 01849909e19..d49b27358b5 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md @@ -157,8 +157,8 @@ TypeNames FormatViewDefinition Specify the version of PowerShell this cmdlet gets for the formatting data. Enter a two digit number separated by a period. -This parameter was added in PowerShell 5.1 to improve compatibility when remoting to computers -running older versions of PowerShell. +This parameter was added in PowerShell 5.1 to improve compatibility when remoting computers running +older versions of PowerShell. ```yaml Type: System.Version diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Random.md index f9ed3077045..509e92962d4 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Random.md @@ -25,7 +25,8 @@ Get-Random [-SetSeed ] [[-Maximum] ] [-Minimum ] [-Count ### RandomListItemParameterSet ``` -Get-Random [-SetSeed ] [-InputObject] [-Count ] [] +Get-Random [-SetSeed ] [-InputObject] [-Count ] + [] ``` ### ShuffleParameterSet diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md index 9126576bed9..cebbac09a36 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md @@ -41,7 +41,8 @@ Get-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-SecureRandom.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-SecureRandom.md index 2ddf6b3a23c..73403438a9b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-SecureRandom.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-SecureRandom.md @@ -18,7 +18,8 @@ Gets a random number, or selects objects randomly from a collection. ### RandomNumberParameterSet (Default) ``` -Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] [] +Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] + [] ``` ### RandomListItemParameterSet @@ -205,8 +206,8 @@ In this example, the **InputObject** parameter specifies an array that contains Get-SecureRandom -InputObject @('a','',$null) ``` -`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a blank -line and `$null` returns to a PowerShell prompt. +`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a +blank line and `$null` returns to a PowerShell prompt. ## PARAMETERS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-TraceSource.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-TraceSource.md index 186f9a43d76..fe825035585 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-TraceSource.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-TraceSource.md @@ -69,7 +69,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 diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-TypeData.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-TypeData.md index b4794def81b..2dd03abb14e 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-TypeData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-TypeData.md @@ -99,9 +99,9 @@ else { The command uses the `Get-TypeData` cmdlet to get the extended type data for the **System.DataTime** type. The command gets the **Members** property of the **TypeData** object. -The **Members** property contains a hash table of properties and methods that are defined by extended -type data. Each key in the Members hash table is a property or method name and each value is the -definition of the property or method value. +The **Members** property contains a hash table of properties and methods that are defined by +extended type data. Each key in the Members hash table is a property or method name and each value +is the definition of the property or method value. The command gets the **DateTime** key in **Members** and its **GetScriptBlock** property value. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Variable.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Variable.md index c901d86544e..ca06cebf3ee 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Variable.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Variable.md @@ -18,8 +18,8 @@ Gets the variables in the current console. ## SYNTAX ``` -Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] [-Scope ] - [] +Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] + [-Scope ] [] ``` ## DESCRIPTION @@ -168,7 +168,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-Alias.md index 7b1d2f48054..b780e45acda 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-Alias.md @@ -20,22 +20,24 @@ Imports an alias list from a file. ### ByPath (Default) ``` -Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` -Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] +Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION The `Import-Alias` cmdlet imports an alias list from a file. -Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite existing aliases by default. -To overwrite an existing alias, after assuring that the contents of the alias file is safe, use the **Force** parameter. +Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite +existing aliases by default. To overwrite an existing alias, after assuring that the contents of the +alias file is safe, use the **Force** parameter. ## EXAMPLES @@ -47,16 +49,22 @@ Import-Alias test.txt This command imports alias information from a file named test.txt. +### Example 2: Get a list of defined aliases and their options + +Use the following command to display information about the currently-defined aliases: + +```powershell +Get-Alias | Select-Object Name, Options +``` + +If the corresponding alias is read-only, it will be displayed in the value of the **Options** +property. + ## PARAMETERS ### -Force Allows the cmdlet to import an alias that is already defined or is read only. -You can use the following command to display information about the currently-defined aliases: - -`Get-Alias | Select-Object Name, Options` - -If the corresponding alias is read-only, it will be displayed in the value of the **Options** property. ```yaml Type: System.Management.Automation.SwitchParameter @@ -72,11 +80,10 @@ Accept wildcard characters: False ### -LiteralPath -Specifies the path to a file that includes exported alias information. -Unlike the **Path** parameter, the value of the **LiteralPath** parameter 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 a file that includes exported alias information. Unlike the **Path** +parameter, the value of the **LiteralPath** parameter 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 @@ -132,7 +139,8 @@ The acceptable values for this parameter are: - Global - Local - Script -- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) +- A number relative to the current scope (0 through the number of scopes, where 0 is the current + scope and 1 is its parent) The default is Local. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). @@ -184,7 +192,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md index 73260a2ab3e..975cc3b55df 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -25,8 +25,8 @@ Import-Clixml [-Path] [-IncludeTotalCount] [-Skip ] [-First < ### ByLiteralPath ``` -Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] [-First ] - [] +Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] + [-First ] [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Import-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/Import-Csv.md index 5d2e0f19cae..10a51488770 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Import-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Import-Csv.md @@ -13,7 +13,6 @@ title: Import-Csv # Import-Csv ## SYNOPSIS - Creates table-like custom objects from the items in a character-separated value (CSV) file. ## SYNTAX @@ -21,15 +20,15 @@ Creates table-like custom objects from the items in a character-separated value ### DelimiterPath (Default) ``` -Import-Csv [[-Delimiter] ] [-Path] [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] [-Path] [-Header ] + [-Encoding ] [] ``` ### DelimiterLiteralPath ``` -Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] + [-Encoding ] [] ``` ### CulturePath diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Measure-Object.md b/reference/7.5/Microsoft.PowerShell.Utility/Measure-Object.md index f2dbf3460d6..70689f5f945 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Measure-Object.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Measure-Object.md @@ -20,15 +20,16 @@ objects, such as files of text. ### GenericMeasure (Default) ``` -Measure-Object [[-Property] ] [-InputObject ] [-StandardDeviation] - [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] [] +Measure-Object [[-Property] ] [-InputObject ] + [-StandardDeviation] [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] + [] ``` ### TextMeasure ``` -Measure-Object [[-Property] ] [-InputObject ] [-Line] [-Word] - [-Character] [-IgnoreWhiteSpace] [] +Measure-Object [[-Property] ] [-InputObject ] [-Line] + [-Word] [-Character] [-IgnoreWhiteSpace] [] ``` ## DESCRIPTION @@ -529,7 +530,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/Get-PfxCertificate.md b/reference/7.6/Microsoft.PowerShell.Security/Get-PfxCertificate.md index d1e1c91cf7b..0891c02a677 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Get-PfxCertificate.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Get-PfxCertificate.md @@ -17,15 +17,15 @@ Gets information about PFX certificate files on the computer. ### ByPath (Default) ``` -Get-PfxCertificate [-FilePath] [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate [-FilePath] [-Password ] + [-NoPromptForPassword] [] ``` ### ByLiteralPath ``` -Get-PfxCertificate -LiteralPath [-Password ] [-NoPromptForPassword] - [] +Get-PfxCertificate -LiteralPath [-Password ] + [-NoPromptForPassword] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Security/Protect-CmsMessage.md b/reference/7.6/Microsoft.PowerShell.Security/Protect-CmsMessage.md index 3ad2abecaee..2d7044b95a1 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Protect-CmsMessage.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Protect-CmsMessage.md @@ -17,21 +17,22 @@ Encrypts content by using the Cryptographic Message Syntax format. ### ByContent (Default) ``` -Protect-CmsMessage [-To] [-Content] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-Content] + [[-OutFile] ] [] ``` ### ByPath ``` -Protect-CmsMessage [-To] [-Path] [[-OutFile] ] [] +Protect-CmsMessage [-To] [-Path] [[-OutFile] ] + [] ``` ### ByLiteralPath ``` -Protect-CmsMessage [-To] [-LiteralPath] [[-OutFile] ] - [] +Protect-CmsMessage [-To] [-LiteralPath] + [[-OutFile] ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Security/Set-Acl.md b/reference/7.6/Microsoft.PowerShell.Security/Set-Acl.md index 1e772507df5..94760f7608f 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Set-Acl.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Set-Acl.md @@ -18,22 +18,24 @@ Changes the security descriptor of a specified item, such as a file or a registr ### ByPath (Default) ``` -Set-Acl [-Path] [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] [-Filter ] - [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl [-Path] [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] + [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] + [] ``` ### ByInputObject ``` -Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] [-Include ] - [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl [-InputObject] [-AclObject] [-PassThru] [-Filter ] + [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Set-Acl -LiteralPath [-AclObject] [-ClearCentralAccessPolicy] [-PassThru] - [-Filter ] [-Include ] [-Exclude ] [-WhatIf] [-Confirm] [] +Set-Acl -LiteralPath [-AclObject] [-ClearCentralAccessPolicy] + [-PassThru] [-Filter ] [-Include ] [-Exclude ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -129,20 +131,20 @@ Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl These commands disable access inheritance from parent folders, while still preserving the existing inherited access rules. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. Next, variables are created to convert the inherited access rules to explicit access rules. To protect the access rules associated with this from inheritance, set the `$isProtected` variable to `$true`. To allow inheritance, set `$isProtected` to `$false`. For more information, see -[set access rule protection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection). +[set access rule protection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A). Set the `$preserveInheritance` variable to `$true` to preserve inherited access rules or `$false` to remove inherited access rules. Then the access rule protection is updated using the **SetAccessRuleProtection()** method. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the ACLs of the Dog.txt that were inherited from the Pets folder will be applied directly -to Dog.txt, and new access policies added to Pets will not change the access to Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor to `Dog.txt`. When the command +completes, the ACLs of the `Dog.txt` that were inherited from the Pets folder will be applied directly +to `Dog.txt`, and new access policies added to Pets will not change the access to `Dog.txt`. ### Example 5: Grant Administrators Full Control of the file @@ -154,29 +156,33 @@ $fileSystemRights = "FullControl" $type = "Allow" # Create new rule $fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type -$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList +$newParams = @{ + TypeName = 'System.Security.AccessControl.FileSystemAccessRule' + ArgumentList = $fileSystemAccessRuleArgumentList +} +$fileSystemAccessRule = New-Object @newParams # Apply new rule $NewAcl.SetAccessRule($fileSystemAccessRule) Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl ``` -This command will grant the **BUILTIN\Administrators** group Full control of the Dog.txt file. +This command will grant the **BUILTIN\Administrators** group Full control of the `Dog.txt` file. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -Next variables are created to grant the **BUILTIN\Administrators** group full control of the Dog.txt -file. The `$identity` variable set to the name of a -[user account](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor). The +Next variables are created to grant the **BUILTIN\Administrators** group full control of the +`Dog.txt` file. The `$identity` variable set to the name of a +[user account](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A). The `$fileSystemRights` variable set to FullControl, and can be any one of the -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) values that specifies -the type of operation associated with the access rule. The `$type` variable set to "Allow" to -specifies whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable -is an argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) values that specifies the +type of operation associated with the access rule. The `$type` variable set to "Allow" to specifies +whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable is an +argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new **FileSystemAccessRule** object is created, and the **FileSystemAccessRule** object is passed to the **SetAccessRule()** method, adds the new access rule. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the **BUILTIN\Administrators** group will have full control of the Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor of to `Dog.txt`. When the command +completes, the **BUILTIN\Administrators** group will have full control of the `Dog.txt`. ## PARAMETERS @@ -341,7 +347,7 @@ Changes the security descriptor of the specified item. Enter the path to an item a file or registry key. Wildcards are permitted. If you pass a security object to `Set-Acl` (either by using the **AclObject** or -**SecurityDescriptor** parameters or by passing a security object from Get-Acl to `Set-Acl`), and +**SecurityDescriptor** parameters or by passing a security object from `Get-Acl` to `Set-Acl`), and you omit the **Path** parameter (name and value), `Set-Acl` uses the path that is included in the security object. @@ -428,8 +434,8 @@ can use it to change the security descriptors of files, directories, and registr [Get-Acl](Get-Acl.md) -[FileSystemAccessRule](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor) +[FileSystemAccessRule](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A) -[ObjectSecurity.SetAccessRuleProtection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection) +[ObjectSecurity.SetAccessRuleProtection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A) -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) diff --git a/reference/7.6/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md b/reference/7.6/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md index 5d381021ec8..feac30e9b33 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md @@ -18,8 +18,8 @@ Sets the PowerShell execution policies for Windows computers. ### All ``` -Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] [-Force] - [-WhatIf] [-Confirm] [] +Set-ExecutionPolicy [-ExecutionPolicy] [[-Scope] ] + [-Force] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Security/Test-FileCatalog.md b/reference/7.6/Microsoft.PowerShell.Security/Test-FileCatalog.md index 92b0c6cea5a..277909f856b 100644 --- a/reference/7.6/Microsoft.PowerShell.Security/Test-FileCatalog.md +++ b/reference/7.6/Microsoft.PowerShell.Security/Test-FileCatalog.md @@ -19,8 +19,8 @@ This cmdlet is only supported on Windows. ## SYNTAX ``` -Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-Path] ] - [-WhatIf] [-Confirm] [] +Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] + [[-Path] ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -30,7 +30,7 @@ Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [[-To] ] [-IncludeC ### ByLiteralPath ``` -Unprotect-CmsMessage [-LiteralPath] [[-To] ] [-IncludeContext] - [] +Unprotect-CmsMessage [-LiteralPath] [[-To] ] + [-IncludeContext] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.ThreadJob/Start-ThreadJob.md b/reference/7.6/Microsoft.PowerShell.ThreadJob/Start-ThreadJob.md index 3aeb7095b3b..f30aa18c1a6 100644 --- a/reference/7.6/Microsoft.PowerShell.ThreadJob/Start-ThreadJob.md +++ b/reference/7.6/Microsoft.PowerShell.ThreadJob/Start-ThreadJob.md @@ -17,17 +17,19 @@ Creates background jobs similar to the `Start-Job` cmdlet. ### ScriptBlock ``` -Start-ThreadJob [-ScriptBlock] [-Name ] [-InitializationScript ] - [-InputObject ] [-ArgumentList ] [-ThrottleLimit ] - [-StreamingHost ] [] +Start-ThreadJob [-ScriptBlock] [-Name ] + [-InitializationScript ] [-InputObject ] + [-ArgumentList ] [-ThrottleLimit ] [-StreamingHost ] + [] ``` ### FilePath ``` -Start-ThreadJob [-FilePath] [-Name ] [-InitializationScript ] - [-InputObject ] [-ArgumentList ] [-ThrottleLimit ] - [-StreamingHost ] [] +Start-ThreadJob [-FilePath] [-Name ] + [-InitializationScript ] [-InputObject ] + [-ArgumentList ] [-ThrottleLimit ] [-StreamingHost ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Add-Type.md b/reference/7.6/Microsoft.PowerShell.Utility/Add-Type.md index 7c1a204cf26..5b21be7609a 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Add-Type.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Add-Type.md @@ -18,8 +18,9 @@ Adds a Microsoft .NET class to a PowerShell session. ### FromSource (Default) ``` -Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] +Add-Type [-TypeDefinition] [-Language ] + [-ReferencedAssemblies ] [-OutputAssembly ] + [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] [] ``` @@ -28,24 +29,24 @@ Add-Type [-TypeDefinition] [-Language ] [-ReferencedAssemblie ``` Add-Type [-Name] [-MemberDefinition] [-Namespace ] [-UsingNamespace ] [-Language ] [-ReferencedAssemblies ] - [-OutputAssembly ] [-OutputType ] [-PassThru] [-IgnoreWarnings] - [-CompilerOptions ] [] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromPath ``` Add-Type [-Path] [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] + [-OutputType ] [-PassThru] [-IgnoreWarnings] + [-CompilerOptions ] [] ``` ### FromLiteralPath ``` -Add-Type -LiteralPath [-ReferencedAssemblies ] [-OutputAssembly ] - [-OutputType ] [-PassThru] [-IgnoreWarnings] [-CompilerOptions ] - [] +Add-Type -LiteralPath [-ReferencedAssemblies ] + [-OutputAssembly ] [-OutputType ] [-PassThru] + [-IgnoreWarnings] [-CompilerOptions ] [] ``` ### FromAssemblyName @@ -451,7 +452,7 @@ Accept wildcard characters: True Specifies the output type of the output assembly. By default, no output type is specified. This parameter is valid only when an output assembly is specified in the command. For more information about the values, see -[OutputAssemblyType Enumeration](/dotnet/api/microsoft.powershell.commands.outputassemblytype). +[OutputAssemblyType Enumeration](xref:Microsoft.PowerShell.Commands.OutputAssemblyType). The acceptable values for this parameter are as follows: @@ -541,7 +542,7 @@ Accept wildcard characters: False Specifies the source code that contains the type definitions. Enter the source code in a string or here-string, or enter a variable that contains the source code. For more information about -here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/about/about_Quoting_Rules.md). +here-strings, see [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). Include a namespace declaration in your type definition. If you omit the namespace declaration, your type might have the same name as another type or the shortcut for another type, causing an @@ -628,7 +629,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't be loaded autom ## RELATED LINKS -[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md) +[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md) [about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md) @@ -636,7 +637,7 @@ arbitrary path requires `Add-Type`, since those assemblies can't be loaded autom [New-Object](New-Object.md) -[OutputAssemblyType](/dotnet/api/microsoft.powershell.commands.outputassemblytype) +[OutputAssemblyType](xref:Microsoft.PowerShell.Commands.OutputAssemblyType) [Platform Invoke (P/Invoke)](/dotnet/standard/native-interop/pinvoke) diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Clear-Variable.md b/reference/7.6/Microsoft.PowerShell.Utility/Clear-Variable.md index ca33a80cfe6..eb72ab30f81 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Clear-Variable.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Clear-Variable.md @@ -18,8 +18,8 @@ Deletes the value of a variable. ## SYNTAX ``` -Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] [-PassThru] - [-Scope ] [-WhatIf] [-Confirm] [] +Clear-Variable [-Name] [-Include ] [-Exclude ] [-Force] + [-PassThru] [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -41,7 +41,7 @@ This command removes the value of global variables that have names that begin wi ### Example 2: Clear a variable in a child scope but not the parent scope ```powershell -$a=3 +$a = 3 &{ Clear-Variable a } $a ``` @@ -165,7 +165,8 @@ The acceptable values for this parameter are: - `Script` You can also use a number relative to the current scope (0 through the number of scopes, where 0 is -the current scope and 1 is its parent). Local is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +the current scope and 1 is its parent). Local is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -215,7 +216,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index fcb9eee839b..65e7be3ca5d 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -10,7 +10,6 @@ title: ConvertFrom-Csv # ConvertFrom-Csv ## SYNOPSIS - Converts object properties in character-separated value (CSV) format into CSV versions of the original objects. @@ -26,7 +25,8 @@ ConvertFrom-Csv [[-Delimiter] ] [-InputObject] [-Header [-Header ] [] +ConvertFrom-Csv -UseCulture [-InputObject] [-Header ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Json.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Json.md index e14f9223967..372bd5e21b8 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Json.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Json.md @@ -16,8 +16,8 @@ Converts a JSON-formatted string to a custom object or a hash table. ## SYNTAX ``` -ConvertFrom-Json [-InputObject] [-AsHashtable] [-DateKind ] [-Depth ] - [-NoEnumerate] [] +ConvertFrom-Json [-InputObject] [-AsHashtable] [-DateKind ] + [-Depth ] [-NoEnumerate] [] ``` ## DESCRIPTION @@ -91,7 +91,8 @@ that can be managed in PowerShell. ```powershell # Ensures that Invoke-WebRequest uses TLS 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | ConvertFrom-Json +$j = Invoke-WebRequest 'https://api.github.com/repos/PowerShell/PowerShell/issues' | + ConvertFrom-Json ``` You can also use the `Invoke-RestMethod` cmdlet, which automatically converts JSON content to diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md index 741f4883cbb..ab3b78e63b3 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md @@ -11,8 +11,7 @@ title: ConvertFrom-Markdown # ConvertFrom-Markdown ## SYNOPSIS -Convert the contents of a string or a file to a **MarkdownInfo** -object. +Convert the contents of a string or a file to a **MarkdownInfo** object. ## SYNTAX @@ -161,7 +160,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 diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md index 86c55f19f97..8135132f192 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md @@ -18,7 +18,8 @@ Converts a SDDL string to a custom object. ### All ``` -ConvertFrom-SddlString [-Sddl] [-Type ] [] +ConvertFrom-SddlString [-Sddl] [-Type ] + [] ``` ## DESCRIPTION @@ -57,7 +58,7 @@ ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. @@ -68,18 +69,29 @@ It uses the `-Type` parameter to specify that SDDL string represents a registry ```powershell $acl = Get-Acl -Path HKLM:\SOFTWARE\Microsoft\ +ConvertFrom-SddlString -Sddl $acl.Sddl | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -ConvertFrom-SddlString -Sddl $acl.Sddl | ForEach-Object {$_.DiscretionaryAcl[0]} - -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateDirectories, Delete, ExecuteKey, +FullControl, GenericExecute, GenericWrite, ListDirectory, ReadExtendedAttributes, ReadPermissions, +TakeOwnership, Traverse, WriteData, WriteExtendedAttributes, WriteKey) +``` -ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | ForEach-Object {$_.DiscretionaryAcl[0]} +```powershell +ConvertFrom-SddlString -Sddl $acl.Sddl -Type RegistryRights | + ForEach-Object {$_.DiscretionaryAcl[0]} +``` -BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, ReadPermissions, SetValue, TakeOwnership, WriteKey) +```Output +BUILTIN\Administrators: AccessAllowed (ChangePermissions, CreateLink, CreateSubKey, Delete, +EnumerateSubKeys, ExecuteKey, FullControl, GenericExecute, GenericWrite, Notify, QueryValues, +ReadPermissions, SetValue, TakeOwnership, WriteKey) ``` The first command uses the `Get-Acl` cmdlet to get the security descriptor for the -HKLM:\SOFTWARE\Microsoft\ key and saves it in the variable. +`HKLM:\SOFTWARE\Microsoft\` key and saves it in the variable. The second command uses the `ConvertFrom-SddlString` cmdlet to get the text representation of the SDDL string, contained in the Sddl property of the object representing the security descriptor. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Csv.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Csv.md index 4521d66a274..22989a20242 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Csv.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Csv.md @@ -11,7 +11,6 @@ title: ConvertTo-Csv # ConvertTo-Csv ## SYNOPSIS - Converts .NET objects into a series of character-separated value (CSV) strings. ## SYNTAX @@ -27,8 +26,9 @@ ConvertTo-Csv [-InputObject] [[-Delimiter] ] [-IncludeTypeInfor ### UseCulture ``` -ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [] +ConvertTo-Csv [-InputObject] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [] ``` ## DESCRIPTION @@ -90,7 +90,8 @@ This example converts the Windows event log for PowerShell to a series of CSV st ```powershell (Get-Culture).TextInfo.ListSeparator -Get-WinEvent -LogName 'PowerShellCore/Operational' | ConvertTo-Csv -UseCulture -NoTypeInformation +Get-WinEvent -LogName 'PowerShellCore/Operational' | + ConvertTo-Csv -UseCulture -NoTypeInformation ``` ```Output diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Html.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Html.md index 9b32fd85a20..f02d929620a 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Html.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Html.md @@ -18,16 +18,16 @@ Converts .NET objects into HTML that can be displayed in a Web browser. ``` ConvertTo-Html [-InputObject ] [[-Property] ] [[-Body] ] - [[-Head] ] [[-Title] ] [-As ] [-CssUri ] [-PostContent ] - [-PreContent ] [-Meta ] [-Charset ] [-Transitional] - [] + [[-Head] ] [[-Title] ] [-As ] [-CssUri ] + [-PostContent ] [-PreContent ] [-Meta ] + [-Charset ] [-Transitional] [] ``` ### Fragment ``` -ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] [-Fragment] - [-PostContent ] [-PreContent ] [] +ConvertTo-Html [-InputObject ] [[-Property] ] [-As ] + [-Fragment] [-PostContent ] [-PreContent ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Json.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Json.md index e57b24d4970..aba1e8cb580 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Json.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Json.md @@ -31,14 +31,14 @@ property values, and the methods are removed. > As of PowerShell 7.2, Extended Type System properties of **DateTime** and **String** objects are > no longer serialized and only the simple object is converted to JSON format -You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON object, -which is easily managed in PowerShell. +You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON +object, which is easily managed in PowerShell. Many web sites use JSON instead of XML to serialize data for communication between servers and web-based apps. -As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds the -depth specified for the command. This prevents unwanted data loss when converting objects. +As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds +the depth specified for the command. This prevents unwanted data loss when converting objects. As of PowerShell 7.5, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON numbers. @@ -207,8 +207,8 @@ Accept wildcard characters: False ### -Depth Specifies how many levels of contained objects are included in the JSON representation. The value -can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a warning if -the number of levels in an input object exceeds this number. +can be any number from `0` to `100`. The default value is `2`. `ConvertTo-Json` emits a +warning if the number of levels in an input object exceeds this number. ```yaml Type: System.Int32 @@ -246,9 +246,9 @@ characters (like newline) are escaped. Acceptable values are: -- `Default` - Only control characters are escaped. -- `EscapeNonAscii` - All non-ASCII and control characters are escaped. -- `EscapeHtml` - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. +- Default - Only control characters are escaped. +- EscapeNonAscii - All non-ASCII and control characters are escaped. +- EscapeHtml - HTML (`<`, `>`, `&`, `'`, `"`) and control characters are escaped. This parameter was introduced in PowerShell 6.2. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Xml.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Xml.md index a3c2939270f..2aea152ad34 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Xml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Xml.md @@ -16,8 +16,8 @@ Creates an XML-based representation of an object. ## SYNTAX ``` -ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] [-As ] - [] +ConvertTo-Xml [-Depth ] [-InputObject] [-NoTypeInformation] + [-As ] [] ``` ## DESCRIPTION @@ -30,10 +30,10 @@ When you pipe multiple objects to `ConvertTo-Xml` or use the **InputObject** par multiple objects, `ConvertTo-Xml` returns a single, in-memory XML document that includes representations of all the objects. -This cmdlet is similar to [Export-Clixml](./Export-Clixml.md) except that `Export-Clixml` stores the +This cmdlet is similar to [Export-Clixml](Export-Clixml.md) except that `Export-Clixml` stores the resulting XML in a [Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) -file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md). `ConvertTo-Xml` +file that can be reimported as objects with [Import-Clixml](Import-Clixml.md). `ConvertTo-Xml` returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` doesn't have an option to convert objects to CLI XML. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Debug-Runspace.md b/reference/7.6/Microsoft.PowerShell.Utility/Debug-Runspace.md index 12119195bd0..39e3a51c99b 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Debug-Runspace.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Debug-Runspace.md @@ -18,7 +18,8 @@ Starts an interactive debugging session with a runspace. ### RunspaceParameterSet (Default) ``` -Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] [] +Debug-Runspace [-Runspace] [-BreakAll] [-WhatIf] [-Confirm] + [] ``` ### NameParameterSet diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md b/reference/7.6/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md index b3f283a9618..2ccbd704bc5 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md @@ -27,8 +27,8 @@ Disable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confir ### Id ``` -Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Disable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -44,7 +44,7 @@ when you create them using the `Set-PSBreakpoint` cmdlet. A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see -[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md). +[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md). ## EXAMPLES diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md b/reference/7.6/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md index d9ae2a52a36..96f2efa81a8 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md @@ -41,7 +41,8 @@ Disable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Disable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md b/reference/7.6/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md index adba380e4a6..d7212dd2883 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md @@ -27,8 +27,8 @@ Enable-PSBreakpoint [-PassThru] [-Breakpoint] [-WhatIf] [-Confirm ### Id ``` -Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] [-Confirm] - [] +Enable-PSBreakpoint [-PassThru] [-Id] [-Runspace ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md b/reference/7.6/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md index 124e2bfb978..6fefb72fca2 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md @@ -41,7 +41,8 @@ Enable-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Enable-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md index ab231951efd..61e047e9b56 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-Alias.md @@ -20,17 +20,17 @@ Exports information about currently defined aliases to a file. ### ByPath (Default) ``` -Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] [-Append] - [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] + [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Alias -LiteralPath [[-Name] ] [-PassThru] [-As ] - [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias -LiteralPath [[-Name] ] [-PassThru] + [-As ] [-Append] [-Force] [-NoClobber] [-Description ] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,52 +47,52 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "alias.csv" +Export-Alias -Path Alias.csv ``` -This command exports current alias information to a file named Alias.csv in the current directory. +This command exports current alias information to a file named `Alias.csv` in the current directory. ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "alias.csv" -NoClobber +Export-Alias -Path Alias.csv -NoClobber ``` -This command exports the aliases in the current session to an Alias.csv file. +This command exports the aliases in the current session to an `Alias.csv` file. -Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already +Because the **NoClobber** parameter is specified, the command will fail if an `Alias.csv` file already exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path Alias.csv -Append -Description "Appended Aliases" -Force ``` -This command appends the aliases in the current session to the Alias.csv file. +This command appends the aliases in the current session to the `Alias.csv` file. The command uses the **Description** parameter to add a description to the comments at the top of the file. -The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if +The command also uses the **Force** parameter to overwrite any existing `Alias.csv` files, even if they have the read-only attribute. ### Example 4: Export aliases as a script ```powershell -Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) +Export-Alias -Path Alias.ps1 -As Script +Add-Content -Path $PROFILE -Value (Get-Content Alias.ps1) $S = New-PSSession -ComputerName Server01 -Invoke-Command -Session $S -FilePath .\alias.ps1 +Invoke-Command -Session $S -FilePath .\Alias.ps1 ``` This example shows how to use the script file format that `Export-Alias` generates. -The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As** +The first command exports the aliases in the session to the `Alias.ps1` file. It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias. -The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. +The second command adds the aliases in the `Alias.ps1` file to the CurrentUser-CurrentHost profile. The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md index 546c5aececa..f3d26fd3175 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -18,21 +18,21 @@ Creates an XML-based representation of an object or objects and stores it in a f ### ByPath (Default) ``` -Export-Clixml [-Depth ] [-Path] -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] [-Path] -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The `Export-Clixml` cmdlet serialized an object into a Common Language Infrastructure (CLI) -XML-based representation stores it in a file. You can then use the `Import-Clixml` cmdlet to +The `Export-Clixml` cmdlet serializes an object into a Common Language Infrastructure (CLI) +XML-based representation and stores it in a file. You can then use the `Import-Clixml` cmdlet to recreate the saved object based on the contents of that file. For more information about CLI, see [Language independence](/dotnet/standard/language-independence). @@ -192,7 +192,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-Csv.md index f6aed2d3ddf..a4a2ad381f5 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-Csv.md @@ -22,19 +22,19 @@ file. ### Delimiter (Default) ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [[-Delimiter] ] [-IncludeTypeInformation] - [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] - [-Confirm] [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [[-Delimiter] ] + [-IncludeTypeInformation] [-NoTypeInformation] [-QuoteFields ] + [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] [] ``` ### UseCulture ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] - [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -56,7 +56,7 @@ file. ```powershell Get-Process -Name WmiPrvSE | - Select-Object -Property BasePriority,Id,SessionId,WorkingSet | + Select-Object -Property BasePriority, Id, SessionId, WorkingSet | Export-Csv -Path .\WmiData.csv -NoTypeInformation Import-Csv -Path .\WmiData.csv ``` @@ -145,11 +145,12 @@ Get-Content -Path .\Processes.csv The `Get-Culture` cmdlet uses the nested properties **TextInfo** and **ListSeparator** and displays the current culture's default list separator. The `Get-Process` cmdlet gets **Process** objects. The process objects are sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts the -process objects to a series of CSV strings. The **Path** parameter specifies that the `Processes.csv` -file is saved in the current directory. The **UseCulture** parameter uses the current culture's -default list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE** -information header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet -uses the **Path** parameter to display the file located in the current directory. +process objects to a series of CSV strings. The **Path** parameter specifies that the +`Processes.csv` file is saved in the current directory. The **UseCulture** parameter uses the +current culture's default list separator as the delimiter. The **NoTypeInformation** parameter +removes the **#TYPE** information header from the CSV output and is not required in PowerShell 6. +The `Get-Content` cmdlet uses the **Path** parameter to display the file located in the current +directory. ### Example 5: Export processes with type information @@ -180,13 +181,13 @@ This example describes how to export objects to a CSV file and use the **Append* objects to an existing file. ```powershell -$AppService = Get-Service -DisplayName *Application* | +$AppService = Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status $AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation Get-Content -Path .\Services.Csv -$WinService = Get-Service -DisplayName *Windows* | +$WinService = Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status $WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append @@ -256,10 +257,10 @@ Get-Content -Path .\FTDateTime.csv The `Get-Date` cmdlet gets the **DateTime** object. The object is sent down the pipeline to the `Select-Object` cmdlet. `Select-Object` uses the **Property** parameter to select a subset of object properties. The object is sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts -the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved in -the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information header -from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the **Path** -parameter to display the CSV file located in the current directory. +the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved +in the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information +header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the +**Path** parameter to display the CSV file located in the current directory. When the `Format-Table` cmdlet is used within the pipeline to select properties unexpected results are received. `Format-Table` sends table format objects down the pipeline to the `Export-Csv` cmdlet @@ -365,7 +366,7 @@ the file located in the current directory. This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv +Get-Date | Export-Csv -QuoteFields "DateTime", "Date" -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -379,7 +380,7 @@ DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thur This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv +Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -401,7 +402,7 @@ $person1 = @{ $person2 = @{ Name = 'Jane Smith' - Number = 1 + Number = 2 } $allPeople = $person1, $person2 @@ -450,6 +451,10 @@ this parameter, `Export-Csv` replaces the file contents without warning. This parameter was introduced in Windows PowerShell 3.0. +Beginning with PowerShell 7.7, using the **Append** parameter with the **NoHeader** parameter throws +an error message instead of accepting the invalid combination and creating a headerless CSV file +that causes subsequent append operations to fail. + ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -503,7 +508,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-FormatData.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-FormatData.md index 940f8235bd5..39a515c1eb5 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-FormatData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-FormatData.md @@ -17,15 +17,15 @@ Saves formatting data from the current session in a formatting file. ### ByPath (Default) ``` -Export-FormatData -InputObject -Path [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -Path [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ### ByLiteralPath ``` -Export-FormatData -InputObject -LiteralPath [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -LiteralPath [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.6/Microsoft.PowerShell.Utility/Export-PSSession.md index 84c8bafb44d..5f1392b30ca 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -12,7 +12,6 @@ title: Export-PSSession # Export-PSSession ## SYNOPSIS - Exports commands from another session and saves them in a PowerShell module. ## SYNTAX @@ -22,9 +21,9 @@ Exports commands from another session and saves them in a PowerShell module. ``` Export-PSSession [-OutputModule] [-Force] [-Encoding ] [[-CommandName] ] [-AllowClobber] [-ArgumentList ] - [-CommandType ] [-Module ] [-FullyQualifiedModule ] - [[-FormatTypeName] ] [-Certificate ] [-Session] - [] + [-CommandType ] [-Module ] + [-FullyQualifiedModule ] [[-FormatTypeName] ] + [-Certificate ] [-Session] [] ``` ## DESCRIPTION @@ -293,7 +292,8 @@ The acceptable values for this parameter are as follows: (`$Env:PATH`). - `Filter` and `Function`: All PowerShell functions. - `Script` Script files accessible in the current session. -- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). +- `Workflow` A PowerShell workflow. For more information, see + [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). These values are defined as a flag-based enumeration. You can combine multiple values together to set multiple flags using this parameter. The values can be passed to the **CommandType** parameter diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/7.6/Microsoft.PowerShell.Utility/Format-Custom.md index d2b12c54da1..7421e590af7 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Format-Custom.md @@ -17,9 +17,9 @@ Uses a customized view to format the output. ## SYNTAX ``` -Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/7.6/Microsoft.PowerShell.Utility/Format-Hex.md index 75e568b85fd..8e9e441f408 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Format-Hex.md @@ -13,7 +13,6 @@ title: Format-Hex # Format-Hex ## SYNOPSIS - Displays a file or other input as hexadecimal. ## SYNTAX @@ -33,8 +32,8 @@ Format-Hex -LiteralPath [-Count ] [-Offset ] [ [-Encoding ] [-Count ] [-Offset ] [-Raw] - [] +Format-Hex -InputObject [-Encoding ] [-Count ] + [-Offset ] [-Raw] [] ``` ## DESCRIPTION @@ -109,7 +108,8 @@ It will pass each object through the Pipeline and process individually. However, data, and the adjacent object is also numeric, it will group them into a single output block. ```powershell -'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | Format-Hex +'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | + Format-Hex ``` ```Output @@ -199,7 +199,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. @@ -261,7 +261,8 @@ Specifies the complete path to a file. The value of **LiteralPath** is used exac This parameter does not accept wildcard characters. To specify multiple paths to files, separate the paths with a comma. If the **LiteralPath** parameter includes escape characters, enclose the path in single quotation marks. PowerShell does not interpret any characters in a single quoted string as -escape sequences. For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +escape sequences. For more information, see +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -332,7 +333,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Format-Table.md b/reference/7.6/Microsoft.PowerShell.Utility/Format-Table.md index 5c515eb274c..4ddbcc1c3bd 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Format-Table.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Format-Table.md @@ -278,12 +278,12 @@ Accept wildcard characters: False Specifies the format of the collection object and the objects in the collection. This parameter is designed to format objects that support the [ICollection](xref:System.Collections.ICollection)([System.Collections](xref:System.Collections)) -interface. The default value is **EnumOnly**. -The acceptable values for this parameter are as follows: +interface. The default value is **EnumOnly**. The acceptable values for this parameter are as +follows: -- **EnumOnly**: Displays the properties of the objects in the collection. -- **CoreOnly**: Displays the properties of the collection object. -- **Both**: Displays the properties of the collection object and the properties of objects in the +- `EnumOnly`: Displays the properties of the objects in the collection. +- `CoreOnly`: Displays the properties of the collection object. +- `Both`: Displays the properties of the collection object and the properties of objects in the collection. ```yaml diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Format-Wide.md b/reference/7.6/Microsoft.PowerShell.Utility/Format-Wide.md index 6926e1618f1..f83bc47f86b 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Format-Wide.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Format-Wide.md @@ -17,9 +17,9 @@ Formats objects as a wide table that displays only one property of each object. ## SYNTAX ``` -Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Alias.md index 542ca7cf849..6b0f12d2a65 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Alias.md @@ -20,13 +20,15 @@ Gets the aliases for the current session. ### Default (Default) ``` -Get-Alias [[-Name] ] [-Exclude ] [-Scope ] [] +Get-Alias [[-Name] ] [-Exclude ] [-Scope ] + [] ``` ### Definition ``` -Get-Alias [-Exclude ] [-Scope ] [-Definition ] [] +Get-Alias [-Exclude ] [-Scope ] [-Definition ] + [] ``` ## DESCRIPTION @@ -182,7 +184,8 @@ are: - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -`Local` is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +`Local` is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -200,7 +203,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Date.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Date.md index 537955d0d98..26c8f59d011 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Date.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Date.md @@ -18,33 +18,33 @@ Gets the current date and time. ### DateAndFormat (Default) ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### DateAndUFormat ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ### UnixTimeSecondsAndFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### UnixTimeSecondsAndUFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Error.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Error.md index 9ab22f84694..58d4247385f 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Error.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Error.md @@ -13,7 +13,6 @@ title: Get-Error # Get-Error ## SYNOPSIS - Gets and displays the most recent error messages from the current session. ## SYNTAX @@ -157,7 +156,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-FormatData.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-FormatData.md index 9bce9d94778..397f2fc344b 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-FormatData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-FormatData.md @@ -16,7 +16,8 @@ Gets the formatting data in the current session. ## SYNTAX ``` -Get-FormatData [[-TypeName] ] [-PowerShellVersion ] [] +Get-FormatData [[-TypeName] ] [-PowerShellVersion ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Host.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Host.md index cd2f2c25124..933c45418e9 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Host.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Host.md @@ -234,7 +234,8 @@ use these features interchangeably. > variable. For more information, see > [about_ANSI_Terminals](../Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md). -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). ## RELATED LINKS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md index 8cc359a69a2..e44c4fcd7cd 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md @@ -26,19 +26,22 @@ Get-PSBreakpoint [[-Script] ] [-Runspace ] [] -Command [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Command [-Runspace ] + [] ``` ### Variable ``` -Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] + [] ``` ### Type ``` -Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] + [] ``` ### Id diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Random.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Random.md index 4d38170744e..824b6e2a219 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Random.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Random.md @@ -25,7 +25,8 @@ Get-Random [-SetSeed ] [[-Maximum] ] [-Minimum ] [-Count ### RandomListItemParameterSet ``` -Get-Random [-SetSeed ] [-InputObject] [-Count ] [] +Get-Random [-SetSeed ] [-InputObject] [-Count ] + [] ``` ### ShuffleParameterSet diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md index dc587d58846..86b89b49565 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md @@ -41,7 +41,8 @@ Get-RunspaceDebug [-RunspaceInstanceId] [] ### ProcessNameParameterSet ``` -Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] [] +Get-RunspaceDebug [[-ProcessName] ] [[-AppDomainName] ] + [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-SecureRandom.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-SecureRandom.md index d0c8cf40465..8bb83f6c941 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-SecureRandom.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-SecureRandom.md @@ -18,7 +18,8 @@ Gets a random number, or selects objects randomly from a collection. ### RandomNumberParameterSet (Default) ``` -Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] [] +Get-SecureRandom [[-Maximum] ] [-Minimum ] [-Count ] + [] ``` ### RandomListItemParameterSet @@ -205,8 +206,8 @@ In this example, the **InputObject** parameter specifies an array that contains Get-SecureRandom -InputObject @('a','',$null) ``` -`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a blank -line and `$null` returns to a PowerShell prompt. +`Get-SecureRandom` returns either `a`, empty string, or `$null`. The empty string displays as a +blank line and `$null` returns to a PowerShell prompt. ## PARAMETERS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-TraceSource.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-TraceSource.md index b280edde646..80ecf011f0e 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-TraceSource.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-TraceSource.md @@ -69,7 +69,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 diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-TypeData.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-TypeData.md index c0790ef1d7b..82de4381c54 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-TypeData.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-TypeData.md @@ -99,9 +99,9 @@ else { The command uses the `Get-TypeData` cmdlet to get the extended type data for the **System.DataTime** type. The command gets the **Members** property of the **TypeData** object. -The **Members** property contains a hash table of properties and methods that are defined by extended -type data. Each key in the Members hash table is a property or method name and each value is the -definition of the property or method value. +The **Members** property contains a hash table of properties and methods that are defined by +extended type data. Each key in the Members hash table is a property or method name and each value +is the definition of the property or method value. The command gets the **DateTime** key in **Members** and its **GetScriptBlock** property value. diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Get-Variable.md b/reference/7.6/Microsoft.PowerShell.Utility/Get-Variable.md index f2e9c96b249..325b355685f 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Get-Variable.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Get-Variable.md @@ -18,8 +18,8 @@ Gets the variables in the current console. ## SYNTAX ``` -Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] [-Scope ] - [] +Get-Variable [[-Name] ] [-ValueOnly] [-Include ] [-Exclude ] + [-Scope ] [] ``` ## DESCRIPTION @@ -168,7 +168,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-Alias.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-Alias.md index 4e909bf8371..8b86bd32af5 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-Alias.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-Alias.md @@ -20,22 +20,24 @@ Imports an alias list from a file. ### ByPath (Default) ``` -Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] [] +Import-Alias [-Path] [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] + [] ``` ### ByLiteralPath ``` -Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] [-Confirm] - [] +Import-Alias -LiteralPath [-Scope ] [-PassThru] [-Force] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION The `Import-Alias` cmdlet imports an alias list from a file. -Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite existing aliases by default. -To overwrite an existing alias, after assuring that the contents of the alias file is safe, use the **Force** parameter. +Beginning in Windows PowerShell 3.0, as a security feature, `Import-Alias` does not overwrite +existing aliases by default. To overwrite an existing alias, after assuring that the contents of the +alias file is safe, use the **Force** parameter. ## EXAMPLES @@ -47,16 +49,22 @@ Import-Alias test.txt This command imports alias information from a file named test.txt. +### Example 2: Get a list of defined aliases and their options + +Use the following command to display information about the currently-defined aliases: + +```powershell +Get-Alias | Select-Object Name, Options +``` + +If the corresponding alias is read-only, it will be displayed in the value of the **Options** +property. + ## PARAMETERS ### -Force Allows the cmdlet to import an alias that is already defined or is read only. -You can use the following command to display information about the currently-defined aliases: - -`Get-Alias | Select-Object Name, Options` - -If the corresponding alias is read-only, it will be displayed in the value of the **Options** property. ```yaml Type: System.Management.Automation.SwitchParameter @@ -72,11 +80,10 @@ Accept wildcard characters: False ### -LiteralPath -Specifies the path to a file that includes exported alias information. -Unlike the **Path** parameter, the value of the **LiteralPath** parameter 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 a file that includes exported alias information. Unlike the **Path** +parameter, the value of the **LiteralPath** parameter 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 @@ -132,7 +139,8 @@ The acceptable values for this parameter are: - Global - Local - Script -- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) +- A number relative to the current scope (0 through the number of scopes, where 0 is the current + scope and 1 is its parent) The default is Local. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). @@ -184,7 +192,10 @@ Accept wildcard characters: False ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md index 4cf7b7eb5c7..f55ab2d9ef6 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-Clixml.md @@ -25,8 +25,8 @@ Import-Clixml [-Path] [-IncludeTotalCount] [-Skip ] [-First < ### ByLiteralPath ``` -Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] [-First ] - [] +Import-Clixml -LiteralPath [-IncludeTotalCount] [-Skip ] + [-First ] [] ``` ## DESCRIPTION diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Import-Csv.md b/reference/7.6/Microsoft.PowerShell.Utility/Import-Csv.md index 794c152f7b4..b7eb8b4edbd 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Import-Csv.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Import-Csv.md @@ -13,7 +13,6 @@ title: Import-Csv # Import-Csv ## SYNOPSIS - Creates table-like custom objects from the items in a character-separated value (CSV) file. ## SYNTAX @@ -21,15 +20,15 @@ Creates table-like custom objects from the items in a character-separated value ### DelimiterPath (Default) ``` -Import-Csv [[-Delimiter] ] [-Path] [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] [-Path] [-Header ] + [-Encoding ] [] ``` ### DelimiterLiteralPath ``` -Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] [-Encoding ] - [] +Import-Csv [[-Delimiter] ] -LiteralPath [-Header ] + [-Encoding ] [] ``` ### CulturePath diff --git a/reference/7.6/Microsoft.PowerShell.Utility/Measure-Object.md b/reference/7.6/Microsoft.PowerShell.Utility/Measure-Object.md index 57d881f7594..560bb4cb71d 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/Measure-Object.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/Measure-Object.md @@ -20,15 +20,16 @@ objects, such as files of text. ### GenericMeasure (Default) ``` -Measure-Object [[-Property] ] [-InputObject ] [-StandardDeviation] - [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] [] +Measure-Object [[-Property] ] [-InputObject ] + [-StandardDeviation] [-Sum] [-AllStats] [-Average] [-Maximum] [-Minimum] + [] ``` ### TextMeasure ``` -Measure-Object [[-Property] ] [-InputObject ] [-Line] [-Word] - [-Character] [-IgnoreWhiteSpace] [] +Measure-Object [[-Property] ] [-InputObject ] [-Line] + [-Word] [-Character] [-IgnoreWhiteSpace] [] ``` ## DESCRIPTION @@ -529,7 +530,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.7/Microsoft.PowerShell.Security/Set-Acl.md b/reference/7.7/Microsoft.PowerShell.Security/Set-Acl.md index dd74eef7259..6bbf18d3ec6 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/Set-Acl.md +++ b/reference/7.7/Microsoft.PowerShell.Security/Set-Acl.md @@ -131,20 +131,20 @@ Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl These commands disable access inheritance from parent folders, while still preserving the existing inherited access rules. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. Next, variables are created to convert the inherited access rules to explicit access rules. To protect the access rules associated with this from inheritance, set the `$isProtected` variable to `$true`. To allow inheritance, set `$isProtected` to `$false`. For more information, see -[set access rule protection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection). +[set access rule protection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A). Set the `$preserveInheritance` variable to `$true` to preserve inherited access rules or `$false` to remove inherited access rules. Then the access rule protection is updated using the **SetAccessRuleProtection()** method. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the ACLs of the Dog.txt that were inherited from the Pets folder will be applied directly -to Dog.txt, and new access policies added to Pets will not change the access to Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor to `Dog.txt`. When the command +completes, the ACLs of the `Dog.txt` that were inherited from the Pets folder will be applied directly +to `Dog.txt`, and new access policies added to Pets will not change the access to `Dog.txt`. ### Example 5: Grant Administrators Full Control of the file @@ -156,29 +156,33 @@ $fileSystemRights = "FullControl" $type = "Allow" # Create new rule $fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type -$fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList +$newParams = @{ + TypeName = 'System.Security.AccessControl.FileSystemAccessRule' + ArgumentList = $fileSystemAccessRuleArgumentList +} +$fileSystemAccessRule = New-Object @newParams # Apply new rule $NewAcl.SetAccessRule($fileSystemAccessRule) Set-Acl -Path "C:\Pets\Dog.txt" -AclObject $NewAcl ``` -This command will grant the **BUILTIN\Administrators** group Full control of the Dog.txt file. +This command will grant the **BUILTIN\Administrators** group Full control of the `Dog.txt` file. -The first command uses the `Get-Acl` cmdlet to get the security descriptor of the Dog.txt file. +The first command uses the `Get-Acl` cmdlet to get the security descriptor of the `Dog.txt` file. -Next variables are created to grant the **BUILTIN\Administrators** group full control of the Dog.txt -file. The `$identity` variable set to the name of a -[user account](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor). The +Next variables are created to grant the **BUILTIN\Administrators** group full control of the +`Dog.txt` file. The `$identity` variable set to the name of a +[user account](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A). The `$fileSystemRights` variable set to FullControl, and can be any one of the -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) values that specifies -the type of operation associated with the access rule. The `$type` variable set to "Allow" to -specifies whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable -is an argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) values that specifies the +type of operation associated with the access rule. The `$type` variable set to "Allow" to specifies +whether to allow or deny the operation. The `$fileSystemAccessRuleArgumentList` variable is an +argument list is to be passed when making the new **FileSystemAccessRule** object. Then a new **FileSystemAccessRule** object is created, and the **FileSystemAccessRule** object is passed to the **SetAccessRule()** method, adds the new access rule. -The last command uses `Set-Acl` to apply the security descriptor of to Dog.txt. When the command -completes, the **BUILTIN\Administrators** group will have full control of the Dog.txt. +The last command uses `Set-Acl` to apply the security descriptor of to `Dog.txt`. When the command +completes, the **BUILTIN\Administrators** group will have full control of the `Dog.txt`. ## PARAMETERS @@ -343,7 +347,7 @@ Changes the security descriptor of the specified item. Enter the path to an item a file or registry key. Wildcards are permitted. If you pass a security object to `Set-Acl` (either by using the **AclObject** or -**SecurityDescriptor** parameters or by passing a security object from Get-Acl to `Set-Acl`), and +**SecurityDescriptor** parameters or by passing a security object from `Get-Acl` to `Set-Acl`), and you omit the **Path** parameter (name and value), `Set-Acl` uses the path that is included in the security object. @@ -430,8 +434,8 @@ can use it to change the security descriptors of files, directories, and registr [Get-Acl](Get-Acl.md) -[FileSystemAccessRule](/dotnet/api/system.security.accesscontrol.filesystemaccessrule.-ctor) +[FileSystemAccessRule](xref:System.Security.AccessControl.FileSystemAccessRule.%23ctor%2A) -[ObjectSecurity.SetAccessRuleProtection](/dotnet/api/system.security.accesscontrol.objectsecurity.setaccessruleprotection) +[ObjectSecurity.SetAccessRuleProtection](xref:System.Security.AccessControl.ObjectSecurity.SetAccessRuleProtection%2A) -[FileSystemRights](/dotnet/api/system.security.accesscontrol.filesystemrights) +[FileSystemRights](xref:System.Security.AccessControl.FileSystemRights) diff --git a/reference/7.7/Microsoft.PowerShell.Security/Test-FileCatalog.md b/reference/7.7/Microsoft.PowerShell.Security/Test-FileCatalog.md index 33ea3a2ac2c..2f49151a77b 100644 --- a/reference/7.7/Microsoft.PowerShell.Security/Test-FileCatalog.md +++ b/reference/7.7/Microsoft.PowerShell.Security/Test-FileCatalog.md @@ -30,7 +30,7 @@ Test-FileCatalog [-Detailed] [-FilesToSkip ] [-CatalogFilePath] [!NOTE] -> As of PowerShell 7.2, Extended Type System properties of **DateTime** and -> **String** objects are no longer serialized and only the simple object is -> converted to JSON format +> As of PowerShell 7.2, Extended Type System properties of **DateTime** and **String** objects are +> no longer serialized and only the simple object is converted to JSON format You can then use the `ConvertFrom-Json` cmdlet to convert a JSON-formatted string to a JSON object, which is easily managed in PowerShell. @@ -41,8 +40,7 @@ web-based apps. As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds the depth specified for the command. This prevents unwanted data loss when converting objects. -As of PowerShell 7.5-preview.3, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON -numbers. +As of PowerShell 7.5, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON numbers. This cmdlet was introduced in Windows PowerShell 3.0. @@ -293,7 +291,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.Utility/ConvertTo-Xml.md b/reference/7.7/Microsoft.PowerShell.Utility/ConvertTo-Xml.md index db1eb6ae104..9194c36bca8 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/ConvertTo-Xml.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/ConvertTo-Xml.md @@ -30,10 +30,10 @@ When you pipe multiple objects to `ConvertTo-Xml` or use the **InputObject** par multiple objects, `ConvertTo-Xml` returns a single, in-memory XML document that includes representations of all the objects. -This cmdlet is similar to [Export-Clixml](./Export-Clixml.md) except that `Export-Clixml` stores the +This cmdlet is similar to [Export-Clixml](Export-Clixml.md) except that `Export-Clixml` stores the resulting XML in a [Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) -file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md). `ConvertTo-Xml` +file that can be reimported as objects with [Import-Clixml](Import-Clixml.md). `ConvertTo-Xml` returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` doesn't have an option to convert objects to CLI XML. diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md b/reference/7.7/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md index 455a02578b5..b57c151e2dc 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md @@ -44,7 +44,7 @@ when you create them using the `Set-PSBreakpoint` cmdlet. A breakpoint is a point in a script where execution stops temporarily so that you can examine the instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets designed for debugging PowerShell scripts. For more information about the PowerShell debugger, see -[about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md). +[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md). ## EXAMPLES diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.7/Microsoft.PowerShell.Utility/Export-Alias.md index d9c83978b6a..9ce709e18eb 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Export-Alias.md @@ -47,52 +47,52 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "alias.csv" +Export-Alias -Path Alias.csv ``` -This command exports current alias information to a file named Alias.csv in the current directory. +This command exports current alias information to a file named `Alias.csv` in the current directory. ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "alias.csv" -NoClobber +Export-Alias -Path Alias.csv -NoClobber ``` -This command exports the aliases in the current session to an Alias.csv file. +This command exports the aliases in the current session to an `Alias.csv` file. -Because the **NoClobber** parameter is specified, the command will fail if an Alias.csv file already +Because the **NoClobber** parameter is specified, the command will fail if an `Alias.csv` file already exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path Alias.csv -Append -Description "Appended Aliases" -Force ``` -This command appends the aliases in the current session to the Alias.csv file. +This command appends the aliases in the current session to the `Alias.csv` file. The command uses the **Description** parameter to add a description to the comments at the top of the file. -The command also uses the **Force** parameter to overwrite any existing Alias.csv files, even if +The command also uses the **Force** parameter to overwrite any existing `Alias.csv` files, even if they have the read-only attribute. ### Example 4: Export aliases as a script ```powershell -Export-Alias -Path "alias.ps1" -As Script -Add-Content -Path $PROFILE -Value (Get-Content alias.ps1) +Export-Alias -Path Alias.ps1 -As Script +Add-Content -Path $PROFILE -Value (Get-Content Alias.ps1) $S = New-PSSession -ComputerName Server01 -Invoke-Command -Session $S -FilePath .\alias.ps1 +Invoke-Command -Session $S -FilePath .\Alias.ps1 ``` This example shows how to use the script file format that `Export-Alias` generates. -The first command exports the aliases in the session to the Alias.ps1 file. It uses the **As** +The first command exports the aliases in the session to the `Alias.ps1` file. It uses the **As** parameter with a value of Script to generate a file that contains a Set-Alias command for each alias. -The second command adds the aliases in the Alias.ps1 file to the CurrentUser-CurrentHost profile. +The second command adds the aliases in the `Alias.ps1` file to the CurrentUser-CurrentHost profile. The path to the profile is saved in the `$PROFILE` variable. The command uses the `Get-Content` cmdlet to get the aliases from the Alias.ps1 file and the `Add-Content` cmdlet to add them to the profile. For more information, see diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.7/Microsoft.PowerShell.Utility/Export-Clixml.md index 452ceb83170..6aae230370a 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -31,8 +31,8 @@ Export-Clixml [-Depth ] -LiteralPath -InputObject [-F ## DESCRIPTION -The `Export-Clixml` cmdlet serialized an object into a Common Language Infrastructure (CLI) -XML-based representation stores it in a file. You can then use the `Import-Clixml` cmdlet to +The `Export-Clixml` cmdlet serializes an object into a Common Language Infrastructure (CLI) +XML-based representation and stores it in a file. You can then use the `Import-Clixml` cmdlet to recreate the saved object based on the contents of that file. For more information about CLI, see [Language independence](/dotnet/standard/language-independence). @@ -192,7 +192,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/7.7/Microsoft.PowerShell.Utility/Export-Csv.md index 6f2be0a446a..e39cc65faea 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Export-Csv.md @@ -13,6 +13,7 @@ title: Export-Csv # Export-Csv ## SYNOPSIS + Converts objects into a series of character-separated value (CSV) strings and saves the strings to a file. @@ -55,7 +56,7 @@ file. ```powershell Get-Process -Name WmiPrvSE | - Select-Object -Property BasePriority,Id,SessionId,WorkingSet | + Select-Object -Property BasePriority, Id, SessionId, WorkingSet | Export-Csv -Path .\WmiData.csv -NoTypeInformation Import-Csv -Path .\WmiData.csv ``` @@ -365,7 +366,7 @@ the file located in the current directory. This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv +Get-Date | Export-Csv -QuoteFields "DateTime", "Date" -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -379,7 +380,7 @@ DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thur This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv +Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -401,7 +402,7 @@ $person1 = @{ $person2 = @{ Name = 'Jane Smith' - Number = 1 + Number = 2 } $allPeople = $person1, $person2 @@ -507,7 +508,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.7/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/7.7/Microsoft.PowerShell.Utility/Format-Hex.md index 352abfecff6..2f7784db5b9 100644 --- a/reference/7.7/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/7.7/Microsoft.PowerShell.Utility/Format-Hex.md @@ -108,7 +108,8 @@ It will pass each object through the Pipeline and process individually. However, data, and the adjacent object is also numeric, it will group them into a single output block. ```powershell -'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | Format-Hex +'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | + Format-Hex ``` ```Output @@ -198,7 +199,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. @@ -261,7 +262,7 @@ This parameter does not accept wildcard characters. To specify multiple paths to paths with a comma. If the **LiteralPath** parameter includes escape characters, enclose the path in single quotation marks. PowerShell does not interpret any characters in a single quoted string 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[]