Updates from: 03/09/2022 02:45:11
Service Microsoft Docs article Related commit history on GitHub Change details
CimCmdlets Export Binarymilog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Export-BinaryMiLog.md
Title: Export-BinaryMiLog
# Export-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Creates a binary encoded representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
``` Export-BinaryMiLog [-InputObject <CimInstance>] [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-BinaryMILog` cmdlet creates a binary-based representation of an object or objects and stores it in a file. You can then use the `Import-BinaryMiLog` cmdlet to re-create the saved object
based on the contents of that file.
This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Create a binary representation of CimInstances
This command exports **CimInstances** to a binary MI log file specified by the P
the example for Import-BinaryMiLog to see how to recreate the **CimInstances** by importing this file.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
CimCmdlets Get Cimassociatedinstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Get-CimAssociatedInstance.md
Title: Get-CimAssociatedInstance
# Get-CimAssociatedInstance
-## Synopsis
+## SYNOPSIS
Retrieves the CIM instances that are connected to a specific CIM instance by an association.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimAssociatedInstance [[-Association] <String>] [-ResultClassName <String>]
[-ResourceUri <Uri>] -CimSession <CimSession[]> [-KeyOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CimAssociatedInstance` cmdlet retrieves the CIM instances connected to a specific CIM instance, called the source instance, by an association.
If the InputObject parameter is not specified, the cmdlet works in one of the fo
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get all the associated instances of a specific instance
named `$s`. The association class name for the **Win32_DependentService** is ret
the `Get-CimAssociatedInstance` cmdlet to get all the associated instances of the retrieved association class.
-## Parameters
+## PARAMETERS
### -Association
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets Get Cimclass (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Get-CimClass.md
Title: Get-CimClass
# Get-CimClass
-## Synopsis
+## SYNOPSIS
Gets a list of CIM classes in a specific namespace.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutS
[-QualifierName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CimClass` cmdlet retrieves a list of CIM classes in a specific namespace. If there is no class name supplied, then the cmdlet returns all the classes in the namespace. Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.
-## Examples
+## EXAMPLES
### Example 1: Get all the class definitions
Get-CimClass -ClassName *disk* -CimSession $s
This set of commands creates a session with multiple computers and stores it into a variable `$s` using the `New-CimSession` cmdlet, and then gets the classes using the `Get-CimClass` cmdlet.
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimClass This cmdlet returns a CIM class object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimSession](New-CimSession.md)
CimCmdlets Get Ciminstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Get-CimInstance.md
Title: Get-CimInstance
# Get-CimInstance
-## Synopsis
+## SYNOPSIS
Gets the CIM instances of a class from a CIM server.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-Namespace <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CimInstance` cmdlet gets the CIM instances of a class from a CIM server. You can specify either the class name or a query for this cmdlet. This cmdlet returns one or more CIM instance
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
- If the either the **ComputerName** parameter or the **CimSession** parameter is specified, then this cmdlet uses the either the CimSession parameter value or **ComputerName** parameter value.
-## Examples
+## EXAMPLES
### Example 1: Get the CIM instances of a specified class
$s = New-CimSession -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s ```
-## Parameters
+## PARAMETERS
### -CimSession
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
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance This cmdlet accepts an input objects specified with the InputObject parameter.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance This cmdlet returns one or more CIM instance objects representing a snapshot of the CIM instances on the CIM server.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Get Cimsession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Get-CimSession.md
Title: Get-CimSession
# Get-CimSession
-## Synopsis
+## SYNOPSIS
Gets the CIM session objects from the current session.
-## Syntax
+## SYNTAX
### ComputerNameSet (Default)
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
By default, the cmdlet gets all of the CIM sessions created in the current PowerShell session. You can use the parameters of `Get-CimSession` to get the sessions that are for particular computers, or
sessions that were created in other PowerShell sessions or that were created on
For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
-## Examples
+## EXAMPLES
### Example 1: Get CIM sessions from the current PowerShell session
ComputerName : Server02
Protocol : WSMAN ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Import Binarymilog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Import-BinaryMiLog.md
Title: Import-BinaryMiLog
# Import-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Used to re-create the saved objects based on the contents of an export file.
-## Syntax
+## SYNTAX
``` Import-BinaryMiLog [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Use this cmdlet to re-create saved objects based on the contents of an export file created by `Export-BinaryMILog`. This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Restore objects exported to a file
stores the resulting object in a binary encoded file.
Import-BinaryMiLog -Path "Processes.bmil" ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
CimCmdlets Invoke Cimmethod (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Invoke-CimMethod.md
Title: Invoke-CimMethod
# Invoke-CimMethod
-## Synopsis
+## SYNOPSIS
Invokes a method of a CIM class.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Invoke-CimMethod -Query <String> [-QueryDialect <String>] -CimSession <CimSessio
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-CimMethod` cmdlet invokes a method of a CIM class or CIM instance using the name-value pairs specified by the **Arguments** parameter.
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not a common scenario.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' } ```
-## Parameters
+## PARAMETERS
### -Arguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimClass
This cmdlet accepts a CIM class as an input object.
This cmdlet accepts a CIM instance as an input object.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Ciminstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/New-CimInstance.md
Title: New-CimInstance
# New-CimInstance
-## Synopsis
+## SYNOPSIS
Creates a CIM instance.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
New-CimInstance [-CimClass] <CimClass> [[-Property] <IDictionary>] [-OperationTi
[-ComputerName <String[]>] [-ClientOnly] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-CimInstance` cmdlet creates an instance of a CIM class based on the class definition on either the local computer or a remote computer. By default, the `New-CimInstance` cmdlet creates an instance on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Create an instance of a CIM class
that **Prop1** and **Prop2** actually exist and that the keys are marked correct
You cannot use the **ComputerName** or **CimSession** parameter with the **ClientOnly** parameter.
-## Parameters
+## PARAMETERS
### -CimClass
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains the CIM instance information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Cimsession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/New-CimSession.md
Title: New-CimSession
--- # New-CimSession
-## Synopsis
+## SYNOPSIS
Creates a CIM session.
-## Syntax
+## SYNTAX
### CredentialParameterSet (Default)
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-
[-SessionOption <CimSessionOptions>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-CimSession` cmdlet creates a CIM session. A CIM session is a client-side object representing a connection to a local computer or a remote computer. The CIM session contains
identifiers.
This cmdlet returns a CIM session object that can be used by all other CIM cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session with default options
$SessionOption = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server1 -SessionOption $SessionOption ```
-## Parameters
+## PARAMETERS
### -Authentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no inputs.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)
CimCmdlets New Cimsessionoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/New-CimSessionOption.md
Title: New-CimSessionOption
# New-CimSessionOption
-## Synopsis
+## SYNOPSIS
Specifies advanced options for the New-CimSession cmdlet.
-## Syntax
+## SYNTAX
### ProtocolTypeSet (Default)
New-CimSessionOption [-Impersonation <ImpersonationType>] [-PacketIntegrity] [-P
[-UICulture <CultureInfo>] [-Culture <CultureInfo>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-CimSessionOption` cmdlet creates an instance of a CIM session options object. You use a CIM session options object as input to the `New-CimSession` cmdlet to specify the options for a CIM
This cmdlet has two parameter sets, one for WsMan options and one for Distribute
Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session options object for DCOM
This example specifies the culture that is used for the CIM session. By default,
client is used when performing operations. However, the default culture can be overridden using the **Culture** parameter.
-## Parameters
+## PARAMETERS
### -Culture
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### CIMSessionOption This cmdlet returns an object that contains CIM session options information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
CimCmdlets Register Cimindicationevent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Register-CimIndicationEvent.md
Title: Register-CimIndicationEvent
--- # Register-CimIndicationEvent
-## Synopsis
+## SYNOPSIS
Subscribes to indications using a filter expression or a query expression.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Register-CimIndicationEvent [-Namespace <String>] [-Query] <String> [-QueryDiale
[-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-CimIndicationEvent` cmdlet subscribes to indications using an indication class name or a query expression. Use the **SourceIdentifier** parameter give a name to the subscription.
a query expression. Use the **SourceIdentifier** parameter give a name to the su
This cmdlet returns an **EventSubscription** object. You can use this object to cancel the subscription.
-## Examples
+## EXAMPLES
### Example 1: Register the events generated by a class
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifi
Get-Event -SourceIdentifier "ProcessStarted" ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet outputs an **EventSubscription** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Event](../microsoft.powershell.utility/get-event.md)
CimCmdlets Remove Ciminstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Remove-CimInstance.md
Title: Remove-CimInstance
--- # Remove-CimInstance
-## Synopsis
+## SYNOPSIS
Removes a CIM instance from a computer.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Remove-CimInstance [-ComputerName <String[]>] [[-Namespace] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet removes a CIM instance from a CIM server. You can specify the CIM instance to remove by using either a CIM instance object retrieved by the `Get-CimInstance` cmdlet, or by specifying a
If the **InputObject** parameter is not specified, the cmdlet works in one of th
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Remove the CIM instance
$var = Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "note
Remove-CimInstance -InputObject $var ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### None This cmdlet produces no outputs.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimInstance](New-CimInstance.md)
CimCmdlets Remove Cimsession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Remove-CimSession.md
Title: Remove-CimSession
# Remove-CimSession
-## Synopsis
+## SYNOPSIS
Removes one or more CIM sessions.
-## Syntax
+## SYNTAX
### CimSessionSet (Default)
Remove-CimSession -InstanceId <Guid[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CimSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-CimSession` cmdlet removes one or more CIM session objects from the local PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove all the CIM sessions
but only output what would happen if it were done.
Remove-CimSession -Name a* -WhatIf ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains CIM session information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimSession](Get-CimSession.md)
CimCmdlets Set Ciminstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/CimCmdlets/Set-CimInstance.md
Title: Set-CimInstance
--- # Set-CimInstance
-## Synopsis
+## SYNOPSIS
Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Set-CimInstance [-ComputerName <String[]>] [-Namespace <String>] [-OperationTime
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet modifies a CIM instance on a CIM server.
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not very common.
-## Examples
+## EXAMPLES
### Example 1: Set the CIM instance
$x = New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";Use
Set-CimInstance -CimInstance $x -Property @{VariableValue="somevalue"} -PassThru ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance When the **Passthru** parameter is specified, this cmdlet returns a modified CIM instance object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
ISE Get Isesnippet (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/ISE/Get-IseSnippet.md
Title: Get-IseSnippet
# Get-IseSnippet
-## Synopsis
+## SYNOPSIS
Gets snippets that the user created.
-## Syntax
+## SYNTAX
``` Get-IseSnippet [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-IseSnippet` cmdlet gets the PS1XML files that contain reusable text snippets that the user created. It works only in Windows PowerShell Integrated Scripting Environment (ISE).
This cmdlet does not get built-in snippets or snippets that are imported from mo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all user-defined snippets
a snippet file.
The `Format-Table` cmdlet displays the **DisplayTitle** and **Description** properties of the snippets in a table.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a file object that represents the snippet file.
-## Notes
+## NOTES
* The `New-IseSnippet` cmdlet stores new user-created snippets in unsigned .ps1xml files. As such, Windows PowerShell cannot add them to a session in which the execution policy is **AllSigned** or
This cmdlet returns a file object that represents the snippet file.
For more information about Windows PowerShell execution policies, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[New-IseSnippet](New-IseSnippet.md)
ISE Import Isesnippet (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/ISE/Import-IseSnippet.md
Title: Import-IseSnippet
--- # Import-IseSnippet
-## Synopsis
+## SYNOPSIS
Imports ISE snippets into the current session
-## Syntax
+## SYNTAX
### FromFolder (Default)
Import-IseSnippet [-Path] <String> [-Recurse] [<CommonParameters>]
Import-IseSnippet [-Recurse] -Module <String> [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-IseSnippet` cmdlet imports reusable text "snippets" from a module or a directory into the current session. The snippets are immediately available for use in Windows PowerShell ISE. This
not get imported snippets.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Import snippets from a directory
available in every Windows PowerShell ISE session.
Copy-Item -Destination $home\Documents\WindowsPowerShell\Snippets ```
-## Parameters
+## PARAMETERS
### -ListAvailable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate output.
-## Notes
+## NOTES
- You cannot use the `Get-IseSnippet` cmdlet to get imported snippets. `Get-IseSnippet` gets only snippets in the `$home\Documents\WindowsPowerShell\Snippets` directory.
This cmdlet does not generate output.
For more information about Windows PowerShell execution policies, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-IseSnippet](Get-IseSnippet.md)
ISE New Isesnippet (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/ISE/New-IseSnippet.md
Title: New-IseSnippet
--- # New-IseSnippet
-## Synopsis
+## SYNOPSIS
Creates a Windows PowerShell ISE code snippet.
-## Syntax
+## SYNTAX
``` New-IseSnippet [-Title] <String> [-Description] <String> [-Text] <String> [-Author <String>] [-CaretOffset <Int32>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ISESnippet` cmdlet creates a reusable text "snippet" for Windows PowerShell ISE. You can use snippets to add text to the Script pane or Command pane in Windows PowerShell ISE. This cmdlet
You cannot use user-created snippets in a session in which the execution policy
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Create a Comment-Based help snippet
Copy-Item "$Home\Documents\WindowsPowerShell\Snippets\Mandatory.Snippets.ps1xml"
This command uses the `Copy-Item` cmdlet to copy the **Mandatory** snippet from the folder where `New-ISESnippet` places it to the Server\Share file share.
-## Parameters
+## PARAMETERS
### -Author
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`New-IseSnippet` stores new user-created snippets in unsigned .ps1xml files. As such, Windows PowerShell cannot add them to a session in which the execution policy is **AllSigned** or
For more information about Windows PowerShell execution policies, see [about_Exe
- You can create a snippet that has the same name as a built-in snippet. Both snippets appear in the snippet menu in Windows PowerShell ISE.
-## Related links
+## RELATED LINKS
[Get-IseSnippet](Get-IseSnippet.md)
Microsoft.PowerShell.Archive Compress Archive (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Archive/Compress-Archive.md
Title: Compress-Archive
# Compress-Archive
-## Synopsis
+## SYNOPSIS
Creates a compressed archive, or zipped file, from specified files and directories.
-## Syntax
+## SYNTAX
### Path (Default)
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-Compressi
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compress-Archive` cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, with optional compression, into
The maximum file size is 2 GB because there's a limitation of the underlying API
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Compress files to create an archive file
The command updates `Draft.Zip` with newer versions of existing files in the `C:
directory and its subdirectories. And, new files that were added to `C:\Reference` or its subdirectories are included in the updated `Draft.Zip` archive.
-## Parameters
+## PARAMETERS
### -CompressionLevel
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
Using recursion and sending objects down the pipeline can duplicate files in your archive. For example, if you use `Get-ChildItem` with the **Recurse** parameter, each **FileInfo** and
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Expand-Archive](Expand-Archive.md)
Microsoft.PowerShell.Archive Expand Archive (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Archive/Expand-Archive.md
Title: Expand-Archive
# Expand-Archive
-## Synopsis
+## SYNOPSIS
Extracts files from a specified archive (zipped) file.
-## Syntax
+## SYNTAX
### Path (Default)
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-Wh
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Expand-Archive` cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage.
-## Examples
+## EXAMPLES
### Example 1: Extract the contents of an archive
specified by the **DestinationPath** parameter.
Expand-Archive -Path Draftv2.Zip -DestinationPath C:\Reference ```
-## Parameters
+## PARAMETERS
### -DestinationPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to an existing archive file.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
The [ZIP file specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) does not specify a standard way of encoding filenames that contain non-ASCII characters. The
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Compress-Archive](compress-archive.md)
Microsoft.PowerShell.Core About Language Keywords (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md
about topic for the keyword and the information that follows the table.
| Keyword | Reference | | ------------ | ----------------------------------------------------------------------------------------------------------------- |
-| Begin | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Break | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
-| Catch | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Class | [about_Classes](about_Classes.md) |
-| Continue | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
-| Data | [about_Data_Sections](about_Data_Sections.md) |
-| Define | Reserved for future use |
-| Do | [about_Do](about_Do.md), [about_While](about_While.md) |
-| DynamicParam | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
-| Else | [about_If](about_If.md) |
-| Elseif | [about_If](about_If.md) |
-| End | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Enum | [about_Enum](about_Enum.md) |
-| Exit | [Described in this topic](#exit) |
-| Filter | [about_Functions](about_Functions.md) |
-| Finally | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| For | [about_For](about_For.md) |
-| ForEach | [about_ForEach](about_ForEach.md) |
-| From | Reserved for future use |
-| Function | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Hidden | [about_Hidden](about_Hidden.md) |
-| If | [about_If](about_If.md) |
-| In | [about_ForEach](about_ForEach.md) |
-| Param | [about_Functions](about_Functions.md) |
-| Process | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Return | [about_Return](about_Return.md) |
-| Static | [about_Classes](about_Classes.md) |
-| Switch | [about_Switch](about_Switch.md) |
-| Throw | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Trap | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Try | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Until | [about_Do](about_Do.md) |
-| Using | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
-| Var | Reserved for future use |
-| While | [about_While](about_While.md), [about_Do](about_Do.md) |
+| `begin` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `break` | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
+| `catch` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `class` | [about_Classes](about_Classes.md) |
+| `continue` | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
+| `data` | [about_Data_Sections](about_Data_Sections.md) |
+| `define` | Reserved for future use |
+| `do` | [about_Do](about_Do.md), [about_While](about_While.md) |
+| `dynamicparam` | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
+| `else` | [about_If](about_If.md) |
+| `elseif` | [about_If](about_If.md) |
+| `end` | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `enum` | [about_Enum](about_Enum.md) |
+| `exit` | [Described in this topic](#exit) |
+| `filter` | [about_Functions](about_Functions.md) |
+| `finally` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `for` | [about_For](about_For.md) |
+| `foreach` | [about_ForEach](about_ForEach.md) |
+| `from` | Reserved for future use |
+| `function` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `hidden` | [about_Hidden](about_Hidden.md) |
+| `if` | [about_If](about_If.md) |
+| `in` | [about_ForEach](about_ForEach.md) |
+| `param` | [about_Functions](about_Functions.md) |
+| `process` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `return` | [about_Return](about_Return.md) |
+| `static` | [about_Classes](about_Classes.md) |
+| `switch` | [about_Switch](about_Switch.md) |
+| `throw` | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `trap` | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `try` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `until` | [about_Do](about_Do.md) |
+| `using` | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
+| `var` | Reserved for future use |
+| `while` | [about_While](about_While.md), [about_Do](about_Do.md) |
The following keywords are used by PowerShell workflows:
-| Keyword | Reference |
-| ------------ | ---------------------------------------------------------------------------- |
-| InlineScript | [about_InlineScript](/powershell/module/psworkflow/about/about_inlinescript) |
-| Parallel | [about_Parallel](/powershell/module/psworkflow/about/about_Parallel) |
-| Sequence | [about_Sequence](/powershell/module/psworkflow/about/about_sequence) |
-| Workflow | [about_Workflows](/powershell/module/psworkflow/about/about_workflows) |
+| Keyword | Reference |
+| -------------- | ---------------------------------------------------------------------------- |
+| `inlinescript` | [about_InlineScript](/powershell/module/psworkflow/about/about_inlinescript) |
+| `parallel` | [about_Parallel](/powershell/module/psworkflow/about/about_Parallel) |
+| `sequence` | [about_Sequence](/powershell/module/psworkflow/about/about_sequence) |
+| `workflow` | [about_Workflows](/powershell/module/psworkflow/about/about_workflows) |
For more information about workflows, see [Running PowerShell Commands in a Workflow](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574197(v=ws.11)).
-## Begin
+## `begin`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Process`, and `End` keywords. The `Begin` statement list runs one time before
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`process`, and `end` keywords. The `begin` statement list runs one time before
any objects are received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Break
+## `break`
Causes a script to exit a loop.
while (<condition>) {
} ```
-## Catch
+## `catch`
-Specifies a statement list to run if an error occurs in the accompanying `Try`
+Specifies a statement list to run if an error occurs in the accompanying `try`
statement list. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
try {<statement list>}
catch [[<error type>]] {<statement list>} ```
-## Class
+## `class`
Specifies a new class in PowerShell.
class <class-name> {
} ```
-## Continue
+## `continue`
Causes a script to stop running a loop and to go back to the condition. If the condition is met, the script begins the loop again.
while (<condition>) {
} ```
-## Data
+## `data`
In a script, defines a section that isolates data from the script logic. Can
-also include `If` statements and some limited commands.
+also include `if` statements and some limited commands.
Syntax:
Syntax:
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>} ```
-## Do
+## `do`
-Used with the `While` or `Until` keyword as a looping construct. PowerShell
-runs the statement list at least one time, unlike a loop that uses `While`.
+Used with the `while` or `until` keyword as a looping construct. PowerShell
+runs the statement list at least one time, unlike a loop that uses `while`.
-Syntax for `While`:
+Syntax for `while`:
```Syntax do {<statement list>} while (<condition>) ```
-Syntax for `Until`:
+Syntax for `until`:
```Syntax do {<statement list>} until (<condition>) ```
-## DynamicParam
+## `dynamicparam`
-Specifies one part of the body of a function, along with the `Begin`, `Process`,
-and `End` keywords. Dynamic parameters are added at run time.
+Specifies one part of the body of a function, along with the `begin`, `process`,
+and `end` keywords. Dynamic parameters are added at runtime.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Else
+## `else`
-Used with the `If` keyword to specify the default statement list.
+Used with the `if` keyword to specify the default statement list.
Syntax:
if (<condition>) {<statement list>}
else {<statement list>} ```
-## Elseif
+## `elseif`
-Used with the `If` and `Else` keywords to specify additional conditionals. The
-`Else` keyword is optional.
+Used with the `if` and `else` keywords to specify additional conditionals. The
+`else` keyword is optional.
Syntax:
elseif (<condition>) {<statement list>}
else {<statement list>} ```
-## End
+## `end`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. The `End` statement list runs one time after all
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. The `end` statement list runs one time after all
the objects have been received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Enum
+## `enum`
`enum` is used to declare an enumeration; a distinct type that consists of a set of named labels called the enumerator list.
enum <enum-name> {
} ```
-## Exit
+## `exit`
Causes PowerShell to exit a script or a PowerShell instance.
to indicate the post-execution status of the script.
Any number between `[int]::MinValue` and `[int]::MaxValue` is allowed. In PowerShell, the `exit` statement sets the value of the `$LASTEXITCODE`
-variable. In the Windows Command Shell (cmd.exe), the exit statement sets the
+variable. In the Windows Command Shell (`cmd.exe`), the exit statement sets the
value of the `%ERRORLEVEL%` environment variable. Any argument that is non-numeric or outside the platform-specific range is translated to the value of `0`.
-In the following example, the user sets the error level variable value to 4 by
-adding `exit 4` to the script file `test.ps1`.
+In the following example, the user sets the error level variable value to **4**
+by adding `exit 4` to the script file `test.ps1`.
```cmd C:\scripts\test>type test.ps1
C:\scripts\test>echo %ERRORLEVEL%
4 ```
-When you run `pwsh.exe -File <path to a script>` and the script file terminates
+When you run `powershell.exe -File <path to a script>` and the script file terminates
with an `exit` command, the exit code is set to the numeric argument used with the `exit` command. If the script has no `exit` statement, the exit code is always `0` when the script completes without error or `1` when the script terminates from an unhandled exception.
-## Filter
+## `filter`
Specifies a function in which the statement list runs one time for each input
-object. It has the same effect as a function that contains only a Process
+object. It has the same effect as a function that contains only a `process`
block. Syntax:
Syntax:
filter <name> {<statement list>} ```
-## Finally
+## `finally`
Defines a statement list that runs after statements that are associated with
-`Try` and `Catch`. A `Finally` statement list runs even if you press
-<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the Exit keyword
+`try` and `catch`. A `finally` statement list runs even if you press
+<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the `exit` keyword
in the script. Syntax:
catch [<error type>] {<statement list>}
finally {<statement list>} ```
-## For
+## `for`
-Defines a loop by using a condition.
+Defines a loop with a condition.
Syntax:
Syntax:
for (<initialize>; <condition>; <iterate>) { <statement list> } ```
-## ForEach
+## `foreach`
-Defines a loop by using each member of a collection.
+Defines a loop using each member of a collection.
Syntax: ```Syntax
-ForEach (<item> in <collection>) { <statement list> }
+foreach (<item> in <collection>) { <statement list> }
```
-## From
+## `from`
Reserved for future use.
-## Function
+## `function`
Creates a named statement list of reusable code. You can name the scope a
-function belongs to. And, you can specify one or more named parameters by using
-the `Param` keyword. Within the function statement list, you can include
-`DynamicParam`, `Begin`, `Process`, and `End` statement lists.
+function belongs to. You can also specify one or more named parameters by using
+the `param` keyword. Within the function statement list, you can include
+`dynamicparam`, `begin`, `process`, and `end` statement lists.
Syntax: ```Syntax function [<scope:>]<name> { param ([type]<$pname1> [, [type]<$pname2>])
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>}
Syntax:
```Syntax function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## If
+## `if`
Defines a conditional.
Syntax:
if (<condition>) {<statement list>} ```
-## Hidden
+## `hidden`
-Hides class members from the default results of the `Get-Member` cmdlet, and
-from IntelliSense and tab completion results.
+Hides class members from the default results of the `Get-Member` cmdlet,
+IntelliSense, and tab completion results.
Syntax: ```Syntax
-Hidden [data type] $member_name
+hidden [data type] $member_name
```
-## In
+## `in`
-Used in a `ForEach` statement to create a loop that uses each member of a
+Used in a `foreach` statement to create a loop that uses each member of a
collection. Syntax: ```Syntax
-ForEach (<item> in <collection>){<statement list>}
+foreach (<item> in <collection>){<statement list>}
```
-## Param
+## `param`
Defines the parameters in a function.
function [<scope:>]<name> {
} ```
-## Process
+## `process`
-Specifies a part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. When a `Process` statement list receives input
-from the pipeline, the `Process` statement list runs one time for each element
-from the pipeline. If the pipeline provides no objects, the `Process` statement
+Specifies a part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. When a `process` statement list receives input
+from the pipeline, the `process` statement list runs one time for each element
+from the pipeline. If the pipeline provides no objects, the `process` statement
list does not run. If the command is the first command in the pipeline, the
-`Process` statement list runs one time.
+`process` statement list runs one time.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Return
+## `return`
Causes PowerShell to leave the current scope, such as a script or function, and writes the optional expression to the output.
Syntax:
return [<expression>] ```
-## Static
+## `static`
Specifies the property or method defined is common to all instances of the
-class in which is defined.
+class in which it is defined.
-See `Class` for usage examples.
+See `class` for usage examples.
-## Switch
+## `switch`
-To check multiple conditions, use a `Switch` statement. The `Switch` statement
-is equivalent to a series of `If` statements, but it is simpler.
+To check multiple conditions, use a `switch` statement. The `switch` statement
+is equivalent to a series of `if` statements, but it is simpler.
-The `Switch` statement lists each condition and an optional action. If a
+The `switch` statement lists each condition and an optional action. If a
condition obtains, the action is performed. Syntax 1:
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
} ```
-## Throw
+## `throw`
Throws an object as an error.
Syntax:
throw [<object>] ```
-## Trap
+## `trap`
Defines a statement list to be run if an error is encountered. An error type requires brackets. The second pair of brackets indicates that the error type
Syntax:
trap [[<error type>]] {<statement list>} ```
-## Try
+## `try`
Defines a statement list to be checked for errors while the statements run. If
-an error occurs, PowerShell continues running in a `Catch` or `Finally`
+an error occurs, PowerShell continues running in a `catch` or `finally`
statement. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
catch [[<error type>]] {<statement list>}
finally {<statement list>} ```
-## Until
+## `until`
-Used in a `Do` statement as a looping construct where the statement list is
+Used in a `do` statement as a looping construct where the statement list is
executed at least one time. Syntax:
Syntax:
do {<statement list>} until (<condition>) ```
-## Using
+## `using`
-Allows to indicate which namespaces are used in the session. Classes and
-members require less typing to mention them. You can also include classes from
-modules.
+Allows indicating which namespaces are used in the session. Classes and members
+require less typing to mention them. You can also include classes from modules.
Syntax #1:
Syntax #2:
using module <module-name> ```
-## While
+## `while`
The `while` statement is a looping construct where the condition is tested
-before the statements are executed. If the condition is FALSE, then the
+before the statements are executed. If the condition is false, then the
statements do not execute. Statement syntax:
while (<condition>) {
} ```
-When used in a `Do` statement, `while` is part of a looping construct where
+When used in a `do` statement, `while` is part of a looping construct where
the statement list is executed at least one time.
-Do loop Syntax:
+`do` loop Syntax:
```Syntax do {<statement list>} while (<condition>)
Microsoft.PowerShell.Core Add History (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Add-History.md
Title: Add-History
# Add-History
-## Synopsis
+## SYNOPSIS
Appends entries to the session history.
-## Syntax
+## SYNTAX
``` Add-History [[-InputObject] <PSObject[]>] [-Passthru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-History` cmdlet adds entries to the end of the session history, that is, the list of commands entered during the current session.
export the commands to a CSV or XML file, then import the commands, and pass the
`Add-History`. You can use this cmdlet to add specific commands to the history or to create a single history file that includes commands from more than one session.
-## Examples
+## EXAMPLES
### Example 1: Add commands to the history of a different session
The **InputObject** parameter passes the results of the command in parentheses t
cmdlet. The command in parentheses, which is executed first, imports the `history.xml` file into PowerShell. The `Add-History` cmdlet then adds the commands in the file to the session history.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.HistoryInfo You can pipe a **HistoryInfo** object to this cmdlet.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a **HistoryInfo** object if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the
the file.
To modify the session history, export the session to a CSV or XML file, modify the file, import the file, and use `Add-History` to append it to the current session history.
-## Related links
+## RELATED LINKS
[Clear-History](Clear-History.md)
Microsoft.PowerShell.Core Add Pssnapin (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Add-PSSnapin.md
Title: Add-PSSnapin
# Add-PSSnapin
-## Synopsis
+## SYNOPSIS
Adds one or more Windows PowerShell snap-ins to the current session.
-## Syntax
+## SYNTAX
``` Add-PSSnapin [-Name] <String[]> [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-PSSnapin` cmdlet adds registered Windows PowerShell snap-ins to the current session. After the snap-ins are added, you can use the cmdlets and providers that the snap-ins support in the
packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a
By default, only the **Microsoft.PowerShell.Core** snap-in is added to the session. Modules are imported automatically on first use and you can use the Import-Module cmdlet to import them.
-## Examples
+## EXAMPLES
### Example 1: Add snap-ins
This example demonstrates the process of registering a snap-in on your system an
your session. It uses ManagementFeatures, a fictitious snap-in implemented in a file that is named ManagementCmdlets.dll.
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSSnapInInfo This cmdlet returns a PSSnapInInfo object that represents the snap-in if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are installed with Windows PowerShell are packaged in modules. In Windows PowerShell 2.0, and in host programs that create older-style
This cmdlet returns a PSSnapInInfo object that represents the snap-in if you spe
compatible with the current version of Windows PowerShell. If the snap-in fails the version check, Windows PowerShell reports an error.
-## Related links
+## RELATED LINKS
[Get-PSSnapin](Get-PSSnapin.md)
Microsoft.PowerShell.Core Clear History (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Clear-History.md
Title: Clear-History
# Clear-History
-## Synopsis
+## SYNOPSIS
Deletes entries from the PowerShell session command history.
-## Syntax
+## SYNTAX
### IDParameter (Default)
Clear-History [[-Count] <int>] [-CommandLine <string[]>] [-Newest] [-WhatIf] [-C
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Clear-History` deletes the command history from a PowerShell session. Each PowerShell session has its own command history. To display the command history, use the `Get-History` cmdlet.
history. To display the `PSReadLine` configuration for command history, use `Get
`PSReadLine` shipped with PowerShell 5.0 and above. For more information, see [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Delete the command history from a PowerShell session
command history. The **Id** parameter specifies to begin with **Id 7**. The **Co
specifies to delete five commands, inclusive of the specified **Id**. `Get-History` displays the updated command history and confirms that five commands were deleted, **Id 3** - **Id 7**.
-## Parameters
+## PARAMETERS
### -CommandLine
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-History`.
-## Outputs
+## OUTPUTS
### None `Clear-History` does not generate any output.
-## Notes
+## NOTES
The PowerShell session history is a list of the commands entered during a PowerShell session. You can view the history, add and delete commands, and run commands from the history. For more
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Related links
+## RELATED LINKS
[about_History](About/about_History.md)
Microsoft.PowerShell.Core Clear Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Clear-Host.md
Title: Clear-Host
# Clear-Host
-## Synopsis
+## SYNOPSIS
Clears the display in the host program.
-## Syntax
+## SYNTAX
``` Clear-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Host` function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function
function.
Because the behavior of the `Clear-Host` function is determined by the host program, `Clear-Host` might work differently in different host programs.
-## Examples
+## EXAMPLES
### Example 1
PS C:>
This command uses the `cls` alias of `Clear-Host` to clear the current display.
-## Parameters
+## PARAMETERS
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Clear-Host`.
-## Outputs
+## OUTPUTS
### None `Clear-Host` does not generate any output
-## Notes
+## NOTES
`Clear-Host` is a simple function, not an advanced function. As such, you cannot use common parameters, such as **Debug**, in a `Clear-Host` command.
-## Related links
+## RELATED LINKS
[Get-Host](../Microsoft.PowerShell.Utility/Get-Host.md)
Microsoft.PowerShell.Core Connect Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Connect-PSSession.md
Title: Connect-PSSession
--- # Connect-PSSession
-## Synopsis
+## SYNOPSIS
Reconnects to disconnected sessions.
-## Syntax
+## SYNTAX
### Name (Default)
Connect-PSSession -InstanceId <Guid[]> [-ThrottleLimit <Int32>] [-WhatIf] [-Conf
Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Connect-PSSession` cmdlet reconnects to user-managed PowerShell sessions (**PSSessions**) that were disconnected. It works on sessions that are disconnected intentionally, such as by using the
For more information about the Disconnected Sessions feature, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Reconnect to a session
The ninth command disconnects from the session in the `$s` variable.The administ
PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session (**PSSession**) to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession This cmdlet returns an object that represents the session to which it reconnected.
-## Notes
+## NOTES
- This cmdlet is only available on Windows platforms.
This cmdlet returns an object that represents the session to which it reconnecte
sessions are considered to be idle from the moment that they are disconnected, even if commands are running in the disconnected session.
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](Disconnect-PSSession.md)
Microsoft.PowerShell.Core Debug Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Debug-Job.md
Title: Debug-Job
# Debug-Job
-## Synopsis
+## SYNOPSIS
Debugs a running background, remote, or Windows PowerShell Workflow job.
-## Syntax
+## SYNTAX
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
accepts a running job object, name, ID, or instance ID as input, and starts a de
the script it is running. The debugger `quit` command stops the job and running script. The `exit` command detaches the debugger, and allows the job to continue to run.
-## Examples
+## EXAMPLES
### Example 1: Debug a job by job ID
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Disable Psremoting (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Disable-PSRemoting.md
Title: Disable-PSRemoting
--- # Disable-PSRemoting
-## Synopsis
+## SYNOPSIS
Prevents PowerShell endpoints from receiving remote connections.
-## Syntax
+## SYNTAX
``` Disable-PSRemoting [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSRemoting` cmdlet blocks remote access to all Windows PowerShell session endpoint configurations on the local computer. This includes any endpoints created by PowerShell 6 or higher.
configurations, see [about_Session_Configurations](About/about_Session_Configura
To run this cmdlet, start Windows PowerShell with the **Run as administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Prevent remote access to all session configurations
microsoft.ServerManager BUILTIN\Administrators AccessAllowed
WithProfile NT AUTHORITY\NETWORK AccessDenied, BUILTIN\Administrators AccessAllowed ```
-## Parameters
+## PARAMETERS
### -Force Forces the command to run without asking for user confirmation.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Disabling the session configurations does not undo all the changes that were made by the `Enable-PSRemoting` or `Enable-PSSessionConfiguration` cmdlets. You might have to undo the
This cmdlet does not generate any output.
`Disable-PSRemoting` is the equivalent of `Set-PSSessionConfiguration -Name \<Configuration name\> -AccessMode Local`
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disable Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Disable-PSSessionConfiguration.md
Title: Disable-PSSessionConfiguration
--- # Disable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Disables session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Disable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSSessionConfiguration` cmdlet disables session configurations on the local computer, which prevents all users from using the session configurations to create a user-managed sessions
connect to the computer.
To disable all session configurations on the computer, use `Disable-PSRemoting`.
-## Examples
+## EXAMPLES
### Example 1: Disable the default configuration
For more information, see the about_Remote_Troubleshooting Help topic.
> Disabling the configuration does not prevent you from changing the configuration using the > `Set-PSSessionConfiguration` cmdlet. It only prevents use of the configuration.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Enable-PSSessionConfiguration](Enable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disconnect Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Title: Disconnect-PSSession
# Disconnect-PSSession
-## Synopsis
+## SYNOPSIS
Disconnects from a session.
-## Syntax
+## SYNTAX
### Session (Default)
Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
[-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disconnect-PSSession` cmdlet disconnects a PowerShell session ("PSSession"), such as one started by using the `New-PSSession` cmdlet, from the current session. As a result, the PSSession
For more information about the Disconnected Sessions feature, see
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1 - Disconnect a session by name
timeout to the 12-hour maximum.
The seventh command gets the value of the **IdleTimeout** property of the disconnected session, which is measured in milliseconds. The output confirms that the command was successful.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session to `Disconnect-PSSession`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession `Disconnect-PSSession` returns an object that represents the session that it disconnected.
-## Notes
+## NOTES
- The `Disconnect-PSSession` cmdlet works only when the local and remote computers are running PowerShell 3.0 or later.
You can pipe a session to `Disconnect-PSSession`.
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Enable Psremoting (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Title: Enable-PSRemoting
--- # Enable-PSRemoting
-## Synopsis
+## SYNOPSIS
Configures the computer to receive remote commands.
-## Syntax
+## SYNTAX
``` Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSRemoting` cmdlet configures the computer to receive PowerShell remote commands that are sent by using the WS-Management technology.
option. This does not apply to Linux or MacOS versions of PowerShell.
> might appear to succeed, but the remoting is not configured correctly. Remote commands and later > attempts to enable and disable remoting, are likely to fail.
-## Examples
+## EXAMPLES
### Example 1: Configure a computer to receive remote commands
subnets.
> The name of the firewall rule can be different depending on the version of Windows. Use the > `Get-NetFirewallRule` cmdlet to list the names of the rules on your system.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns strings that describe its results.
-## Notes
+## NOTES
In PowerShell 3.0, `Enable-PSRemoting` creates the following firewall exceptions for WS-Management communications.
descriptor of session configurations. In PowerShell 3.0, `Enable-PSRemoting` rem
**Deny_All** and **Network_Deny_All** settings. This provides remote access to session configurations that were reserved for local use.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enable Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Enable-PSSessionConfiguration.md
Title: Enable-PSSessionConfiguration
--- # Enable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Enables the session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Enable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-SecurityDescriptorSddl <String>] [-SkipNetworkProfileCheck] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSSessionConfiguration` cmdlet enables registered session configurations that have been disabled, such as by using the `Disable-PSSessionConfiguration` or `Disable-PSRemoting` cmdlets, or
also sets the value of the **Enabled** property of the session configuration
(`AccessMode=Local`) security descriptor setting that allows only users of the local computer to use to the session configuration.
-## Examples
+## EXAMPLES
### Example 1: Re-enable the default session
$sddl = "O:NSG:BAD:P(A;;GXGWGR;;;BA)(A;;GAGR;;;S-1-5-21-123456789-188441444-3100
Enable-PSSessionConfiguration -Name MaintenanceShell -SecurityDescriptorSDDL $sddl ```
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
To use this cmdlet, you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enter Pshostprocess (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Title: Enter-PSHostProcess
# Enter-PSHostProcess
-## Synopsis
+## SYNOPSIS
Connects to and enters into an interactive session with a local process.
-## Syntax
+## SYNTAX
### ProcessIdParameterSet (Default)
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSHostProcess` cmdlet connects to and enters into an interactive session with a local process.
To support attaching to processes on remote computers, the `Enter-PSHostProcess`
in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.
-## Examples
+## EXAMPLES
### Example Part 1: Start debugging a runspace within the PowerShell ISE process
cmdlet. This returns you to the `PS C:\>` prompt.
PS C:\> ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Enter-PSHostProcess` cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a PowerShell ISE
loaded the PowerShell engine.
To exit a process from within the process, type **exit**, and then press <kbd>Enter</kbd>.
-## Related links
+## RELATED LINKS
[Exit-PSHostProcess](Exit-PSHostProcess.md)
Microsoft.PowerShell.Core Enter Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Enter-PSSession.md
Title: Enter-PSSession
--- # Enter-PSSession
-## Synopsis
+## SYNOPSIS
Starts an interactive session with a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Enter-PSSession [-ContainerId] <String> [-ConfigurationName <String>] [-RunAsAdm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSSession` cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as if you were typing directly
interactive session. However, you cannot use the `Disconnect-PSSession`, `Connec
To end the interactive session and disconnect from the remote computer, use the `Exit-PSSession` cmdlet, or type `exit`.
-## Examples
+## EXAMPLES
### Example 1: Start an interactive session
This example shows how to start and stop an interactive session. The first comma
The second command uses the `Exit-PSSession` cmdlet to end the session. You can also use the **Exit** keyword to end the interactive session. `Exit-PSSession` and **Exit** have the same effect.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.Runspaces.PSSession You can pipe a computer name, as a string, or a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
To connect to a remote computer, you must be a member of the Administrators group on the remote computer. To start an interactive session on the local computer, you must start PowerShell with the
If the session you want to enter is busy processing a command, there might be a
PowerShell responds to the `Enter-PSSession` command. You are connected as soon as the session is available. To cancel the `Enter-PSSession` command, press <kbd>CTRL</kbd>+<kbd>C</kbd>.
-## Related links
+## RELATED LINKS
[Exit-PSSession](Exit-PSSession.md)
Microsoft.PowerShell.Core Exit Pshostprocess (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Exit-PSHostProcess.md
Title: Exit-PSHostProcess
# Exit-PSHostProcess
-## Synopsis
+## SYNOPSIS
Closes an interactive session with a local process.
-## Syntax
+## SYNTAX
``` Exit-PSHostProcess [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSHostProcess` cmdlet closes an interactive session with a local process that you have opened by running the `Enter-PSHostProcess` cmdlet. You run the `Exit-PSHostProcess` cmdlet from within the process, when you are finished debugging or troubleshooting a script that is running within a process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### Example 1: Exit a process
in the process, as described in `Enter-PSHostProcess`. After you type the `exit`
debugger, run the `Exit-PSHostProcess` cmdlet to close your interactive session with the process. The cmdlet closes your session in the process, and returns you to the `PS C:\>` prompt.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enter-PSHostProcess](Enter-PSHostProcess.md)
Microsoft.PowerShell.Core Exit Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Exit-PSSession.md
Title: Exit-PSSession
# Exit-PSSession
-## Synopsis
+## SYNOPSIS
Ends an interactive session with a remote computer.
-## Syntax
+## SYNTAX
``` Exit-PSSession [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the `Enter-PSSession` cmdlet.
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using
You can also use the `exit` keyword to end an interactive session. The effect is the same as using `Exit-PSSession`.
-## Examples
+## EXAMPLES
### Example 1: Start and stop an interactive session
PS C:\>
This example uses the `exit` keyword to stop an interactive session started by using `Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet takes only the common parameters.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Export Console (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Export-Console.md
Title: Export-Console
# Export-Console
-## Synopsis
+## SYNOPSIS
Exports the names of snap-ins in the current session to a console file.
-## Syntax
+## SYNTAX
``` Export-Console [[-Path] <String>] [-Force] [-NoClobber] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Console` cmdlet exports the names of the Windows PowerShell snap-ins in the current session to a Windows PowerShell console file (.psc1). You can use this cmdlet to save the snap-ins
then use the **PSConsoleFile** parameter of PowerShell.exe to specify the consol
For more information about Windows PowerShell snap-ins, see [about_PSSnapins](About/about_PSSnapins.md).
-## Examples
+## EXAMPLES
### Example 1: Export the names of snap-ins in the current session
The sixth command uses the `Export-Console` cmdlet without a **Path** parameter.
exports the names of all the Windows PowerShell snap-ins in the current session to the most recently used file, `NewConsole.psc1`.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet creates a file that contains the exported aliases.
-## Notes
+## NOTES
- When a console file (`.psc1`) is used to start the session, the name of the console file is automatically stored in the `$ConsoleFileName` automatic variable. The value of `$ConsoleFileName`
This cmdlet creates a file that contains the exported aliases.
You can also save Windows PowerShell snap-ins for future sessions by adding an Add-PSSnapin command to your Windows PowerShell profile. For more information, see [about_Profiles](About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Add-PSSnapin](Add-PSSnapin.md)
Microsoft.PowerShell.Core Export Modulemember (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Export-ModuleMember.md
Title: Export-ModuleMember
--- # Export-ModuleMember
-## Synopsis
+## SYNOPSIS
Specifies the module members that are exported.
-## Syntax
+## SYNTAX
``` Export-ModuleMember [[-Function] <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [-Alias <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ModuleMember` cmdlet specifies the module members that are exported from a script module (`.psm1`) file, or from a dynamic module created by using the `New-Module` cmdlet. Module members
module imports from other modules.
An `Export-ModuleMember` command is optional, but it is a best practice. Even if the command confirms the default values, it demonstrates the intention of the module author.
-## Examples
+## EXAMPLES
### Example 1: Export functions and aliases in a script module
This command shows how to use `Export-ModuleMember` in a dynamic module that is
In this example, `Export-ModuleMember` is used to export both the `Hi` alias and the `SayHello` function in the dynamic module.
-## Parameters
+## PARAMETERS
### -Alias
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
+## INPUTS
### System.String You can pipe function name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To exclude a member from the list of exported members, add an `Export-ModuleMember` command that lists all other members but omits the member that you want to exclude.
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Foreach Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/ForEach-Object.md
Title: ForEach-Object
--- # ForEach-Object
-## Synopsis
+## SYNOPSIS
Performs an operation against each item in a collection of input objects.
-## Syntax
+## SYNTAX
### ScriptBlockSet (Default)
ForEach-Object [-InputObject <PSObject>] [-MemberName] <String> [-ArgumentList <
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ForEach-Object` cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified by using the **InputObject** parameter.
Starting in Windows PowerShell 3.0, there are two different ways to construct a
`Get-Process | ForEach-Object ProcessName`
-## Examples
+## EXAMPLES
### Example 1: Divide integers in an array
two
three ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns objects that are determined by the input.
-## Notes
+## NOTES
- The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe input to a **Foreach** statement. For more information about the **Foreach** statement, see
This cmdlet returns objects that are determined by the input.
- Starting in PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Core Get Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-Command.md
Title: Get-Command
--- # Get-Command
-## Synopsis
+## SYNOPSIS
Gets all commands.
-## Syntax
+## SYNTAX
### CmdletSet (Default)
Get-Command [[-Name] <String[]>] [-Module <String[]>] [-FullyQualifiedModule <Mo
[-All] [-ListImported] [-ParameterName <String[]>] [-ParameterType <PSTypeName[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Command` cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. `Get-Command` gets the commands from
information from help topics.
Starting in Windows PowerShell 5.0, results of the `Get-Command` cmdlet display a **Version** column by default. A new **Version** property has been added to the **CommandInfo** class.
-## Examples
+## EXAMPLES
### Example 1: Get cmdlets, functions, and aliases
first net adapter that the cmdlet returns. To get the **PSTypeNames** property o
not the **PSTypeNames** property of a collection of net adapters, the command uses array notation to get the first net adapter that the cmdlet returns.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe command names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandInfo
Represents functions and filters.
Represents workflows.
-## Notes
+## NOTES
- When more than one command that has the same name is available to the session, `Get-Command` returns the command that runs when you type the command name. To get commands that have the same
Represents workflows.
`$PSModuleAutoLoadingPreference` preference variable. For more information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Export-PSSession](../Microsoft.PowerShell.Utility/Export-PSSession.md)
Microsoft.PowerShell.Core Get Help (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-Help.md
Title: Get-Help
# Get-Help
-## Synopsis
+## SYNOPSIS
Displays information about PowerShell commands and concepts.
-## Syntax
+## SYNTAX
### AllUsersView (Default)
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] -Detailed [<CommonParameters>] ```
-### Examples
+### EXAMPLES
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] -Examples [<CommonParameters>] ```
-### Parameters
+### PARAMETERS
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component <String[]>]
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] -ShowWindow [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Help` cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, workflows, providers, aliases, and
For information about parameter attributes, such as **Required** and **Position*
> in a module, import the module, either by using the `Import-Module` cmdlet or by running a cmdlet > that's included in the module.
-## Examples
+## EXAMPLES
### Example 1: Display basic help information about a cmdlet
your functions and scripts, see [about_Comment_Based_Help](./About/about_Comment
Get-Help -Name C:\PS-Test\MyScript.ps1 ```
-## Parameters
+## PARAMETERS
### -Category
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-Help`.
-## Outputs
+## OUTPUTS
### ExtendedCmdletHelpInfo
If you get a conceptual help article, `Get-Help` returns it as a string.
If you get a command that has a help file, `Get-Help` returns a **MamlCommandHelpInfo** object.
-## Notes
+## NOTES
PowerShell 3.0 doesn't include help files. To download and install the help files that `Get-Help` reads, use the `Update-Help` cmdlet. You can use the `Update-Help` cmdlet to download and install
following fields:
- **Accepts wildcard characters**. Indicates whether the value of a parameter can include wildcard characters, such as an asterisk (`*`) or question mark (`?`).
-## Related links
+## RELATED LINKS
[about_Command_Syntax](About/about_Command_Syntax.md)
Microsoft.PowerShell.Core Get History (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-History.md
Title: Get-History
--- # Get-History
-## Synopsis
+## SYNOPSIS
Gets a list of the commands entered during the current session.
-## Syntax
+## SYNTAX
``` Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-History` cmdlet gets the session history, that is, the list of commands entered during the current session.
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Get the session history
command.
Get-History | Format-List -Property * ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64 You can pipe a history ID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a history object for each history item that it gets.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the run order, the status, and the start and end times of the command. As you enter each
Starting in Windows PowerShell 3.0, the default value of the `$MaximumHistoryCou
variable is `4096`. In Windows PowerShell 2.0, the default value is `64`. For more information about the `$MaximumHistoryCount` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core Get Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-Job.md
Title: Get-Job
--- # Get-Job
-## Synopsis
+## SYNOPSIS
Gets PowerShell background jobs that are running in the current session.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Get-Job [-IncludeChildJob] [-ChildJobState <JobState>] [-HasMoreData <Boolean>]
Get-Job [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Job` cmdlet gets objects that represent the background jobs that were started in the current session. You can use `Get-Job` to get jobs that were started by using the `Start-Job`
into the session before you run a `Get-Job` command, either by using the `Import
by using or getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get all background jobs started in the current session
Access is denied.
For more information, see the [about_Remote_Troubleshooting](./about/about_Remote_Troubleshooting.md) Help topic.
-## Parameters
+## PARAMETERS
### -After
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.RemotingJob This cmdlet returns objects that represent the jobs in the session.
-## Notes
+## NOTES
The **PSJobTypeName** property of jobs indicates the job type of the job. The property value is determined by the job type author. The following list shows common job types.
determined by the job type author. The following list shows common job types.
`Invoke-Command` cmdlet. - **PSWorkflowJob**. Job started by using the **AsJob** common parameter of workflows.
-## Related links
+## RELATED LINKS
[Invoke-Command](Invoke-Command.md)
Microsoft.PowerShell.Core Get Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-Module.md
Title: Get-Module
--- # Get-Module
-## Synopsis
+## SYNOPSIS
List the modules imported in the current session or that can be imported from the PSModulePath.
-## Syntax
+## SYNTAX
### Loaded (Default)
Get-Module [[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-
-CimSession <CimSession> [-CimResourceUri <Uri>] [-CimNamespace <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Module` cmdlet lists the PowerShell modules that have been imported, or that can be imported, into a PowerShell session. Without parameters, `Get-Module` gets modules that have been
Management Instrumentation (WMI) on the remote computer. Then use the **CIMSessi
`Import-Module` cmdlet and then run the imported commands, the commands run implicitly on the remote computer. You can use this WMI and CIM strategy to manage the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Get modules imported into the current session
The fourth command runs the `Get-Disk` command. Although the command is typed in
it runs implicitly on the remote computer from which it was imported. The command gets objects from the remote computer and returns them to the local session.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe module names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
This cmdlet returns objects that represent modules.
When you specify the **ListAvailable** parameter, `Get-Module` returns a **ModuleInfoGrouping** object, which is a type of **PSModuleInfo** object that has the same properties and methods.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are included in PowerShell are packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a snap-in
object, which is a type of **PSModuleInfo** object that has the same properties
remoting enabled. This includes the local computer. When you create a CIM session on the local computer, PowerShell uses DCOM, instead of WMI, to create the session.
-## Related links
+## RELATED LINKS
[Get-CimSession](../CimCmdlets/Get-CimSession.md)
Microsoft.PowerShell.Core Get Pshostprocessinfo (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-PSHostProcessInfo.md
Title: Get-PSHostProcessInfo
--- # Get-PSHostProcessInfo
-## Synopsis
+## SYNOPSIS
Gets process information about the PowerShell host.
-## Syntax
+## SYNTAX
### ProcessNameParameterSet (Default)
Get-PSHostProcessInfo [-Process] <Process[]> [<CommonParameters>]
Get-PSHostProcessInfo [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSHostProcessInfo` cmdlet gets information about PowerShell host processes running on the local computer. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### 1: Get a list of PowerShell hosts running on the system
ProcessName ProcessId AppDomainName MainWindowTitle
powershell 14676 DefaultAppDomain Windows PowerShell ```
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### System.Diagnostics.Process You can pipe a **Process** object from `Get-Process` to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSHostProcessInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Process](../Microsoft.PowerShell.Management/get-process.md)
Microsoft.PowerShell.Core Get Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-PSSession.md
Title: Get-PSSession
--- # Get-PSSession
-## Synopsis
+## SYNOPSIS
Gets the PowerShell sessions on local and remote computers.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSSession [-InstanceId <Guid[]>] [<CommonParameters>]
Get-PSSession [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSession` cmdlet gets the user-managed PowerShell sessions (**PSSessions**) on local and remote computers.
the current session and connect to the specified computer.
For more information about PowerShell sessions, see [about_PSSessions](about/about_PSSessions.md).
-## Examples
+## EXAMPLES
### Example 1: Get sessions created in the current session
Get-PSSession -Id 2
This command gets the **PSSession** with ID 2. Because the value of the **ID** property is unique only in the current session, the **Id** parameter is valid only for local commands.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet gets user-managed sessions **PSSession** objects" such as those that are created by using the New-PSSession, `Enter-PSSession`, and Invoke-Command cmdlets. It does not get the
For more information about the values of the **State** property of sessions, see
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Get Pssessioncapability (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-PSSessionCapability.md
Title: Get-PSSessionCapability
# Get-PSSessionCapability
-## Synopsis
+## SYNOPSIS
Gets the capabilities of a specific user on a constrained session configuration.
-## Syntax
+## SYNTAX
``` Get-PSSessionCapability [-ConfigurationName] <String> [-Username] <String> [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionCapability` cmdlet gets the capabilities of a specific user on a constrained session configuration. Use this cmdlet to audit customized session configurations for users.
object. This object contains details about the Windows PowerShell runspace the s
interact with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.
-## Examples
+## EXAMPLES
### Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -F
This example returns details about the runspace the user CONTOSO\User would interact with when connecting to the Endpoint1 constrained endpoint.
-## Parameters
+## PARAMETERS
### -ConfigurationName
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.Runspaces.InitialSessionState
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSRoleCapabilityFile](New-PSRoleCapabilityFile.md)
Microsoft.PowerShell.Core Get Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-PSSessionConfiguration.md
Title: Get-PSSessionConfiguration
--- # Get-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Gets the registered session configurations on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSessionConfiguration [[-Name] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionConfiguration` cmdlet gets the session configurations that have been registered on the local computer. This is an advanced cmdlet that is designed to be used by system administrators
session configuration authors to examine and compare session configurations.
To create and register a session configuration, use the `Register-PSSessionConfiguration` cmdlet. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1 - Get session configurations on the local computer
create a session. This variable is set on the local computer, but it specifies a
the remote computer. For more information about the `$PSSessionConfiguration` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration
-## Notes
+## NOTES
- To run this cmdlet, start PowerShell with the **Run as administrator** option.
You cannot pipe input to this cmdlet.
commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Get Pssnapin (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-PSSnapin.md
Title: Get-PSSnapin
# Get-PSSnapin
-## Synopsis
+## SYNOPSIS
Gets the Windows PowerShell snap-ins on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSnapin [[-Name] <String[]>] [-Registered] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSnapin` cmdlet gets the Windows PowerShell snap-ins that have been added to the current session or that have been registered on the system. This cmdlet lists the snap-ins in the order in
packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a
By default, only the **Microsoft.PowerShell.Core** snap-in is added to the session. Modules are imported automatically on first use and you can use the `Import-Module` cmdlet to import them.
-## Examples
+## EXAMPLES
### Example 1: Get snap-ins that are currently loaded
PS C:\> Get-PSSnapIn -Name smp*
This command gets the Windows PowerShell snap-ins in the current session that have names that begin with smp.
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSSnapInInfo `Get-PSSnapin` returns an object for each snap-in that it gets.
-## Notes
+## NOTES
Starting in Windows PowerShell 3.0, the core commands that are installed with Windows PowerShell are packaged in modules. In Windows PowerShell 2.0, and in host programs that create older-style
include core snap-ins.
modules, see [CreateDefault2 Method](/dotnet/api/system.management.automation.runspaces.initialsessionstate.createdefault2#System_Management_Automation_Runspaces_InitialSessionState_CreateDefault2).
-## Related links
+## RELATED LINKS
[Add-PSSnapin](Add-PSSnapin.md)
Microsoft.PowerShell.Core Get Verb (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Get-Verb.md
Title: Get-Verb
--- # Get-Verb
-## Synopsis
+## SYNOPSIS
Gets approved PowerShell verbs.
-## Syntax
+## SYNTAX
``` Get-Verb [[-verb] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Verb` function gets verbs that are approved for use in PowerShell commands.
warning message.
> [Approved Verbs](../../docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md) in > the Microsoft Docs.
-## Examples
+## EXAMPLES
### Example 1 - Get a list of all verbs
Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility ```
-## Parameters
+## PARAMETERS
### -Verb
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).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Selected.Microsoft.PowerShell.Commands.MemberDefinition
-## Notes
+## NOTES
`Get-Verb` returns a modified version of a Microsoft.PowerShell.Commands.MemberDefinition object. The object does not have the standard properties of a MemberDefinition object. Instead it has Verb
Some of the cmdlets that are installed with PowerShell, such as `Tee-Object` and
unapproved verbs. These cmdlets are historic exceptions and their verbs are classified as **reserved**.
-## Related links
+## RELATED LINKS
[Import-Module](import-module.md)
Microsoft.PowerShell.Core Import Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Import-Module.md
Title: Import-Module
# Import-Module
-## Synopsis
+## SYNOPSIS
Adds modules to the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
[-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or
import CIM modules from the remote computer. The imported commands run implicitl
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Import the members of a module into the current session
Number Friendly Name OperationalStatus Total Size Partition Style
0 Virtual HD ATA Device Online 40 GB MBR ```
-## Parameters
+## PARAMETERS
### -Alias
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo, System.Reflection.Assembly You can pipe a module name, module object, or assembly object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSModuleInfo, or System.Management.Automation.PSCustomObject
By default, `Import-Module` does not generate any output. If you specify the **P
the cmdlet generates a **System.Management.Automation.PSModuleInfo** object that represents the module. If you specify the **AsCustomObject** parameter, it generates a **PSCustomObject** object.
-## Notes
+## NOTES
- Before you can import a module, the module must be installed on the local computer. That is, the module directory must be copied to a directory that is accessible to your local computer. For more
module. If you specify the **AsCustomObject** parameter, it generates a **PSCust
statement at the beginning of your script. This imports the module, including the class and enum definitions. For more information, see [about_Using](About/about_Using.md).
-## Related links
+## RELATED LINKS
[about_Modules](about/about_Modules.md)
Microsoft.PowerShell.Core Invoke Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Invoke-Command.md
Title: Invoke-Command
# Invoke-Command
-## Synopsis
+## SYNOPSIS
Runs commands on local and remote computers.
-## Syntax
+## SYNTAX
### InProcess (Default)
Invoke-Command [-ConfigurationName <String>] [-ThrottleLimit <Int32>] [-AsJob] [
[-ArgumentList <Object[]>] -ContainerId <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Command` cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single `Invoke-Command` command, you can run commands on
Before using `Invoke-Command` to run commands on a remote computer, read [about_
Some code samples use splatting to reduce the line length. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Run a script on a server
and the **IdleTimeout** value is set to **43200000** milliseconds (12 hours).
To get the results of commands and scripts that run in disconnected sessions, use the `Receive-PSSession` cmdlet.
-## Parameters
+## PARAMETERS
### -AllowRedirection
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
+## INPUTS
### System.Management.Automation.ScriptBlock You can pipe a command in a script block to `Invoke-Command`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob, System.Management.Automation.Runspaces.PSSession, or the output of the invoked command
This cmdlet returns a job object, if you use the **AsJob** parameter. If you spe
**InDisconnectedSession** parameter, `Invoke-Command` returns a **PSSession** object. Otherwise, it returns the output of the invoked command, which is the value of the **ScriptBlock** parameter.
-## Notes
+## NOTES
On Windows Vista, and later versions of the Windows operating system, to use the **ComputerName** parameter of `Invoke-Command` to run a command on the local computer, you must run PowerShell using
session. For more information about the values of the **State** property of sess
information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Invoke History (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Invoke-History.md
Title: Invoke-History
--- # Invoke-History
-## Synopsis
+## SYNOPSIS
Runs commands from the session history.
-## Syntax
+## SYNTAX
``` Invoke-History [[-Id] <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-History` cmdlet runs commands from the session history. You can pass objects representing the commands from Get-History to `Invoke-History`, or you can identify commands in the
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Run the most recent command in the history
the command uses the `ForEach-Object` cmdlet to run the `Invoke-History` command
Get-History -Id 255 -Count 7 | ForEach {Invoke-History -Id $_.Id} ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a history **Id** to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output, but output might be generated by the commands that `Invoke-History` runs.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the order of execution, the status, and the start and end times of the command. As you
about the session history, see [about_History](About/about_History.md).
You can also refer to `Invoke-History` by its built-in aliases, `r` and `ihy`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core New Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-Module.md
Title: New-Module
--- # New-Module
-## Synopsis
+## SYNOPSIS
Creates a new dynamic module that exists only in memory.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
New-Module [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Function <String[]>]
[-ReturnResult] [-AsCustomObject] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Module` cmdlet creates a dynamic module from a script block. The members of the dynamic module, such as functions and variables, are immediately available in the session and remain
To make a dynamic module available to `Get-Module`, pipe a `New-Module` command
pipe the module object that `New-Module` returns to `Import-Module`. This action adds the dynamic module to the `Get-Module` list, but it does not save the module to disk or make it persistent.
-## Examples
+## EXAMPLES
### Example 1: Create a dynamic module
New-Module -ScriptBlock {function SayHello {"Hello, World!"}; SayHello} -ReturnR
Hello, World! ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a module name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo, System.Management.Automation.PSCustomObject, or None
This cmdlet generates a **PSModuleInfo** object, by default. If you use the **As
parameter, it generates a **PSCustomObject** object. If you use the **ReturnResult** parameter, it returns the result of evaluating the script block in the dynamic module.
-## Notes
+## NOTES
You can also refer to `New-Module` by its alias, `nmo`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Modulemanifest (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-ModuleManifest.md
Title: New-ModuleManifest
# New-ModuleManifest
-## Synopsis
+## SYNOPSIS
Creates a new module manifest.
-## Syntax
+## SYNTAX
### All
New-ModuleManifest [-Path] <string> [-NestedModules <Object[]>] [-Guid <guid>] [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ModuleManifest` cmdlet creates a new module manifest (`.psd1`) file, populates its values, and saves the manifest file in the specified path.
values for certain properties. For more information, see
[Required metadata for items published to the PowerShell Gallery](/powershell/scripting/gallery/how-to/publishing-packages/publishing-a-package#required-metadata-for-items-published-to-the-powershell-gallery) in the Gallery documentation.
-## Examples
+## EXAMPLES
### Example 1 - Create a new module manifest
ExportedFormatFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\Event.
ExportedTypeFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml} ```
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.String By default, `New-ModuleManifest` doesn't generate any output. However, if you use the **PassThru** parameter, it generates a **System.String** object representing the module manifest.
-## Notes
+## NOTES
`New-ModuleManifest` creates module manifest (`.psd1`) files encoded as **UTF16**.
The caller's session state is the session state into which a module is imported.
refers to the global session state, but when a module imports nested modules, the caller is the module and the caller's session state is the module's session state.
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Psrolecapabilityfile (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md
Title: New-PSRoleCapabilityFile
--- # New-PSRoleCapabilityFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a set of capabilities to be exposed through a session configuration.
-## Syntax
+## SYNTAX
``` New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-Description <String>]
New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that can be exposed through session configuration files. This includes determining which cmdlets,
in the **RoleDefinitions** field in a PowerShell Session Configuration (.pssc) f
This cmdlet was introduced in Windows PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Create a blank role capability file
$roleParameters = @{
New-PSRoleCapabilityFile @roleParameters ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSSessionConfigurationFile](New-PSSessionConfigurationFile.md)
Microsoft.PowerShell.Core New Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-PSSession.md
Title: New-PSSession
--- # New-PSSession
-## Synopsis
+## SYNOPSIS
Creates a persistent connection to a local or remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-PSSession [-Name <String[]>] [-ConfigurationName <String>] -ContainerId <Str
[-RunAsAdministrator] [-ThrottleLimit <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSession` cmdlet creates a PowerShell session (**PSSession**) on a local or remote computer. When you create a **PSSession**, PowerShell establishes a persistent connection to the
You can run commands on a remote computer without creating a **PSSession** by us
**ComputerName** parameter, PowerShell creates a temporary connection that is used for the command and is then closed.
-## Examples
+## EXAMPLES
### Example 1: Create a session on the local computer
The second command uses the option in a new session. The command uses the `New-P
create a new session. The value of the SessionOption parameter is the **SessionOption** object in the `$so` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.URI, System.Management.Automation.Runspaces.PSSession You can pipe a string, URI, or session object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet uses the PowerShell remoting infrastructure. To use this cmdlet, the local computer and any remote computers must be configured for PowerShell remoting. For more
You can pipe a string, URI, or session object to this cmdlet.
- When you are finished with the **PSSession**, use the `Remove-PSSession` cmdlet to delete the **PSSession** and release its resources.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core New Pssessionconfigurationfile (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-PSSessionConfigurationFile.md
Title: New-PSSessionConfigurationFile
--- # New-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a session configuration.
-## Syntax
+## SYNTAX
``` New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Guid <Guid>]
New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Gui
[-FormatsToProcess <String[]>] [-AssembliesToLoad <String[]>] [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionConfigurationFile` cmdlet creates a file of settings that define a session configuration and the environment of sessions that are created by using the session configuration.
For more information about session configurations and session configuration file
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Creating and using a NoLanguage session
AssembliesToLoad = 'System.Web.Services', 'FSharp.Compiler.CodeDom.dll'
} ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Parameters, such as **VisibleCmdlets** and **VisibleProviders**, do not import items into the session. Instead, they select from among the items imported into the session. For example, if the
This cmdlet does not generate any output.
Before using an edited session configuration file, use the `Test-PSSessionConfigurationFile` cmdlet to verify that the configuration file entries are valid.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core New Pssessionoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-PSSessionOption.md
Title: New-PSSessionOption
--- # New-PSSessionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a PSSession.
-## Syntax
+## SYNTAX
``` New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachineProfile] [-Culture <CultureInfo>]
New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachinePr
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [-IncludePortInSPN] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionOption` cmdlet creates an object that contains advanced options for a user-managed session (**PSSession**). You can use the object as the value of the **SessionOption**
in the session configuration. However, they do not take precedence over maximum
limits set in the session configuration. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Create a default session option
commands in the remote session. The data appears in the **ApplicationArguments**
The final `Invoke-Command` shows how the data might be used.
-## Parameters
+## PARAMETERS
### -ApplicationArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Remoting.PSSessionOption
-## Notes
+## NOTES
If the **SessionOption** parameter is not used in a command to create a **PSSession**, the session options are determined by the property values of the `$PSSessionOption` preference variable, if it
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Enter-PSSession](Enter-PSSession.md)
Microsoft.PowerShell.Core New Pstransportoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/New-PSTransportOption.md
Title: New-PSTransportOption
# New-PSTransportOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a session configuration.
-## Syntax
+## SYNTAX
``` New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int32>] [-MaxSessions <Int32>]
New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int3
[-OutputBufferingMode <OutputBufferingMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSTransportOption` cmdlet creates an object that contains transport options for session configurations. You can use the object as the value of the **TransportOption** parameter of cmdlets
session configurations, see [about_Session_Configurations](About/about_Session_C
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Generate a default transport option
The fourth command uses the `Format-List` cmdlet to display all properties of th
`$s` variable in a list. The output shows that the session has an idle time-out of one hour (360,000 milliseconds).
-## Parameters
+## PARAMETERS
### -IdleTimeoutSec
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.WSManConfigurationOption
-## Notes
+## NOTES
- The properties of a session configuration object vary with the options set for the session configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[New-PSSession](New-PSSession.md)
Microsoft.PowerShell.Core Out Default (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Out-Default.md
Title: Out-Default
--- # Out-Default
-## Synopsis
+## SYNOPSIS
Sends the output to the default formatter and to the default output cmdlet.
-## Syntax
+## SYNTAX
``` Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
This cmdlet isn't intended to be used by the end user. Other cmdlets are recomme
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md) file to control formatting.
-## Examples
+## EXAMPLES
### Example 1
Get-Process | Select-Object -First 5 | Out-Default
No error is thrown when using `Out-Default` but the output isn't changed if it's not explicitly called.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Custom](../Microsoft.PowerShell.Utility/Format-Custom.md)
Microsoft.PowerShell.Core Out Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Out-Host.md
Title: Out-Host
# Out-Host
-## Synopsis
+## SYNOPSIS
Sends output to the command line.
-## Syntax
+## SYNTAX
### All
Sends output to the command line.
Out-Host [-Paging] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
pipeline to the host executing the command. `Out-Host` ignores ANSI escape seque
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without trying to interpret or change them.
-## Examples
+## EXAMPLES
### Example 1: Display output one page at a time
Out-Host -InputObject $io
`Out-Host` uses the **InputObject** parameter to specify the `$io` variable and displays the history.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-Host`.
-## Outputs
+## OUTPUTS
### None `Out-Host` doesn't generate any output. It sends objects to the host for display.
-## Notes
+## NOTES
The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the **Paging** parameter in the PowerShell ISE, the following error is displayed:
variable and use the **InputObject** parameter to pass the data to the cmdlet.
`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Clear-Host](Clear-Host.md)
Microsoft.PowerShell.Core Out Null (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Out-Null.md
Title: Out-Null
--- # Out-Null
-## Synopsis
+## SYNOPSIS
Hides the output instead of sending it down the pipeline or displaying it.
-## Syntax
+## SYNTAX
``` Out-Null [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Null` cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen. This only affects the standard output stream. Other output streams, like the Error stream are not affected. Exceptions will be displayed. This makes it easier to test your command for any errors.
-## Examples
+## EXAMPLES
### Example 1: Delete output
Get-ChildItem | Out-Null
This command gets items in the current location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The cmdlets that contain the **Out** verb (the **Out** cmdlets) do not have parameters for names or file paths. To send data to an **Out** cmdlet, use a pipeline operator (`|`) to send the output
This cmdlet does not generate any output.
- `Out-Null` does not return any output objects. If you pipe the output of `Out-Null` to the Get-Member cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-Default](Out-Default.md)
Microsoft.PowerShell.Core Receive Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Receive-Job.md
Title: Receive-Job
--- # Receive-Job
-## Synopsis
+## SYNOPSIS
Gets the results of the PowerShell background jobs in the current session.
-## Syntax
+## SYNTAX
### Location (Default)
Receive-Job [-Keep] [-NoRecurse] [-Force] [-Wait] [-AutoRemoveJob] [-WriteEvents
[-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-Job` cmdlet gets the results of PowerShell background jobs, such as those started by using the `Start-Job` cmdlet or the **AsJob** parameter of any cmdlet.
custom job type into the session before it runs a `Receive-Job` command, either
For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get results for a particular job
Cannot find drive. A drive with the name 'Z' does not exist.
+ PSComputerName : localhost ```
-## Parameters
+## PARAMETERS
### -AutoRemoveJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe job objects to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the results of the commands in the job.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Receive Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Receive-PSSession.md
Title: Receive-PSSession
# Receive-PSSession
-## Synopsis
+## SYNOPSIS
Gets results of commands in disconnected sessions
-## Syntax
+## SYNTAX
### Session (Default)
Receive-PSSession [-Name] <String> [-OutTarget <OutTarget>] [-JobName <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-PSSession` cmdlet gets the results of commands running in PowerShell sessions (**PSSession**) that were disconnected. If the session is currently connected, `Receive-PSSession`
For more information about the Disconnected Sessions feature, see
Some examples use splatting to reduce the line length and improve readability. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Connect to a PSSession
the command is run in the same session, `Receive-PSSession` returns the results
and reuses the same job object. The command saves the job in the `$j2` variable. The `Receive-Job` cmdlet gets the results of the job in the `$j` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession
You can pipe the instance Ids of sessions this cmdlet.
You can pipe session names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job or PSObject
This cmdlet returns the results of commands that ran in the disconnected session
value or default value of the **OutTarget** parameter is Job, `Receive-PSSession` returns a job object. Otherwise, it returns objects that represent that command results.
-## Notes
+## NOTES
`Receive-PSSession` gets results only from sessions that were disconnected. Only sessions that are connected to, or terminate at, computers that run PowerShell 3.0 or later versions can be
When you disconnect a **PSSession**, the session state is Disconnected and the a
- For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Register Argumentcompleter (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md
Title: Register-ArgumentCompleter
# Register-ArgumentCompleter
-## Synopsis
+## SYNOPSIS
Registers a custom argument completer.
-## Syntax
+## SYNTAX
### NativeSet
Register-ArgumentCompleter [-CommandName <String[]>] -ParameterName <String>
-ScriptBlock <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ArgumentCompleter` cmdlet registers a custom argument completer. An argument completer allows you to provide dynamic tab completion, at run time for any command that you specify.
-## Examples
+## EXAMPLES
### Example 1: Register a custom argument completer
The results are piped to the `ForEach-Object` cmdlet which use the **new** stati
[System.Management.Automation.CompletionResult](/dotnet/api/system.management.automation.completionresult) class to create a new **CompletionResult** object for each value.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet returns no output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Core Register Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md
Title: Register-PSSessionConfiguration
# Register-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Creates and registers a new session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSSessionConfiguration [-ProcessorArchitecture <String>] [-Name] <Strin
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSSessionConfiguration` cmdlet creates and registers a new session configuration on the local computer. This is an advanced cmdlet that you can use to create custom sessions for remote
configuration class and by using a script that runs in the session. Beginning in
For information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md). For information about session configuration files, see [about_Session_Configuration_Files](About/about_Session_Configuration_Files.md).
-## Examples
+## EXAMPLES
### Example 1: Register a NewShell session configuration
The script contains a single command that uses dot sourcing to run the user's
For more information about profiles, see [about_Profiles](./About/about_Profiles.md). For more information about dot sourcing, see [about_Scopes](./About/about_Scopes.md).
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigContainerElement
-## Notes
+## NOTES
To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Remove Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Remove-Job.md
Title: Remove-Job
# Remove-Job
-## Synopsis
+## SYNOPSIS
Deletes a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Remove-Job [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Job [-Command <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by the `Start-Job` cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
job. Or, use `Remove-Job` with the **Force** parameter to delete a running job.
Jobs remain in the global job cache until you delete the background job or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Delete a job by using its name
asterisk (`*`) to specify that all the object's properties are displayed in a li
`Remove-Job` uses the **InstanceId** parameter to specify the job to delete.
-## Parameters
+## PARAMETERS
### -Command
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
+## INPUTS
### System.Management.Automation.Job You can send a job object down the pipeline to `Remove-Job`.
-## Outputs
+## OUTPUTS
### None `Remove-Job` doesn't generate any output.
-## Notes
+## NOTES
A PowerShell job creates a new process. When the job completes, the process exits. When `Remove-Job` is run, the job's state is removed. If a job stops before completion and its process hasn't exited, the process is forcibly terminated.
-## Related links
+## RELATED LINKS
[about_Jobs](./About/about_Jobs.md)
Microsoft.PowerShell.Core Remove Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Remove-Module.md
Title: Remove-Module
--- # Remove-Module
-## Synopsis
+## SYNOPSIS
Removes modules from the current session.
-## Syntax
+## SYNTAX
### name
Remove-Module [-FullyQualifiedName] <ModuleSpecification[]> [-Force] [-WhatIf] [
Remove-Module [-ModuleInfo] <PSModuleInfo[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Module` cmdlet removes the members of a module, such as cmdlets and functions, from the current session.
removed, but the assembly is not unloaded.
This cmdlet does not uninstall the module or delete it from the computer. It affects only the current PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove a module
Remove-Module -ModuleInfo $a
This command uses the **ModuleInfo** parameter to remove the BitsTransfer module.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo You can pipe module names and module objects to `Remove-Module`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Remove Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Remove-PSSession.md
Title: Remove-PSSession
--- # Remove-PSSession
-## Synopsis
+## SYNOPSIS
Closes one or more PowerShell sessions (PSSessions).
-## Syntax
+## SYNTAX
### Id (Default)
Remove-PSSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PSSession [-ComputerName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSession` cmdlet closes PowerShell sessions (**PSSessions**) in the current session. It stops any commands that are running in the **PSSessions**, ends the **PSSession**, and releases the
session.
If you have saved the **PSSession** in a variable, the session object remains in the variable, but the state of the **PSSession** is Closed.
-## Examples
+## EXAMPLES
### Example 1: Remove sessions by using IDs
Function EndPSS { Get-PSSession | Remove-PSSession }
This function deletes all of the **PSSessions** in the current session. After you add this function to your PowerShell profile, to delete all sessions, type `EndPSS`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
- The **Id** parameter is mandatory. To delete all the **PSSessions** in the current session, type `Get-PSSession | Remove-PSSession`.
This cmdlet does not return any objects.
- **PSSessions** are specific to the current session. When you end a session, the **PSSessions** that you created in that session are forcibly closed.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Remove Pssnapin (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Remove-PSSnapin.md
Title: Remove-PSSnapin
# Remove-PSSnapin
-## Synopsis
+## SYNOPSIS
Removes Windows PowerShell snap-ins from the current session.
-## Syntax
+## SYNTAX
``` Remove-PSSnapin [-Name] <String[]> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSnapin` cmdlet removes a Windows PowerShell snap-in from the current session. You can use it to remove snap-ins that you have added to Windows PowerShell You cannot use this cmdlet to
remove the snap-ins that are installed with Windows PowerShell.
After you remove a snap-in from the current session, the snap-in is still loaded, but the cmdlets and providers in the snap-in are no longer available in the session.
-## Examples
+## EXAMPLES
### Example 1: Remove a snap-in
Remove-PSSnapin -Name *event*
This command removes all Windows PowerShell snap-ins that have names that include event.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.Management.Automation.PSSnapInInfo You can pipe a snap-in object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSSnapInInfo
This cmdlet generates a **System.Management.Automation.PSSnapInInfo** object tha
snap-in, if you specify the **PassThru** parameter. By default, `Remove-PSSnapin` does not generate any output.
-## Notes
+## NOTES
- `Remove-PSSnapin` does not check the version of Windows PowerShell before removing a snap-in from the session. If a snap-in cannot be removed, a warning appears and the command fails.
any output.
your Windows PowerShell profile, you should delete the command to remove the snap-in from future sessions. For instructions, type `Get-Help about_Profiles`.
-## Related links
+## RELATED LINKS
[Add-PSSnapin](Add-PSSnapin.md)
Microsoft.PowerShell.Core Resume Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Resume-Job.md
Title: Resume-Job
# Resume-Job
-## Synopsis
+## SYNOPSIS
Restarts a suspended job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Resume-Job [-Wait] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Resume-Job [-Wait] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resume-Job` cmdlet resumes a workflow job that was suspended, such as by using the `Suspend-Job` cmdlet or the [about_Suspend-Workflow](../PSWorkflow/about/about_Suspend-Workflow.md)
either by using the `Import-Module` cmdlet or getting or using a cmdlet in the m
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Resume a job by ID
only in workflows.
For information about the `Suspend-Workflow`, see about_Suspend-Workflow](../PSWorkflow/about/about_Suspend-Workflow.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe all types of jobs to this cmdlet. If `Resume-Job` gets a job of an unsupported type, it returns a terminating error.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.Job This cmdlet returns the jobs that it tries to resume, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Resume-Job` can only resume jobs that are suspended. If you submit a job in a different state, `Resume-Job` runs the resume operation on the job, but generates a warning to notify you that the
Otherwise, this cmdlet does not generate any output.
If attempts to suspend the job fail, verify that the job options and properties allow for suspending.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Save Help (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Save-Help.md
Title: Save-Help
--- # Save-Help
-## Synopsis
+## SYNOPSIS
Downloads and saves the newest help files to a file system directory.
-## Syntax
+## SYNTAX
### Path (Default)
Save-Help -LiteralPath <String[]> [[-Module] <PSModuleInfo[]>] [-FullyQualifiedM
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Help` cmdlet downloads the newest help files for PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not
group on the computer to download the help files for these modules.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Save the help for the DhcpServer module
The command uses the `Save-Help` cmdlet to download and save the help files to t
The **Force** parameter is required when you have to run a `Save-Help` command more than one time each day.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSModuleInfo You can pipe a module object from the `Get-Module` cmdlet to the **Module** parameter of `Save-Help`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To save help for modules in the $pshome\Modules folder, start PowerShell by using the Run as administrator option. Only members of the Administrators group on the computer can download help
This cmdlet does not generate any output.
- The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Help](Get-Help.md)
Microsoft.PowerShell.Core Set Psdebug (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Set-PSDebug.md
Title: Set-PSDebug
# Set-PSDebug
-## Synopsis
+## SYNOPSIS
Turns script debugging features on and off, sets the trace level, and toggles strict mode.
-## Syntax
+## SYNTAX
### on
Set-PSDebug [-Trace <Int32>] [-Step] [-Strict] [<CommonParameters>]
Set-PSDebug [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSDebug` cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. By default, the PowerShell debug features are off.
When the **Trace** parameter has a value of `1`, each line of script is traced a
parameter has a value of `2`, variable assignments, function calls, and script calls are also traced. If the **Step** parameter is specified, you're prompted before each line of the script runs.
-## Examples
+## EXAMPLES
### Example 1: Set the trace level
Set-PSDebug -Off; foreach ($i in 1..3) {$i}
3 ```
-## Parameters
+## PARAMETERS
### -Off
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
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Debuggers](./About/about_Debuggers.md)
Microsoft.PowerShell.Core Set Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md
Title: Set-PSSessionConfiguration
--- # Set-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Changes the properties of a registered session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Set-PSSessionConfiguration [-Name] <String> [-RunAsCredential <PSCredential>]
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSSessionConfiguration` cmdlet changes the properties of the session configurations on the local computer.
to the local computer. For more information about session configurations, see [a
To see the properties of a session configuration, use the `Get-PSSessionConfiguration` cmdlet or the WSMan Provider. For more information about the WSMan Provider, type `Get-Help WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Change the thread apartment state
PSVersion 2.0
startupscript c:\ps-test\Maintenance.ps1 ```
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigLeafElement
-## Notes
+## NOTES
To run this cmdlet, start PowerShell by using the Run as administrator option.
properties that are introduced in PowerShell 3.0, such as **OutputBufferingMode*
PowerShell 2.0 commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Set Strictmode (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Set-StrictMode.md
Title: Set-StrictMode
--- # Set-StrictMode
-## Synopsis
+## SYNOPSIS
Establishes and enforces coding rules in expressions, scripts, and script blocks.
-## Syntax
+## SYNTAX
### Version (Default)
Set-StrictMode -Version <Version> [<CommonParameters>]
Set-StrictMode [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-StrictMode` cmdlet configures strict mode for the current scope and all child scopes, and turns it on and off. When strict mode is on, PowerShell generates a terminating error when the
When `Set-StrictMode` is off, PowerShell has the following behaviors:
- Results of improper function syntax vary with the error conditions - Attempting to retrieve a value using an invalid index in an array returns `$Null`
-## Examples
+## EXAMPLES
### Example 1: Turn on strict mode as version 1.0
At line:1 char:1
With strict mode set to version 3 or higher, invalid or out of bounds indexes result in errors.
-## Parameters
+## PARAMETERS
### -Off
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
While `Set-StrictMode` **Version** parameter will accept values greater than `3.0`, currently there are no additional rules defined for anything higher than `3.0`.
are no additional rules defined for anything higher than `3.0`.
`Set-StrictMode` is effective only in the scope in which it is set and in its child scopes. For more information about scopes in PowerShell, see [about_Scopes](about/about_Scopes.md).
-## Related links
+## RELATED LINKS
[Set-PSDebug](Set-PSDebug.md)
Microsoft.PowerShell.Core Start Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Start-Job.md
Title: Start-Job
# Start-Job
-## Synopsis
+## SYNOPSIS
Starts a PowerShell background job.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Start-Job [-Name <String>] [-Credential <PSCredential>] -LiteralPath <String>
[-PSVersion <Version>] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Job` cmdlet starts a PowerShell background job on the local computer.
The default working directory for jobs is hardcoded. The Windows default is `$HO
Linux or macOS the default is `$HOME`. The script code running in the background job needs to manage the working directory as needed.
-## Examples
+## EXAMPLES
### Example 1: Start a background job
running on the local computer.
To view the job's output, use the `Receive-Job` cmdlet. For example, `Receive-Job -Id 1`.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### System.String You can use the pipeline to send an object with the **Name** property to the **Name** parameter. For example, you can pipeline a **FileInfo** object from `Get-ChildItem` to `Start-Job`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob `Start-Job` returns a **PSRemotingJob** object that represents the job that it started.
-## Notes
+## NOTES
To run in the background, `Start-Job` runs in its own session in the current session. When you use the `Invoke-Command` cmdlet to run a `Start-Job` command in a session on a remote computer, `Start-Job` runs in a session in the remote session.
-## Related links
+## RELATED LINKS
[about_Arrays](./about/about_arrays.md)
Microsoft.PowerShell.Core Stop Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Stop-Job.md
Title: Stop-Job
--- # Stop-Job
-## Synopsis
+## SYNOPSIS
Stops a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Stop-Job [-PassThru] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters
Stop-Job [-PassThru] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Job` cmdlet stops PowerShell background jobs that are in progress. You can use this cmdlet to stop all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing
either by using the `Import-Module` cmdlet or by using or getting a cmdlet in th
information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Stop a job on a remote computer by using Invoke-Command
display confirms that the state of the job is Stopped.
For more information about remote background jobs, see [about_Remote_Jobs](About/about_Remote_Jobs.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSRemotingJob This cmdlet returns a job object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Suspend Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Suspend-Job.md
Title: Suspend-Job
# Suspend-Job
-## Synopsis
+## SYNOPSIS
Temporarily stops workflow jobs.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Suspend-Job [-Force] [-Wait] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<Common
Suspend-Job [-Force] [-Wait] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Suspend-Job` cmdlet suspends workflow jobs. Suspend means to temporarily interrupt or pause a workflow job. This cmdlet allows users who are running workflows to suspend the workflow. It
using a cmdlet in the module.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Suspend a workflow job by name
PS C:\> Suspend-Job Maintenance -Force
This command suspends the Maintenance workflow job forcibly. The Maintenance job does not have checkpoints. It cannot be suspended correctly and might not resume correctly.
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe all types of jobs to this cmdlet. However, if `Suspend-Job` gets a job of an unsupported type, it returns a terminating error.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job This cmdlet returns the jobs that it suspended.
-## Notes
+## NOTES
- The mechanism and location for saving a suspended job might vary depending on the job type. For example, suspended workflow jobs are saved in a flat file store by default, but can also be saved
This cmdlet returns the jobs that it suspended.
If attempts to suspend the job fail, verify that the job options and properties allow for suspending.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Test Modulemanifest (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Test-ModuleManifest.md
Title: Test-ModuleManifest
--- # Test-ModuleManifest
-## Synopsis
+## SYNOPSIS
Verifies that a module manifest file accurately describes the contents of a module.
-## Syntax
+## SYNTAX
``` Test-ModuleManifest [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ModuleManifest` cmdlet verifies that the files that are listed in the module manifest (`.psd1`) file are actually in the specified paths.
module.
that `Get-Module` returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
-## Examples
+## EXAMPLES
### Example 1: Test a manifest
previous command generates no error, the command displays `$True`, and `$False`
You can use this function in conditional statements, such as those that might precede an `Import-Module` command or a command that uses the module.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe the path to a module manifest to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo This cmdlet returns a **PSModuleInfo** object that represents the module. It returns this object even if the manifest has errors.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core Test Pssessionconfigurationfile (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md
Title: Test-PSSessionConfigurationFile
--- # Test-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Verifies the keys and values in a session configuration file.
-## Syntax
+## SYNTAX
``` Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet verifies that a session configuration file contains valid keys and the values are of the correct type. For enumerated values, the cmdlet verifies that the specified values are valid.
configuration files, see [about_Session_Configuration_Files](About/about_Session
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Test a session configuration file
the **ConfigFilePath** property value. Then it uses the `Test-PSSessionConfigura
test the file in the **ConfigFilePath** value. The **Verbose** parameter returns the file error when the file fails the test.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe a session configuration file path to `Test-PSSessionConfigurationFile`.
-## Outputs
+## OUTPUTS
### System.Boolean
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Unregister Pssessionconfiguration (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Unregister-PSSessionConfiguration.md
Title: Unregister-PSSessionConfiguration
--- # Unregister-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Deletes registered session configurations from the computer.
-## Syntax
+## SYNTAX
``` Unregister-PSSessionConfiguration [-Name] <String> [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSSessionConfiguration` cmdlet deletes registered session configurations from the computer. This cmdlet is designed for system administrators to manage customized session
If you accidentally delete the default **Microsoft.PowerShell** or **Microsoft.P
session configurations, use the `Enable-PSRemoting` cmdlet to restore them. For more information, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Delete a session configuration
Finally, the `New-PSSession` cmdlet tries to create a session that uses the **Ma
configuration. This time, the session fails because the **MaintenanceShell** configuration was deleted when the WinRM service restarted.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration You can pipe a session configuration object from `Get-PSSessionConfiguration` to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Update Help (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Update-Help.md
Title: Update-Help
# Update-Help
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest help files on your computer.
-## Syntax
+## SYNTAX
### Path (Default)
Update-Help [[-Module] <String[]>] [-FullyQualifiedModule <ModuleSpecification[]
[-UseDefaultCredentials] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Help` cmdlet downloads the newest help files for PowerShell modules and installs them on your computer. You need not restart PowerShell to make the change effective. You can use the
The `Update-Help` cmdlet was introduced in Windows PowerShell 3.0.
> To update help for modules in the `$PSHOME` directory, > start Windows PowerShell ISE by using the Run as administrator option.
-## Examples
+## EXAMPLES
### Example 1: Update help files for all modules
ADDSDeployment en-US
ADFS en-US 3.0.0.0 ```
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.IO.DirectoryInfo
You can pipe a directory path to `Update-Help`.
You can pipe a module object from the `Get-Module` cmdlet to `Update-Help`.
-## Outputs
+## OUTPUTS
### None `Update-Help` doesn't generate any output.
-## Notes
+## NOTES
To update help for the core PowerShell modules, that contain the commands that are installed with PowerShell, or any module in the `$PSHOME\Modules` directory, start PowerShell with the option to
that you author, see [Supporting Updatable Help](/powershell/scripting/developer
The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
Microsoft.PowerShell.Core Wait Job (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Wait-Job.md
Title: Wait-Job
--- # Wait-Job
-## Synopsis
+## SYNOPSIS
Waits until one or all of the PowerShell jobs running in the session are in a terminating state.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-State] <JobState> [<CommonParamete
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Job` cmdlet waits for a job to be in a terminating state before continuing execution. The terminating states are:
type, import the module that supports the custom job type into the session befor
module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Wait for all jobs
Wait-Job -Id 1
This command waits for the job with an ID value of 1.
-## Parameters
+## PARAMETERS
### -Any
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob This cmdlet returns job objects that represent the jobs in a terminating state. If the wait ends because the value of the **Timeout** parameter is exceeded, `Wait-Job` does not return any objects.
-## Notes
+## NOTES
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the following states:
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the fo
- Disconnected To direct `Wait-Job` to continue to wait for Suspended and Disconnected jobs, use the **Force** parameter.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Where Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/Where-Object.md
Title: Where-Object
--- # Where-Object
-## Synopsis
+## SYNOPSIS
Selects objects from a collection based on their property values.
-## Syntax
+## SYNTAX
### EqualSet (Default)
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>]
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>] [-IsNot] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Where-Object` cmdlet selects objects that have particular property values from the collection of objects that are passed to it. For example, you can use the `Where-Object` cmdlet to select files
The previous example is functionally equivalent to:
For more information about how booleans are evaluated, see [about_Booleans](about/about_Booleans.md).
-## Examples
+## EXAMPLES
### Example 1: Get stopped services
valid only in script blocks. You cannot use them in the comparison statement for
- For more information about the Updatable Help feature, see [about_Updatable_Help](./About/about_Updatable_Help.md).
-## Parameters
+## PARAMETERS
### -CContains
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns selected items from the input object set.
-## Notes
+## NOTES
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Diagnostics Export Counter (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Export-Counter.md
Title: Export-Counter
# Export-Counter
-## Synopsis
+## SYNOPSIS
Exports performance counter data to log files.
-## Syntax
+## SYNTAX
``` Export-Counter [-Path] <String> [-FileFormat <String>] [-MaxSize <UInt32>] -InputObject <PerformanceCounterSampleSet[]> [-Force] [-Circular] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Counter` cmdlet exports performance counter data (PerformanceCounterSampleSet objects) to log files in binary performance log (.blg), comma-separated value (.csv), or tab-separated value
The `Export-Counter` cmdlet is designed to export data that is returned by the `
This cmdlet runs only on Windows 7, Windows Server 2008 R2, and later versions of Windows.
-## Examples
+## EXAMPLES
### EXAMPLE 1: Export counter data to a file
$LowSpace = $All | Where-Object {$_.CounterSamples.CookedValue -lt 15}
$LowSpace | Export-Counter -Path LowDiskSpace.blg ```
-## Parameters
+## PARAMETERS
### -Circular
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet You can pipe performance counter data from `Get-Counter` or `Import-Counter` to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
The log file generator expects that all input objects have the same counter path and that the objects are arranged in ascending time order.
The `Import-Counter` cmdlet does not have a **ComputerName** parameter. However,
configured for remote Windows PowerShell Windows PowerShell, you can use the `Invoke-Command` cmdlet to run an `Import-Counter` command on a remote computer.
-## Related links
+## RELATED LINKS
[Get-Counter](Get-Counter.md)
Microsoft.PowerShell.Diagnostics Get Counter (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md
Title: Get-Counter
# Get-Counter
-## Synopsis
+## SYNOPSIS
Gets performance counter data from local and remote computers.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Get-Counter [[-Counter] <String[]>] [-SampleInterval <Int32>] [-MaxSamples <Int6
Get-Counter [-ListSet] <String[]> [-ComputerName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Counter` cmdlet gets performance counter data directly from the performance monitoring instrumentation in the Windows family of operating systems. `Get-Counter` gets performance data from
PowerShell with the **Run as administrator** option.
> performance objects, counters, and instances. The names will be different on a system that uses > another language. Use the `Get-Counter -ListSet` command to see the localized names.
-## Examples
+## EXAMPLES
### Example 1: Get the counter set list
objects down the pipeline. `Sort-Object` uses the **Property** parameter to sort
the columns for the output. The **AutoSize** parameter adjusts the column widths to minimize truncation.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String[] `Get-Counter` accepts pipeline input for counter paths and counter set names.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample
that are output are as follows:
**CounterSamples** property: **Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample**
-## Notes
+## NOTES
If no parameters are specified, `Get-Counter` gets one sample for each specified performance counter. Use the **MaxSamples** and **Continuous** parameters to get more samples.
increase the interval.
The **MaxSamples** and **SampleInterval** values apply to all the counters on each computer in the command. To set different values for different counters, enter separate `Get-Counter` commands.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Diagnostics Get Winevent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md
Title: Get-WinEvent
# Get-WinEvent
-## Synopsis
+## SYNOPSIS
Gets events from event logs and event tracing log files on local and remote computers.
-## Syntax
+## SYNTAX
### GetLogSet (Default)
Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede
[-FilterXml] <XmlDocument> [-Oldest] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WinEvent` cmdlet gets events from event logs, including classic logs, such as the **System** and **Application** logs. The cmdlet gets data from event logs that are generated by the
table queries.
If you're not running PowerShell as an Administrator, you might see error messages that you cannot retrieve information about a log.
-## Examples
+## EXAMPLES
### Example 1: Get all the logs from a local computer
the output. The **LogName** key specifies the value as the **Application** log.
key uses the value, **Application Error**, which is the event's **Source**. The **Data** key uses the value **iexplore.exe** The **StartTime** key uses the value stored in `$StartTime` variable.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String, System.Xml.XmlDocument, System.Collections.Hashtable You can pipeline a **LogName** (string), a **FilterXML** query, or a **FilterHashtable** query to `Get-WinEvent`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Eventing.Reader.EventLogConfiguration, System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics.Eventing.Reader.ProviderMetadata
With the **ListProvider** parameter, `Get-WinEvent` returns
With all other parameters, `Get-WinEvent` returns **System.Diagnostics.Eventing.Reader.EventLogRecord** objects.
-## Notes
+## NOTES
`Get-WinEvent` is designed to replace the `Get-EventLog` cmdlet on computers running Windows Vista and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
is retained for backward compatibility.
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md)
Microsoft.PowerShell.Diagnostics Import Counter (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/Import-Counter.md
Title: Import-Counter
--- # Import-Counter
-## Synopsis
+## SYNOPSIS
Imports performance counter log files and creates the objects that represent each counter sample in the log.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Import-Counter [-Path] <String[]> -ListSet <String[]> [<CommonParameters>]
Import-Counter [-Path] <String[]> [-Summary] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Counter` cmdlet imports performance counter data from performance counter log files and creates objects for each counter sample in the file. The **PerformanceCounterSampleSet** objects
Along with the `Get-Counter` and `Export-Counter` cmdlets, this feature lets you
import, combine, filter, manipulate, and re-export performance counter data within Windows PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Import all counter data from a file
which imports the data from the specified paths.
Notice that each path is enclosed in quotation marks and that the paths are separated from each other by a comma.
-## Parameters
+## PARAMETERS
### -Counter
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
+## INPUTS
### System.String You can pipe performance counter log paths to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.CounterFileInfo
you use the **ListSet** parameter, this cmdlet returns a
parameter, this cmdlet returns a **Microsoft.PowerShell.Commands.GetCounter.CounterFileInfo** object.
-## Notes
+## NOTES
- This cmdlet does not have a **ComputerName** parameter. However, if the computer is configured for Windows PowerShell remoting, you can use the `Invoke-Command` cmdlet to run an `Import-Counter` command on a remote computer.
-## Related links
+## RELATED LINKS
[Export-Counter](Export-Counter.md)
Microsoft.PowerShell.Diagnostics New Winevent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md
Title: New-WinEvent
--- # New-WinEvent
-## Synopsis
+## SYNOPSIS
Creates a new Windows event for the specified event provider.
-## Syntax
+## SYNTAX
``` New-WinEvent [-ProviderName] <String> [-Id] <Int32> [-Version <Byte>] [[-Payload] <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-WinEvent` cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from Windows PowerShell.
-## Examples
+## EXAMPLES
### Example 1
New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Wo
This command uses the `New-WinEvent` cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does to generate any output.
-## Notes
+## NOTES
- After the provider writes the event to an eventlog, you can use the `Get-WinEvent` cmdlet to get the event from the event log.
-## Related links
+## RELATED LINKS
[Get-WinEvent](Get-WinEvent.md)
Microsoft.PowerShell.Host Start Transcript (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md
Title: Start-Transcript
--- # Start-Transcript
-## Synopsis
+## SYNOPSIS
Creates a record of all or part of a PowerShell session to a text file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Start-Transcript [[-OutputDirectory] <String>] [-Append] [-Force] [-NoClobber] [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transcript` cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the
When using the **Append** parameter, if the target file doesn't have a Byte Orde
`Start-Transcript` defaults to `ASCII` encoding in the target file. This behavior can result in improper encoding of mulitbyte characters in the transcript.
-## Examples
+## EXAMPLES
### Example 1: Start a transcript file with default settings
This command starts a transcript in the `Transcript0.txt` file in `C:\transcript
**NoClobber** parameter is used, the command prevents any existing files from being overwritten. If the `Transcript0.txt` file already exists, the command fails.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a confirmation message and the path to the output file.
-## Notes
+## NOTES
To stop a transcript, use the `Stop-Transcript` cmdlet. To record an entire session, add the `Start-Transcript` command to your profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Stop-Transcript](Stop-Transcript.md)
Microsoft.PowerShell.Host Stop Transcript (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Host/Stop-Transcript.md
Title: Stop-Transcript
# Stop-Transcript
-## Synopsis
+## SYNOPSIS
Stops a transcript.
-## Syntax
+## SYNTAX
``` Stop-Transcript [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Transcript` cmdlet stops a transcript that was started by the `Start-Transcript` cmdlet. Alternatively, you can end a session to stop a transcript.
-## Examples
+## EXAMPLES
### Example 1: Stop all transcripts
Stop-Transcript
This command stops all transcripts.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a status message and the path to the output file.
-## Notes
+## NOTES
* If a transcript has not been started, the command fails. *
-## Related links
+## RELATED LINKS
[Start-Transcript](Start-Transcript.md)
Microsoft.PowerShell.LocalAccounts Add Localgroupmember (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Add-LocalGroupMember.md
Title: Add-LocalGroupMember
# Add-LocalGroupMember
-## Synopsis
+## SYNOPSIS
Adds members to a local group.
-## Syntax
+## SYNTAX
### Group
Add-LocalGroupMember [-Member] <LocalPrincipal[]> [-SID] <SecurityIdentifier> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-LocalGroupMember` cmdlet adds users or groups to a local security group. All the rights and permissions that are assigned to a group are assigned to all members of that group.
accounts from that domain and from trusted domains to a local group.
> If the computer is joined to a domain and you try to add a local user that has the same name as a > member of the domain it adds the domain member.
-## Examples
+## EXAMPLES
### Example 1: Add members to the Administrators group
example uses a placeholder value for the user name of an account at Outlook.com.
Add-LocalGroupMember -Group "Administrators" -Member "Admin02", "MicrosoftAccount\username@Outlook.com", "AzureAD\DavidChew@contoso.com", "CONTOSO\Domain Admins" ```
-## Parameters
+## PARAMETERS
### -Group
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local principal, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.
follows:
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Get-LocalGroupMember](Get-LocalGroupMember.md)
Microsoft.PowerShell.LocalAccounts Disable Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Disable-LocalUser.md
Title: Disable-LocalUser
# Disable-LocalUser
-## Synopsis
+## SYNOPSIS
Disables a local user account.
-## Syntax
+## SYNTAX
### InputObject
Disable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-LocalUser` cmdlet disables local user accounts. When a user account is disabled, the user cannot log on. When a user account is enabled, the user can log on.
user cannot log on. When a user account is enabled, the user can log on.
> The **Microsoft.PowerShell.LocalAccounts** module is not available in 32-bit PowerShell on a > 64-bit system.
-## Examples
+## EXAMPLES
### Example 1: Disable an account by specifying a name
Get-LocalUser Guest | Disable-LocalUser
This command gets the built-in Guest account by using `Get-LocalUser`, and then passes it to the current cmdlet by using the pipeline operator(`|`). That cmdlet disables that account.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local user, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
* The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Enable-LocalUser](Enable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts Enable Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Enable-LocalUser.md
Title: Enable-LocalUser
# Enable-LocalUser
-## Synopsis
+## SYNOPSIS
Enables a local user account.
-## Syntax
+## SYNTAX
### InputObject
Enable-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-LocalUser` cmdlet enables local user accounts. When a user account is disabled, the user cannot log on.
When a user account is enabled, the user can log on.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Enable an account by specifying a name
Get-LocalUser -Name "Administrator" | Enable-LocalUser
This command gets the built-in Administrator account by using `Get-LocalUser`, and then passes it to the current cmdlet by using the pipeline operator. That cmdlet enables that account.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local user, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts Get Localgroup (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Get-LocalGroup.md
Title: Get-LocalGroup
# Get-LocalGroup
-## Synopsis
+## SYNOPSIS
Gets the local security groups.
-## Syntax
+## SYNTAX
### Default (Default)
Get-LocalGroup [[-Name] <String[]>] [<CommonParameters>]
Get-LocalGroup [[-SID] <SecurityIdentifier[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-LocalGroup` cmdlet gets local security groups in Security Account Manager. This cmdlet gets default built-in groups and local security groups that you create.
This cmdlet gets default built-in groups and local security groups that you crea
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Get the Administrators group
Get-LocalGroup -Name "Administrators"
This command gets the local Administrators group. The command displays properties of the group in the console.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String, System.Security.Principal.SecurityIdentifier You can pipe a string or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup This cmdlet returns a local group.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet returns a local group.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[New-LocalGroup](New-LocalGroup.md)
Microsoft.PowerShell.LocalAccounts Get Localgroupmember (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Get-LocalGroupMember.md
Title: Get-LocalGroupMember
# Get-LocalGroupMember
-## Synopsis
+## SYNOPSIS
Gets members from a local group.
-## Syntax
+## SYNTAX
### Default (Default)
Get-LocalGroupMember [-Group] <LocalGroup> [[-Member] <String>] [<CommonParamete
Get-LocalGroupMember [[-Member] <String>] [-SID] <SecurityIdentifier> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-LocalGroupMember` cmdlet gets members from a local group.
The `Get-LocalGroupMember` cmdlet gets members from a local group.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Get all members of the Administrators group
Get-LocalGroupMember -Group "Administrators"
This command gets all the members of the local Administrators group.
-## Parameters
+## PARAMETERS
### -Group
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local group, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.SecurityAccountsManager.LocalPrincipal This cmdlet returns local principals.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet returns local principals.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Add-LocalGroupMember](Add-LocalGroupMember.md)
Microsoft.PowerShell.LocalAccounts Get Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Get-LocalUser.md
Title: Get-LocalUser
# Get-LocalUser
-## Synopsis
+## SYNOPSIS
Gets local user accounts.
-## Syntax
+## SYNTAX
### Default (Default)
Get-LocalUser [[-Name] <String[]>] [<CommonParameters>]
Get-LocalUser [[-SID] <SecurityIdentifier[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-LocalUser` cmdlet gets local user accounts. This cmdlet gets default built-in user accounts, local user accounts that you created, and local accounts that you connected to Microsoft
accounts.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Get an account by using its name
Name Enabled Description
Administrator True Built-in account for administering the computer/domain ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Security.Principal.SecurityIdentifier You can pipe a string or SID to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser[] This cmdlet returns local user accounts.
-## Notes
+## NOTES
The **PrincipalSource** property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects describes the source of the object. The possible sources are as follows:
describes the source of the object. The possible sources are as follows:
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts New Localgroup (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/New-LocalGroup.md
Title: New-LocalGroup
# New-LocalGroup
-## Synopsis
+## SYNOPSIS
Creates a local security group.
-## Syntax
+## SYNTAX
``` New-LocalGroup [-Description <String>] [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-LocalGroup` cmdlet creates a local security group in the Security Account Manager.
The `New-LocalGroup` cmdlet creates a local security group in the Security Accou
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Create a security group
New-LocalGroup -Name "SecurityGroup04"
This command creates a group named SecurityGroup04.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup This cmdlet returns a security group.
-## Notes
+## NOTES
` The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
follows:
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Get-LocalGroup](Get-LocalGroup.md)
Microsoft.PowerShell.LocalAccounts New Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/New-LocalUser.md
Title: New-LocalUser
# New-LocalUser
-## Synopsis
+## SYNOPSIS
Creates a local user account.
-## Syntax
+## SYNTAX
### Password (Default)
New-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-LocalUser` cmdlet creates a local user account. This cmdlet creates a local user account or a local user account that is connected to a Microsoft account.
or a local user account that is connected to a Microsoft account.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Create a user account
password as a secure string in the `$Password` variable.
The second command creates a local user account by using the password stored in `$Password`. The command specifies a user name, full name, and description for the user account.
-## Parameters
+## PARAMETERS
### -AccountExpires
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](/reference/6/Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String, System.DateTime, System.Boolean, System.Security.SecureString You can pipe a string, a **DateTime** object, a boolean value, or a secure string to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser This cmdlet returns a **LocalUser** object. This object provides information about the user account.
-## Notes
+## NOTES
- A user name cannot be identical to any other user name or group name on the computer. A user name cannot consist only of periods `.` or spaces. A user name can contain up to 20 uppercase
This object provides information about the user account.
> **PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the > Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts Remove Localgroup (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroup.md
Title: Remove-LocalGroup
# Remove-LocalGroup
-## Synopsis
+## SYNOPSIS
Deletes local security groups.
-## Syntax
+## SYNTAX
### InputObject
Remove-LocalGroup [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-LocalGroup [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-LocalGroup` cmdlet deletes local security groups. This cmdlet deletes only a local group. It does not delete the user accounts, computer accounts, or group accounts that belong to
the group.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Delete a security group
Remove-LocalGroup -Name "SecurityGroup04"
This command deletes the group named SecurityGroup04.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier You can pipe a security group, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet cannot delete the following default groups:
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Get-LocalGroup](Get-LocalGroup.md)
Microsoft.PowerShell.LocalAccounts Remove Localgroupmember (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Remove-LocalGroupMember.md
Title: Remove-LocalGroupMember
# Remove-LocalGroupMember
-## Synopsis
+## SYNOPSIS
Removes members from a local group.
-## Syntax
+## SYNTAX
### Group
Remove-LocalGroupMember [-Member] <LocalPrincipal[]> [-SID] <SecurityIdentifier>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-LocalGroupMember` cmdlet removes users or groups from a local group.
The `Remove-LocalGroupMember` cmdlet removes users or groups from a local group.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Remove members from the Administrators group
cmdlet removes include a local user account, a Microsoft account, an Azure Activ
and a domain group. This example uses a placeholder value for the user name of an account at Outlook.com.
-## Parameters
+## PARAMETERS
### -Group
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalPrincipal, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local principal, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Add-LocalGroupMember](Add-LocalGroupMember.md)
Microsoft.PowerShell.LocalAccounts Remove Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Remove-LocalUser.md
Title: Remove-LocalUser
# Remove-LocalUser
-## Synopsis
+## SYNOPSIS
Deletes local user accounts.
-## Syntax
+## SYNTAX
### InputObject
Remove-LocalUser [-Name] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-LocalUser [-SID] <SecurityIdentifier[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-LocalUser` cmdlet deletes local user accounts.
-## Examples
+## EXAMPLES
### Example 1: Delete a user account
This command deletes the user account named AdminContoso02.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local user, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts Rename Localgroup (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Rename-LocalGroup.md
Title: Rename-LocalGroup
# Rename-LocalGroup
-## Synopsis
+## SYNOPSIS
Renames a local security group.
-## Syntax
+## SYNTAX
### InputObject
Rename-LocalGroup [-Name] <String> [-NewName] <String> [-WhatIf] [-Confirm] [<Co
Rename-LocalGroup [-NewName] <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The **Rename-LocalGroup** cmdlet renames a local security group.
The **Rename-LocalGroup** cmdlet renames a local security group.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Change the name of a group
PS C:\> Rename-LocalGroup -Name "SecurityGroup" -NewName "SecurityGroup04"
This command renames a security group named SecurityGroup.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier You can pipe a security group, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Get-LocalGroup](Get-LocalGroup.md)
Microsoft.PowerShell.LocalAccounts Rename Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Rename-LocalUser.md
Title: Rename-LocalUser
# Rename-LocalUser
-## Synopsis
+## SYNOPSIS
Renames a local user account.
-## Syntax
+## SYNTAX
### InputObject
Rename-LocalUser [-Name] <String> [-NewName] <String> [-WhatIf] [-Confirm] [<Com
Rename-LocalUser [-NewName] <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-LocalUser` cmdlet renames a local user account.
The `Rename-LocalUser` cmdlet renames a local user account.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Rename a user account
Rename-LocalUser -Name "Admin02" -NewName "AdminContoso02"
This command renames the user account named Admin02.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local user, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.LocalAccounts Set Localgroup (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Set-LocalGroup.md
Title: Set-LocalGroup
# Set-LocalGroup
-## Synopsis
+## SYNOPSIS
Changes a local security group.
-## Syntax
+## SYNTAX
### InputObject
Set-LocalGroup -Description <String> [-Name] <String> [-WhatIf] [-Confirm] [<Com
Set-LocalGroup -Description <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-LocalGroup` cmdlet changes a local security group.
-## Examples
+## EXAMPLES
### Example 1: Change a group description
This command changes the description of a local group.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalGroup, System.String, System.Security.Principal.SecurityIdentifier You can pipe a security group, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Get-LocalGroup](Get-LocalGroup.md)
Microsoft.PowerShell.LocalAccounts Set Localuser (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.LocalAccounts/Set-LocalUser.md
Title: Set-LocalUser
# Set-LocalUser
-## Synopsis
+## SYNOPSIS
Modifies a local user account.
-## Syntax
+## SYNTAX
### Name (Default)
Set-LocalUser [-AccountExpires <DateTime>] [-AccountNeverExpires] [-Description
[-UserMayChangePassword <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-LocalUser` cmdlet modifies a local user account. This cmdlet can reset the password of a local user account.
local user account.
> The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit > system.
-## Examples
+## EXAMPLES
### Example 1: Change a description of a user account
account in the $UserAccount variable.
The third command sets the new password on the user account stored in `$UserAccount`.
-## Parameters
+## PARAMETERS
### -AccountExpires
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
+## INPUTS
### System.Management.Automation.SecurityAccountsManager.LocalUser, System.String, System.Security.Principal.SecurityIdentifier You can pipe a local user, a string, or a SID to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The **PrincipalSource** property is a property on **LocalUser**, **LocalGroup**, and **LocalPrincipal** objects that describes the source of the object. The possible sources are as
This cmdlet does not generate any output.
**PrincipalSource** is supported only by Windows 10, Windows Server 2016, and later versions of the Windows operating system. For earlier versions, the property is blank.
-## Related links
+## RELATED LINKS
[Disable-LocalUser](Disable-LocalUser.md)
Microsoft.PowerShell.Management Add Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Add-Computer.md
Title: Add-Computer
--- # Add-Computer
-## Synopsis
+## SYNOPSIS
Add the local computer to a domain or workgroup.
-## Syntax
+## SYNTAX
### Domain (Default)
Add-Computer [-ComputerName <String[]>] [-LocalCredential <PSCredential>] [-Cred
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Computer` cmdlet adds the local computer or remote computers to a domain or workgroup, or moves them from one domain to another. It also creates a domain account if the computer is added to
controller or to perform an unsecure join.
To get the results of the command, use the **Verbose** and **PassThru** parameters.
-## Examples
+## EXAMPLES
### Example 1: Add a local computer to a domain then restart the computer
the predefined name joins the domain using only the computer name and the tempor
The predefined password is only used to support the join operation and is replaced as part of normal computer account procedures after the computer completes the join.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe computer names and new names to the `Add-Computer` Cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo When you use the **PassThru** parameter, `Add-Computer` returns a **ComputerChangeInfo** object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- In Windows PowerShell 2.0, the **Server** parameter of `Add-Computer` fails even when the server is present. In Windows PowerShell 3.0, the implementation of the **Server** parameter is changed so that it works reliably.
-## Related links
+## RELATED LINKS
[Checkpoint-Computer](Checkpoint-Computer.md)
Microsoft.PowerShell.Management Add Content (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Add-Content.md
Title: Add-Content
--- # Add-Content
-## Synopsis
+## SYNOPSIS
Adds content to the specified items, such as adding words to a file.
-## Syntax
+## SYNTAX
### Path (Default)
Add-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[-Stream <string>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Content` cmdlet appends content to a specified item or file. You can specify the content by typing the content in the command or by specifying an object that contains the content. If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Add a string to all text files with an exception
Mode LastWriteTime Length Name
To remove the read-only attribute, use the `Set-ItemProperty` command with the **Value** parameter set to `False`.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object, System.Management.Automation.PSCredential You can pipe values, paths, or credentials to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Add-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- When you pipe an object to `Add-Content`, the object is converted to a string before it is added to the item. The object type determines the string format, but the format might be different than
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Checkpoint Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Checkpoint-Computer.md
Title: Checkpoint-Computer
--- # Checkpoint-Computer
-## Synopsis
+## SYNOPSIS
Creates a system restore point on the local computer.
-## Syntax
+## SYNTAX
``` Checkpoint-Computer [-Description] <String> [[-RestorePointType] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Checkpoint-Computer` cmdlet creates a system restore point on the local computer.
System restore points and the `Checkpoint-Computer` cmdlet are supported only on
Beginning in Windows 8, `Checkpoint-Computer` cannot create more than one checkpoint each day.
-## Examples
+## EXAMPLES
### Example 1: Create a system restore point
Checkpoint-Computer -Description "ChangeNetSettings" -RestorePointType MODIFY_SE
This command creates a MODIFY_SETTINGS system restore point called "ChangeNetSettings".
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Checkpoint-Computer`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **CreateRestorePoint** method of the **SystemRestore** class with a **BEGIN_SYSTEM_CHANGE** event. - Beginning in Windows 8, `Checkpoint-Computer` cannot create more than one system restore point each day. If you try to create a new restore point before the 24-hour period has elapsed, Windows PowerShell generates the following error:
This cmdlet does not generate any output.
`"A new system restore point cannot be created because one has already been created within the past 24 hours. Please try again later."`
-## Related links
+## RELATED LINKS
[Disable-ComputerRestore](Disable-ComputerRestore.md)
Microsoft.PowerShell.Management Clear Content (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Clear-Content.md
Title: Clear-Content
--- # Clear-Content
-## Synopsis
+## SYNOPSIS
Deletes the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Content -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Content` cmdlet deletes the contents of an item, such as deleting the text from a file, but it does not delete the item. As a result, the item exists, but it is empty. The `Clear-Content` is similar to `Clear-Item`, but it works on items with contents, instead of items with values.
-## Examples
+## EXAMPLES
### Example 1: Delete all content from a directory
Get-Content C:\Test\Copy-Script.ps1 -Stream Zone.Identifier
```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-Content`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
You can use `Clear-Content` with the PowerShell FileSystem provider and with other providers that manipulate content. To clear items that are not considered to be content, such as items managed by the PowerShell Certificate or Registry providers, use `Clear-Item`.
The `Clear-Content` cmdlet is designed to work with the data exposed by any prov
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Add-Content](Add-Content.md)
Microsoft.PowerShell.Management Clear Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Clear-EventLog.md
Title: Clear-EventLog
--- # Clear-EventLog
-## Synopsis
+## SYNOPSIS
Clears all entries from specified event logs on the local or remote computers.
-## Syntax
+## SYNTAX
``` Clear-EventLog [-LogName] <String[]> [[-ComputerName] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-EventLog` cmdlet deletes all of the entries from the specified event logs on the local computer or on remote computers. To use `Clear-EventLog`, you must be a member of the Administrators
The cmdlets that contain the **EventLog** noun (the EventLog cmdlets) work only
logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use the Get-WinEvent cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Clear specific event log types from the local computer
log list.
Notice that a few entries were added to the System and Security logs after the logs were cleared but before they were displayed.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-EventLog`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To use `Clear-EventLog` on Windows Vista and later versions of Windows, start Windows PowerShell with the "Run as administrator" option.
-## Related links
+## RELATED LINKS
[Get-EventLog](Get-EventLog.md)
Microsoft.PowerShell.Management Clear Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Clear-Item.md
Title: Clear-Item
--- # Clear-Item
-## Synopsis
+## SYNOPSIS
Clears the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of a variable
You can use the **Include** and **Exclude** parameters to identify particular re
Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the **Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you can use
This cmdlet does not generate any output.
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem provider does not support this cmdlet. To clear files, use the `Clear-Content`.
-## Related links
+## RELATED LINKS
[Copy-Item](Copy-Item.md)
Microsoft.PowerShell.Management Clear Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Clear-ItemProperty.md
Title: Clear-ItemProperty
--- # Clear-ItemProperty
-## Synopsis
+## SYNOPSIS
Clears the value of a property but does not delete the property.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PassThru] [-Force]
[-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-ItemProperty` cmdlet clears the value of a property, but it does not delete the property. You can use this cmdlet to delete the data from a registry value.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of registry key
This command clears the data in the "Options" registry value in the "MyApp" subk
Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the *PassThru* parameter, `Clear-ItemProperty` generates a **PSCustomObject** object that represents the cleared item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero. Otherwise, the value is empty. The `Clear-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Copy-ItemProperty](Copy-ItemProperty.md)
Microsoft.PowerShell.Management Clear Recyclebin (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Title: Clear-RecycleBin
# Clear-RecycleBin
-## Synopsis
+## SYNOPSIS
Clears the contents of a recycle bin.
-## Syntax
+## SYNTAX
### All
Clears the contents of a recycle bin.
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-RecycleBin` cmdlet deletes the content of a computer's recycle bin. This action is like using Windows **Empty Recycle Bin**.
-## Examples
+## EXAMPLES
### 1: Clear all recycle bins
clear all recycle bins on the local computer.
An alternative is to replace `-Force` with `-Confirm:$false`.
-## Parameters
+## PARAMETERS
### -DriveLetter
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
+## INPUTS
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Complete Transaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Complete-Transaction.md
Title: Complete-Transaction
# Complete-Transaction
-## Synopsis
+## SYNOPSIS
Commits the active transaction.
-## Syntax
+## SYNTAX
``` Complete-Transaction [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Complete-Transaction` cmdlet commits an active transaction. When you commit a transaction, the commands in the transaction are finalized and the data affected by the commands is changed.
If the transaction includes multiple subscribers, to commit the transaction, you
The `Complete-Transaction` cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
-## Examples
+## EXAMPLES
### Example 1: Commit a transaction
However, when you add the **UseTransaction** parameter to the `Get-ChildItem` co
becomes part of the transaction, and it gets the items in the transaction even if they are not yet added to the data.
-## Parameters
+## PARAMETERS
### -Confirm
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- You cannot roll back a transaction that has been committed, or commit a transaction that has been rolled back.
This cmdlet does not generate any output.
By default, if any part of a transaction cannot be committed, such as when a command in the transaction results in an error, the entire transaction is rolled back.
-## Related links
+## RELATED LINKS
[Get-Transaction](Get-Transaction.md)
Microsoft.PowerShell.Management Convert Path (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Convert-Path.md
Title: Convert-Path
--- # Convert-Path
-## Synopsis
+## SYNOPSIS
Converts a path from a PowerShell path to a PowerShell provider path.
-## Syntax
+## SYNTAX
### Path (Default)
Convert-Path [-Path] <String[]> [-UseTransaction] [<CommonParameters>]
Convert-Path -LiteralPath <String[]> [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Convert-Path` cmdlet converts a path from a PowerShell path to a PowerShell provider path.
-## Examples
+## EXAMPLES
### Example 1: Convert the working directory to a standard file system path
PS C:\> Convert-Path ~
C:\Users\User01 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the converted path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use in programs and
available in your session, type `Get-PSProvider`. For more information, see
`Convert-Path` only converts existing paths. It cannot be used to convert a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Join-Path](Join-Path.md)
Microsoft.PowerShell.Management Copy Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Copy-Item.md
Title: Copy-Item
# Copy-Item
-## Synopsis
+## SYNOPSIS
Copies an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-Item -LiteralPath <String[]> [[-Destination] <String>] [-Container] [-Force
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-Item` cmdlet copies an item from one location to another location in the same namespace. For instance, it can copy a file to a folder, but it can't copy a file to a certificate drive.
This cmdlet can copy and rename items in the same command. To rename an item, en
the value of the **Destination** parameter. To rename an item and not copy it, use the `Rename-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Copy a file to the specified directory
The `Copy-Item` cmdlet has the **Container** parameter set to `$false`. This cau
the source folder to be copied but does not preserve the folder structure. Notice that files with the same name are overwritten in the destination folder.
-## Parameters
+## PARAMETERS
### -Container
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the copied item When you use the **PassThru** parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management Copy Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md
Title: Copy-ItemProperty
--- # Copy-ItemProperty
-## Synopsis
+## SYNOPSIS
Copies a property and value from a specified location to another location.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <Strin
[-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key.
-## Examples
+## EXAMPLES
### Example 1: Copy a property from a registry key to another registry key
This command copies the property named "MyProperty" from the "MyApplication" reg
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **Passthru** parameter, this cmdlet generates a **PsCustomObject** representing the copied item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Debug Process (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Debug-Process.md
Title: Debug-Process
--- # Debug-Process
-## Synopsis
+## SYNOPSIS
Debugs one or more processes running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Debug-Process [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Process -InputObject <Process[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Process` cmdlet attaches a debugger to one or more running processes on a local computer. You can specify the processes by their process name or process ID (PID), or you can pipe process
objects to this cmdlet.
This cmdlet attaches the debugger that is currently registered for the process. Before using this cmdlet, verify that a debugger is downloaded and correctly configured.
-## Examples
+## EXAMPLES
### Example 1: Attach a debugger to a process on the computer
computer. It saves the resulting process object in the variable named `$P`.
The second command uses the **InputObject** parameter of the `Debug-Process` cmdlet to submit the process object in the `$P` variable.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32, System.Diagnostics.Process, System.String You can pipe a process ID (Int32), a process object (System.Diagnostics.Process), or a process name (String) to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see [AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Disable Computerrestore (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Disable-ComputerRestore.md
Title: Disable-ComputerRestore
# Disable-ComputerRestore
-## Synopsis
+## SYNOPSIS
Disables the System Restore feature on the specified file system drive.
-## Syntax
+## SYNTAX
```Syntax Disable-ComputerRestore [-Drive] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ComputerRestore` cmdlet turns off the System Restore feature on one or more file system drives. As a result, attempts to restore the computer do not affect the specified drive.
Restore for each drive, use `Rstrui.exe`.
System restore points and the ComputerRestore cmdlets are supported only on client operating systems, such as Windows 7, Windows Vista, and Windows XP.
-## Examples
+## EXAMPLES
### Example 1: Disable System Restore on the specified drive
Disable-ComputerRestore "C:\", "D:\"
This command disables System Restore on the C: and D: drives. The command uses the **Drive** parameter, but it omits the Drive parameter name.
-## Parameters
+## PARAMETERS
### -Drive
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To run this cmdlet on Windows Vista and later versions of Windows, open Windows PowerShell with the Run as administrator option.
This cmdlet does not generate any output.
This cmdlet uses the Windows Management Instrumentation (WMI) **SystemRestore** class.
-## Related links
+## RELATED LINKS
[Checkpoint-Computer](Checkpoint-Computer.md)
Microsoft.PowerShell.Management Enable Computerrestore (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Enable-ComputerRestore.md
Title: Enable-ComputerRestore
# Enable-ComputerRestore
-## Synopsis
+## SYNOPSIS
Enables the System Restore feature on the specified file system drive.
-## Syntax
+## SYNTAX
``` Enable-ComputerRestore [-Drive] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ComputerRestore` cmdlet turns on the System Restore feature on one or more file system drives. As a result, you can use tools, such as the Restore-Computer cmdlet, to restore the computer
Restore for each drive, use `Rstrui.exe`.
System restore points and the ComputerRestore cmdlets are supported only on client operating systems, such as Windows 7, Windows Vista, and Windows XP.
-## Examples
+## EXAMPLES
### Example 1: Enable System Restore on the specified drive
Enable-ComputerRestore -Drive "C:\", "D:\"
This command enables System Restore on the C: and D: drives of the local computer.
-## Parameters
+## PARAMETERS
### -Drive
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To run this cmdlet on Windows Vista and later versions of Windows, open Windows PowerShell with the Run as administrator option.
This cmdlet does not generate any output.
This cmdlet uses the Windows Management Instrumentation (WMI) **SystemRestore** class.
-## Related links
+## RELATED LINKS
[Checkpoint-Computer](Checkpoint-Computer.md)
Microsoft.PowerShell.Management Get Childitem (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ChildItem.md
Title: Get-ChildItem
--- # Get-ChildItem
-## Synopsis
+## SYNOPSIS
Gets the items and child items in one or more specified locations.
-## Syntax
+## SYNTAX
### Items (Default)
Get-ChildItem [[-Filter] <string>] -LiteralPath <string[]> [-Include <string[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the **Recurse**
of levels to recurse.
Locations are exposed to `Get-ChildItem` by PowerShell providers. A location can be a file system directory, registry hive, or a certificate store. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Get child items from a file system directory
Name Target
tmp {C:\Users\user1\AppData\Local\Temp} ```
-## Parameters
+## PARAMETERS
### -Attributes
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
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ChildItem`.
-## Outputs
+## OUTPUTS
### System.Object
path.
If you use the **Name** parameter, `Get-ChildItem` returns the object names as strings.
-## Notes
+## NOTES
- `Get-ChildItem` can be run using any of the built-in aliases, `ls`, `dir`, and `gci`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
If you use the **Name** parameter, `Get-ChildItem` returns the object names as s
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md)
Microsoft.PowerShell.Management Get Clipboard (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Clipboard.md
Title: Get-Clipboard
--- # Get-Clipboard
-## Synopsis
+## SYNOPSIS
Gets the current Windows clipboard entry.
-## Syntax
+## SYNTAX
``` Get-Clipboard [-Format <ClipboardFormat>] [-TextFormatType <TextDataFormat>] [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Clipboard` cmdlet gets the current Windows clipboard entry. Multiple lines of text are returned as an array of strings similar to `Get-Content`.
-## Examples
+## EXAMPLES
### Example 1: Get the content of the clipboard and display it to the command-line
Mode LastWriteTime Length Name
-a---- 6/28/2018 2:28 PM 345 README.md ```
-## Parameters
+## PARAMETERS
### -Format
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.String, System.IO.FileInfo, System.IO.Stream, System.Drawing.Image
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-Clipboard](Set-Clipboard.md)
Microsoft.PowerShell.Management Get Computerinfo (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ComputerInfo.md
Title: Get-ComputerInfo
--- # Get-ComputerInfo
-## Synopsis
+## SYNOPSIS
Gets a consolidated object of system and operating system properties.
-## Syntax
+## SYNTAX
``` Get-ComputerInfo [[-Property] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ComputerInfo` cmdlet gets a consolidated object of system and operating system properties. This cmdlet was introduced in Windows PowerShell 5.1.
-## Examples
+## EXAMPLES
### Example 1: Get all computer properties
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0 ```
-## Parameters
+## PARAMETERS
### -Property
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Management.ComputerInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Computerrestorepoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ComputerRestorePoint.md
Title: Get-ComputerRestorePoint
# Get-ComputerRestorePoint
-## Synopsis
+## SYNOPSIS
Gets the restore points on the local computer.
-## Syntax
+## SYNTAX
### ID (Default)
Get-ComputerRestorePoint [[-RestorePoint] <Int32[]>] [<CommonParameters>]
Get-ComputerRestorePoint -LastStatus [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ComputerRestorePoint` cmdlet gets the local computer's system restore points. And, it can display the status of the most recent attempt to restore the computer.
use a sequence number to identify a restore point for the `Restore-Computer` cmd
System restore points and the `Get-ComputerRestorePoint` cmdlet are supported only on client operating systems such as Windows 10.
-## Examples
+## EXAMPLES
### Example 1: Get all system restore points
output only contains the sequence number.
`Get-ComputerRestorePoint` uses the **SequenceNumber** property with an array index. The array index of `-1` gets the most recent sequence number in the array.
-## Parameters
+## PARAMETERS
### -LastStatus
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-ComputerRestorePoint`.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\default\SystemRestore or String
Management Instrumentation (WMI) **SystemRestore** class.
When you use the **LastStatus** parameter, `Get-ComputerRestorePoint` returns a string.
-## Notes
+## NOTES
To run a `Get-ComputerRestorePoint` command on Windows Vista and later versions of Windows, open PowerShell with the **Run as administrator** option. `Get-ComputerRestorePoint` uses the WMI **SystemRestore** class.
-## Related links
+## RELATED LINKS
[about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md)
Microsoft.PowerShell.Management Get Content (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md
Title: Get-Content
--- # Get-Content
-## Synopsis
+## SYNOPSIS
Gets the content of the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Content [-ReadCount <Int64>] [-TotalCount <Int64>] [-Tail <Int32>] -LiteralP
[-Encoding <FileSystemCmdletProviderEncoding>] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Content` cmdlet gets the content of the item at the location specified by the path, such as the text in a file or the content of a function. For files, the content is read one line at a time
and returns a collection of objects, each of which represents a line of content.
Beginning in PowerShell 3.0, `Get-Content` can also get a specified number of lines from the beginning or end of an item.
-## Examples
+## EXAMPLES
### Example 1: Get the content of a text file
The **Raw** parameter ensures that the bytes are returned as a `[System.Byte[]]`
parameter was absent, the return value is a stream of bytes, which is interpreted by PowerShell as `[System.Object[]]`.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64, System.String[], System.Management.Automation.PSCredential You can pipe the read count, total count, paths, or credentials to `Get-Content`.
-## Outputs
+## OUTPUTS
### System.Byte, System.String `Get-Content` returns strings or bytes. The output type depends upon the type of content that you specify as input.
-## Notes
+## NOTES
The `Get-Content` cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Management Get Controlpanelitem (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ControlPanelItem.md
Title: Get-ControlPanelItem
--- # Get-ControlPanelItem
-## Synopsis
+## SYNOPSIS
Gets control panel items.
-## Syntax
+## SYNTAX
### RegularName (Default)
Get-ControlPanelItem [[-Name] <String[]>] [-Category <String[]>] [<CommonParamet
Get-ControlPanelItem -CanonicalName <String[]> [-Category <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ControlPanelItem` cmdlet gets control panel items on the local computer. You can use it to find control panel items by name, category, or description, even on systems that do not have a
without these components.
This cmdlet was introduced in Windows PowerShell 3.0. It works only on Windows 8 and Windows Server 2012 and newer.
-## Examples
+## EXAMPLES
### Example 1: Get all control panel items
Sound Microsoft.Sound {Hardware} Configure your
The `Get-ControlPanelItem` cmdlet gets all control panel items. The `Where-Object` cmdlet filters the items by the value of the **Description** property.
-## Parameters
+## PARAMETERS
### -CanonicalName
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
+## INPUTS
### System.String You can pipe a name or name pattern to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ControlPanelItem This cmdlet gets control panel items on the local computer.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Show-ControlPanelItem](Show-ControlPanelItem.md)
Microsoft.PowerShell.Management Get Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-EventLog.md
Title: Get-EventLog
# Get-EventLog
-## Synopsis
+## SYNOPSIS
Gets the events in an event log, or a list of the event logs, on the local computer or remote computers.
-## Syntax
+## SYNTAX
### LogName (Default)
Get-EventLog [-LogName] <String> [-ComputerName <String[]>] [-Newest <Int32>] [-
Get-EventLog [-ComputerName <String[]>] [-List] [-AsString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventLog` cmdlet gets events and event logs from local and remote computers. By default, `Get-EventLog` gets logs from the local computer. To get logs from remote computers, use the
Vista and later Windows versions, use `Get-WinEvent`.
> `Get-EventLog` uses a Win32 API that is deprecated. The results may not be accurate. Use the > `Get-WinEvent` cmdlet instead.
-## Examples
+## EXAMPLES
### Example 1: Get event logs on the local computer
objects are stored in the `$Begin` and `$End` variables. The `Get-EventLog` cmdl
event type. The date and time range is set by the **After** parameter and `$Begin` variable and the **Before** parameter and `$End` variable.
-## Parameters
+## PARAMETERS
### -After
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
+## INPUTS
### None You cannot pipe input to `Get-EventLog`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.EventLogEntry. System.Diagnostics.EventLog. System.String
If only the **List** parameter is specified, the output is a collection of
If both the **List** and **AsString** parameters are specified, the output is a collection of **System.String** objects.
-## Notes
+## NOTES
The cmdlets `Get-EventLog` and `Get-WinEvent` are not supported in the Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.Management Get Hotfix (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-HotFix.md
Title: Get-HotFix
# Get-HotFix
-## Synopsis
+## SYNOPSIS
Gets the hotfixes that are installed on local or remote computers.
-## Syntax
+## SYNTAX
### Default (Default)
Get-HotFix [[-Id] <String[]>] [-ComputerName <String[]>] [-Credential <PSCredent
[<CommonParameters>] ```
-### Description
+### DESCRIPTION
``` Get-HotFix [-Description <String[]>] [-ComputerName <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Hotfix` cmdlet gets hotfixes, or updates, that are installed on the local computer or specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.
-## Examples
+## EXAMPLES
### Example 1: Get all hotfixes on the local computer
This example gets the most recent hotfix installed on a computer.
objects by ascending order and uses the **Property** parameter to evaluate each **InstalledOn** date. The array notation `[-1]` selects the most recent installed hotfix.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### String You can pipe one or more computer names to Get-HotFix.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\CIMV2\Win32_QuickFixEngineering `Get-HotFix` returns objects that represent the hotfixes on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Installer (MSI) or the [Windows Update](https://update.microsoft.com) site are n
The `Get-HotFix` output might vary on different operating systems.
-## Related links
+## RELATED LINKS
[about_Arrays](../Microsoft.PowerShell.Core/About/about_Arrays.md)
Microsoft.PowerShell.Management Get Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Item.md
Title: Get-Item
--- # Get-Item
-## Synopsis
+## SYNOPSIS
Gets the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Excl
[-Credential <PSCredential>] [-UseTransaction] [-Stream <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Item` cmdlet gets the item at the specified location. It doesn't get the contents of the item at the location unless you use a wildcard character (`*`) to request all the contents of the
item.
This cmdlet is used by PowerShell providers to navigate through different types of data stores.
-## Examples
+## EXAMPLES
### Example 1: Get the current directory
the contents of the item.
Get-Item C:\Windows\*.* -Exclude "w*" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the objects that it gets. The type is determined by the type of objects in the path.
-## Notes
+## NOTES
This cmdlet does not have a **Recurse** parameter, because it gets only an item, not its contents. To get the contents of an item recursively, use `Get-ChildItem`.
This cmdlet is designed to work with the data exposed by any provider. To list t
available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Get Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ItemProperty.md
Title: Get-ItemProperty
--- # Get-ItemProperty
-## Synopsis
+## SYNOPSIS
Gets the properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemProperty -LiteralPath <String[]> [[-Name] <String[]>] [-Filter <String>]
[-Exclude <String[]>] [-Credential <PSCredential>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemProperty` cmdlet gets the properties of the specified items. For example, you can use this cmdlet to get the value of the LastAccessTime property of a file object. You can also use this cmdlet to view registry entries and their values.
-## Examples
+## EXAMPLES
### Example 1: Get information about a specific directory
Path : C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
ExecutionPolicy : RemoteSigned ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ItemProperty`.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime `Get-ItemProperty` returns an object for each item property that it gets. The object type depends on the object that is retrieved. For example, in a file system drive, it might return a file or folder.
-## Notes
+## NOTES
The `Get-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type "`Get-PSProvider`". For more information, see about_Providers.
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Get Itempropertyvalue (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md
Title: Get-ItemPropertyValue
--- # Get-ItemPropertyValue
-## Synopsis
+## SYNOPSIS
Gets the value for one or more properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <Strin
[-Exclude <String[]>] [-Credential <PSCredential>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemPropertyValue` gets the current value for a property that you specify when you use the **Name** parameter, located in a path that you specify with either the **Path** or **LiteralPath** parameters.
-## Examples
+## EXAMPLES
### Example 1: Get the value of the ProductID property
Target : {}
LinkType : ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime
This cmdlet returns an object for each item property value that it gets. The obj
the property value that is retrieved. For example, in a file system drive, the cmdlet might return a file or folder.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, run the `Get-PSProvider` cmdlet. For more information, see about_Providers.
-## Related links
+## RELATED LINKS
[Get-ItemProperty](Get-ItemProperty.md)
Microsoft.PowerShell.Management Get Location (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Location.md
Title: Get-Location
--- # Get-Location
-## Synopsis
+## SYNOPSIS
Gets information about the current working location or a location stack.
-## Syntax
+## SYNTAX
### Location (Default)
Get-Location [-PSProvider <String[]>] [-PSDrive <String[]>] [-UseTransaction] [<
Get-Location [-Stack] [-StackName <String[]>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Location` cmdlet gets an object that represents the current directory, much like the print working directory (pwd) command.
scripts, such as in a function that displays the current directory in the PowerS
You can also use this cmdlet to display the locations in a location stack. For more information, see the Notes and the descriptions of the **Stack** and **StackName** parameters.
-## Examples
+## EXAMPLES
### Example 1: Display your current drive location
change the prompt in your console by creating a new function named `prompt`.
To see the current prompt function, type the following command: `Get-Content Function:\prompt`
-## Parameters
+## PARAMETERS
### -PSDrive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo or System.Management.Automation.PathInfoStack If you use the **Stack** or **StackName** parameters, this cmdlet returns a **PathInfoStack** object. Otherwise, it returns a **PathInfo** object.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
cmdlet to display the locations in the unnamed stack. To make the unnamed stack
use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Pop-Location](Pop-Location.md)
Microsoft.PowerShell.Management Get Psdrive (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-PSDrive.md
Title: Get-PSDrive
--- # Get-PSDrive
-## Synopsis
+## SYNOPSIS
Gets drives in the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSDrive [-LiteralName] <String[]> [-Scope <String>] [-PSProvider <String[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSDrive` cmdlet gets the drives in the current session. You can get a particular drive or all drives in the session.
You do not need to restart Windows PowerShell. Similarly, when an external drive
from the computer, Windows PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Get drives in the current session
The last command uses the `Get-CimInstance` cmdlet to display the instances of t
**Win32_NetworkConnection** class. Like **net use**, it returns only the persistent G: drive created by `New-PSDrive`.
-## Parameters
+## PARAMETERS
### -LiteralName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo This cmdlet returns objects that represent the drives in the session.
-## Notes
+## NOTES
* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the `Get-PSProvider` cmdlet. For more information, see
This cmdlet returns objects that represent the drives in the session.
sessions that are started without explicit credentials or with the credentials of the current user.
-## Related links
+## RELATED LINKS
[New-PSDrive](New-PSDrive.md)
Microsoft.PowerShell.Management Get Psprovider (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-PSProvider.md
Title: Get-PSProvider
--- # Get-PSProvider
-## Synopsis
+## SYNOPSIS
Gets information about the specified PowerShell provider.
-## Syntax
+## SYNTAX
``` Get-PSProvider [[-PSProvider] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSProvider` cmdlet gets the PowerShell providers in the current session. You can get a particular drive or all drives in the session.
PowerShell providers let you access a variety of data stores as though they were
For information about PowerShell providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Display a list of all available providers
This example shows that the tilde symbol (~) represents the value of the **Home*
FileSystem provider. The **Home** property value is optional, but for the **FileSystem** provider, it is defined as `$env:homedrive\$env:homepath` or `$home`.
-## Parameters
+## PARAMETERS
### -PSProvider
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### String[] You can pipe one or more provider name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ProviderInfo This cmdlet returns objects that represent the PowerShell providers in the session.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Process (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Process.md
Title: Get-Process
--- # Get-Process
-## Synopsis
+## SYNOPSIS
Gets the processes that are running on the local computer or a remote computer.
-## Syntax
+## SYNTAX
### Name (Default)
Get-Process -InputObject <Process[]> [-ComputerName <String[]>] [-Module] [-File
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Process` cmdlet gets the processes on a local or remote computer.
supports methods that let you start and stop the process. You can also use the p
`Get-Process` cmdlet to get file version information for the program that runs in the process and to get the modules that the process loaded.
-## Examples
+## EXAMPLES
### Example 1: Get a list of all active processes on the local computer
The **mainWindowTitle** property is just one of many useful properties of the **
that `Get-Process` returns. To view all of the properties, pipe the results of a `Get-Process` command to the `Get-Member` cmdlet `Get-Process | Get-Member`.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Diagnostics.ProcessModule
By default, this cmdlet returns a **System.Diagnostics.Process** object. If you
use the **Module** parameter, without the **FileVersionInfo** parameter, it returns a **System.Diagnostics.ProcessModule** object.
-## Notes
+## NOTES
- You can also refer to this cmdlet by its built-in aliases, ps and gps. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
use the **Module** parameter, without the **FileVersionInfo** parameter, it retu
- You can also use the built-in alternate views of the processes available with `Format-Table`, such as **StartTime** and **Priority**, and you can design your own views.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Service.md
Title: Get-Service
--- # Get-Service
-## Synopsis
+## SYNOPSIS
Gets the services on a local or remote computer.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Service [-ComputerName <String[]>] [-DependentServices] [-RequiredServices]
[-Exclude <String[]>] [-InputObject <ServiceController[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Service` cmdlet gets objects that represent the services on a local computer or on a remote computer, including running and stopped services.
computer, including running and stopped services.
You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get all services on the computer
The command returns the value of the **ServicesDependedOn** property of the serv
This command gets the WinRM service on the local computer. This example shows that you can pipe a service name string (enclosed in quotation marks) to `Get-Service`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns objects that represent the services on the computer.
-## Notes
+## NOTES
You can also refer to `Get-Service` by its built-in alias, `gsv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
services. The Status property of a service is an enumerated value in which the n
represent integer values. The sort is based on the integer value, not the name. "Running" appears before "Stopped" because "Stopped" has a value of "1", and "Running" has a value of "4".
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Get Timezone (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-TimeZone.md
Title: Get-TimeZone
--- # Get-TimeZone
-## Synopsis
+## SYNOPSIS
Gets the current time zone or a list of available time zones.
-## Syntax
+## SYNTAX
### Name (Default)
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TimeZone` cmdlet gets the current time zone or a list of available time zones.
-## Examples
+## EXAMPLES
### Example 1: Get the current time zone
Get-TimeZone -ListAvailable
This command gets all available time zones.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.TimeZoneInfo[]
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TimeZone](Set-TimeZone.md)
Microsoft.PowerShell.Management Get Transaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-Transaction.md
Title: Get-Transaction
# Get-Transaction
-## Synopsis
+## SYNOPSIS
Gets the current (active) transaction.
-## Syntax
+## SYNTAX
``` Get-Transaction [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Transaction` cmdlet gets an object that represents the current transaction in the session.
transaction that was most recently active in the session.
This cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
-## Examples
+## EXAMPLES
### Example 1: Get the current transaction
transaction.
The second `Complete-Transaction` command commits the transaction.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTransaction This cmdlet returns an object that represents the current transaction.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Complete-Transaction](Complete-Transaction.md)
Microsoft.PowerShell.Management Get Wmiobject (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Get-WmiObject.md
Title: Get-WmiObject
--- # Get-WmiObject
-## Synopsis
+## SYNOPSIS
Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.
-## Syntax
+## SYNTAX
### query (Default)
Get-WmiObject [-Amended] [-AsJob] [-Impersonation <ImpersonationLevel>]
[-ComputerName <String[]>] [-Namespace <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Starting in PowerShell 3.0, this cmdlet has been superseded by `Get-CimInstance`.
Beginning in Windows PowerShell 3.0, the **__Server** property of the object tha
returns has a **PSComputerName** alias. This makes it easier to include the source computer name in output and reports.
-## Examples
+## EXAMPLES
### Example 1: Get processes on the local computer
Get-WmiObject Win32_Service -Credential FABRIKAM\administrator -ComputerName Fab
> [!NOTE] > Credentials cannot be used when targeting the local computer.
-## Parameters
+## PARAMETERS
### -Amended
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
+## INPUTS
### None You cannot pipe input to `Get-WmiObject`.
-## Outputs
+## OUTPUTS
### PSObject or System.Management.Automation.RemotingJob When you use the **AsJob** parameter, the cmdlet returns a job object. Otherwise, the object that `Get-WmiObject` returns depends on the value of the **Class** parameter.
-## Notes
+## NOTES
To access WMI information on a remote computer, the cmdlet must run under an account that is a member of the local administrators group on the remote computer. Or, the default access control on
Only some of the properties of each WMI class are displayed by default. The set
is displayed for each WMI class is specified in the Types.ps1xml configuration file. To get all properties of a WMI object, use the `Get-Member` or `Format-List` cmdlets.
-## Related links
+## RELATED LINKS
[Invoke-WmiMethod](Invoke-WmiMethod.md)
Microsoft.PowerShell.Management Invoke Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Invoke-Item.md
Title: Invoke-Item
--- # Invoke-Item
-## Synopsis
+## SYNOPSIS
Performs the default action on the specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Invoke-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Item` cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with the document file type. The default action depends on the type of item and is determined by the PowerShell provider that provides access to the data.
-## Examples
+## EXAMPLES
### Example 1: Open a file
In this case, opening in Excel is the default action for ".xls" files.
Invoke-Item "C:\Documents and Settings\Lister\My Documents\*.xls" ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None The command does not generate any output. However, output might be generated by the item that it invokes.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Invoke Wmimethod (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Invoke-WmiMethod.md
Title: Invoke-WmiMethod
# Invoke-WmiMethod
-## Synopsis
+## SYNOPSIS
Calls WMI methods.
-## Syntax
+## SYNTAX
### class (Default)
Invoke-WmiMethod [-Name] <String> [-AsJob] [-Impersonation <ImpersonationLevel>]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WmiMethod` cmdlet calls the methods of Windows Management Instrumentation (WMI) objects.
CIM standard, which enables the cmdlets to use the same techniques to manage Win
those running other operating systems. Instead of using `Invoke-WmiMethod`, consider using [Invoke-CimMethod](../cimcmdlets/invoke-cimmethod.md).
-## Examples
+## EXAMPLES
### Example 1: List the required order of WMI objects
$binSD = $acl.GetSecurityDescriptorBinaryForm()
Invoke-WmiMethod -class Win32_SecurityDescriptorHelper -Name BinarySDToSDDL -ArgumentList $binSD, $null ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-WSManInstance](../Microsoft.WsMan.Management/Get-WSManInstance.md)
Microsoft.PowerShell.Management Join Path (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Join-Path.md
Title: Join-Path
--- # Join-Path
-## Synopsis
+## SYNOPSIS
Combines a path and a child path into a single path.
-## Syntax
+## SYNTAX
``` Join-Path [-Path] <String[]> [-ChildPath] <String> [-Resolve] [-Credential <PSCredential>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-Path` cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.
-## Examples
+## EXAMPLES
### Example 1: Combine a path with a child path
The `ForEach-Object` statement selects only the Root property of the `PSDriveInf
The output shows that the PowerShell drives on the computer included a drive mapped to the C:\Program Files directory.
-## Parameters
+## PARAMETERS
### -ChildPath
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the resulting path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun (the Path cmdlets) manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Limit Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Limit-EventLog.md
Title: Limit-EventLog
# Limit-EventLog
-## Synopsis
+## SYNOPSIS
Sets the event log properties that limit the size of the event log and the age of its entries.
-## Syntax
+## SYNTAX
``` Limit-EventLog [-LogName] <String[]> [-ComputerName <String[]>] [-RetentionDays <Int32>] [-OverflowAction <OverflowAction>] [-MaximumSize <Int64>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Limit-EventLog` cmdlet sets the maximum size of a classic event log, how long each event must be retained, and what happens when the log reaches its maximum size. You can use it to limit the
The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on c
To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use `Get-WinEvent`.
-## Examples
+## EXAMPLES
### Example 1: Increase the size of an event log
This example changes the overflow action of all event logs on the local computer
The first command gets the log names of all of the logs on the local computer. The second command sets the overflow action. The third command displays the results.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To use this cmdlet on Windows Vista and later versions of Windows, open Windows PowerShell with the Run as administrator option.
This cmdlet does not generate any output.
classic event log. To see the current settings of the event log properties, type `Get-EventLog -List`.
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.Management Move Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Move-Item.md
Title: Move-Item
--- # Move-Item
-## Synopsis
+## SYNOPSIS
Moves an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-Item -LiteralPath <String[]> [[-Destination] <String>] [-Force] [-Filter <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-Item` cmdlet moves an item, including its properties, contents, and child items, from one location to another location. The locations must be supported by the same provider. For example, it can move a file or subdirectory from one directory to another or move a registry subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a file to another directory and rename it
The **Destination** parameter does not require a literal path, because the Desti
Move-Item -LiteralPath 'Logs[Sept`06]' -Destination 'Logs[2006]' ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the moved item. When you use the *PassThru* parameter, this cmdlet generates an object representing the moved item. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet will move files between drives that are supported by the same provider, but it will move directories only within the same drive.
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Move Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Move-ItemProperty.md
Title: Move-ItemProperty
--- # Move-ItemProperty
-## Synopsis
+## SYNOPSIS
Moves a property from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Destination] <Str
[-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-ItemProperty` cmdlet moves a property of an item from one item to another item. For instance, it can move a registry entry from one registry key to another registry key. When you move an item property, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a registry value and its data to another key
subkey of the `HKLM\Software\MyCompany` registry key.
Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, this cmdlet generates a **PSCustomObject** representing the moved item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-EventLog.md
Title: New-EventLog
# New-EventLog
-## Synopsis
+## SYNOPSIS
Creates a new event log and a new event source on a local or remote computer.
-## Syntax
+## SYNTAX
``` New-EventLog [-LogName] <string> [-Source] <string[]> [[-ComputerName] <string[]>]
New-EventLog [-LogName] <string> [-Source] <string[]> [[-ComputerName] <string[]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates a new classic event log on a local or remote computer. It can also register an event source that writes to the new log or to an existing log.
The cmdlets that contain the EventLog noun (the Event log cmdlets) work only on
To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of Windows, use `Get-WinEvent`.
-## Examples
+## EXAMPLES
### Example 1 - create a new event log
New-EventLog -ComputerName Server01 -Source NewTestApp -LogName Application -Mes
The command requires that the NewTestApp.dll file is located on the Server01 computer.
-## Parameters
+## PARAMETERS
### -CategoryResourceFile
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.EventLogEntry
-## Notes
+## NOTES
To use `New-EventLog` on Windows Vista and later versions of Windows, open PowerShell with the "Run as administrator" option.
When you create a new event log, the associated file is stored in the
The file name is the first eight characters of the **Log** property with an .evt file name extension.
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.Management New Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-Item.md
Title: New-Item
--- # New-Item
-## Synopsis
+## SYNOPSIS
Creates a new item.
-## Syntax
+## SYNTAX
### pathSet (Default)
New-Item [[-Path] <String[]>] -Name <String> [-ItemType <String>] [-Value <Objec
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Item` cmdlet creates a new item and sets its value. The types of items that can be created depend on the location of the item. For example, in the file system, `New-Item` creates files and
folders. In the registry, `New-Item` creates registry keys and entries.
`New-Item` can also set the value of the items that it creates. For example, when it creates a new file, `New-Item` can add initial content to the file.
-## Examples
+## EXAMPLES
### Example 1: Create a file in the current directory
Mode LastWriteTime Length Name
> the same as when overwriting a file. If the registry key already exists, the key and all > properties and values will be overwritten with an empty registry key.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe a value for the new item to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the item that it creates.
-## Notes
+## NOTES
`New-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management New Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-ItemProperty.md
Title: New-ItemProperty
--- # New-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates a new property for an item and sets its value.
-## Syntax
+## SYNTAX
### Path (Default)
New-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PropertyType <String
[-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ItemProperty` cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet is used to create new registry values, because registry values are properties
This cmdlet does not add properties to an object.
- To add a property to an instance of an object, use the `Add-Member` cmdlet. - To add a property to all objects of a particular type, modify the Types.ps1xml file.
-## Examples
+## EXAMPLES
### Example 1: Add a registry entry
$newValue.multistring[0]
a ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject `New-ItemProperty` returns a custom object that contains the new property.
-## Notes
+## NOTES
`New-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Psdrive (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-PSDrive.md
Title: New-PSDrive
# New-PSDrive
-## Synopsis
+## SYNOPSIS
Creates temporary and persistent drives that are associated with a location in an item data store.
-## Syntax
+## SYNTAX
### All
New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Descripti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSDrive` cmdlet creates temporary and persistent drives that are mapped to or associated with a location in a data store, such as a network drive, a directory on the local computer, or a
information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Spla
> Unless you use the **Scope** parameter, PSDrives are created in the scope in which the > `New-PSDrive` command is run.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary drive mapped to a network share
New-PSDrive -Persist -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public
To ensure that the drive is available outside of the script to must use the **Scope** parameter to create the drive in the **Global** scope.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo
-## Notes
+## NOTES
`New-PSDrive` is designed to work with the data exposed by any provider. To list the providers available in your session, use `Get-PSProvider`. For more information about providers, see
Mapped network drives are specific to a user account. Mapped drives created in e
sessions using the credential of another user aren't visible in sessions started using different credentials.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management New Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-Service.md
Title: New-Service
--- # New-Service
-## Synopsis
+## SYNOPSIS
Creates a new Windows service.
-## Syntax
+## SYNTAX
``` New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>] [-Description <String>]
New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Service` cmdlet creates a new entry for a Windows service in the registry and in the service database. A new service requires an executable file that runs during the service.
service database. A new service requires an executable file that runs during the
The parameters of this cmdlet let you set the display name, description, startup type, and dependencies of the service.
-## Examples
+## EXAMPLES
### Example 1: Create a service
This example shows two ways to delete the TestService service. The first command
option of `Sc.exe`. The second command uses the **Delete** method of the **Win32_Service** objects that `Get-CimInstance` returns.
-## Parameters
+## PARAMETERS
### -BinaryPathName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns an object that represents the new service.
-## Notes
+## NOTES
To run this cmdlet, start PowerShell by using the **Run as administrator** option.
To delete a service, use Sc.exe, or use the `Get-CimInstance` cmdlet to get the
object that represents the service and then use the **Delete** method to delete the service. The object that `Get-Service` returns does not have a delete method.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management New Webserviceproxy (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/New-WebServiceProxy.md
Title: New-WebServiceProxy
# New-WebServiceProxy
-## Synopsis
+## SYNOPSIS
Creates a Web service proxy object that lets you use and manage the Web service in PowerShell.
-## Syntax
+## SYNTAX
### NoCredentials (Default)
New-WebServiceProxy [-Uri] <Uri> [[-Class] <String>] [[-Namespace] <String>] [-U
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-WebServiceProxy` cmdlet lets you use a Web service in PowerShell. The cmdlet connects to a Web service and creates a Web service proxy object in PowerShell. You can use the proxy object to
A Web service is an XML-based program that exchanges data over a network, especi
Internet. The Microsoft .NET Framework provides Web service proxy objects that represent the Web service as a .NET Framework object.
-## Examples
+## EXAMPLES
### Example 1: Create a proxy for a Web service
PS> $calc.Multiply(6,7)
This example uses the Web service proxy stored in the `$calc` variable. The command uses the **Multiply** method of the proxy.
-## Parameters
+## PARAMETERS
### -Class
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### A Web service proxy object This cmdlet returns a Web service proxy object. The namespace and class of the object are determined by the parameters of the command. The default is generated from the input URI.
-## Notes
+## NOTES
`New-WebServiceProxy` uses the **System.Net.WebClient** class to load the specified Web service.
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Pop Location (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Pop-Location.md
Title: Pop-Location
--- # Pop-Location
-## Synopsis
+## SYNOPSIS
Changes the current location to the location most recently pushed onto the stack.
-## Syntax
+## SYNTAX
``` Pop-Location [-PassThru] [-StackName <String>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Pop-Location` cmdlet changes the current location to the location most recently pushed onto the stack by using the `Push-Location` cmdlet. You can pop a location from the default stack or from a stack that you create by using a `Push-Location` command.
-## Examples
+## EXAMPLES
### Example 1: Change to most recent location
the PowerShell certificate provider.
The last two commands pop those locations off the stack. The first `popd` command returns to the Registry drive, and the second command returns to the file system drive.
-## Parameters
+## PARAMETERS
### -PassThru
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo
This cmdlet generates a **System.Management.Automation.PathInfo** object that re
location, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
You can also refer to `Pop-Location` by its built-in alias, `popd`. For more inf
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Push Location (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Push-Location.md
Title: Push-Location
--- # Push-Location
-## Synopsis
+## SYNOPSIS
Adds the current location to the top of a location stack.
-## Syntax
+## SYNTAX
### Path (Default)
Push-Location [[-Path] <String>] [-PassThru] [-StackName <String>] [-UseTransact
Push-Location [-LiteralPath <String>] [-PassThru] [-StackName <String>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Push-Location` cmdlet adds ("pushes") the current location onto a location stack. If you specify a path, `Push-Location` pushes the current location onto a location stack and then changes
does not exist, `Push-Location` creates it.
For more information about location stacks, see the [Notes](#notes).
-## Examples
+## EXAMPLES
### Example 1
the `Pop-Location` cmdlet to pop the original location (`C:\`) from the Stack2 s
For more information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path (but not a literal path) to `Push-Location`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PathInfo
When you use the **PassThru** parameter, `Push-Location` generates a
**System.Management.Automation.PathInfo** object that represents the location. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
The `Push-Location` cmdlet is designed to work with the data exposed by any prov
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Register Wmievent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Register-WmiEvent.md
Title: Register-WmiEvent
--- # Register-WmiEvent
-## Synopsis
+## SYNOPSIS
Subscribes to a Windows Management Instrumentation (WMI) event.
-## Syntax
+## SYNTAX
### class (Default)
Register-WmiEvent [-Namespace <String>] [-Credential <PSCredential>] [-ComputerN
[-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-WmiEvent` cmdlet subscribes to Windows Management Instrumentation (WMI) events on the local computer or on a remote computer.
Windows operating system and those that run other operating systems. Instead of
`Register-WmiEvent`, consider using the [Register-CimIndicationEvent](../cimcmdlets/register-cimindicationevent.md) cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events generated by a class
Get-Event -SourceIdentifier "Start"
WMI returns the events to the local computer and stores them in the event queue in the current session. To retrieve the events, run a local `Get-Event` command.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To use this cmdlet in Windows Vista or a later version of the Windows operating system, start Windows PowerShell by using the Run as administrator option.
Windows PowerShell by using the Run as administrator option.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Remove Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-Computer.md
Title: Remove-Computer
--- # Remove-Computer
-## Synopsis
+## SYNOPSIS
Removes the local computer from its domain.
-## Syntax
+## SYNTAX
### Local (Default)
Remove-Computer -UnjoinDomainCredential <PSCredential> [-LocalCredential <PSCred
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Computer` cmdlet removes the local computer and remote computers from their current domains.
credential parameters that specify alternate credentials for connecting to remot
unjoining from a domain, a **Restart** parameter for restarting the affected computers, and a **WorkgroupName** parameter for specifying the name of the workgroup to which computers are added.
-## Examples
+## EXAMPLES
### Example 1: Remove the local computer from its domain
Remove-Computer -ComputerName "Server01", "localhost" -UnjoinDomainCredential Do
The **Force** parameter suppresses the confirmation prompt for each computer. The **Restart** parameter restarts the computers to make the change effective.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String You can pipe computer names to thiscmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo When you use the **PassThru** parameter, `Remove-Computer` returns a **ComputerChangeInfo** object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet does not remove computers from workgroups.
-## Related links
+## RELATED LINKS
[Add-Computer](Add-Computer.md)
Microsoft.PowerShell.Management Remove Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-EventLog.md
Title: Remove-EventLog
# Remove-EventLog
-## Synopsis
+## SYNOPSIS
Deletes an event log or unregisters an event source.
-## Syntax
+## SYNTAX
### Default (Default)
Remove-EventLog [[-ComputerName] <String[]>] [-LogName] <String[]> [-WhatIf] [-C
Remove-EventLog [[-ComputerName] <String[]>] [-Source <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-EventLog`cmdlet deletes an event log file from a local or remote computer and unregisters all its event sources for the log. You can also use this cmdlet to unregister event
versions of the Windows operating system, use Get-WinEvent.
> This cmdlet can delete operating system event logs, which might cause application failures and > unexpected system behavior.
-## Examples
+## EXAMPLES
### Example 1: Remove an event log from the local computer
source.
The third command is identical to the first. It shows that the MyApp event source was deleted.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- To use `Remove-EventLog`on Windows Vista and later versions of the Windows operating system, start Windows PowerShell by using the Run as administrator option.
This cmdlet does not return any output.
- When you unregister an event source for a particular log, the event source might be prevented from writing entries in other event logs.
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.Management Remove Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-Item.md
Title: Remove-Item
--- # Remove-Item
-## Synopsis
+## SYNOPSIS
Deletes the specified items.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Item` cmdlet deletes one or more items. Because it is supported by many providers, it can delete many different types of items, including files, folders, registry keys, variables, aliases, and functions.
-## Examples
+## EXAMPLES
### Example 1: Delete files that have any file name extension
The **Stream** parameter `Get-Item` gets the `Zone.Identifier` stream of the `Co
file. `Remove-Item` uses the **Stream** parameter to remove the `Zone.Identifier` stream of the file. Finally, the `Get-Item` cmdlet shows that the `Zone.Identifier` stream was deleted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
The `Remove-Item` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see
When you try to delete a folder that contains items without using the **Recurse*
cmdlet prompts for confirmation. Using `-Confirm:$false` does not suppress the prompt. This is by design.
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Remove Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md
Title: Remove-ItemProperty
--- # Remove-ItemProperty
-## Synopsis
+## SYNOPSIS
Deletes the property and its value from an item.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Force] [-Filter
[-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.
-## Examples
+## EXAMPLES
### Example 1: Delete a registry value
Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the nam
Get-Item -Path HKLM:\Software\MyCompany | Remove-ItemProperty -Name NoOfEmployees ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values. `Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Item](Get-Item.md)
Microsoft.PowerShell.Management Remove Psdrive (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-PSDrive.md
Title: Remove-PSDrive
--- # Remove-PSDrive
-## Synopsis
+## SYNOPSIS
Deletes temporary PowerShell drives and disconnects mapped network drives.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-PSDrive [-LiteralName] <String[]> [-PSProvider <String[]>] [-Scope <Strin
[-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSDrive` cmdlet deletes temporary PowerShell drives that were created by using the `New-PSDrive` cmdlet.
Beginning in Windows PowerShell 3.0, when an external drive is connected to the
You do not need to restart PowerShell. Similarly, when an external drive is disconnected from the computer, PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Remove a file system drive
This command uses `Remove-PSDrive` to disconnect the X: and S: mapped network dr
Get-PSDrive X, S | Remove-PSDrive ```
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.Management.Automation.PSDriveInfo You can pipe a drive object, such as one from the `Get-PSDrive` cmdlet, to the `Remove-PSDrive` cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- The `Remove-PSDrive` cmdlet is designed to work with the data exposed by any PowerShell provider. To list the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-PSDrive](Get-PSDrive.md)
Microsoft.PowerShell.Management Remove Wmiobject (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Remove-WmiObject.md
Title: Remove-WmiObject
# Remove-WmiObject
-## Synopsis
+## SYNOPSIS
Deletes an instance of an existing Windows Management Instrumentation (WMI) class.
-## Syntax
+## SYNTAX
### class (Default)
Remove-WmiObject [-AsJob] [-Impersonation <ImpersonationLevel>] [-Authentication
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-WmiObject` cmdlet deletes an instance of an existing Windows Management Instrumentation (WMI)class.
-## Examples
+## EXAMPLES
### Example 1: Close all instances of a Win32 process
in the `$a` variable.
The second command pipes the `$a` variable to `Remove-WMIObject`, which deletes the folder.
-## Parameters
+## PARAMETERS
### -AsJob
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
+## INPUTS
### System.Management.ManagementObject You can pipe a management object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.RemotingJob This cmdlet returns a job object, if you specify the **AsJob** parameter. Otherwise, it does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-WmiObject](Get-WmiObject.md)
Microsoft.PowerShell.Management Rename Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Rename-Computer.md
Title: Rename-Computer
--- # Rename-Computer
-## Synopsis
+## SYNOPSIS
Renames a computer.
-## Syntax
+## SYNTAX
``` Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCredential>]
Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCrede
[-Protocol <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Computer` cmdlet renames the local computer or a remote computer. It renames one computer in each command. This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Rename the local computer
The **Force** parameter suppresses the confirmation prompt.
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not have parameters that take input by value. However, you can pipe the values of the **ComputerName** and **NewName** properties of objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo This cmdlet returns a **ComputerChangeInfo** object, if you specify the **PassThru** parameter. Otherwise, it does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-Computer](Add-Computer.md)
Microsoft.PowerShell.Management Rename Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Rename-Item.md
Title: Rename-Item
--- # Rename-Item
-## Synopsis
+## SYNOPSIS
Renames an item in a PowerShell provider namespace.
-## Syntax
+## SYNTAX
### ByPath (Default)
Rename-Item -LiteralPath <String> [-NewName] <String> [-Force] [-PassThru]
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Item` cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
content of the item being renamed.
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Rename a file
command through the pipeline. The script block uses the `-replace` operator to r
extension of each file with `.log`. Notice that matching using the `-replace` operator is not case sensitive.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object that represents the renamed item. This cmdlet generates an object that represents the renamed item, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Rename-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Rename Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Title: Rename-ItemProperty
--- # Rename-ItemProperty
-## Synopsis
+## SYNOPSIS
Renames a property of an item.
-## Syntax
+## SYNTAX
### Path (Default)
Rename-ItemProperty -LiteralPath <String> [-Name] <String> [-NewName] <String> [
[-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-ItemProperty` cmdlet changes the name of a specified item property. The value of the property is not changed. For example, you can use `Rename-ItemProperty` to change the name of a registry entry.
-## Examples
+## EXAMPLES
### Example 1: Rename a registry entry
This command renames the config registry entry that is contained in the "HKEY_LO
Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig ```
-## Parameters
+## PARAMETERS
### -Credential
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject This cmdlet generates a **PSCustomObject** that represents the renamed item property, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Reset Computermachinepassword (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Reset-ComputerMachinePassword.md
Title: Reset-ComputerMachinePassword
# Reset-ComputerMachinePassword
-## Synopsis
+## SYNOPSIS
Resets the machine account password for the computer.
-## Syntax
+## SYNTAX
``` Reset-ComputerMachinePassword [-Server <String>] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Reset-ComputerMachinePassword` cmdlet changes the computer account password that the computers use to authenticate to the domain controllers in the domain. You can use it to reset the password of the local computer.
-## Examples
+## EXAMPLES
### Example 1: Reset the password for the local computer
Server01 remote computer.
For more information about remote commands in Windows PowerShell, see [about_Remote](../Microsoft.PowerShell.Core/About/about_Remote.md) and `Invoke-Command`.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Resolve Path (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Resolve-Path.md
Title: Resolve-Path
--- # Resolve-Path
-## Synopsis
+## SYNOPSIS
Resolves the wildcard characters in a path, and displays the path contents.
-## Syntax
+## SYNTAX
### Path (Default)
Resolve-Path -LiteralPath <String[]> [-Relative] [-Credential <PSCredential>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resolve-Path` cmdlet displays the items and containers that match the wildcard pattern at the location specified. The match can include files, folders, registry keys, or any other object accessible from a PSDrive provider.
-## Examples
+## EXAMPLES
### Example 1: Resolve the home folder path
expression.
PS C:\> Resolve-Path -LiteralPath 'test[xml]' ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo, System.String Returns a **PathInfo** object. Returns a string value for the resolved path if you specify the **Relative** parameter.
-## Notes
+## NOTES
The `*-Path` cmdlets work with the FileSystem, Registry, and Certificate providers.
session, type `Get-PSProvider`. For more information, see
`Resolve-Path` only resolves existing paths. It cannot be used to resolve a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Restart Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Restart-Computer.md
Title: Restart-Computer
# Restart-Computer
-## Synopsis
+## SYNOPSIS
Restarts the operating system on local and remote computers.
-## Syntax
+## SYNTAX
### DefaultSet (Default)
Restart-Computer [-AsJob] [-DcomAuthentication <AuthenticationLevel>]
[-Force] [-ThrottleLimit <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Restart-Computer` cmdlet restarts the operating system on the local and remote computers.
information, see [WS-Management Protocol](/windows/desktop/WinRM/ws-management-p
This cmdlet requires Windows PowerShell remoting only when you use the **AsJob** parameter in a command.
-## Examples
+## EXAMPLES
### Example 1: Restart the local computer
Restart-Computer -ComputerName Server01 -Protocol WSMan -WsmanAuthentication Ker
The **Protocol** parameter specifies to use the WSMan protocol. The **WsmanAuthentication** parameter specifies the authentication method as **Kerberos**.
-## Parameters
+## PARAMETERS
### -AsJob
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
+## INPUTS
### System.String
In Windows PowerShell 2.0, the **ComputerName** parameter takes input from the p
property name. In Windows PowerShell 3.0, and later, the **ComputerName** parameter takes input from the pipeline by value.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.RemotingJob If you specify the **AsJob** parameter, `Restart-Computer` returns a job object. Otherwise, no output is generated.
-## Notes
+## NOTES
- `Restart-Computer` only work on computers running Windows and requires WinRM and WMI to shutdown a system, including the local system.
In Windows PowerShell 2.0, the **AsJob** parameter doesn't work reliably when yo
stopping remote computers. In Windows PowerShell 3.0, the implementation is changed to resolve this problem.
-## Related links
+## RELATED LINKS
[About Windows Remote Management](/windows/desktop/WinRM/about-windows-remote-management)
Microsoft.PowerShell.Management Restart Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Restart-Service.md
Title: Restart-Service
--- # Restart-Service
-## Synopsis
+## SYNOPSIS
Stops and then starts one or more services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Restart-Service` cmdlet sends a stop message and then a start message to the Windows Service Controller for a specified service. If a service was already stopped, it is started without
notifying you of an error. You can specify the services by their service names o
you can use the **InputObject** parameter to pass an object that represents each service that you want to restart.
-## Examples
+## EXAMPLES
### Example 1: Restart a service on the local computer
sends the selected services to `Restart-Service`.
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
restarted service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Restart-Service` can control services only when the current user has permission to do this. If a
generate any output.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Restore Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Restore-Computer.md
Title: Restore-Computer
# Restore-Computer
-## Synopsis
+## SYNOPSIS
Starts a system restore on the local computer.
-## Syntax
+## SYNTAX
``` Restore-Computer [-RestorePoint] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Restore-Computer` cmdlet restores the local computer to the specified system restore point.
The `Restore-Computer` cmdlet restores the local computer to the specified syste
System restore points and `Restore-Computer` are supported only on client operating systems, such as Windows 7, Windows Vista, and Windows XP.
-## Examples
+## EXAMPLES
### Example 1: Restore the local computer
The third command uses the **LastStatus** parameter of `Get-ComputerRestorePoint
the status of the restore operation. Because `Restore-Computer` forces a restart, this command would be entered after the computer restarts.
-## Parameters
+## PARAMETERS
### -RestorePoint
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To run a `Restore-Computer` command on Windows Vista and later versions of the Windows operating system, open Windows PowerShell by using the Run as administrator option. - This cmdlet uses the Windows Management Instrumentation (WMI) **SystemRestore** class.
-## Related links
+## RELATED LINKS
[Checkpoint-Computer](Checkpoint-Computer.md)
Microsoft.PowerShell.Management Resume Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Resume-Service.md
Title: Resume-Service
--- # Resume-Service
-## Synopsis
+## SYNOPSIS
Resumes one or more suspended (paused) services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclu
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resume-Service` cmdlet sends a resume message to the Windows Service Controller for each of the specified services. If a service is suspended, it resumes. If it is currently running, the message
is ignored. You can specify the services by their service names or display names
**InputObject** parameter to pass a service object that represents the services that you want to resume.
-## Examples
+## EXAMPLES
### Example 1: Resume a service on the local computer
next pipeline operator sends the results to `Resume-Service`, which resumes the
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
resumed service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- The status of services that have been suspended is Paused. When services are resumed, their status is Running.
any output.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Clipboard (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-Clipboard.md
Title: Set-Clipboard
--- # Set-Clipboard
-## Synopsis
+## SYNOPSIS
Sets the current Windows clipboard entry.
-## Syntax
+## SYNTAX
### String (Default)
Set-Clipboard [-Append] -Path <String[]> [-AsHtml] [-WhatIf] [-Confirm] [<Common
Set-Clipboard [-Append] -LiteralPath <String[]> [-AsHtml] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Clipboard` cmdlet sets the current Windows clipboard entry.
-## Examples
+## EXAMPLES
### Example 1: Copy text to the clipboard
ssh key so that it can be pasted into another application, like GitHub.
Get-Content C:\Users\user1\.ssh\id_ed25519.pub | Set-Clipboard ```
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
In rare cases when using `Set-Clipboard` with a high number of values in rapid succession, like in a loop, you might sporadically get a blank value from the clipboard. This can be fixed by using `Start-Sleep -Milliseconds 1` in the loop.
-## Related links
+## RELATED LINKS
[Get-Clipboard](Get-Clipboard.md)
Microsoft.PowerShell.Management Set Content (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-Content.md
Title: Set-Content
--- # Set-Content
-## Synopsis
+## SYNOPSIS
Writes new content or replaces existing content in a file.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[-Stream <string>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Set-Content` is a string-processing cmdlet that writes new content or replaces the content in a file. `Set-Content` replaces the existing content and differs from the `Add-Content` cmdlet that
the command line or send content through the pipeline.
If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Replace the contents of multiple files in a directory
directory to the **Value** empty.
Set-Content -Path C:\Temp\* -Filter *.txt -Value "Empty" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that contains the new value for the item to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Set-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Set-Content` by its built-in alias, `sc`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Set Item (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-Item.md
Title: Set-Item
--- # Set-Item
-## Synopsis
+## SYNOPSIS
Changes the value of an item to the value specified in the command.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Item -LiteralPath <String[]> [[-Value] <Object>] [-Force] [-PassThru] [-Filt
[-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Item` cmdlet changes the value of an item, such as a variable or registry key, to the value specified in the command.
-## Examples
+## EXAMPLES
### Example 1: Create an alias
The **Options** parameter is available in `Set-Item` only when you use it with t
Set-Item -Path function:prompt -Options "AllScope,ReadOnly" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the new value of the item to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the new or changed item. This cmdlet generates an object that represent the item, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in the file system, use the `Set-Content` cmdlet.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Set Itemproperty (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-ItemProperty.md
Title: Set-ItemProperty
--- # Set-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates or changes the value of a property of an item.
-## Syntax
+## SYNTAX
### propertyValuePathSet (Default)
Set-ItemProperty -LiteralPath <String[]> -InputObject <PSObject> [-PassThru] [-F
[-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item. You can use the cmdlet to establish or change the properties of items. For example, you can use
the cmdlet to establish or change the properties of items. For example, you can
You also use `Set-ItemProperty` to create and change registry values and data. For example, you can add a new registry entry to a key and establish or change its value.
-## Examples
+## EXAMPLES
### Example 1: Set a property of a file
specify the property and its new value.
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject
This cmdlet generates a **PSCustomObject** object that represents the item that
new property value, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Set-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Set Location (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-Location.md
Title: Set-Location
--- # Set-Location
-## Synopsis
+## SYNOPSIS
Sets the current working location to a specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Location -LiteralPath <String> [-PassThru] [-UseTransaction] [<CommonParamet
Set-Location [-PassThru] [-StackName <String>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Location` cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.
a directory, a subdirectory, a registry location, or any provider path.
You can also use the **StackName** parameter to make a named location stack the current location stack. For more information about location stacks, see the Notes.
-## Examples
+## EXAMPLES
### Example 1: Set the current location
The third command displays the locations in the current location stack.
The `*-Location` cmdlets use the current location stack unless a different location stack is specified in the command. For information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo, System.Management.Automation.PathInfoStack
This cmdlet does not generate any output unless you specify the **PassThru** par
new location. Using **PassThru** with **StackName** generates a **PathInfoStack** object representing the new stack context.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
If you make a named location stack the current location stack, you can no longer
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Set Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-Service.md
Title: Set-Service
# Set-Service
-## Synopsis
+## SYNOPSIS
Starts, stops, and suspends a service, and changes its properties.
-## Syntax
+## SYNTAX
### Name (Default)
Set-Service [-ComputerName <String[]>] [-DisplayName <String>] [-Description <St
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Service` cmdlet changes the properties of a service such as the **Status**, **Description**, **DisplayName**, and **StartupType**. `Set-Service` can start, stop, suspend, or pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to `Set-Service`.
-## Examples
+## EXAMPLES
### Example 1: Change a display name
Set-Service -InputObject $S -Status Stopped
in the variable, `$S`. `Set-Service` uses the **InputObject** parameter and specifies the object stored `$S`. The **Status** parameter sets the service to **Stopped**.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can use the pipeline to send a service object or a string that contains a service name to `Set-Service`.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController By default, `Set-Service` doesn't return any objects. Use the **PassThru** parameter to output a **ServiceController** object.
-## Notes
+## NOTES
`Set-Service` requires elevated permissions. Use the **Run as administrator** option.
a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the **Name** column and the display names are in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Timezone (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-TimeZone.md
Title: Set-TimeZone
--- # Set-TimeZone
-## Synopsis
+## SYNOPSIS
Sets the system time zone to a specified time zone.
-## Syntax
+## SYNTAX
### Name (Default)
Set-TimeZone -Id <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-TimeZone [-InputObject] <TimeZoneInfo> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone.
-## Examples
+## EXAMPLES
### Example 1: Set the time zone by Id
As we saw in the previous example, the **Id** and the **Name** of the Time Zone
The **Name** parameter must match the **StandardName** or **DaylightName** properties of the **TimeZoneInfo** object.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.TimeZoneInfo, System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-TimeZone](Get-TimeZone.md)
Microsoft.PowerShell.Management Set Wmiinstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Set-WmiInstance.md
Title: Set-WmiInstance
# Set-WmiInstance
-## Synopsis
+## SYNOPSIS
Creates or updates an instance of an existing Windows Management Instrumentation (WMI) class.
-## Syntax
+## SYNTAX
### Class (Default)
Set-WmiInstance [-PutType <PutType>] [-AsJob] [-Impersonation <ImpersonationLeve
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-WmiInstance` cmdlet creates or updates an instance of an existing Windows Management Instrumentation (WMI) class. The created or updated instance is written to the WMI repository.
standard. this enables cmdlets to use the same techniques to manage Windows-base
those running other operating systems. Instead of using `Set-WmiInstance`, consider using the [Set-CimInstance](/powershell/module/cimcmdlets/set-ciminstance) or [New-CimInstance](/powershell/module/cimcmdlets/new-ciminstance) cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Set WMI logging level
value, together considered a value pair, in the argument parameter. The paramete
that is defined by the `@{property = value}` construction. The returned class information reflects the new value.
-## Parameters
+## PARAMETERS
### -Arguments
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
+## INPUTS
### None This cmdlet does not accept input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-WmiObject](Get-WmiObject.md)
Microsoft.PowerShell.Management Show Controlpanelitem (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Show-ControlPanelItem.md
Title: Show-ControlPanelItem
--- # Show-ControlPanelItem
-## Synopsis
+## SYNOPSIS
Opens control panel items.
-## Syntax
+## SYNTAX
### RegularName (Default)
Show-ControlPanelItem -CanonicalName <String[]> [<CommonParameters>]
Show-ControlPanelItem [[-InputObject] <ControlPanelItem[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-ControlPanelItem` cmdlet opens control panel items on the local computer. You can use it to open control panel items by name, category, or description, even on systems that do not have a
only control panel items that can open without these components.
This cmdlet was introduced in Windows PowerShell 3.0 and works on Windows 8, Windows Server 2012, and higher versions.
-## Examples
+## EXAMPLES
### Example 1: Show a control panel item
This method is an alternative to using a `Show-ControlPanelItem` command.
> In PowerShell, you can omit the .cpl file extension for control panel files because it's included > in the value of the `$env:PathExt` environment variable.
-## Parameters
+## PARAMETERS
### -CanonicalName
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
+## INPUTS
### System.String, Microsoft.PowerShell.Commands.ControlPanelItem You can pipe a name or control panel item object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ControlPanelItem](Get-ControlPanelItem.md)
Microsoft.PowerShell.Management Show Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Show-EventLog.md
Title: Show-EventLog
# Show-EventLog
-## Synopsis
+## SYNOPSIS
Displays the event logs of the local or a remote computer in Event Viewer.
-## Syntax
+## SYNTAX
``` Show-EventLog [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-EventLog` cmdlet opens Event Viewer on the local computer and displays in it all of the classic event logs on the local computer or a remote computer.
The cmdlets that contain the **EventLog** noun (the **EventLog** cmdlets) work o
logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of the Windows operating system, use the `Get-WinEvent` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Display event logs for the local computer
Show-EventLog -ComputerName "Server01"
This command opens Event Viewer and displays in it the classic event logs on the Server01 computer.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The Windows PowerShell command prompt returns as soon as Event Viewer opens. You can work in the current session while Event Viewer is open.
This cmdlet does not generate any output.
Because this cmdlet requires a user interface, it does not work on Server Core installations of Windows Server.
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.Management Split Path (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Split-Path.md
Title: Split-Path
--- # Split-Path
-## Synopsis
+## SYNOPSIS
Returns the specified part of a path.
-## Syntax
+## SYNTAX
### ParentSet (Default)
Split-Path -LiteralPath <String[]> [-Resolve] [-Credential <PSCredential>] [-Use
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Split-Path` cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell
whether the path is relative or absolute.
You can use this cmdlet to get or submit only a selected part of a path.
-## Examples
+## EXAMPLES
### Example 1: Get the qualifier of a path
C:\Documents and Settings\User01\My Documents
This command uses a pipeline operator (`|`) to send a path to `Split-Path`. The path is enclosed in quotation marks to indicate that it is a single token.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String, System.Boolean
items, such as a **FileInfo** or **RegistryKey** object.
When you specify the *IsAbsolute* parameter, `Split-Path` returns a **Boolean** value.
-## Notes
+## NOTES
- The split location parameters (**Qualifier**, **Parent**, **Leaf**, and **NoQualifier**) are exclusive. You can use only one in each command.
When you specify the *IsAbsolute* parameter, `Split-Path` returns a **Boolean**
`Split-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Start Process (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Start-Process.md
Title: Start-Process
--- # Start-Process
-## Synopsis
+## SYNOPSIS
Starts one or more processes on the local computer.
-## Syntax
+## SYNTAX
### Default (Default)
Start-Process [-FilePath] <string> [[-ArgumentList] <string[]>] [-WorkingDirecto
[-PassThru] [-Verb <string>] [-WindowStyle <ProcessWindowStyle>] [-Wait] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Process` cmdlet starts one or more processes on the local computer. By default, `Start-Process` creates a new process that inherits all the environment variables that are defined
cmdlet.
You can use the parameters of `Start-Process` to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.
-## Examples
+## EXAMPLES
### Example 1: Start a process that uses default values
Start-Process -FilePath "$env:comspec" -ArgumentList "/c dir `"%systemdrive%\pro
Start-Process -FilePath "$env:comspec" -ArgumentList "/c","dir","`"%systemdrive%\program files`"" ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet generates a **System.Diagnostics.Process** object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not return any output.
-## Notes
+## NOTES
By default, `Start-Process` launches a process _asynchronously_. Control is instantly returned to PowerShell even if the new process is still running.
This cmdlet is implemented by using the **Start** method of the **System.Diagnos
class. For more information about this method, see [Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Management Start Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Start-Service.md
Title: Start-Service
--- # Start-Service
-## Synopsis
+## SYNOPSIS
Starts one or more stopped services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclud
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Service` cmdlet sends a start message to the Windows Service Controller for each of the specified services. If a service is already running, the message is ignored without error. You can specify the services by their service names or display names, or you can use the **InputObject** parameter to supply a service object that represents the services that you want to start.
-## Examples
+## EXAMPLES
### Example 1: Start a service by using its name
that the **StartMode** property of the Tlntsvr service is **Disabled**. The `Set
changes the start type to **Manual**. Now, we can resubmit the `Start-Service` command. This time, the command succeeds. To verify that the command succeeded, run `Get-Service`.
-## Parameters
+## PARAMETERS
### -DisplayName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you specify **PassThru**. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Start-Service` by its built-in alias, `sasv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
service, if you specify **PassThru**. Otherwise, this cmdlet does not generate a
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \<display-name\> start failed.`
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Start Transaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Start-Transaction.md
Title: Start-Transaction
# Start-Transaction
-## Synopsis
+## SYNOPSIS
Starts a transaction.
-## Syntax
+## SYNTAX
``` Start-Transaction [-Timeout <Int32>] [-Independent] [-RollbackPreference <RollbackSeverity>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transaction` cmdlet starts a transaction, which is a series of commands that are managed as a unit. A transaction can be completed, or committed. Alternatively, it can be completely undone,
or roll back the new transaction before you make any changes to the original tra
`Start-Transaction` cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
-## Examples
+## EXAMPLES
### Example 1: Start and roll back a transaction
rolled back automatically.
When the time-out expires, you are not notified, but the **Status** property of the transaction object is set to RolledBack and commands that use the **UseTransaction** parameter fail.
-## Parameters
+## PARAMETERS
### -Independent
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Complete-Transaction](Complete-Transaction.md)
Microsoft.PowerShell.Management Stop Computer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Stop-Computer.md
Title: Stop-Computer
# Stop-Computer
-## Synopsis
+## SYNOPSIS
Stops (shuts down) local and remote computers.
-## Syntax
+## SYNTAX
### All
Stop-Computer [-AsJob] [-DcomAuthentication <AuthenticationLevel>] [-WsmanAuthen
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Computer` cmdlet shuts down the local computer and remote computers.
that are created to run the command, and to force an immediate shut down.
This cmdlet doesn't require PowerShell remoting unless you use the **AsJob** parameter.
-## Examples
+## EXAMPLES
### Example 1: Shut down the local computer
computers in the `$s` variable. The **Force** parameter forces an immediate shut
**ThrottleLimit** parameter limits the command to 10 concurrent connections. The **Credential** parameter submits the credentials saved in the `$c` variable.
-## Parameters
+## PARAMETERS
### -AsJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.RemotingJob The cmdlet returns a **System.Management.Automation.RemotingJob** object, if you specify the **AsJob** parameter. Otherwise, it doesn't generate any output.
-## Notes
+## NOTES
This cmdlet uses the **Win32Shutdown** method of the **Win32_OperatingSystem** WMI class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine.
-## Related links
+## RELATED LINKS
[Add-Computer](Add-Computer.md)
Microsoft.PowerShell.Management Stop Process (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Stop-Process.md
Title: Stop-Process
--- # Stop-Process
-## Synopsis
+## SYNOPSIS
Stops one or more running processes.
-## Syntax
+## SYNTAX
### Id (Default)
Stop-Process -Name <String[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<Common
Stop-Process [-InputObject] <Process[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Process` cmdlet stops one or more running processes. You can specify a process by process name or process ID (PID), or pass a process object to `Stop-Process`. `Stop-Process` works only on
On Windows Vista and later versions of the Windows operating system, to stop a p
owned by the current user, you must start PowerShell by using the Run as administrator option. Also, you are not prompted for confirmation unless you specify the **Confirm** parameter.
-## Examples
+## EXAMPLES
### Example 1: Stop all instances of a process
PowerShell prompts you for confirmation.
The second command specifies **Force** to suppress the prompt. As a result, the process is stopped without confirmation.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet returns a **System.Diagnostics.Process** object that represents the stopped process, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Stop-Process` by its built-in aliases, `kill` and `spps` For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate
- When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Stop Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Stop-Service.md
Title: Stop-Service
--- # Stop-Service
-## Synopsis
+## SYNOPSIS
Stops one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName <String[]> [-Include <S
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Service` cmdlet sends a stop message to the Windows Service Controller for each of the specified services. You can specify the services by their service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the service that you want to stop.
-## Examples
+## EXAMPLES
### Example 1: Stop a service on the local computer
The second command stops the IISAdmin service. The **Force** parameter is requir
that has dependent services. The command uses the **Confirm** parameter to request confirmation from the user before it stops each service.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can also refer to `Stop-Service` by its built-in alias, **spsv**. For more information, see about_Aliases.
To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Suspend Service (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Suspend-Service.md
Title: Suspend-Service
--- # Suspend-Service
-## Synopsis
+## SYNOPSIS
Suspends (pauses) one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Excl
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Suspend-Service` cmdlet sends a suspend message to the Windows Service Controller for each of the specified services. While suspended, the service is still running, but its action is stopped
until resumed, such as by usingthe `Resume-Service` cmdlet. You can specify the
service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the services that you want to suspend.
-## Examples
+## EXAMPLES
### Example 1: Suspend a service
of `$True` for the **CanPauseAndContinue** property. Another pipeline operator p
`Suspend-Service`. The **Confirm** parameter prompts you for confirmation before suspending each of the services.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Suspend-Service` can control services only when the current user has permission to do this. If a command does not work correctly, you might not have the required permissions.
output.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Test Computersecurechannel (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Test-ComputerSecureChannel.md
Title: Test-ComputerSecureChannel
# Test-ComputerSecureChannel
-## Synopsis
+## SYNOPSIS
Tests and repairs the secure channel between the local computer and its domain.
-## Syntax
+## SYNTAX
``` Test-ComputerSecureChannel [-Repair] [-Server <String>] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ComputerSecureChannel` cmdlet verifies that the channel between the local computer and its domain is working correctly by checking the status of its trust relationships. If a connection
more detailed test results, use the **Verbose** parameter.
This cmdlet works much like `NetDom.exe`. Both NetDom and `Test-ComputerSecureChannel` use the **NetLogon** service to perform the actions.
-## Examples
+## EXAMPLES
### Example 1: Test a channel between the local computer and its domain
and prevents typing errors.
The `if` statement checks the value that `Test-ComputerSecureChannel` returns before it runs a script.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean This cmdlet returns `$True` if the connection is working correctly and `$False` if it is not.
-## Notes
+## NOTES
- To run a `Test-ComputerSecureChannel` command on Windows Vista and later versions of the Windows operating system, open Windows PowerShell by using the Run as administrator option. - `Test-ComputerSecureChannel` is implemented by using the **I_NetLogonControl2** function, which controls various aspects of the Netlogon service.
-## Related links
+## RELATED LINKS
[Checkpoint-Computer](Checkpoint-Computer.md)
Microsoft.PowerShell.Management Test Connection (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Test-Connection.md
Title: Test-Connection
# Test-Connection
-## Synopsis
+## SYNOPSIS
Sends ICMP echo request packets, or pings, to one or more computers.
-## Syntax
+## SYNTAX
### Default (Default)
Test-Connection [-DcomAuthentication <AuthenticationLevel>] [-WsmanAuthenticatio
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Connection` cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this
you can investigate in PowerShell. The **Quiet** parameter returns a **Boolean**
**System.Boolean** object for each tested connection. If multiple connections are tested, an array of **Boolean** values is returned.
-## Examples
+## EXAMPLES
### Example 1: Send echo requests to a remote computer
object. The value is `$True` if any of the four pings succeed and is, otherwise,
If the `Test-Connection` command returns a value of `$True`, the command uses the `New-PSSession` cmdlet to create the **PSSession**.
-## Parameters
+## PARAMETERS
### -AsJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\cimv2\Win32_PingStatus, System.Management.Automation.RemotingJob, System.Boolean
If you specify the **Quiet** parameter, it returns a **Boolean** value. If multi
tested, an array of **Boolean** values is returned. Otherwise, `Test-Connection` returns a **Win32_PingStatus** object for each ping.
-## Notes
+## NOTES
This cmdlet uses the **Win32_PingStatus** class. A `Get-WMIObject Win32_PingStatus` command is equivalent to a `Test-Connection` command. The **Source** parameter set was introduced in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Add-Computer](Add-Computer.md)
Microsoft.PowerShell.Management Test Path (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Test-Path.md
Title: Test-Path
--- # Test-Path
-## Synopsis
+## SYNOPSIS
Determines whether all elements of a path exist.
-## Syntax
+## SYNTAX
### Path (Default)
Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
[-OlderThan <DateTime>] [-NewerThan <DateTime>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the
whitespace string, then `$False` is returned. If the `Path` is an empty string, `$null`, array of `$null` or empty array, a non-terminating error is returned.
-## Examples
+## EXAMPLES
### Example 1: Test a path
At line:1 char:11
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.TestPathCommand ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean The cmdlet returns a **Boolean** value.
-## Notes
+## NOTES
The cmdlets that contain the **Path** noun (the **Path** cmdlets) work with path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use
manipulators.
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Undo Transaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Undo-Transaction.md
Title: Undo-Transaction
# Undo-Transaction
-## Synopsis
+## SYNOPSIS
Rolls back the active transaction.
-## Syntax
+## SYNTAX
``` Undo-Transaction [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Undo-Transaction` cmdlet rolls back the active transaction. When you roll back a transaction, the changes that were made by the commands in the transaction are discarded and the data is restored
use this cmdlet to roll back the active transaction at any time.
The `Undo-Transaction` cmdlet is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
-## Examples
+## EXAMPLES
### Example 1: Roll back the current transaction
The final command is a `Get-Transaction` command that gets the active, or in thi
recently active, transaction. The results show that the transaction is rolled back, and that the subscriber count is 0, showing that the transaction was rolled back for all subscribers.
-## Parameters
+## PARAMETERS
### -Confirm
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You cannot roll back a transaction that has been committed.
This cmdlet does not return any output.
Rolling back the transaction ends the transaction. To use a transaction again, you must start a new transaction.
-## Related links
+## RELATED LINKS
[Complete-Transaction](Complete-Transaction.md)
Microsoft.PowerShell.Management Use Transaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Use-Transaction.md
Title: Use-Transaction
# Use-Transaction
-## Synopsis
+## SYNOPSIS
Adds the script block to the active transaction.
-## Syntax
+## SYNTAX
``` Use-Transaction [-TransactedScript] <ScriptBlock> [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Use-Transaction` cmdlet adds a script block to an active transaction. This enables you to do transacted scripting by using transaction-enabled Microsoft .NET Framework objects. The script block
cmdlet.
`Use-Transaction` is one of a set of cmdlets that support the transactions feature in Windows PowerShell. For more information, see [about_Transactions](../Microsoft.PowerShell.Core/About/about_Transactions.md).
-## Examples
+## EXAMPLES
### Example 1: Script by using a transaction-enabled object
The final command uses the **ToString** method to display the resulting value of
as a string. The results show that only the changes that were made outside the transaction were applied to the object.
-## Parameters
+## PARAMETERS
### -TransactedScript
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the result of the transaction.
-## Notes
+## NOTES
- The **UseTransaction** parameter includes the command in the active transaction. Because the `Use-Transaction` cmdlet is always used in transactions, this parameter is required to make any `Use-Transaction` command effective.
-## Related links
+## RELATED LINKS
[Complete-Transaction](Complete-Transaction.md)
Microsoft.PowerShell.Management Wait Process (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Wait-Process.md
Title: Wait-Process
--- # Wait-Process
-## Synopsis
+## SYNOPSIS
Waits for the processes to be stopped before accepting more input.
-## Syntax
+## SYNTAX
### Name (Default)
Wait-Process [-Id] <Int32[]> [[-Timeout] <Int32>] [<CommonParameters>]
Wait-Process [[-Timeout] <Int32>] -InputObject <Process[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Process` cmdlet waits for one or more running processes to be stopped before accepting input. In the PowerShell console, this cmdlet suppresses the command prompt until the processes are
stopped. You can specify a process by process name or process ID (PID), or pipe
`Wait-Process` works only on processes running on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Stop a process and wait
PS C:\> Wait-Process -Name outlook, winword -Timeout 30
This command waits 30 seconds for the Outlook and Winword processes to stop. If both processes are not stopped, the cmdlet displays a non-terminating error and the command prompt.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **WaitForExit** method of the **System.Diagnostics.Process** class.
This cmdlet does not generate any output.
`Start-Process -Wait` waits for the process tree (the process and all its descendants) to exit before returning control.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Write Eventlog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Management/Write-EventLog.md
Title: Write-EventLog
# Write-EventLog
-## Synopsis
+## SYNOPSIS
Writes an event to an event log.
-## Syntax
+## SYNTAX
``` Write-EventLog [-LogName] <String> [-Source] <String> [[-EntryType] <EventLogEntryType>] [-Category <Int16>] [-EventId] <Int32> [-Message] <String> [-RawData <Byte[]>] [-ComputerName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-EventLog` cmdlet writes an event to an event log.
The cmdlets that contain the **EventLog** noun (the **EventLog** cmdlets) work o
logs. To get events from logs that use the Windows Event Log technology in Windows Vista and later versions of the Windows operating system, use the `Get-WinEvent` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Write an event to the Application event log
PS C:\> Write-EventLog -ComputerName "Server01" -LogName Application -Source "My
This command writes an event from the MyApp source to the Application event log on the Server01 remote computer.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.EventLogEntry This cmdlet returns objects that represents the events in the logs.
-## Notes
+## NOTES
For some Windows event logs, writing events requires administrator rights. You must start PowerShell using the **Run as Administrator** option.
-## Related links
+## RELATED LINKS
[Clear-EventLog](Clear-EventLog.md)
Microsoft.PowerShell.ODataUtils Export Odataendpointproxy (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.ODataUtils/Export-ODataEndpointProxy.md
Title: Export-ODataEndpointProxy
--- # Export-ODataEndpointProxy
-## Synopsis
+## SYNOPSIS
Generates a module that contains cmdlets to manage an OData endpoint.
-## Syntax
+## SYNTAX
``` Export-ODataEndpointProxy [-Uri] <String> [-OutputModule] <String> [[-MetadataUri] <String>]
Export-ODataEndpointProxy [-Uri] <String> [-OutputModule] <String> [[-MetadataUr
[-AllowClobber] [-AllowUnsecureConnection] [[-Headers] <Hashtable>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ODataEndpointProxy` cmdlet uses the metadata of an OData endpoint to generate a module that contains cmdlets you can use to manage that OData endpoint. The module is based on CDXML. After
the cmdlets to align with Windows PowerShell cmdlet naming guidelines, you can m
Every cmdlet in a generated module must include a **ConnectionURI** parameter in order to connect to the endpoint that the module manages.
-## Examples
+## EXAMPLES
### Example 1: Generate a module to manage a retail web service endpoint
collection name to the desired noun for the cmdlet set. In this example, Product
collection name and **Merchandise** is the noun. To allow connections to non-SSL sites, HTTP, as opposed to HTTPS, add the **AllowUnsecureConnection** parameter.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[OData Library](/previous-versions/dotnet/wcf-data-services/hh525392(v=vs.103))
Microsoft.PowerShell.Operation.Validation Get Operationvalidation (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Operation.Validation/Get-OperationValidation.md
Title: Get-OperationValidation
# Get-OperationValidation
-## Synopsis
+## SYNOPSIS
Gets Operation Validation Framework tests.
-## Syntax
+## SYNTAX
``` Get-OperationValidation [[-ModuleName] <String[]>] [-TestType <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-OperationValidation` cmdlet gets Operation Validation Framework tests for installed modules.
modules.
Modules that include a Diagnostics folder are inspected for Pester tests in the Simple or Comprehensive subfolder, or both.
-## Examples
+## EXAMPLES
### Example 1: Get Operation Validation tests
Get-OperationValidation -ModuleName "C:\temp\modules\AddNumbers"
This command gets validation tests from the module named **AddNumbers** in the `C:\temp\modules` folder.
-## Parameters
+## PARAMETERS
### -ModuleName
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
+## INPUTS
### None You cannot pipe any input to this cmdlet.
-## Outputs
+## OUTPUTS
### PSCustomObject The **PSCustomObject** describes the validation.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-OperationValidation](Invoke-OperationValidation.md)
Microsoft.PowerShell.Operation.Validation Invoke Operationvalidation (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Operation.Validation/Invoke-OperationValidation.md
Title: Invoke-OperationValidation
# Invoke-OperationValidation
-## Synopsis
+## SYNOPSIS
Invokes Operation Validation Framework tests.
-## Syntax
+## SYNTAX
### FileAndTest (Default)
Invoke-OperationValidation [-ModuleName <String[]>] [-TestType <String[]>] [-Inc
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-OperationValidation` cmdlet invokes Operation Validation Framework tests for a specified module.
-## Examples
+## EXAMPLES
### Example 1: Invoke an Operation Validation test
Passed Scenario targeted tests:The Firewall Rules:A rule for UDP port 3389 is e
This command gets the module named **OperationValidation**, and uses the pipeline operator (`|`) to pass it to the `Invoke-OperationValidation` cmdlet, which runs the test.
-## Parameters
+## PARAMETERS
### -IncludePesterOutput
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
+## INPUTS
### PSCustomObject You can pipe the output of `Get-OperationValidation` to this cmdlet.
-## Outputs
+## OUTPUTS
### PSCustomObject The **PSCustomObject** describes whether the validation was successful.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-OperationValidation](Get-OperationValidation.md)
Microsoft.PowerShell.Security Convertfrom Securestring (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md
Title: ConvertFrom-SecureString
--- # ConvertFrom-SecureString
-## Synopsis
+## SYNOPSIS
Converts a secure string to an encrypted standard string.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertFrom-SecureString [-SecureString] <SecureString> [[-SecureKey] <SecureStr
ConvertFrom-SecureString [-SecureString] <SecureString> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SecureString` cmdlet converts a secure string (**System.Security.SecureString**) into an encrypted standard string (**System.String**). Unlike a secure string, an encrypted standard
Encryption Standard (AES) encryption algorithm is used. The specified key must h
key is specified, the Windows Data Protection API (DPAPI) is used to encrypt the standard string representation.
-## Examples
+## EXAMPLES
### Example 1: Create a secure string
Because each decimal numeral represents a single byte (8 bits), the key has 24 d
The second command uses the key in the `$Key` variable to convert the secure string to an encrypted standard string.
-## Parameters
+## PARAMETERS
### -Key
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
+## INPUTS
### System.Security.SecureString You can pipe a **SecureString** object to ConvertFrom-SecureString.
-## Outputs
+## OUTPUTS
### System.String ConvertFrom-SecureString returns a standard string object.
-## Notes
+## NOTES
- To create a secure string from characters that are typed at the command prompt, use the **AsSecureString** parameter of the `Read-Host` cmdlet.
ConvertFrom-SecureString returns a standard string object.
them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertTo-SecureString](ConvertTo-SecureString.md)
Microsoft.PowerShell.Security Convertto Securestring (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/ConvertTo-SecureString.md
Title: ConvertTo-SecureString
--- # ConvertTo-SecureString
-## Synopsis
+## SYNOPSIS
Converts plain text or encrypted strings to secure strings.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParame
ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-SecureString` cmdlet converts encrypted standard strings into secure strings. It can also convert plain text to secure strings. It is used with `ConvertFrom-SecureString` and
If the standard string being converted was encrypted with `ConvertFrom-SecureStr
specified key, that same key must be provided as the value of the **Key** or **SecureKey** parameter of the `ConvertTo-SecureString` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Convert a secure string to an encrypted string
$Secure_String_Pwd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
> You should avoid using plain text strings in script or from the command line. The plain text can > show up in event logs and command history logs.
-## Parameters
+## PARAMETERS
### -AsPlainText
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a standard encrypted string to `ConvertTo-SecureString`.
-## Outputs
+## OUTPUTS
### System.Security.SecureString `ConvertTo-SecureString` returns a **SecureString** object.
-## Notes
+## NOTES
Some characters, such as emoticons, correspond to several code points in the string that contains them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertFrom-SecureString](ConvertFrom-SecureString.md)
Microsoft.PowerShell.Security Get Acl (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-Acl.md
Title: Get-Acl
--- # Get-Acl
-## Synopsis
+## SYNOPSIS
Gets the security descriptor for a resource, such as a file or registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-Acl [-LiteralPath <String[]>] [-Audit] [-AllCentralAccessPolicies] [-Filter
[-Exclude <String[]>] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Acl` cmdlet gets objects that represent the security descriptor of a file or resource. The security descriptor contains the access control lists (ACLs) of the resource. The ACL specifies the
permissions that users and user groups have to access the resource.
Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of `Get-Acl` to get the security descriptor of objects that do not have a path.
-## Examples
+## EXAMPLES
### Example 1- Get an ACL for a folder
storage subsystem object.
Get-Acl -InputObject (Get-StorageSubSystem -Name S087) ```
-## Parameters
+## PARAMETERS
### -AllCentralAccessPolicies
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity, System.Security.AccessControl.DirectorySecurity, System.Security.AccessControl.RegistrySecurity `Get-Acl` returns an object that represents the ACLs that it gets. The object type depends upon the ACL type.
-## Notes
+## NOTES
By default, `Get-Acl` displays the PowerShell path to the resource (`<provider>::<resource-path>`), the owner of the resource, and "Access", a list (array) of the access control entries in the
Because `Get-Acl` is supported by the file system and registry providers, you ca
view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.
-## Related links
+## RELATED LINKS
[Set-Acl](Set-Acl.md)
Microsoft.PowerShell.Security Get Authenticodesignature (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md
Title: Get-AuthenticodeSignature
--- # Get-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Gets information about the Authenticode signature for a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-AuthenticodeSignature` cmdlet gets information about the Authenticode signature for a file or file content as a byte array.
the Windows catalog signature is used.
If the file is not signed, the information is retrieved, but the fields are blank.
-## Examples
+## EXAMPLES
### Example 1: Get the Authenticode signature for a file
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePa
This command gets information about the Authenticode signature for the content of a file. In this example, the file extension is specified along with the content of the file.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature `Get-AuthenticodeSignature` returns a signature object for each signature that it gets.
-## Notes
+## NOTES
For information about Authenticode signatures in PowerShell, see [about_Signing](../Microsoft.PowerShell.Core/About/about_Signing.md).
-## Related links
+## RELATED LINKS
[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Microsoft.PowerShell.Security Get Cmsmessage (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-CmsMessage.md
Title: Get-CmsMessage
--- # Get-CmsMessage
-## Synopsis
+## SYNOPSIS
Gets content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent
Get-CmsMessage [-Path] <String> [<CommonParameters>]
Get-CmsMessage [-LiteralPath] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CmsMessage` cmdlet gets content that has been encrypted using the Cryptographic Message Syntax (CMS) format.
path to the encrypted content. You can pipe the results of `Get-CmsMessage` to
`Unprotect-CmsMessage` to decrypt the content, provided that you have information about the document encryption certificate that was used to encrypt the content.
-## Examples
+## EXAMPLES
### Example 1: Get encrypted content
This command pipes the results of the `Get-CmsMessage` cmdlet from Example 1 to
the **To** parameter is the value of the encrypting certificate's Subject line. The decrypted message, "Try the new Break All command," is the result.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Get Credential (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-Credential.md
Title: Get-Credential
--- # Get-Credential
-## Synopsis
+## SYNOPSIS
Gets a credential object based on a user name and password.
-## Syntax
+## SYNTAX
### CredentialSet (Default)
Get-Credential [-Credential] <PSCredential> [<CommonParameters>]
Get-Credential -Message <String> [[-UserName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Credential` cmdlet creates a credential object for a specified user name and password. You can use the credential object in security operations.
an authentication dialog box appears to prompt the user. However, in some host p
PowerShell console, you can prompt the user at the command line by changing a registry entry. For more information about this registry entry, see the notes and examples.
-## Examples
+## EXAMPLES
### Example 1
This command gets a credential from the Server01 remote computer. The command us
`Invoke-Command` cmdlet to run a `Get-Credential` command on the remote computer. The output shows the remote security message that `Get-Credential` includes in the authentication prompt.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCredential `Get-Credential` returns a credential object.
-## Notes
+## NOTES
You can use the **PSCredential** object that `Get-Credential` creates in cmdlets that request user authentication, such as those with a **Credential** parameter.
The **Credential** parameter is not supported by all providers that are installe
Beginning in PowerShell 3.0, it is supported on select cmdlets, such as the `Get-Content` and `New-PSDrive` cmdlets.
-## Related links
+## RELATED LINKS
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
Microsoft.PowerShell.Security Get Executionpolicy (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md
Title: Get-ExecutionPolicy
# Get-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Gets the execution policies for the current session.
-## Syntax
+## SYNTAX
### All
Gets the execution policies for the current session.
Get-ExecutionPolicy [[-Scope] <ExecutionPolicyScope>] [-List] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
To display the execution policies for each scope in the order of precedence, use `Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use
The effective execution policy is determined by execution policies that are set
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
-## Examples
+## EXAMPLES
### Example 1: Get all execution policies
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -List
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
+## INPUTS
### None `Get-ExecutionPolicy` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ExecutionPolicy
-## Notes
+## NOTES
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, whether scripts must be digitally signed before they are run.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
Microsoft.PowerShell.Security Get Pfxcertificate (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Get-PfxCertificate.md
Title: Get-PfxCertificate
--- # Get-PfxCertificate
-## Synopsis
+## SYNOPSIS
Gets information about PFX certificate files on the computer.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-PfxCertificate [-FilePath] <String[]> [<CommonParameters>]
Get-PfxCertificate -LiteralPath <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PfxCertificate` cmdlet gets an object representing each specified PFX certificate file. A PFX file includes both the certificate and a private key.
-## Examples
+## EXAMPLES
### Example 1: Get a PFX certificate
to run a `Get-PfxCertificate` command remotely.
When the PFX certificate file is not password-protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Parameters
+## PARAMETERS
### -FilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-PfxCertificate`.
-## Outputs
+## OUTPUTS
### System.Security.Cryptography.X509Certificates.X509Certificate2 `Get-PfxCertificate` returns an object for each certificate that it gets.
-## Notes
+## NOTES
When using the `Invoke-Command` cmdlet to run a `Get-PfxCertificate` command remotely, and the PFX certificate file is not password protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security New Filecatalog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/New-FileCatalog.md
Title: New-FileCatalog
--- # New-FileCatalog
-## Synopsis
+## SYNOPSIS
`New-FileCatalog` creates a catalog file of file hashes that can be used to validate the authenticity of a file.
-## Syntax
+## SYNTAX
``` New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`New-FileCatalog` creates a [Windows catalog file](/windows-hardware/drivers/install/catalog-files) for a set of folders and files. This catalog file contains hashes for all files in the provided
create file hashes, and version 2 uses SHA256. Catalog version 2 is not supporte
2008 R2 or Windows 7. You should use catalog version 2 on Windows 8, Windows Server 2012, and later operating systems.
-## Examples
+## EXAMPLES
### Example 1: Create a file catalog for `Microsoft.PowerShell.Utility`
Mode LastWriteTime Length Name
-a---- 11/2/2018 11:58 AM 950 Microsoft.PowerShell.Utility.cat ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String The pipeline takes a string that is used as the catalog filename.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Test-FileCatalog](Test-FileCatalog.md)
Microsoft.PowerShell.Security Protect Cmsmessage (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md
Title: Protect-CmsMessage
--- # Protect-CmsMessage
-## Synopsis
+## SYNOPSIS
Encrypts content by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent (Default)
Protect-CmsMessage [-To] <CmsMessageRecipient[]> [-LiteralPath] <String> [[-OutF
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Protect-CmsMessage` cmdlet encrypts content by using the Cryptographic Message Syntax (CMS) format.
To be recognized in PowerShell, encryption certificates require a unique extende
the IDs for Code Signing and Encrypted Mail). For an example of a certificate that would work for document encryption, see Example 1 in this topic.
-## Examples
+## EXAMPLES
### Example 1: Create a certificate for encrypting content
To view document encryption certificates in the certificate provider, you can ad
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md), available only when the certificate provider is loaded.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Set Acl (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Set-Acl.md
Title: Set-Acl
--- # Set-Acl
-## Synopsis
+## SYNOPSIS
Changes the security descriptor of a specified item, such as a file or a registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-Acl -LiteralPath <String[]> [-AclObject] <Object> [[-CentralAccessPolicy] <S
[-WhatIf] [-Confirm] [-UseTransaction] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Acl` cmdlet changes the security descriptor of a specified item, such as a file or a registry key, to match the values in a security descriptor that you supply.
supply a security descriptor that has the values you want to apply. `Set-Acl` ap
descriptor that is supplied. It uses the value of the **AclObject** parameter as a model and changes the values in the item's security descriptor to match the values in the **AclObject** parameter.
-## Examples
+## EXAMPLES
### Example 1: Copy a security descriptor from one file to another
is an argument list is to be passed when making the new **FileSystemAccessRule**
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
+## PARAMETERS
### -AclObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.CommonSecurityDescriptor You can pipe an ACL object or a security descriptor to `Set-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity By default, `Set-Acl` does not generate any output. However, if you use the **Passthru** parameter, it generates a security object. The type of the security object depends on the type of the item.
-## Notes
+## NOTES
The `Set-Acl` cmdlet is supported by the PowerShell file system and registry providers. As such, you can use it to change the security descriptors of files, directories, and registry keys.
-## Related links
+## RELATED LINKS
[Get-Acl](Get-Acl.md)
Microsoft.PowerShell.Security Set Authenticodesignature (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md
Title: Set-AuthenticodeSignature
--- # Set-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Adds an [Authenticode](/windows-hardware/drivers/install/authenticode) signature to a PowerShell script or other file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-AuthenticodeSignature [-Certificate] <X509Certificate2> [-IncludeChain <Stri
-Content <Byte[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-AuthenticodeSignature` cmdlet adds an Authenticode signature to any file that supports Subject Interface Package (SIP).
In a PowerShell script file, the signature takes the form of a block of text tha
of the instructions that are executed in the script. If there is a signature in the file when this cmdlet runs, that signature is removed.
-## Examples
+## EXAMPLES
### Example 1 - Sign a script using a certificate from the local certificate store
the **IncludeChain** parameter to include all of the signatures in the trust cha
root authority. It also uses the **TimeStampServer** parameter to add a timestamp to the signature. This prevents the script from failing when the certificate expires.
-## Parameters
+## PARAMETERS
### -Certificate
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the file path to `Set-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security Set Executionpolicy (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md
Title: Set-ExecutionPolicy
# Set-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Sets the PowerShell execution policies for Windows computers.
-## Syntax
+## SYNTAX
### All
Set-ExecutionPolicy [-ExecutionPolicy] <ExecutionPolicy> [[-Scope] <ExecutionPol
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## 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).
To display the execution policies for each scope in the order of precedence, use
`Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use `Get-ExecutionPolicy` with no parameters.
-## Examples
+## EXAMPLES
### Example 1: Set an execution policy
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -ExecutionPolicy
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
+## INPUTS
### Microsoft.PowerShell.ExecutionPolicy, System.String You can pipe an execution policy object or a string that contains the name of an execution policy to `Set-ExecutionPolicy`.
-## Outputs
+## OUTPUTS
### None `Set-ExecutionPolicy` doesn't return any output.
-## Notes
+## NOTES
`Set-ExecutionPolicy` doesn't change the **MachinePolicy** and **UserPolicy** scopes because they are set by Group Policies.
If the Group Policy **Turn on Script Execution** is enabled for the computer or
preference is saved, but it is not effective. PowerShell displays a message that explains the conflict.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Security Test Filecatalog (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Test-FileCatalog.md
Title: Test-FileCatalog
--- # Test-FileCatalog
-## Synopsis
+## SYNOPSIS
`Test-FileCatalog` validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity. This cmdlet is only supported on Windows.
-## Syntax
+## SYNTAX
``` Test-FileCatalog [-Detailed] [-FilesToSkip <String[]>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Test-FileCatalog` validates the authenticity of files by comparing the file hashes of a catalog file (.cat) with the hashes of actual files on disk. If it detects any mismatches, it returns the
validation by using the -FilesToSkip parameter.
This cmdlet is only supported on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create and validate a file catalog
PathItems : {[Microsoft.PowerShell.Utility.psd1,
Signature : System.Management.Automation.Signature ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.IO.DirectoryInfo[], System.String[] The pipeline accepts an array of strings or `DirectoryInfo` objects that represent paths to the files that need to be validated.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CatalogValidationStatus
A more detailed object returned when using `-Detailed` which can be used to anal
that may or may not have passed validation, which hashes were expected vs. found, and the algorithm used in the catalog.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-FileCatalog](New-FileCatalog.md)
Microsoft.PowerShell.Security Unprotect Cmsmessage (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md
Title: Unprotect-CmsMessage
--- # Unprotect-CmsMessage
-## Synopsis
+## SYNOPSIS
Decrypts content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByWinEvent (Default)
Unprotect-CmsMessage [-LiteralPath] <String> [-IncludeContext] [[-To] <CmsMessag
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unprotect-CmsMessage` cmdlet decrypts content that has been encrypted by using the Cryptographic Message Syntax (CMS) format.
can specify content that you want to decrypt as a string, by the encryption even
number, or by path to the encrypted content. The `Unprotect-CmsMessage` cmdlet returns the decrypted content.
-## Examples
+## EXAMPLES
### Example 1: Decrypt a message
Unprotect-CmsMessage -LiteralPath @parameters
Try the new Break All command ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Eventing.Reader.EventLogRecord or System.String You can pipe an object containing encrypted content to `Unprotect-CmsMessage`.
-## Outputs
+## OUTPUTS
### System.String The unencrypted message.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Add Member (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Add-Member.md
Title: Add-Member
--- # Add-Member
-## Synopsis
+## SYNOPSIS
Adds custom properties and methods to an instance of a PowerShell object.
-## Syntax
+## SYNTAX
### TypeNameSet (Default)
Add-Member -InputObject <PSObject> [-MemberType] <PSMemberTypes> [-Name] <String
[[-SecondValue] <Object>] [-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Member` cmdlet lets you add members (properties and methods) to an instance of a PowerShell object. For instance, you can add a NoteProperty member that contains a description of the object or
Also, beginning in Windows PowerShell 3.0, the **PassThru** parameter, which gen
object, is needed less frequently. `Add-Member` now adds the new members directly to the input object of more types. For more information, see the **PassThru** parameter description.
-## Examples
+## EXAMPLES
### Example 1: Add a note property to a PSObject
PSVersion NoteProperty System.String PSVersion=4.0
System NoteProperty System.String System=Server Core ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object type to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Object When you use the **PassThru** parameter, this cmdlet returns the newly-extended object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can add members only to **PSObject** objects. To determine whether an object is a **PSObject** object, use the `-is` operator.
and methods.
The `$this` variable refers to the instance of the object to which the properties and methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Add Type (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Add-Type.md
Title: Add-Type
# Add-Type
-## Synopsis
+## SYNOPSIS
Adds a Microsoft .NET class to a PowerShell session.
-## Syntax
+## SYNTAX
### FromSource (Default)
Add-Type [-CompilerParameters <CompilerParameters>] -LiteralPath <String[]>
Add-Type -AssemblyName <String[]> [-PassThru] [-IgnoreWarnings] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Type` cmdlet lets you define a Microsoft .NET Framework class in your PowerShell session. You can then instantiate objects, by using the `New-Object` cmdlet, and use the objects just as you
You can use the parameters of `Add-Type` to specify an alternate language and co
default, compiler options, assembly dependencies, the class namespace, the names of the type, and the resulting assembly.
-## Examples
+## EXAMPLES
### Example 1: Add a .NET type to a session
support the resulting public type.
The Loop method is called as a static method of the type stored in the `$FSharpType` variable.
-## Parameters
+## PARAMETERS
### -AssemblyName
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
+## INPUTS
### None You can't send objects down the pipeline to `Add-Type`.
-## Outputs
+## OUTPUTS
### None or System.Type When you use the **PassThru** parameter, `Add-Type` returns a **System.Type** object that represents the new type. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
The types that you add exist only in the current session. To use the types in all sessions, add them to your PowerShell profile. For more information about the profile, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
output. As a result, types written in these languages can't be used with `Add-Ty
This cmdlet is based on the Microsoft .NET Framework [CodeDomProvider Class](/dotnet/api/system.codedom.compiler.codedomprovider).
-## Related links
+## RELATED LINKS
[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md)
Microsoft.PowerShell.Utility Clear Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Clear-Variable.md
Title: Clear-Variable
--- # Clear-Variable
-## Synopsis
+## SYNOPSIS
Deletes the value of a variable.
-## Syntax
+## SYNTAX
``` Clear-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Variable` cmdlet deletes the data stored in a variable, but it does not delete the variable. As a result, the value of the variable is NULL (empty). If the variable has a specified data or object type, this cmdlet preserves the type of the object stored in the variable.
-## Examples
+## EXAMPLES
### Example 1: Remove the value of global variables that begin with a search string
Clear-Variable -Name "Processes"
This command deletes the value of the variable named Processes. After the cmdlet completes the operation, the variable named Processes still exists, but the value is null.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, this cmdlet generates a
**System.Management.Automation.PSVariable** object representing the cleared variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To delete a variable, along with its value, use `Remove-Variable` or `Remove-Item`.
this cmdlet does not generate any output.
You can also refer to `Clear-Variable` by its built-in alias, `clv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Get-Variable](Get-Variable.md)
Microsoft.PowerShell.Utility Compare Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Compare-Object.md
Title: Compare-Object
--- # Compare-Object
-## Synopsis
+## SYNOPSIS
Compares two sets of objects.
-## Syntax
+## SYNTAX
``` Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compare-Object` cmdlet compares two sets of objects. One set of objects is the **reference**, and the other set of objects is the **difference**.
terminating error.
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1 - Compare the content of two text files
InputObject SideIndicator
In the second case, the **TimeSpan** is converted to a string so the object are different.
-## Parameters
+## PARAMETERS
### -CaseSensitive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send an object down the pipeline to the **DifferenceObject** parameter.
-## Outputs
+## OUTPUTS
### None
When you use the **PassThru** parameter, the **Type** of the object is not chang
of the object returned has an added **NoteProperty** named **SideIndicator**. **SideIndicator** shows which input object the output belongs to.
-## Notes
+## NOTES
When using the **PassThru** parameter, the output displayed in the console may not include the **SideIndicator** property. The default format view for the object type output by `Compare-Object` does not include the **SideIndicator** property. For more information see [Example 3](#ex3) in this article.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convert String (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Convert-String.md
Title: Convert-String
--- # Convert-String
-## Synopsis
+## SYNOPSIS
Formats a string to match examples.
-## Syntax
+## SYNTAX
``` Convert-String [-Example <System.Collections.Generic.List`1[System.Management.Automation.PSObject]>] -InputObject <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The cmdlet formats a string to match the format of examples.
-## Examples
+## EXAMPLES
### Example 1: Convert format of a string
command coverts each string in `$Processes`.
> The fourth pattern implicitly says that two or more words separated by spaces are matched. Without > the fourth pattern, only the first word of the string enclosed in double quotes is matched.
-## Parameters
+## PARAMETERS
### -Example
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
+## INPUTS
### String You can pipe strings to this cmdlet.
-## Outputs
+## OUTPUTS
### String This cmdlet returns a string.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-String](ConvertFrom-String.md)
Microsoft.PowerShell.Utility Convertfrom Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Title: ConvertFrom-Csv
--- # ConvertFrom-Csv
-## Synopsis
+## SYNOPSIS
Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertFrom-Csv [-InputObject] <psobject[]> [[-Delimiter] <char>] [-Header <stri
ConvertFrom-Csv [-InputObject] <psobject[]> -UseCulture [-Header <string[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Csv` cmdlet creates objects from CSV variable-length strings that are generated by the `ConvertTo-Csv` cmdlet.
You can also use the `Export-Csv` and `Import-Csv` cmdlets to convert objects to
file (and back). These cmdlets are the same as the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets, except that they save the CSV strings in a file.
-## Examples
+## EXAMPLES
### Example 1: Convert processes on the local computer to CSV format
When the **UseCulture** parameter is used, be sure that the current culture's de
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` cannot generate objects from the CSV strings.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe CSV strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns the objects described by the properties in the CSV strings.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings (by using the **ToString()*
object), so they are represented by the name of the property value. This cmdlet does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Convertfrom Json (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md
Title: ConvertFrom-Json
# ConvertFrom-Json
-## Synopsis
+## SYNOPSIS
Converts a JSON-formatted string to a custom object.
-## Syntax
+## SYNTAX
``` ConvertFrom-Json [-InputObject] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Json` cmdlet converts a JavaScript Object Notation (JSON) formatted string to a custom **PSCustomObject** object that has a property for each field in the JSON string. JSON is
This cmdlet was introduced in PowerShell 3.0.
> [!NOTE] > This cmdlet doesn't support JSON with comments.
-## Examples
+## EXAMPLES
### Example 1: Convert a DateTime object to a JSON object
The command uses Get-Content cmdlet to get the strings in a JSON file. Then it u
operator to send the delimited string to the `ConvertFrom-Json` cmdlet, which converts it to a custom object.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `ConvertFrom-Json`.
-## Outputs
+## OUTPUTS
### PSCustomObject
-## Notes
+## NOTES
The `ConvertFrom-Json` cmdlet is implemented using the [JavaScriptSerializer class](/dotnet/api/system.web.script.serialization.javascriptserializer).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertfrom Sddlstring (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md
Title: ConvertFrom-SddlString
--- # ConvertFrom-SddlString
-## Synopsis
+## SYNOPSIS
Converts a SDDL string to a custom object.
-## Syntax
+## SYNTAX
``` ConvertFrom-SddlString [-Sddl] <String> [-Type <Object>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SddlString` cmdlet converts a Security Descriptor Definition Language string to a custom **PSCustomObject** object with the following properties: Owner, Group, DiscretionaryAcl,
the access rights specified in a SDDL string.
This cmdlet was introduced in PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Convert file system access rights SDDL to a PSCustomObject
The second command uses the `ConvertFrom-SddlString` cmdlet to get text represen
It uses the `-Type` parameter to specify that SDDL string represents an Active Directory security descriptor.
-## Parameters
+## PARAMETERS
### -Sddl
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a SDDL string to `ConvertFrom-SddlString`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Security Descriptor Definition Language](/windows/win32/secauthz/security-descriptor-definition-language)
Microsoft.PowerShell.Utility Convertfrom String (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-String.md
Title: ConvertFrom-String
--- # ConvertFrom-String
-## Synopsis
+## SYNOPSIS
Extracts and parses structured properties from string content.
-## Syntax
+## SYNTAX
### ByDelimiter (Default)
ConvertFrom-String [-TemplateFile <String[]>] [-TemplateContent <String[]>] [-In
[-InputObject] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-String` cmdlet extracts and parses structured properties from string content. This cmdlet generates an object by parsing text from a traditional text stream. For each string in the
You can customize the delimiter by piping the `ConvertFrom-String` results into
The cmdlet also supports automatically-generated, example-driven parsing based on the [FlashExtract, research work by Microsoft Research](https://www.microsoft.com/research/publication/flashextract-framework-data-extraction-examples/).
-## Examples
+## EXAMPLES
### Example 1: Generate an object with default property names
phone NoteProperty string phone=425-123-6789
The `Get-Member` cmdlet is used to show that the **age** property is an integer.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-String: Example-based text parsing](https://devblogs.microsoft.com/powershell/convertfrom-string-example-based-text-parsing/)
Microsoft.PowerShell.Utility Convertfrom Stringdata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md
Title: ConvertFrom-StringData
--- # ConvertFrom-StringData
-## Synopsis
+## SYNOPSIS
Converts a string containing one or more key and value pairs to a hash table.
-## Syntax
+## SYNTAX
``` ConvertFrom-StringData [-StringData] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-StringData` cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often
your results by escaping it with a preceding backslash, like this: `\\`. Unescap
characters, such as those that are commonly used in file paths, can render as illegal escape sequences in your results.
-## Examples
+## EXAMPLES
### Example 1: Convert a single-quoted here-string to a hash table
Name Value
Message Look in c:\Windows\System32 ```
-## Parameters
+## PARAMETERS
### -StringData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string containing a key-value pair to `ConvertFrom-StringData`.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable This cmdlet returns a hash table that it creates from the key-value pairs.
-## Notes
+## NOTES
A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally.
This cmdlet can be useful in scripts that display user messages in multiple spok
can use the dictionary-style hash tables to isolate text strings from code, such as in resource files, and to format the text strings for use in translation tools.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Convertto Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## Synopsis
+## SYNOPSIS
Converts .NET objects into a series of comma-separated value (CSV) strings.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <psobject> [[-Delimiter] <char>] [-NoTypeInformatio
ConvertTo-Csv [-InputObject] <psobject> [-UseCulture] [-NoTypeInformation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## Examples
+## EXAMPLES
### Example 1: Convert an object to CSV
objects to a series of CSV strings. The **UseCulture** parameter uses the curren
list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE** information header from the CSV output.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV output is returned as a collection of strings.
-## Notes
+## NOTES
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Convertto Html (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Title: ConvertTo-Html
--- # ConvertTo-Html
-## Synopsis
+## SYNOPSIS
Converts .NET objects into HTML that can be displayed in a Web browser.
-## Syntax
+## SYNTAX
### Page (Default)
ConvertTo-Html [-InputObject <PSObject>] [[-Property] <Object[]>] [-As <String>]
[-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
on the properties of the first object that you submit. If the remaining objects
the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.
-## Examples
+## EXAMPLES
### Example 1: Create a web page to display the date
cmdlet. The command also uses the `Out-File` cmdlet to send the output to the Se
A semicolon (`;`) ends the first command and starts a second command, which uses the `Invoke-Item` cmdlet to open the `Services.htm` file in the default browser.
-## Parameters
+## PARAMETERS
### -As
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any .NET object to `ConvertTo-Html`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument `ConvertTo-Html` returns series of strings that comprise valid HTML.
-## Notes
+## NOTES
To use this cmdlet, pipe one or more objects to the cmdlet or use the **InputObject** parameter to specify the object. When the input consists of multiple objects, the output of these two methods is
quite different.
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>`
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertto Json (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Title: ConvertTo-Json
--- # ConvertTo-Json
-## Synopsis
+## SYNOPSIS
Converts an object to a JSON-formatted string.
-## Syntax
+## SYNTAX
``` ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript Object Notation (JSON) format. The properties are converted to field names, the field values are converted to
web-based apps.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1
Year : 2018
This example shows how to use the `ConvertTo-Json` and `ConvertFrom-Json` cmdlets to convert an object to a JSON string and a JSON object.
-## Parameters
+## PARAMETERS
### -Compress
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to `ConvertTo-Json`.
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
The `ConvertTo-Json` cmdlet is implemented using the [JavaScriptSerializer class](/dotnet/api/system.web.script.serialization.javascriptserializer).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertto Xml (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md
Title: ConvertTo-Xml
--- # ConvertTo-Xml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object.
-## Syntax
+## SYNTAX
``` ConvertTo-Xml [-Depth <Int32>] [-InputObject] <PSObject> [-NoTypeInformation] [-As <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Xml` cmdlet creates an [XML-based](/dotnet/api/system.xml.xmldocument) representation of one or more .NET objects. To use this cmdlet, pipe one or more objects to the cmdlet, or use the
file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md).
returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` does not have an option to convert objects to CLI XML.
-## Examples
+## EXAMPLES
### Example 1: Convert a date to XML
ConvertTo-Xml -As "Document" -InputObject (Get-Process) -Depth 3
This command converts the process objects that represent all of the processes on the computer into an XML document. The objects are expanded to a depth of three levels.
-## Parameters
+## PARAMETERS
### -As
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `ConvertTo-XML`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument The value of the **As** parameter determines the type of object that `ConvertTo-XML` returns.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Debug Runspace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Debug-Runspace.md
Title: Debug-Runspace
--- # Debug-Runspace
-## Synopsis
+## SYNOPSIS
Starts an interactive debugging session with a runspace.
-## Syntax
+## SYNTAX
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Runspace [-InstanceId] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Debug a remote runspace
In the last command, you start debugging an opened runspace that is running a sc
`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## Related links
+## RELATED LINKS
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
Title: Disable-PSBreakpoint
--- # Disable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Disables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets des
PowerShell scripts. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint and disable it
This command disables all breakpoints in the current console.
`Get-PSBreakpoint` | Disable-PSBreakpoint ```
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Disable Runspacedebug (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md
Title: Disable-RunspaceDebug
--- # Disable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Disable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Disable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-RunspaceDebug` cmdlet disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Examples
+## EXAMPLES
### 1: Disable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-RunspaceDebug](Enable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Enables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Id (Default)
Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't gene
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Runspacedebug (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md
Title: Enable-RunspaceDebug
--- # Enable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Enable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-RunspaceDebug` cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Examples
+## EXAMPLES
### 1: Enable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 True False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Export Alias (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-Alias.md
Title: Export-Alias
--- # Export-Alias
-## Synopsis
+## SYNOPSIS
Exports information about currently defined aliases to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file does not exist, the cmdlet will create it. `Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
-## Examples
+## EXAMPLES
### Example 1: Export an alias
The third and fourth commands add the aliases in the Alias.ps1 file to a remote
The third command uses the `New-PSSession` cmdlet to create the session. The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
-## Parameters
+## PARAMETERS
### -Append
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).
-## Inputs
+## INPUTS
### None. You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Export-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
* You can only Export-Aliases to a file.
-## Related links
+## RELATED LINKS
[Get-Alias](Get-Alias.md)
Microsoft.PowerShell.Utility Export Clixml (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-Clixml.md
Title: Export-Clixml
# Export-Clixml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Clixml -LiteralPath <String> -InputObject <PSObject> [-Depth <Int32>] [-F
[-Encoding <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Clixml` cmdlet creates a Common Language Infrastructure (CLI) XML-based representation of an object or objects and stores it in a file. You can then use the `Import-Clixml` cmdlet to
file. `ConvertTo-XML` returns the XML, so you can continue to process it in Powe
A valuable use of `Export-Clixml` on Windows computers is to export credentials and secure strings securely as XML. For an example, see Example 3.
-## Examples
+## EXAMPLES
### Example 1: Export a string to an XML file
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -Depth
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
+## INPUTS
### System.Management.Automation.PSObject You can pipeline any object to `Export-Clixml`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-Clixml` creates a file that contains the XML.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Html](ConvertTo-Html.md)
Microsoft.PowerShell.Utility Export Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## Synopsis
+## SYNOPSIS
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Export-Csv [[-Path] <string>] -InputObject <psobject> [-LiteralPath <string>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Export process properties to a CSV file
The `Export-Csv` cmdlet **Force** parameter is used to force the export to write
**Edition** property is discarded. The `Import-Csv` cmdlet uses the **Path** parameter to display the file located in the current directory.
-## Parameters
+## PARAMETERS
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV list is sent to the file designated in the Path parameter.
-## Notes
+## NOTES
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV` to save objects in a CSV file and then use
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Formatdata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-FormatData.md
Title: Export-FormatData
# Export-FormatData
-## Synopsis
+## SYNOPSIS
Saves formatting data from the current session in a formatting file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
[-IncludeScriptBlock] [<CommonParameters>] ```
-## Description
+## 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
use the Update-FormatData cmdlet to add the formatting data to a session.
For more information about formatting files in Windows PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Export session format data
The third command shows the effects of this change. The command uses the `Get-Pr
get processes that have names that begin with P. The output shows that property values that are calculated by using script blocks are missing from the display.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Management.Automation.ExtendedTypeDefinition You can pipe **ExtendedTypeDefinition** objects from `Get-FormatData` to `Export-FormatData`.
-## Outputs
+## OUTPUTS
### None `Export-FormatData` does not return any objects. It generates a file and saves it in the specified path.
-## Notes
+## NOTES
- To use any formatting file, including an exported formatting file, the execution policy for the session must allow scripts and configuration files to run. For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Export Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md
Title: Export-PSSession
# Export-PSSession
-## Synopsis
+## SYNOPSIS
Exports commands from another session and saves them in a PowerShell module.
-## Syntax
+## SYNTAX
``` Export-PSSession [-Session] <PSSession> [-OutputModule] <string> [[-CommandName] <string[]>]
Export-PSSession [-Session] <PSSession> [-OutputModule] <string> [[-CommandName]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## Examples
+## EXAMPLES
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Export-PSSession`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-PSSession` returns a list of files that comprise the module that it created.
-## Notes
+## NOTES
`Export-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for remoting. For more information, see
The module that `Export-PSSession` creates might include a formatting file, even
does not import formatting data. If the command does not import formatting data, any formatting files that are created will not contain formatting data.
-## Related links
+## RELATED LINKS
[about_Command_Precedence](../Microsoft.PowerShell.Core/About/about_Command_Precedence.md)
Microsoft.PowerShell.Utility Format Custom (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md
Title: Format-Custom
--- # Format-Custom
-## Synopsis
+## SYNOPSIS
Uses a customized view to format the output.
-## Syntax
+## SYNTAX
``` Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-View <String>]
Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-Vi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Custom` cmdlet formats the output of a command as defined in an alternate view. `Format-Custom` is designed to display views that are not just tables or just lists. You can use the views defined in the `*format.PS1XML` files in the PowerShell directory, or you can create your own views in new PS1XML files and use the `Update-FormatData` cmdlet to add them to PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Format output with a custom view
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -Depth
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Custom`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Custom` returns the format objects that represent the display.
-## Notes
+## NOTES
`Format-Custom` is designed to display views that are not just tables or just lists. To display an alternate table view, use `Format-Table`. To display an alternate list view, use `Format-List`.
You can also refer to `Format-Custom` by its built-in alias, `fc`. For more info
The **GroupBy** parameter assumes that the objects are sorted. Before using `Format-Custom` to group the objects, use `Sort-Object` to sort them.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Hex (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Format-Hex.md
Title: Format-Hex
# Format-Hex
-## Synopsis
+## SYNOPSIS
Displays a file or other input as hexadecimal.
-## Syntax
+## SYNTAX
### Path (Default)
Format-Hex -LiteralPath <string[]> [<CommonParameters>]
Format-Hex -InputObject <Object> [-Encoding <string>] [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Hex` cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at
to get file information.
When using `Format-Hex` on a file, the cmdlet ignores newline characters and returns the entire contents of a file in one string with the newline characters preserved.
-## Examples
+## EXAMPLES
### Example 1: Get the hexadecimal representation of a string
PS> 1,2,3,1000 | Format-Hex -Raw
Notice the difference in output. The **Raw** parameter displays the numbers as 4-byte values, true to their **Int32** types.
-## Parameters
+## PARAMETERS
### -Encoding
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ByteCollection
methods that convert the collection of bytes to a string formatted like each lin
by `Format-Hex`. If you specify the **Path** or **LiteralPath** parameter, the object also contains the path of the file that contains each byte.
-## Notes
+## NOTES
The right-most column of output tries to render the bytes as characters:
Generally, each byte is interpreted as a Unicode code point, which means that:
- Multi-byte UTF-8 characters never render correctly - UTF-16 characters render correctly only if their high-order byte happens be `NUL`.
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Utility Format List (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Format-List.md
Title: Format-List
--- # Format-List
-## Synopsis
+## SYNOPSIS
Formats the output as a list of properties in which each property appears on a new line.
-## Syntax
+## SYNTAX
``` Format-List [[-Property] <Object[]>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-List` cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use `Format-List` to format and display all or
selected properties of an object as a list (format-list *).
Because more space is available for each item in a list than in a table, PowerShell displays more properties of the object in the list, and the property values are less likely to be truncated.
-## Examples
+## EXAMPLES
### Example 1: Format computer services
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -DisplayError
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-List`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-List` returns the format objects that represent the list.
-## Notes
+## NOTES
You can also refer to Format-List by its built-in alias, FL. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use the list format, otherwis
fails. If the alternate view is a table, use `Format-Table`. If the alternate view is not a list or a table, use `Format-Custom`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Table (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Format-Table.md
Title: Format-Table
# Format-Table
-## Synopsis
+## SYNOPSIS
Formats the output as a table.
-## Syntax
+## SYNTAX
### All
Format-Table [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [[-Property
[-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Table` cmdlet formats the output of a command as a table with the selected properties of the object in each column. The object type determines the default layout and properties that are
specify the column headings in the table. To add a calculated property, use the
**GroupBy** parameter. For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
-## Examples
+## EXAMPLES
### Example 1: Format PowerShell host
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : mshExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object down the pipeline to `Format-Table`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Table` returns format objects that represent the table.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Wide (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md
Title: Format-Wide
--- # Format-Wide
-## Synopsis
+## SYNOPSIS
Formats objects as a wide table that displays only one property of each object.
-## Syntax
+## SYNTAX
``` Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>]
Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Wide` cmdlet formats objects as a wide table that displays only one property of each object. You can use the **Property** parameter to determine which property is displayed.
-## Examples
+## EXAMPLES
### Example 1: Format names of files in the current directory
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Wide`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Wide` returns format objects that represent the table.
-## Notes
+## NOTES
You can also refer to `Format-Wide` by its built-in alias, `fw`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use table format; if it does
fails. If the alternate view is a list, use `Format-List`. If the alternate view is neither a list nor a table, use Format-Custom.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Get Alias (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Alias.md
Title: Get-Alias
--- # Get-Alias
-## Synopsis
+## SYNOPSIS
Gets the aliases for the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Alias [[-Name] <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonP
Get-Alias [-Exclude <String[]>] [-Scope <String>] [-Definition <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Alias` cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your PowerShell profile.
parameter, `Get-Alias` takes a command name and returns its aliases.
Beginning in Windows PowerShell 3.0, `Get-Alias` displays non-hyphenated alias names in an `<alias> -> <definition>` format to make it even easier to find the information that you need.
-## Examples
+## EXAMPLES
### Example 1: Get all aliases in the current session
that begin with "e".
The command uses the **Scope** parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.
-## Parameters
+## PARAMETERS
### -Definition
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
+## INPUTS
### System.String You can pipe alias names to `Get-Alias`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
You can pipe alias names to `Get-Alias`.
every alias, but PowerShell uses an arrow-based format to display the names of non-hyphenated aliases.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To delete an alias, use `Remove-Item`. - The arrow-based alias name format is not used for aliases that include a hyphen. These are likely to be preferred substitute names for cmdlets and functions, instead of typical abbreviations or nicknames.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Get Culture (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Culture.md
Title: Get-Culture
# Get-Culture
-## Synopsis
+## SYNOPSIS
Gets the current culture set in the operating system.
-## Syntax
+## SYNTAX
``` Get-Culture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Culture` cmdlet gets information about the current culture settings. This includes information about the current language settings on the system, such as the keyboard layout, and the
system, and the [Set-Culture](/powershell/module/international/set-culture) cmdl
International module. The user-interface (UI) culture determines which text strings are used for user interface elements, such as menus and messages.
-## Examples
+## EXAMPLES
### Example 1: Get culture settings
culture object.
Many object properties have properties. The fifth command uses dot notation to display the value of the **FirstDayOfWeek** property of the **DateTimeFormat** property.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo `Get-Culture` returns an object that represents the current culture.
-## Notes
+## NOTES
You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the name of the current culture and the `$PsUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
[Set-Culture](/powershell/module/international/set-culture)
Microsoft.PowerShell.Utility Get Date (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Date.md
Title: Get-Date
# Get-Date
-## Synopsis
+## SYNOPSIS
Gets the current date and time.
-## Syntax
+## SYNTAX
### net (Default)
Get-Date [[-Date] <DateTime>] [-Year <Int32>] [-Month <Int32>] [-Day <Int32>] [-
[-UFormat <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Date` cmdlet gets a **DateTime** object that represents the current date or a date that you specify. `Get-Date` can format the date and time in several .NET and UNIX formats. You can use
programs.
`Get-Date` uses the computer's culture settings to determine how the output is formatted. To view your computer's settings, use `(Get-Culture).DateTimeFormat`.
-## Examples
+## EXAMPLES
### Example 1: Get the current date and time
replaced by periods.
includes the `$timestamp` variable as the directory name. The **Type** parameter specifies that a directory is created.
-## Parameters
+## PARAMETERS
### -Date
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
+## INPUTS
### Pipeline input `Get-Date` accepts pipeline input. For example, `Get-ChildItem | Get-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime or System.String
The method `(Get-Date).ToString()` converts a **DateTime** object a **String** o
To display an object's properties and methods, send the object down the pipeline to `Get-Member`. For example, `Get-Date | Get-Member`.
-## Notes
+## NOTES
**DateTime** objects are in long-date and long-time formats for the system locale.
The valid **UFormat specifiers** are displayed in the following table:
| `%y` | Year in 2-digit format | 19 | | `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |
-## Related links
+## RELATED LINKS
[ForEach-Object](../Microsoft.PowerShell.Core/ForEach-Object.md)
Microsoft.PowerShell.Utility Get Event (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Event.md
Title: Get-Event
--- # Get-Event
-## Synopsis
+## SYNOPSIS
Gets the events in the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-Event [[-SourceIdentifier] <String>] [<CommonParameters>]
Get-Event [-EventIdentifier] <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Event` cmdlet gets events in the PowerShell event queue for the current session. You can get all events or use the **EventIdentifier** or **SourceIdentifier** parameter to specify the
PowerShell exits. You can use `Get-Event` or `Wait-Event` to get the events.
This cmdlet does not get events from the Event Viewer logs. To get those events, use `Get-WinEvent` or `Get-EventLog`.
-## Examples
+## EXAMPLES
### Example 1: Get all events
PS C:\> Get-Event -EventIdentifier 2
This command gets the event with an event identifier of 2.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs `Get-Event` returns a **PSEventArgs** object for each event. To see a description of this object, type `Get-Help Get-Event -Full` and see the Notes section of the help topic.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
The `Get-Event` cmdlet returns a **PSEventArgs** object
register an event. In the value of the **Action** parameter, the **MessageData** property of the `$Event` automatic variable contains this value.
-## Related links
+## RELATED LINKS
[New-Event](New-Event.md)
Microsoft.PowerShell.Utility Get Eventsubscriber (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md
Title: Get-EventSubscriber
--- # Get-EventSubscriber
-## Synopsis
+## SYNOPSIS
Gets the event subscribers in the current session.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-EventSubscriber [[-SourceIdentifier] <String>] [-Force] [<CommonParameters>]
Get-EventSubscriber [-SubscriptionId] <Int32> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventSubscriber` cmdlet gets the event subscribers in the current session.
your Windows PowerShell session, and the events to which you subscribed are adde
queue whenever they are raised. To cancel an event subscription, delete the event subscriber by using the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get the event subscriber for a timer event
being generated when the Elapsed event occurs.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventSubscriber `Get-EventSubscriber` returns an object that represents each event subscriber.
-## Notes
+## NOTES
The `New-Event` cmdlet, which creates a custom event, does not generate a subscriber. Therefore, the `Get-EventSubscriber` cmdlet will not find a subscriber object for these events. However, if you use
generates.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Get Filehash (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-FileHash.md
Title: Get-FileHash
--- # Get-FileHash
-## Synopsis
+## SYNOPSIS
Computes the hash value for a file by using a specified hash algorithm.
-## Syntax
+## SYNTAX
### Path (Default)
Get-FileHash -LiteralPath <String[]> [-Algorithm <String>] [<CommonParameters>]
Get-FileHash -InputStream <Stream> [-Algorithm <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FileHash` cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying
are also identical.
By default, the `Get-FileHash` cmdlet uses the SHA256 algorithm, although any hash algorithm that is supported by the target operating system can be used.
-## Examples
+## EXAMPLES
### Example 1: Compute the hash value for a file
Hash
64EC88CA00B268E5BA1A35678A1B5316D212F4F366B2477232534A8AECA37F3C ```
-## Parameters
+## PARAMETERS
### -Algorithm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string to the `Get-FileHash` cmdlet that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### Microsoft.Powershell.Utility.FileHash `Get-FileHash` returns an object that represents the path to the specified file, the value of the computed hash, and the algorithm used to compute the hash.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Get Formatdata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md
Title: Get-FormatData
--- # Get-FormatData
-## Synopsis
+## SYNOPSIS
Gets the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FormatData` cmdlet gets the formatting data in the current session.
cmdlet to serialize the objects, convert them to XML, and save them in `Format.p
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Get all formatting data
TypeNames FormatViewDefinition
> **PowerShellVersion** parameter with the appropriate version. If the parameter and value are > omitted, you may not get all the correct type information.
-## Parameters
+## PARAMETERS
### -PowerShellVersion
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExtendedTypeDefinition
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-FormatData](Export-FormatData.md)
Microsoft.PowerShell.Utility Get Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Host.md
Title: Get-Host
--- # Get-Host
-## Synopsis
+## SYNOPSIS
Gets an object that represents the current host program.
-## Syntax
+## SYNTAX
``` Get-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Host` cmdlet gets an object that represents the program that is hosting Windows PowerShell.
including detailed information about the version of Windows PowerShell that is c
the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
-## Examples
+## EXAMPLES
### Example 1: Get information about the PowerShell console host
This command uses the **PrivateData** property of `$Host` as its ErrorBackground
see all of the properties of the object in the `$Host`.PrivateData property, type `$host.PrivateData | format-list *`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Internal.Host.InternalHost `Get-Host` returns a **System.Management.Automation.Internal.Host.InternalHost** object.
-## Notes
+## NOTES
The `$Host` automatic variable contains the same object that `Get-Host` returns, and you can use it in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variables contain the same
use these features interchangeably.
For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Get Member (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Member.md
Title: Get-Member
--- # Get-Member
-## Synopsis
+## SYNOPSIS
Gets the properties and methods of objects.
-## Syntax
+## SYNTAX
``` Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Member` cmdlet gets the members, the properties and methods, of objects.
information about static members, the members of the class, not of the instance,
parameter. To get only certain types of members, such as **NoteProperties**, use the **MemberType** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get the members of process objects
LastWriteTimeUtc
Attributes ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Get-Member`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MemberDefinition `Get-Member` returns an object for each property or method that its gets.
-## Notes
+## NOTES
You can get information about a collection object either by using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`.
return information about the `[System.RuntimeType]` type. However, when you use
parameter, `Get-Member` returns the static members of the specific type represented by the `System.RuntimeType` instance.
-## Related links
+## RELATED LINKS
[Add-Member](Add-Member.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Title: Get-PSBreakpoint
--- # Get-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Gets the breakpoints that are set in the current session.
-## Syntax
+## SYNTAX
### Script (Default)
Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParamet
Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints.
examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed
PowerShell scripts and commands. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Get all breakpoints for all scripts and functions
This command gets all line and variable breakpoints in the `Sample.ps1` script.
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1" ```
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## Notes
+## NOTES
You can use `Get-PSBreakpoint` or its alias, "gbp".
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Pscallstack (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-PSCallStack.md
Title: Get-PSCallStack
--- # Get-PSCallStack
-## Synopsis
+## SYNOPSIS
Displays the current call stack.
-## Syntax
+## SYNTAX
``` Get-PSCallStack [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSCallStack` cmdlet displays the current call stack.
display the call stack in a script or function outside of the debugger.
To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCallStack`.
-## Examples
+## EXAMPLES
### Example 1: Get the call stack for a function
stack.
The final command is a `Step-Out` command (`o`) that exits the debugger and continues executing the script to completion.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CallStackFrame `Get-PSCallStack` returns an object that represents the items in the call stack.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Random (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Random.md
Title: Get-Random
--- # Get-Random
-## Synopsis
+## SYNOPSIS
Gets a random number, or selects objects randomly from a collection.
-## Syntax
+## SYNTAX
### RandomNumberParameterSet (Default)
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [<Common
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Random` cmdlet gets a randomly selected number. If you submit a collection of objects to `Get-Random`, it gets one or more randomly selected objects from the collection.
objects returned from a collection, or a seed number.
> the current session until you use **SetSeed** again or close the session. You can't reset the seed > to its default value.
-## Examples
+## EXAMPLES
### Example 1: Get a random integer
Name Count
6 188 ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe one or more objects. `Get-Random` selects values randomly from the piped objects.
-## Outputs
+## OUTPUTS
### System.Int32, System.Int64, System.Double `Get-Random` returns an integer or floating-point number, or an object selected randomly from a submitted collection.
-## Notes
+## NOTES
By default, `Get-Random` generates cryptographically secure randomness using the [RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class.
the output type for each of the numeric input types.
Beginning in Windows PowerShell 3.0, `Get-Random` supports 64-bit integers. In Windows PowerShell 2.0, all values are cast to **System.Int32**.
-## Related links
+## RELATED LINKS
[System.Security.Cryptography.RandomNumberGenerator()](/dotnet/api/system.security.cryptography.randomnumbergenerator)
Microsoft.PowerShell.Utility Get Runspace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Runspace.md
Title: Get-Runspace
--- # Get-Runspace
-## Synopsis
+## SYNOPSIS
Gets active runspaces within a PowerShell host process.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Get-Runspace [-Id] <Int32[]> [<CommonParameters>]
Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Runspace` cmdlet gets active runspaces in a PowerShell host process.
-## Examples
+## EXAMPLES
### Example 1: Get runspaces
Id Name ComputerName Type State Availability
1 Runspace1 localhost Local Opened Busy ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to `Debug-Runspace`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Debug-Runspace](Debug-Runspace.md)
Microsoft.PowerShell.Utility Get Runspacedebug (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md
Title: Get-RunspaceDebug
--- # Get-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Shows runspace debugging options.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Get-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Get-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-RunspaceDebug` cmdlet shows runspace debugging options.
-## Examples
+## EXAMPLES
### 1: Show the state of the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Get Tracesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-TraceSource.md
Title: Get-TraceSource
--- # Get-TraceSource
-## Synopsis
+## SYNOPSIS
Gets PowerShell components that are instrumented for tracing.
-## Syntax
+## SYNTAX
``` Get-TraceSource [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TraceSource` cmdlet gets the trace sources for PowerShell components that are currently in use. You can use the data to determine which PowerShell components you can trace. When tracing, the
trace data to monitor data flow, program execution, and errors.
The tracing cmdlets were designed for PowerShell developers, but they are available to all users.
-## Examples
+## EXAMPLES
### Example 1: Get trace sources by name
Get-TraceSource
This command gets all of the PowerShell components that can be traced.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String You can pipe a string that contains the name of a trace source to `Get-TraceSource`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTraceSource `Get-TraceSource` returns objects that represent the trace sources.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TraceSource](Set-TraceSource.md)
Microsoft.PowerShell.Utility Get Typedata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-TypeData.md
Title: Get-TypeData
--- # Get-TypeData
-## Synopsis
+## SYNOPSIS
Gets the extended type data in the current session.
-## Syntax
+## SYNTAX
``` Get-TypeData [[-TypeName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TypeData` cmdlet gets the extended type data in the current session. This includes type data that was added to the session by `Types.ps1xml` file and dynamic type data that was added by
about dynamic type data that the `Update-TypeData` cmdlet adds, see `Update-Type
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all extended type data
The command gets the **DateTime** key in **Members** and its **GetScriptBlock**
The output shows the script block that creates the value of the **DateTime** property of every **System.DateTime** object in PowerShell.
-## Parameters
+## PARAMETERS
### -TypeName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe type names to `Get-TypeData`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.TypeData
-## Notes
+## NOTES
`Get-TypeData` gets only the extended type data in the current session. It does not get extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Get Uiculture (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-UICulture.md
Title: Get-UICulture
--- # Get-UICulture
-## Synopsis
+## SYNOPSIS
Gets the current UI culture settings in the operating system.
-## Syntax
+## SYNTAX
``` Get-UICulture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-UICulture` cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such
as menus and messages.
You can also use the `Get-Culture` cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.
-## Examples
+## EXAMPLES
### Example 1: Get the UI culture
This command displays the short date pattern for the current UI culture. To see
subproperties of the **DateTimeFormat** property of the UI culture, type `(Get-UICulture).DateTimeFormat | Get-Member`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo, Microsoft.PowerShell.VistaCultureInfo
You cannot pipe input to this cmdlet.
it returns a **CultureInfo** object. In Windows PowerShell 2.0, it returns a **VistaCultureInfo** object.
-## Notes
+## NOTES
You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the name of the current culture, and the `$PSUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Get Unique (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Unique.md
Title: Get-Unique
--- # Get-Unique
-## Synopsis
+## SYNOPSIS
Returns unique items from a sorted list.
-## Syntax
+## SYNTAX
### AsString (Default)
Get-Unique [-InputObject <PSObject>] [-AsString] [<CommonParameters>]
Get-Unique [-InputObject <PSObject>] [-OnType] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Unique` cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. The list must be sorted for the cmdlet to work properly.
and returns only one instance of each item. The list must be sorted for the cmdl
`Get-Unique` is case-sensitive. As a result, strings that differ only in character casing are considered to be unique.
-## Examples
+## EXAMPLES
### Example 1: Get unique words in a text file
The **AsString** parameter tells `Get-Unique` to treat the **ProcessName** value
Without this parameter, `Get-Unique` treats the **ProcessName** values as objects and returns only one instance of the object, that is, the first process name in the list.
-## Parameters
+## PARAMETERS
### -AsString
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any type of object to `Get-Unique`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject The type of object that `Get-Unique` returns is determined by the input.
-## Notes
+## NOTES
You can also refer to `Get-Unique` by its built-in alias, `gu`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md). To sort a list, use Sort-Object. You can also use the **Unique** parameter of `Sort-Object` to find the unique items in a list.
-## Related links
+## RELATED LINKS
[Select-Object](Select-Object.md)
Microsoft.PowerShell.Utility Get Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Get-Variable.md
Title: Get-Variable
--- # Get-Variable
-## Synopsis
+## SYNOPSIS
Gets the variables in the current console.
-## Syntax
+## SYNTAX
``` Get-Variable [[-Name] <String[]>] [-ValueOnly] [-Include <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Variable` cmdlet gets the PowerShell variables in the current console. You can retrieve just the values of the variables by specifying the **ValueOnly** parameter, and you can filter the variables returned by name.
-## Examples
+## EXAMPLES
### Example 1: Get variables by letter
Get-Variable -Scope 0
Compare-Object (Get-Variable -Scope 0) (Get-Variable -Scope 1) ```
-## Parameters
+## PARAMETERS
### -Exclude
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the variable name to `Get-Variable`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSVariable
When you specify the **ValueOnly** parameter, if the specified variable's value
processing the variable's values one at a time. A workaround to force collection enumeration is to enclose the `Get-Variable` command in parenthesis.
-## Notes
+## NOTES
- This cmdlet does not manage environment variables. To manage environment variables, you can use the environment variable provider.
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Group Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Group-Object.md
Title: Group-Object
# Group-Object
-## Synopsis
+## SYNOPSIS
Groups objects that contain the same value for specified properties.
-## Syntax
+## SYNTAX
### HashTable
Group-Object [-NoElement] [-AsHashTable] [-AsString] [-InputObject <PSObject>]
[[-Property] <Object[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Group-Object` cmdlet displays objects in groups based on the value of a specified property. `Group-Object` returns a table with one row for each property value and a column that displays the
number of items with that value.
If you specify more than one property, `Group-Object` first groups them by the values of the first property, and then, within each property group, it groups by the value of the next property.
-## Examples
+## EXAMPLES
### Example 1: Group files by extension
Cmdlet Get-AppLockerPolicy 2.0.0.0 AppLocker
... ```
-## Parameters
+## PARAMETERS
### -AsHashTable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Group-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GroupInfo or System.Collections.Hashtable When you use the **AsHashTable** parameter, `Group-Object` returns a **Hashtable** object. Otherwise, it returns a **GroupInfo** object.
-## Notes
+## NOTES
You can use the **GroupBy** parameter of the formatting cmdlets, such as `Format-Table` and `Format-List`, to group objects. Unlike `Group-Object`, which creates a single table with a row for
following rules:
Objects that don't have a specified property can't be grouped. Objects that aren't grouped appear in the final **GroupInfo** object output in a group named `AutomationNull.Value`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Import Alias (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-Alias.md
Title: Import-Alias
--- # Import-Alias
-## Synopsis
+## SYNOPSIS
Imports an alias list from a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-What
[<CommonParameters>] ```
-## Description
+## 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.
-## Examples
+## EXAMPLES
### Example 1: Import aliases from a file
Import-Alias test.txt
This command imports alias information from a file named test.txt.
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Alias`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Import-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Import Clixml (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-Clixml.md
Title: Import-Clixml
# Import-Clixml
-## Synopsis
+## SYNOPSIS
Imports a CLIXML file and creates corresponding objects in PowerShell.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Clixml -LiteralPath <String[]> [-IncludeTotalCount] [-Skip <UInt64>] [-Fi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Clixml` cmdlet imports a Common Language Infrastructure (CLI) XML file with data that represents Microsoft .NET Framework objects and creates the PowerShell objects. For more information
that were exported as secure XML using `Export-Clixml`. For an example, see Exam
`Import-Clixml` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import a serialized file and recreate an object
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -First
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
+## INPUTS
### System.String You can pipeline a string that contains a path to `Import-Clixml`.
-## Outputs
+## OUTPUTS
### PSObject `Import-Clixml` returns objects that were deserialized from the stored XML files.
-## Notes
+## NOTES
When specifying multiple values for a parameter, use commas to separate the values. For example, `<parameter-name> <value1>, <value2>`.
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Import Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md
Title: Import-Csv
--- # Import-Csv
-## Synopsis
+## SYNOPSIS
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Import-Csv [[-Path] <string[]>] -UseCulture [-LiteralPath <string[]>] [-Header <
[-Encoding <string>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
`Import-Csv` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns the objects described by the content in the CSV file.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings by using the **ToString()**
object, so they are represented by the name of the property value. `Export-Csv` does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Localizeddata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md
Title: Import-LocalizedData
--- # Import-LocalizedData
-## Synopsis
+## SYNOPSIS
Imports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
-## Syntax
+## SYNTAX
``` Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-LocalizedData` cmdlet dynamically retrieves strings from a subdirectory whose name matches the UI language set for the current user of the operating system. It is designed to enable
it easy for scripts to display user messages in the UI language of the current u
information about this and about the format of the `.psd1` files, see [about_Script_Internationalization](../Microsoft.PowerShell.Core/About/about_Script_Internationalization.md).
-## Examples
+## EXAMPLES
### Example 1: Import text strings
The sample output shows the results of running both scripts when the UI culture
and there are no matching files or directories for that UI culture. `Day1.ps1` displays an error message and English output. `Day2.ps1` just displays the English output.
-## Parameters
+## PARAMETERS
### -BaseDirectory
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable `Import-LocalizedData` saves the hash table in the variable that is specified by the value of the **BindingVariable** parameter.
-## Notes
+## NOTES
- Before using `Import-LocalizedData`, localize your user messages. Format the messages for each locale (UI culture) in a hash table of key-value pairs, and save the hash table in a file with the
You cannot pipe input to this cmdlet.
For more information, see [about_Script_Internationalization](../Microsoft.Powershell.Core/About/about_Script_Internationalization.md).
-## Related links
+## RELATED LINKS
[Write-Host](Write-Host.md)
Microsoft.PowerShell.Utility Import Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-PSSession.md
Title: Import-PSSession
--- # Import-PSSession
-## Synopsis
+## SYNOPSIS
Imports commands from another session into the current session.
-## Syntax
+## SYNTAX
``` Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <Stri
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PSSession` cmdlet imports commands , such as cmdlets, functions, and aliases, from a PSSession on a local or remote computer into the current session. You can import any command that
Beginning in Windows PowerShell 3.0, you can use the `Import-Module` cmdlet to i
remote session into the current session. This feature uses implicit remoting. It is equivalent to using `Import-PSSession` to import selected modules from a remote session into the current session.
-## Examples
+## EXAMPLES
### Example 1: Import all commands from a PSSession
which returns the module name.
The `Get-Command` command is the equivalent of `Get-Command $M.Name`".
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
You cannot pipe objects to this cmdlet.
However, the imported module is temporary and exists only in the current session. To create a permanent module on disk, use the `Export-PSSession` cmdlet.
-## Notes
+## NOTES
- `Import-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for WS-Management remoting. For more information, see
permanent module on disk, use the `Export-PSSession` cmdlet.
include the prefix that you assign by using the **Prefix** parameter. To get help for an imported command in Windows PowerShell 2.0, use the original (non-prefixed) command name.
-## Related links
+## RELATED LINKS
[Export-PSSession](Export-PSSession.md)
Microsoft.PowerShell.Utility Import Powershelldatafile (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md
Title: Import-PowerShellDataFile
--- # Import-PowerShellDataFile
-## Synopsis
+## SYNOPSIS
Imports values from a `.PSD1` file without invoking its contents.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-PowerShellDataFile [[-Path] <String[]>] [<CommonParameters>]
Import-PowerShellDataFile [-LiteralPath <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a `.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
However, `Invoke-Expression` runs any code contained in the file. This could pro
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the code.
-## Examples
+## EXAMPLES
### Example 1: Retrieve values from PSD1
NodeName DSC-01
NodeName DSC-02 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Expression](Invoke-Expression.md)
Microsoft.PowerShell.Utility Invoke Expression (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Invoke-Expression.md
Title: Invoke-Expression
--- # Invoke-Expression
-## Synopsis
+## SYNOPSIS
Runs commands or expressions on the local computer.
-## Syntax
+## SYNTAX
``` Invoke-Expression [-Command] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Expression` cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without `Invoke-Expression`, a string submitted at the command
Expressions are evaluated and run in the current scope. For more information, se
> before running it. In general, it is best to design your script with predefined input options, > rather than allowing freeform input.
-## Examples
+## EXAMPLES
### Example 1: Evaluate an expression
command fails if the example number is not valid.
> If the example code from the help file has output in the example, PowerShell attempts to run the > output along with the code and an error will be thrown.
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String or PSObject You can pipe an object that represents the command to `Invoke-Expression`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### PSObject Returns the output that is generated by the invoked command (the value of the **Command** parameter).
-## Notes
+## NOTES
In most cases, you invoke expressions using PowerShell's call operator and achieve the same results. The call operator is a safer method. For more information, see [about_Operators](../microsoft.powershell.core/about/about_operators.md#call-operator-).
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Invoke Restmethod (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
Title: Invoke-RestMethod
# Invoke-RestMethod
-## Synopsis
+## SYNOPSIS
Sends an HTTP or HTTPS request to a RESTful web service.
-## Syntax
+## SYNTAX
``` Invoke-RestMethod [-Method <WebRequestMethod>] [-UseBasicParsing] [-Uri] <Uri>
Invoke-RestMethod [-Method <WebRequestMethod>] [-UseBasicParsing] [-Uri] <Uri>
[-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that return richly structured data.
This cmdlet is introduced in Windows PowerShell 3.0.
> By default, script code in the web page may be run when the page is being parsed to populate the > `ParsedHtml` property. Use the **UseBasicParsing** switch to suppress this.
-## Examples
+## EXAMPLES
### Example 1: Get the PowerShell RSS feed
$x
30 ```
-## Parameters
+## PARAMETERS
### -Body
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## Outputs
+## OUTPUTS
### System.Xml.XmlDocument, Microsoft.PowerShell.Commands.HtmlWebResponseObject, System.String
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a PSObject that represents the strings.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Invoke Webrequest (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
Title: Invoke-WebRequest
--- # Invoke-WebRequest
-## Synopsis
+## SYNOPSIS
Gets content from a web page on the Internet.
-## Syntax
+## SYNTAX
``` Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSession>] [-SessionVariable <String>]
Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSessio
[-TransferEncoding <String>] [-InFile <String>] [-OutFile <String>] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WebRequest` cmdlet sends HTTP, HTTPS, FTP, and FILE requests to a web page or web service. It parses the response and returns collections of forms, links, images, and other
This cmdlet was introduced in Windows PowerShell 3.0.
> However, since the `contoso.com` sites do not exist, the examples do not work. Adapt the examples > to hosts in your environment.
-## Examples
+## EXAMPLES
### Example 1: Send a web request
$StatusCode
The terminating error is caught by the `catch` block, which retrieves the **StatusCode** from the **Exception** object.
-## Parameters
+## PARAMETERS
### -Body
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-WebRequest`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HtmlWebResponseObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-RestMethod](Invoke-RestMethod.md)
Microsoft.PowerShell.Utility Measure Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Measure-Command.md
Title: Measure-Command
--- # Measure-Command
-## Synopsis
+## SYNOPSIS
Measures the time it takes to run script blocks and cmdlets.
-## Syntax
+## SYNTAX
``` Measure-Command [-InputObject <PSObject>] [-Expression] <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Command` cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.
operation, and returns the execution time.
> [!NOTE] > Script blocks run by `Measure-Command` run in the current scope, not a child scope.
-## Examples
+## EXAMPLES
### Example 1: Measure a command
Value 2
For more information about the invocation operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#call-operator-).
-## Parameters
+## PARAMETERS
### -Expression
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe an object to `Measure-Command`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `Measure-Command` returns a time span object that represents the result.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Measure Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Measure-Object.md
Title: Measure-Object
--- # Measure-Object
-## Synopsis
+## SYNOPSIS
Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
-## Syntax
+## SYNTAX
### GenericMeasure (Default)
Measure-Object [-InputObject <PSObject>] [[-Property] <String[]>] [-Line] [-Word
[-IgnoreWhiteSpace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Object` cmdlet calculates the property values of certain types of object. `Measure-Object` performs three types of measurements, depending on the parameters in the command.
The `Measure-Object` cmdlet performs calculations on the property values of obje
**Average** of numeric values. For **String** objects, you can also use `Measure-Object` to count the number of lines, words, and characters.
-## Examples
+## EXAMPLES
### Example 1: Count the files and folders in a directory
Lines Words Characters Property
3 5 ```
-## Parameters
+## PARAMETERS
### -Average
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Measure-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GenericMeasureInfo
You can pipe objects to `Measure-Object`.
If you use the **Word** parameter, `Measure-Object` returns a **TextMeasureInfo** object. Otherwise, it returns a **GenericMeasureInfo** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility New Alias (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-Alias.md
Title: New-Alias
# New-Alias
-## Synopsis
+## SYNOPSIS
Creates a new alias.
-## Syntax
+## SYNTAX
``` New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Alias` cmdlet creates a new alias in the current Windows PowerShell session. Aliases created by using `New-Alias` are not saved after you exit the session or close Windows PowerShell. You can use the `Export-Alias` cmdlet to save your alias information to a file. You can later use `Import-Alias` to retrieve that saved alias information.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
description, quick wmi alias, for the alias and makes it read-only. The last lin
uses `Get-Alias` to get the new alias and pipes it to Format-List to display all of the information about it.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **Passthru** parameter, `New-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the new alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To change an alias, use `Set-Alias`. To delete an alias, use `Remove-Item`.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility New Event (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-Event.md
Title: New-Event
--- # New-Event
-## Synopsis
+## SYNOPSIS
Creates a new event.
-## Syntax
+## SYNTAX
``` New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Event` cmdlet creates a new custom event.
the event subscription by using the `Unregister-Event` cmdlet, the event subscri
are deleted from the session. If you do not subscribe to the custom event, to delete the event, you must change the program conditions or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Create a new event in the event queue
Instrumentation (WMI) event that is raised when a new process is created. The co
Because the events that `New-Event` raises are automatically added to the PowerShell event queue, you do not need to register for that event.
-## Parameters
+## PARAMETERS
### -EventArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
The new custom event, the event subscription, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility New Guid (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-Guid.md
Title: New-Guid
# New-Guid
-## Synopsis
+## SYNOPSIS
Creates a GUID.
-## Syntax
+## SYNTAX
``` New-Guid [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Guid` cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
-## Examples
+## EXAMPLES
### Example 1: Create a GUID
New-Guid
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Guid This cmdlet returns a GUID.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-Object.md
Title: New-Object
--- # New-Object
-## Synopsis
+## SYNOPSIS
Creates an instance of a Microsoft .NET Framework or COM object.
-## Syntax
+## SYNTAX
### Net (Default)
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictio
New-Object [-ComObject] <String> [-Strict] [-Property <IDictionary>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Object` cmdlet creates an instance of a .NET Framework or COM object.
you type the fully qualified name of a .NET Framework class and the cmdlet retur
instance of that class. To create an instance of a COM object, use the **ComObject** parameter and specify the ProgID of the object as its value.
-## Examples
+## EXAMPLES
### Example 1: Create a System.Version object
members of `$array` to parameters of the constructor but the constructor does no
parameter. Wrapping `$array` in another array prevents PowerShell from attempting to bind the three members of `$array` to parameters of the constructor.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Object `New-Object` returns the object that is created.
-## Notes
+## NOTES
- `New-Object` provides the most commonly-used functionality of the VBScript CreateObject function. A statement like `Set objShell = CreateObject("Shell.Application")` in VBScript can be
You cannot pipe input to this cmdlet.
- `New-Object` expands upon the functionality available in the Windows Script Host environment by making it easy to work with .NET Framework objects from the command line and within scripts.
-## Related links
+## RELATED LINKS
[about_Object_Creation](../Microsoft.PowerShell.Core/About/about_Object_Creation.md)
Microsoft.PowerShell.Utility New Temporaryfile (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md
Title: New-TemporaryFile
--- # New-TemporaryFile
-## Synopsis
+## SYNOPSIS
Creates a temporary file.
-## Syntax
+## SYNTAX
``` New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates temporary files that you can use in scripts.
order and uses the first path found:
- On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary file
$TempFile = New-TemporaryFile
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file in the `$TempFile` variable. You can use this file later in your script.
-## Parameters
+## PARAMETERS
### -Confirm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a **FileInfo** object that represents the temporary file.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Timespan (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-TimeSpan.md
Title: New-TimeSpan
--- # New-TimeSpan
-## Synopsis
+## SYNOPSIS
Creates a TimeSpan object.
-## Syntax
+## SYNTAX
### Date (Default)
New-TimeSpan [[-Start] <DateTime>] [[-End] <DateTime>] [<CommonParameters>]
New-TimeSpan [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Seconds <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-TimeSpan` cmdlet creates a **TimeSpan** object that represents a time interval. You can use a **TimeSpan** object to add or subtract time from **DateTime** objects.
You can use a **TimeSpan** object to add or subtract time from **DateTime** obje
Without parameters, a `New-TimeSpan` command returns a **TimeSpan** object that represents a time interval of zero.
-## Examples
+## EXAMPLES
### Example 1: Create a TimeSpan object for a specified duration
TotalSeconds : 27813562.3127728
TotalMilliseconds : 27813562312.7728 ```
-## Parameters
+## PARAMETERS
### -Days
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a **DateTime** object that represents that start time to `New-TimeSpan`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `New-TimeSpan` returns an object that represents the time span.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility New Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/New-Variable.md
Title: New-Variable
# New-Variable
-## Synopsis
+## SYNOPSIS
Creates a new variable.
-## Syntax
+## SYNTAX
``` New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Opti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Variable` cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
a variable, and determine whether variables are public or private.
Typically, you create a new variable by typing the variable name and its value, such as `$Var = 3`, but you can use the `New-Variable` cmdlet to use its parameters.
-## Examples
+## EXAMPLES
### Example 1: Create a variable
abc123xyz
This command demonstrates that variables with spaces can be created. The variables can be accessed using the `Get-Variable` cmdlet or directly by delimiting a variable with braces.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### System.Object You can pipe a value to `New-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `New-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Out File (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Out-File.md
Title: Out-File
--- # Out-File
-## Synopsis
+## SYNOPSIS
Sends output to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Out-File [[-Encoding] <string>] -LiteralPath <string> [-Append] [-Force] [-NoClo
[-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means
that the output may not be ideal for programmatic processing unless all input ob
When you need to specify parameters for the output, use `Out-File` rather than the redirection operator (`>`). For more information about redirection, see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md).
-## Examples
+## EXAMPLES
### Example 1: Send output and create a file
DemoDefaultOutFileWidth
For more information about `$PSDefaultParameterValues`, see [about_Preference_Variables](../Microsoft.Powershell.Core/About/about_preference_variables.md#psdefaultparametervalues).
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-File`.
-## Outputs
+## OUTPUTS
### None `Out-File` does not generate any output.
-## Notes
+## NOTES
Input objects are automatically formatted as they would be in the terminal, but you can use a `Format-*` cmdlet to explicitly control the formatting of the output to the file. For example,
cmdlet.
`Out-File` saves data to a file but it does not produce any output objects to the pipeline.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.Powershell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Out Gridview (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Out-GridView.md
Title: Out-GridView
--- # Out-GridView
-## Synopsis
+## SYNOPSIS
Sends output to an interactive table in a separate window.
-## Syntax
+## SYNTAX
### PassThru (Default)
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputMod
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-GridView` cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table.
You can use the following features of the table to examine your data:
For full instructions, see the [Notes](#notes) section of this article.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a grid view
This command line can be used in a Windows shortcut. Without the **Wait** parame
would exit as soon as the `Out-GridView` window opened, which would close the `Out-GridView` window almost immediately.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None Normally, `Out-GridView` does not return any objects. When using the **PassThru** parameter, the objects representing the selected rows are returned to the pipeline.
-## Notes
+## NOTES
You cannot use a remote command to open a grid view window on another computer.
The criteria only affects the display. It does not delete items from the table.
- To delete selected criteria, click the red X beside each criterion. - To delete all criteria, click the **Clear All** button.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out Printer (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Out-Printer.md
Title: Out-Printer
# Out-Printer
-## Synopsis
+## SYNOPSIS
Sends output to a printer.
-## Syntax
+## SYNTAX
``` Out-Printer [[-Name] <String>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Printer` cmdlet sends output to the default printer or to an alternate printer, if one is specified.
specified.
> This cmdlet was reintroduced in PowerShell 7. This cmdlet is only available on Windows systems > that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1 - Send a file to be printed on the default printer
Out-Printer -InputObject $H
`Get-Help` gets the full version of the Help topic for `Get-CimInstance` and stores it in the `$H` variable. The **InputObject** parameter passes the value of `$H` to `Out-Printer`.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-Printer`.
-## Outputs
+## OUTPUTS
### None `Out-Printer` does not return any objects.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb do not format objects. They just render them and send them to the specified display destination. If you send an unformatted object to an `Out` cmdlet, the
cmdlet sends it to a formatting cmdlet before rendering it.
you pipe the output of `Out-Printer` to `Get-Member`, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out String (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Out-String.md
Title: Out-String
# Out-String
-## Synopsis
+## SYNOPSIS
Outputs input objects as a string.
-## Syntax
+## SYNTAX
### All
Outputs input objects as a string.
Out-String [-Stream] [-Width <Int32>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-String` cmdlet converts input objects into strings. By default, `Out-String` accumulates the strings and returns them as a single string, but you can use the **Stream**
parameter to direct `Out-String` to return one line at a time or create an array
cmdlet lets you search and manipulate string output as you would in traditional shells when object manipulation is less convenient.
-## Examples
+## EXAMPLES
### Example 1: Get the current culture and convert the data to strings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-String`.
-## Outputs
+## OUTPUTS
### System.String `Out-String` returns the string that it creates from the input object.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb don't format objects. The `Out` cmdlets send objects to the formatter for the specified display destination.
-## Related links
+## RELATED LINKS
[about_Formatting](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md)
Microsoft.PowerShell.Utility Read Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Read-Host.md
Title: Read-Host
--- # Read-Host
-## Synopsis
+## SYNOPSIS
Reads a line of input from the console.
-## Syntax
+## SYNTAX
``` Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 8190 characters it can accept as input from a user.
-## Examples
+## EXAMPLES
### Example 1: Save console input to a variable
value is stored as a **SecureString** object in the `$pwd_secure_string` variabl
$pwd_secure_string = Read-Host "Enter a Password" -AsSecureString ```
-## Parameters
+## PARAMETERS
### -AsSecureString
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept input from the PowerShell pipeline.
-## Outputs
+## OUTPUTS
### System.String or System.Security.SecureString If the **AsSecureString** parameter is used, `Read-Host` returns a **SecureString**. Otherwise, it returns a string.
-## Notes
+## NOTES
This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is connected to the keyboard of the host console.
-## Related links
+## RELATED LINKS
[Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Utility Register Engineevent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Register-EngineEvent.md
Title: Register-EngineEvent
# Register-EngineEvent
-## Synopsis
+## SYNOPSIS
Subscribes to events that are generated by the PowerShell engine and by the `New-Event` cmdlet.
-## Syntax
+## SYNTAX
``` Register-EngineEvent [-SourceIdentifier] <String> [[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-EngineEvent` cmdlet subscribes to events that are generated by the PowerShell engine and the `New-Event` cmdlet. Use the **SourceIdentifier** parameter to specify the event.
the `Unregister-Event` cmdlet, which deletes the event subscriber from the sessi
When the subscribed event is raised, it is added to the event queue in your session. To get events in the event queue, use the `Get-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Register a PowerShell engine event on remote computers
The `Unregister-Event` cmdlet stops the job associated with the event subscripti
Id 19 is still running and creating new events. We use the **Job** cmdlets stop the job and remove the unneeded job objects. `Get-Content` displays the contents of the log file.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Register-EngineEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob If you use the **Action** parameter, `Register-EngineEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
when PowerShell has been idle for 300 milliseconds (ms).
> 2.2.0-beta4, **OnIdle** behavior changed to signal the event only if there is a `ReadKey()` > timeout and the current editing buffer is empty.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Register Objectevent (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md
Title: Register-ObjectEvent
--- # Register-ObjectEvent
-## Synopsis
+## SYNOPSIS
Subscribes to the events that are generated by a Microsoft .NET Framework object.
-## Syntax
+## SYNTAX
``` Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceId
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ObjectEvent` cmdlet subscribes to events that are generated by .NET objects on the local computer or on a remote computer.
When you subscribe to an event, an event subscriber is added to your session. To
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events when a new process starts
value of the `$Random` variable.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None You cannot pipe objects to `Register-ObjectEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob When you use the **Action** parameter, `Register-ObjectEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Event (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Remove-Event.md
Title: Remove-Event
# Remove-Event
-## Synopsis
+## SYNOPSIS
Deletes events from the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Remove-Event [-SourceIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameter
Remove-Event [-EventIdentifier] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Event` cmdlet deletes events from the event queue in the current session. This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Remove an event by source identifier
PS C:\> Get-Event | Remove-Event
This command deletes all events from the event queue.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventArgs You can pipe events from `Get-Event` to `Remove-Event`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Deletes breakpoints from the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
not function.
information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Remove all breakpoints
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator (`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint[]
You can pipe breakpoint objects to `Remove-PSBreakpoint`.
### System.Management.Automation.Runspaces.Runspace
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Typedata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Remove-TypeData.md
Title: Remove-TypeData
# Remove-TypeData
-## Synopsis
+## SYNOPSIS
Deletes extended types from the current session.
-## Syntax
+## SYNTAX
### RemoveTypeDataSet (Default)
Remove-TypeData [-TypeName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-TypeData -Path <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-TypeData` cmdlet deletes extended type data from the current session. This cmdlet affects only the current session and sessions that are created in the current session.
files, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/about/about_Types.p
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Remove type data for a specified type
cmdlet to remove extended type data for all CIM types in the sessions in the `$S
Invoke-Command -Session $S {Get-TypeData -TypeName *CIM* | Remove-TypeData} ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.TypeData
You can pipe **TypeData** object, such as the ones that the `Get-TypeData` cmdle
You can pipe the type names to `Remove-TypeData`. When you pipe an object to `Remove-TypeData`, `Remove-TypeData` gets the type name of the object and removes all type data for the object type.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-TypeData` can remove only the extended type data in the current session. It cannot remove extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[Get-TypeData](Get-TypeData.md)
Microsoft.PowerShell.Utility Remove Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Remove-Variable.md
Title: Remove-Variable
--- # Remove-Variable
-## Synopsis
+## SYNOPSIS
Deletes a variable and its value.
-## Syntax
+## SYNTAX
``` Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Variable` cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
-## Examples
+## EXAMPLES
### Example 1: Remove a variable
Remove-Variable Smp
This command deletes the `$Smp` variable.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### System.Management.Automation.PSVariable You can pipe a variable object to `Remove-Variable`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- Changes affect only the current scope, such as a session. To delete a variable from all sessions, add a `Remove-Variable` command to your PowerShell profile.
This cmdlet does not return any output.
- You can also refer to `Remove-Variable` by its built-in alias, `rv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Select Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Select-Object.md
Title: Select-Object
--- # Select-Object
-## Synopsis
+## SYNOPSIS
Selects objects or object properties.
-## Syntax
+## SYNTAX
### DefaultParameter (Default)
Select-Object [-InputObject <PSObject>] [[-Property] <Object[]>] [-ExcludeProper
Select-Object [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Object` cmdlet selects specified properties of an object or set of objects. It can also select unique objects, a specified number of objects, or objects in a specified position in an
objects is generated, even when the command that generates the objects appears b
`Select-Object` command in the pipeline. To turn off this optimizing behavior, use the **Wait** parameter.
-## Examples
+## EXAMPLES
### Example 1: Select objects by property
Diagnostics.Format.ps1xml 4.955078125 223
DotNetTypes.format.ps1xml 134.9833984375 223 ```
-## Parameters
+## PARAMETERS
### -ExcludeProperty
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Select-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject
-## Notes
+## NOTES
- You can also refer to the `Select-Object` cmdlet by its built-in alias, `select`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
You can pipe any object to `Select-Object`.
information, see _Write Single Records to the Pipeline_ in [Strongly Encouraged Development Guidelines](/powershell/scripting/developer/windows-powershell).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Select String (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Select-String.md
Title: Select-String
# Select-String
-## Synopsis
+## SYNOPSIS
Finds text in strings and files.
-## Syntax
+## SYNTAX
### File (Default)
Select-String [-Pattern] <String[]> -LiteralPath <String[]> [-SimpleMatch] [-Cas
[-Context <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
You can also specify that `Select-String` should expect a particular character e
when you're searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Find a case-sensitive match
Name foo
Piping to `Out-String -Stream` converts the formatted output into a multiple single-line string objects. This means that when `Select-String` finds a match it outputs only the matching line.
-## Parameters
+## PARAMETERS
### -AllMatches
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has a **ToString** method to `Select-String`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MatchInfo or System.Boolean By default, the output is a set of **MatchInfo** objects with one for each match found. If you use the **Quiet** parameter, the output is a Boolean value indicating whether the pattern was found.
-## Notes
+## NOTES
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
To find the properties of a **MatchInfo** object, type the following command:
`Select-String -Path test.txt -Pattern 'test' | Get-Member | Format-List -Property *`
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Select Xml (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Select-Xml.md
Title: Select-Xml
--- # Select-Xml
-## Synopsis
+## SYNOPSIS
Finds text in an XML string or document.
-## Syntax
+## SYNTAX
### Xml (Default)
Select-Xml [-XPath] <string> -LiteralPath <string[]> [-Namespace <hashtable>] [<
Select-Xml [-XPath] <string> -Content <string[]> [-Namespace <hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Xml` cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the **Content**, **Path**, or **Xml** parameter to specify the XML to be searched.
-## Examples
+## EXAMPLES
### Example 1: Select AliasProperty nodes
Select-Xml -Path $Home\Documents\WindowsPowerShell\Snippets -Namespace $SnippetN
ForEach-Object {$_.Node.Innerxml} ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String or System.Xml.XmlNode You can pipe a path or XML node to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.SelectXmlInfo
-## Notes
+## NOTES
XPath is a standard language that is designed to identify parts of an XML document. For more information about the XPath language, see [XPath Reference](/dotnet/standard/data/xml/select-nodes-using-xpath-navigation) and the Selection Filters section of [Event Selection](/previous-versions//aa385231(v=vs.85)).
-## Related links
+## RELATED LINKS
[ConvertTo-Xml](ConvertTo-Xml.md)
Microsoft.PowerShell.Utility Send Mailmessage (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Send-MailMessage.md
Title: Send-MailMessage
--- # Send-MailMessage
-## Synopsis
+## SYNOPSIS
Sends an email message.
-## Syntax
+## SYNTAX
### All
Send-MailMessage [-To] <string[]> [-Subject] <string> [[-Body] <string>] [[-Smtp
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Send-MailMessage` cmdlet sends an email message from within PowerShell.
information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About
> not use `Send-MailMessage`. For more information, see > [Platform Compatibility note DE0005](https://aka.ms/SendMailMessage).
-## Examples
+## EXAMPLES
### Example 1: Send an email from one person to another person
The **Credential** parameter specifies a domain administrator's credentials are
message. The **UseSsl** parameter specifies that Secure Socket Layer (SSL) creates a secure connection.
-## Parameters
+## PARAMETERS
### -Attachments
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
+## INPUTS
### System.String You can pipe the path and file names of attachments to `Send-MailMessage`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
Microsoft.PowerShell.Utility Set Alias (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-Alias.md
Title: Set-Alias
# Set-Alias
-## Synopsis
+## SYNOPSIS
Creates or changes an alias for a cmdlet or other command in the current PowerShell session.
-## Syntax
+## SYNTAX
### Default (Default)
Set-Alias [-Name] <string> [-Value] <string> [-Description <string>] [-Option <S
[-PassThru] [-Scope <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Alias` cmdlet creates or changes an alias for a cmdlet or a command, such as a function, script, file, or other executable. An alias is an alternate name that refers to a cmdlet or command.
as the description.
An alias that is created or changed by `Set-Alias` is not permanent and is only available during the current PowerShell session. When the PowerShell session is closed, the alias is removed.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
Set-Alias -Name Go -Option ReadOnly, Private
The alias `Go` should already exist. After running the command above, the alias is not be able to be changed without using the **Force** parameter and is only available in the current scope.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### None `Set-Alias` does not accept input from the pipeline.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **PassThru** parameter, `Set-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the alias. Otherwise, `Set-Alias` does not generate any output.
-## Notes
+## NOTES
PowerShell includes built-in aliases that are available in each PowerShell session. The `Get-Alias` cmdlet displays the aliases available in a PowerShell session.
An alias can be saved and reused in another PowerShell session by doing an expor
save an alias to a file, use `Export-Alias`. To add a saved alias to a new PowerShell session, use `Import-Alias`.
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Utility Set Date (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-Date.md
Title: Set-Date
--- # Set-Date
-## Synopsis
+## SYNOPSIS
Changes the system time on the computer to a time that you specify.
-## Syntax
+## SYNTAX
### Date (Default)
Set-Date [-Date] <DateTime> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm
Set-Date [-Adjust] <TimeSpan> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Date` cmdlet changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a **Date
**TimeSpan** object to `Set-Date`. To specify a new date or time, use the **Date** parameter. To specify a change interval, use the **Adjust** parameter.
-## Examples
+## EXAMPLES
### Example 1: Add three days to the system date
$90mins = New-TimeSpan -Minutes 90
Set-Date -Adjust $90mins ```
-## Parameters
+## PARAMETERS
### -Adjust
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a date to `Set-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime `Set-Date` returns an object that represents the date that it set.
-## Notes
+## NOTES
- Use this cmdlet cautiously when changing the date and time on the computer. The change might prevent the computer from receiving system-wide events and updates that are triggered by a date or
You can pipe a date to `Set-Date`.
[TimeSpan Methods](/dotnet/api/system.timespan) in the .NET SDK.
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
Title: Set-PSBreakpoint
--- # Set-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Sets a breakpoint on a line, command, or variable.
-## Syntax
+## SYNTAX
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging P
For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint on a line
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Set-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You cannot pipe input to `Set-PSBreakpoint`.
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## Notes
+## NOTES
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Tracesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-TraceSource.md
Title: Set-TraceSource
--- # Set-TraceSource
-## Synopsis
+## SYNOPSIS
Configures, starts, and stops a trace of PowerShell components.
-## Syntax
+## SYNTAX
### optionsSet (Default)
Set-TraceSource [-Name] <String[]> [-RemoveListener <String[]>] [<CommonParamete
Set-TraceSource [-Name] <String[]> [-RemoveFileListener <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TraceSource` cmdlet configures, starts, and stops a trace of a PowerShell component. You can use it to specify which components will be traced and where the tracing output is sent.
-## Examples
+## EXAMPLES
### Example 1: Trace the ParameterBinding component
This command stops the trace of the **ParameterBinding** component of PowerShell
**Name** parameter to identify the component that was being traced and the **RemoveListener** parameter to identify the trace listener.
-## Parameters
+## PARAMETERS
### -Debugger
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a name to `Set-TraceSource`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSTraceSource
When you use the **PassThru** parameter, `Set-TraceSource` generates a
**System.Management.Automation.PSTraceSource** object representing the trace session. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
this cmdlet does not generate any output.
module are loaded automatically when the component is in use, and they appear in the output of `Get-TraceSource`.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Set Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md
Title: Set-Variable
--- # Set-Variable
-## Synopsis
+## SYNOPSIS
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## Syntax
+## SYNTAX
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## Examples
+## EXAMPLES
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## Parameters
+## PARAMETERS
### -Description
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Show Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Show-Command.md
Title: Show-Command
# Show-Command
-## Synopsis
+## SYNOPSIS
Displays PowerShell command information in a graphical window.
-## Syntax
+## SYNTAX
``` Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-Command` cmdlet lets you create a PowerShell command in a command window. You can use the features of the command window to run the command or have it return the command to you.
This cmdlet was introduced in PowerShell 3.0.
Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1: Open the Commands window
command, instead of creating a new command. When you run this command, the `Show
opens. You can use the window features to set parameter values. To run the command, click the **Run** button in the `Show-Command` window.
-## Parameters
+## PARAMETERS
### -ErrorPopup
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
+## INPUTS
### None You cannot pipe input to `Show-Command`.
-## Outputs
+## OUTPUTS
### None, System.String, System.Object
When you use the **PassThru** parameter, `Show-Command` returns a command string
**ErrorPopup** parameter, `Show-Command` returns the command output (any object). Otherwise, `Show-Command` does not generate any output.
-## Notes
+## NOTES
`Show-Command` does not work in remote sessions.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Sort Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Sort-Object.md
Title: Sort-Object
# Sort-Object
-## Synopsis
+## SYNOPSIS
Sorts objects by property values.
-## Syntax
+## SYNTAX
### Default (Default)
Sort-Object [[-Property] <Object[]>] [-Descending] [-Unique] [-InputObject <psob
[-Culture <string>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Sort-Object` cmdlet sorts objects in ascending or descending order based on object property values. If sort properties are not included in a command, PowerShell uses default sort properties
tables to sort in ascending order, descending order, or a combination of sort or
sorted as case-sensitive or case-insensitive. Use the **Unique** parameter to eliminate duplicates from the output.
-## Examples
+## EXAMPLES
### Example 1: Sort the current directory by name
The `Get-ChildItem` cmdlet gets the files from the directory specified by the **
down the pipeline to the `Sort-Object` cmdlet. `Sort-Object` uses the **Length** and **Name** parameter to sort the files by length in ascending order. Since `File01.txt` and `File03.txt` have the same length, they are further sorted by their property **Name**.
-## Parameters
+## PARAMETERS
### -CaseSensitive
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be sorted to `Sort-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Sort-Object` returns the sorted objects.
-## Notes
+## NOTES
The `Sort-Object` cmdlet sorts objects based on properties specified in the command or the default sort properties for the object type. Default sort properties are defined using the `PropertySet`
values. For Windows services, **Stopped** has a value of **1** and **Running** h
**Stopped** is sorted before **Running** because of the enumerated values. For more information, see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Start Sleep (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Start-Sleep.md
Title: Start-Sleep
--- # Start-Sleep
-## Synopsis
+## SYNOPSIS
Suspends the activity in a script or session for the specified period of time.
-## Syntax
+## SYNTAX
### Seconds (Default)
Start-Sleep [-Seconds] <Int32> [<CommonParameters>]
Start-Sleep -Milliseconds <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Sleep` cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.
-## Examples
+## EXAMPLES
### Example 1: Sleep all commands for 15 seconds
Start-Sleep -m 500
This command makes all the commands in the session sleep for one-half of a second (500 milliseconds).
-## Parameters
+## PARAMETERS
### -Milliseconds
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int32 You can pipe the number of seconds to `Start-Sleep`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You can also refer to `Start-Sleep` by its built-in alias, `sleep`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
This cmdlet does not return any output.
- `Ctrl+C` does not break out of `[Threading.Thread]::Sleep`. For more information, see [Thread.Sleep Method](/dotnet/api/system.threading.thread.sleep).
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Tee Object (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Tee-Object.md
Title: Tee-Object
--- # Tee-Object
-## Synopsis
+## SYNOPSIS
Saves command output in a file or variable and also sends it down the pipeline.
-## Syntax
+## SYNTAX
### File (Default)
Tee-Object [-InputObject <PSObject>] -LiteralPath <String> [<CommonParameters>]
Tee-Object [-InputObject <PSObject>] -Variable <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Tee-Object` cmdlet redirects output, that is, it sends the output of a command in two directions (like the letter T). It stores the output in a file or variable and also sends it down the pipeline. If `Tee-Object` is the last command in the pipeline, the command output is displayed at the prompt.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a file and to the console
drive. A pipeline operator (`|`) sends the list to `Tee-Object`, which appends t
AllSystemFiles.txt file and passes the list down the pipeline to the `Out-File` cmdlet, which saves the list in the `NewSystemFiles.txt file`.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Tee-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Tee-Object` returns the object that it redirects.
-## Notes
+## NOTES
You can also use the `Out-File` cmdlet or the redirection operator, both of which save the output in a file but do not send it down the pipeline.
a file but do not send it down the pipeline.
`Tee-Object` uses "Unicode" (UTF-16LE) encoding when it writes to files. If you need a different encoding, use the `Out-File` cmdlet with the **Encoding** parameter.
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility Trace Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Trace-Command.md
Title: Trace-Command
# Trace-Command
-## Synopsis
+## SYNOPSIS
Configures and starts a trace of the specified expression or command.
-## Syntax
+## SYNTAX
### expressionSet (Default)
Trace-Command [-InputObject <PSObject>] [-Name] <String[]> [[-Option] <PSTraceSo
[-Debugger] [-PSHost] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Trace-Command` cmdlet configures and starts a trace of the specified expression or command. It works like Set-TraceSource, except that it applies only to the specified command.
-## Examples
+## EXAMPLES
### Example 1: Trace metadata processing, parameter binding, and an expression
the **InputObject** parameter. The **InputObject** parameter passes the variable
expression. In effect, the command being processed during the trace is `Get-Alias -InputObject $A" or "$A | Get-Alias`.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects that represent input to the expression to `Trace-Command`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject Returns the command trace in the debug stream.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
Returns the command trace in the debug stream.
**Expression**, **Option** or **Name**, **Command**, **Option**. If you include the parameter names, the parameters can appear in any order.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Unblock File (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Unblock-File.md
Title: Unblock-File
--- # Unblock-File
-## Synopsis
+## SYNOPSIS
Unblocks files that were downloaded from the Internet.
-## Syntax
+## SYNTAX
### ByPath (Default)
Unblock-File [-Path] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Unblock-File -LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unblock-File` cmdlet lets you open files that were downloaded from the Internet. It unblocks PowerShell script files that were downloaded from the Internet so you can run them, even when the
For more information about PowerShell execution policies, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Unblock a file
At line:1 char:1
PS C:\> Get-Item C:\ps-test\Start-ActivityTracker.ps1 | Unblock-File ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a file path to `Unblock-File`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Unblock-File` cmdlet works only in file system drives. - `Unblock-File` performs the same operation as the **Unblock** button on the **Properties** dialog
This cmdlet does not generate any output.
- If you use the `Unblock-File` cmdlet on a file that is not blocked, the command has no effect on the unblocked file and the cmdlet does not generate errors.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Utility Unregister Event (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Unregister-Event.md
Title: Unregister-Event
# Unregister-Event
-## Synopsis
+## SYNOPSIS
Cancels an event subscription.
-## Syntax
+## SYNTAX
### BySource (Default)
Unregister-Event [-SourceIdentifier] <String> [-Force] [-WhatIf] [-Confirm] [<Co
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-Event` cmdlet cancels an event subscription that was created by using the `Register-EngineEvent`, `Register-ObjectEvent`, or `Register-WmiEvent` cmdlet.
created by using the `New-Event` cmdlet, the new event is also deleted from the
`Unregister-Event` does not delete events from the event queue. To delete events, use the `Remove-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Cancel an event subscription by source identifier
It uses a pipeline operator (`|`) to send the subscriber objects to `Unregister-
deletes them from the session. To complete the task, the **Force** parameter is also required on `Unregister-Event`.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventSubscriber You can pipe the output from `Get-EventSubscriber` to `Unregister-Event`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the
current session, the event queue is discarded and the event subscription is canc
subscribed to the event by using the `Register-EngineEvent` cmdlet. To delete a custom event from the session, you must remove it programmatically or close the session.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Update Formatdata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Update-FormatData.md
Title: Update-FormatData
# Update-FormatData
-## Synopsis
+## SYNOPSIS
Updates the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-FormatData` cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell.
added or changed a formatting file, but do not want to interrupt the session.
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Reload previously loaded formatting files
The second command uses the `Update-FormatData` cmdlet to reload the formatting
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it without using parameters.
-## Parameters
+## PARAMETERS
### -AppendPath
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
+## INPUTS
### System.String You can pipe a string that contains the append path to `Update-FormatData`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
- `Update-FormatData` also updates the formatting data for commands in the session that were imported from modules. If the formatting file for a module changes, you can run an `Update-FormatData` command to update the formatting data for imported commands. You do not need to import the module again.
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Update List (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Update-List.md
Title: Update-List
# Update-List
-## Synopsis
+## SYNOPSIS
Adds items to and removes items from a property value that contains a collection of objects.
-## Syntax
+## SYNTAX
### AddRemoveSet (Default)
Update-List [-Add <Object[]>] [-Remove <Object[]>] [-InputObject <PSObject>] [[-
Update-List -Replace <Object[]> [-InputObject <PSObject>] [[-Property] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-List` cmdlet adds, removes, or replaces items in a property value of an object and returns the updated object. This cmdlet is designed for properties that contain collections of
interface.
The core cmdlets that are installed with PowerShell do not support this interface. To determine whether a cmdlet supports `Update-List`, see the cmdlet Help topic.
-## Examples
+## EXAMPLES
### Example 1: Add items to a property value
Deck : 2ΓÖú KΓÖÑ 4ΓÖá 10ΓÖÑ 8ΓÖá 10ΓÖª 9ΓÖá 6ΓÖá KΓÖª 7ΓÖú 3ΓÖú QΓÖú AΓÖÑ
8ΓÖÑ ```
-## Parameters
+## PARAMETERS
### -Add
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be updated to `Update-List`.
-## Outputs
+## OUTPUTS
### Objects or System.Management.Automation.PSListModifier `Update-List` returns the updated object, or it returns an object that represents the update action.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Update Typedata (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Update-TypeData.md
Title: Update-TypeData
# Update-TypeData
-## Synopsis
+## SYNOPSIS
Updates the extended type data in the session.
-## Syntax
+## SYNTAX
### FileSet (Default)
Update-TypeData [-MemberType <PSMemberTypes>] [-MemberName <String>] [-Value <Ob
Update-TypeData [-Force] [-TypeData] <TypeData[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-TypeData` cmdlet updates the extended type data in the session by reloading the `Types.ps1xml` files into memory and adding new extended type data.
the `Update-TypeData` cmdlet cannot use method syntax.
For more information about the `Types.ps1xml` files in PowerShell, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Update extended types
modules. The value of the **Value** parameter is a script that returns `$True` i
The second command pipes the module objects from `Get-Module` to the `Format-Table` cmdlet, which displays the **Name** and **SupportsUpdatableHelp** properties of all modules in a list.
-## Parameters
+## PARAMETERS
### -AppendPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the values of the **AppendPath**, **TypeName**, or **TypeData** parameters to `Update-TypeData`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Wait Debugger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Wait-Debugger.md
Title: Wait-Debugger
--- # Wait-Debugger
-## Synopsis
+## SYNOPSIS
Stops a script in the debugger before running the next statement in the script.
-## Syntax
+## SYNTAX
``` Wait-Debugger [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Stops the PowerShell script execution engine at the point immediately after the `Wait-Debugger` cmdlet and waits for a debugger to be attached. This is similar to using
cmdlet and waits for a debugger to be attached. This is similar to using
> Make sure you remove the `Wait-Debugger` lines after you are done. A running script appears to be > hung when it is stopped at a `Wait-Debugger`.
-## Examples
+## EXAMPLES
### Example 1: Insert breakpoint for debugging
class FileResource
} ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-DscDebug](/powershell/module/PSDesiredStateConfiguration/Enable-DscDebug)
Microsoft.PowerShell.Utility Wait Event (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Wait-Event.md
Title: Wait-Event
# Wait-Event
-## Synopsis
+## SYNOPSIS
Waits until a particular event is raised before continuing to run.
-## Syntax
+## SYNTAX
``` Wait-Event [[-SourceIdentifier] <String>] [-Timeout <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Event` cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes when the event is detected. To cancel the wait, press
response to an event in two different ways:
- using the **Action** parameter of the event subscription - waiting for an event to return and then respond with an action
-## Examples
+## EXAMPLES
### Example 1: Wait for the next event
identifier of **ProcessStarted**. If the specified time expires, the wait ends.
Wait-Event -SourceIdentifier "ProcessStarted" -Timeout 90 ```
-## Parameters
+## PARAMETERS
### -SourceIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Write Debug (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Debug.md
Title: Write-Debug
--- # Write-Debug
-## Synopsis
+## SYNOPSIS
Writes a debug message to the console.
-## Syntax
+## SYNTAX
``` Write-Debug [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Debug` cmdlet writes debug messages to the host from a script or command. By default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the `$DebugPreference` variable.
-## Examples
+## EXAMPLES
### Example 1: Understand $DebugPreference
change only affects the scope of the function. The value is not affected outside
For more information about the **Debug** common parameter, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a debug message to `Write-Debug`.
-## Outputs
+## OUTPUTS
### None `Write-Debug` only writes to the debug stream. It does not write any objects to the pipeline.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Error (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Error.md
Title: Write-Error
# Write-Error
-## Synopsis
+## SYNOPSIS
Writes an object to the error stream.
-## Syntax
+## SYNTAX
### NoException (Default)
Write-Error -ErrorRecord <ErrorRecord> [-RecommendedAction <String>] [-CategoryA
[-CategoryReason <String>] [-CategoryTargetName <String>] [-CategoryTargetType <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Error` cmdlet declares a non-terminating error. By default, errors are sent in the error stream to the host program to be displayed, along with output.
continues to process the other items in the collection.
To declare a terminating error, use the `Throw` keyword. For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
-## Examples
+## EXAMPLES
### Example 1: Write an error for RegistryKey object
has a null constructor.
The second command uses the `Write-Error` cmdlet to declare a non-terminating error. The value of the **Exception** parameter is the **Exception** object in the `$E` variable.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains an error message to `Write-Error`.
-## Outputs
+## OUTPUTS
### Error object `Write-Error` writes only to the error stream. It does not return any objects.
-## Notes
+## NOTES
`Write-Error` does not change the value of the `$?` automatic variable, therefore it does not signal a terminating error condition. To signal a terminating error, use the [$PSCmdlet.WriteError()](/dotnet/api/system.management.automation.cmdlet.writeerror) method.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Write Host (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Host.md
Title: Write-Host
# Write-Host
-## Synopsis
+## SYNOPSIS
Writes customized output to a host.
-## Syntax
+## SYNTAX
``` Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
hosting PowerShell.
> affect `Write-Host` messages. The exception to this rule is `-InformationAction Ignore`, which > effectively suppresses `Write-Host` output. (see "Example 5")
-## Examples
+## EXAMPLES
### Example 1: Write to the console without adding a new line
These commands effectively suppress output of the `Write-Host` cmdlet. The first
The second example redirects the information stream of the command to the `$null` variable and thereby suppresses it.
-## Parameters
+## PARAMETERS
### -BackgroundColor
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).
-## Inputs
+## INPUTS
### System.Object You can pipe objects to be written to the host.
-## Outputs
+## OUTPUTS
### None `Write-Host` sends the objects to the host. It does not return any objects. However, the host displays the objects that `Write-Host` sends to it.
-## Notes
+## NOTES
- When writing a collection to the host, elements of the collection are printed on the same line separated by a single space. This can be overridden with the **Separator** parameter.
displays the objects that `Write-Host` sends to it.
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Write Information (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md
Title: Write-Information
# Write-Information
-## Synopsis
+## SYNOPSIS
Specifies how PowerShell handles information stream data for a command.
-## Syntax
+## SYNTAX
``` Write-Information [-MessageData] <Object> [[-Tags] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Information` cmdlet specifies how PowerShell handles information stream data for a command.
the `InformationAction` common parameter to your command. For more information,
`Write-Information` is also a supported workflow activity in PowerShell 5.x.
-## Examples
+## EXAMPLES
### Example 1: Write information for Get- results
function Test-Info
Test-Info 6> Info.txt ```
-## Parameters
+## PARAMETERS
### -MessageData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None `Write-Information` does not accept piped input.
-## Outputs
+## OUTPUTS
### System.Management.Automation.InformationRecord
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Output (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Output.md
Title: Write-Output
--- # Write-Output
-## Synopsis
+## SYNOPSIS
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
-## Syntax
+## SYNTAX
``` Write-Output [-InputObject] <PSObject[]> [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
be written, `"Home directory: $HOME"`.
By default, `Write-Output` enumerates through collection objects. However, `Write-Output` can also be used to pass collections down the pipeline as a single object with the **NoEnumerate** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get objects and write them to the console
Count : 1
... ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Write-Output`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Write-Output` returns the objects that are submitted as input.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Progress (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Progress.md
Title: Write-Progress
--- # Write-Progress
-## Synopsis
+## SYNOPSIS
Displays a progress bar within a PowerShell command window.
-## Syntax
+## SYNTAX
``` Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-PercentComplete <Int32>]
Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-Perce
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script. You can select the indicators that the bar reflects and the text that appears above and below the progress bar.
-## Examples
+## EXAMPLES
### Example 1: Display the progress of a For loop
Step 1
In this example you can use the **ParentId** parameter to have indented output to show parent/child relationships in the progress of each step.
-## Parameters
+## PARAMETERS
### -Activity
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None `Write-Progress` does not generate any output.
-## Notes
+## NOTES
If the progress bar does not appear, check the value of the `$ProgressPreference` variable. If the value is set to SilentlyContinue, the progress bar is not displayed. For more information about
The parameters of the cmdlet correspond to the properties of the
**System.Management.Automation.ProgressRecord** class. For more information, see [ProgressRecord Class](/dotnet/api/system.management.automation.progressrecord).
-## Related links
+## RELATED LINKS
[Write-Debug](Write-Debug.md)
Microsoft.PowerShell.Utility Write Verbose (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Verbose.md
Title: Write-Verbose
--- # Write-Verbose
-## Synopsis
+## SYNOPSIS
Writes text to the verbose message stream.
-## Syntax
+## SYNTAX
``` Write-Verbose [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Verbose` cmdlet writes text to the verbose message stream in PowerShell. Typically, the verbose message stream is used to deliver more in depth information about command processing.
By default, the verbose message stream is not displayed, but you can display it
value of the `$VerbosePreference` variable or using the **Verbose** common parameter in any command.
-## Examples
+## EXAMPLES
### Example 1: Write a status message
The first command assigns a value of Continue to the `$VerbosePreference` prefer
default value, `SilentlyContinue`, suppresses verbose messages. The second command writes a verbose message.
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the message to `Write-Verbose`.
-## Outputs
+## OUTPUTS
### None `Write-Verbose` writes only to the verbose message stream.
-## Notes
+## NOTES
- Verbose messages are returned only when the command uses the **Verbose** common parameter. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
You can pipe a string that contains the message to `Write-Verbose`.
For more information about the `$VerbosePreference` variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Warning (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Write-Warning.md
Title: Write-Warning
# Write-Warning
-## Synopsis
+## SYNOPSIS
Writes a warning message.
-## Syntax
+## SYNTAX
``` Write-Warning [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Warning` cmdlet writes a warning message to the PowerShell host. The response to the warning depends on the value of the user's `$WarningPreference` variable and the use of the **WarningAction** common parameter.
-## Examples
+## EXAMPLES
### Example 1: Write a warning message
warning.
For more information about the **WarningAction** common parameter, see [about_CommonParameters](../Microsoft.Powershell.Core/About/about_CommonParameters.md).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the warning to `Write-Warning`.
-## Outputs
+## OUTPUTS
### None `Write-Warning` writes only to the warning stream. It does not generate any other output.
-## Notes
+## NOTES
The default value for the `$WarningPreference` variable is `Continue`, which displays the warning and then continues executing the command. To determine valid values for a preference variable such as `$WarningPreference`, set it to a string of random characters, such as "abc". The resulting error message lists the valid values.
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.WSMan.Management Connect Wsman (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Connect-WSMan.md
Title: Connect-WSMan
# Connect-WSMan
-## Synopsis
+## SYNOPSIS
Connects to the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Connect-WSMan [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-Port <Int32>]
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Connect-WSMan` cmdlet connects to the WinRM service on a remote computer, and it establishes a persistent connection to the remote computer. You can use this cmdlet in the context of the WSMan
workgroups.
For information about how to disconnect from the WinRM service on a remote computer, see the `Disconnect-WSMan` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Connect to a remote computer
The second command uses the **SessionOption** parameter to pass the credentials
the `$a` variable to `Connect-WSMan`. Then, `Connect-WSMan` connects to the remote server01 computer by using the specified session options.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
You can run management commands or query management data on a remote computer without creating a WS-Management session. You can do this by using the **ComputerName** parameters of
WS-Management session. You can do this by using the **ComputerName** parameters
PowerShell creates a temporary connection that is used for the single command. After the command runs, the connection is closed.
-## Related links
+## RELATED LINKS
[Disable-WSManCredSSP](Disable-WSManCredSSP.md)
Microsoft.WSMan.Management Disable Wsmancredssp (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Disable-WSManCredSSP.md
Title: Disable-WSManCredSSP
# Disable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Disables CredSSP authentication on a computer.
-## Syntax
+## SYNTAX
``` Disable-WSManCredSSP [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-WSManCredSSP` cmdlet disables Credential Security Support Provider (CredSSP) authentication on a client or on a server computer. When CredSSP authentication is used, the user
performs the following action:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Disable CredSSP on a client
Disable-WSManCredSSP -Role Server
This command disables CredSSP on the server, which prevents delegation from clients.
-## Parameters
+## PARAMETERS
### -Role
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To enable CredSSP authentication, use the Enable-WSManCredSSP cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Disconnect Wsman (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Disconnect-WSMan.md
Title: Disconnect-WSMan
# Disconnect-WSMan
-## Synopsis
+## SYNOPSIS
Disconnects the client from the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
``` Disconnect-WSMan [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disconnect-WSMan` cmdlet disconnects the client from the WinRM service on a remote computer. If you saved the WS-Management session in a variable, the session object remains in the variable, but
change to the WSMan provider.
For more information about how to connect to the WinRM service on a remote computer, see `Connect-WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Delete a connection to a remote computer
computer, in this case the server01 computer. However, you can also use `Disconn
connections to remote computers before you change to the WSMan provider. Those connections do not appear in the ComputerName list.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Enable Wsmancredssp (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md
Title: Enable-WSManCredSSP
# Enable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Enables Credential Security Support Provider (CredSSP) authentication on a computer.
-## Syntax
+## SYNTAX
### All
Enables Credential Security Support Provider (CredSSP) authentication on a compu
Enable-WSManCredSSP [[-DelegateComputer] <String[]>] [-Force] [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-WSManCredSSP` cmdlet enables CredSSP authentication on a client or on a server computer. When CredSSP authentication is used, the user credentials are passed to a remote computer to be
the Parameters section.
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Delegate client credentials
Set-Item -Path "WSMan:\server02\service\auth\credSSP" -Value $True
parameter to specify the **WSMan** provider's location. The **Value** parameter sets the **Service** setting to true.
-## Parameters
+## PARAMETERS
### -DelegateComputer
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement If CredSSP authentication is successfully enabled, this cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmancredssp (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Get-WSManCredSSP.md
Title: Get-WSManCredSSP
--- # Get-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Gets the Credential Security Support Provider-related configuration for the client.
-## Syntax
+## SYNTAX
``` Get-WSManCredSSP [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WSManCredSSP` cmdlet gets the Credential Security Support Provider-related configuration of the client and the server. The output indicates whether Credential Security Support Provider
The cmdlet performs the following actions:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Display CredSSP configuration
If the computer is not configured for CredSSP, this is the output:
`The machine is not configured to allow delegating fresh credentials.`
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet. To enable CredSSP authentication, use the `Enable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmaninstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Get-WSManInstance.md
Title: Get-WSManInstance
# Get-WSManInstance
-## Synopsis
+## SYNOPSIS
Displays management information for a resource instance specified by a Resource URI.
-## Syntax
+## SYNTAX
### GetInstance (Default)
Get-WSManInstance [-ApplicationName <String>] [-BasePropertiesOnly] [-ComputerNa
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WSManInstance` cmdlet retrieves an instance of a management resource that is specified by a resource Uniform Resource Identifier (URI). The information that is retrieved can be a complex XML
standard Web Services for Management (WS-Management) **Get** command.
This cmdlet uses the WS-Management connection/transport layer to retrieve information.
-## Examples
+## EXAMPLES
### Example 1: Get all information from WMI
returns association instances, not associated instances.
You must enclose the filter in quotation marks, as shown in the example.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This command does not accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement This cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Invoke Wsmanaction (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Invoke-WSManAction.md
Title: Invoke-WSManAction
--- # Invoke-WSManAction
-## Synopsis
+## SYNOPSIS
Invokes an action on the object that is specified by the Resource URI and by the selectors.
-## Syntax
+## SYNTAX
### URI (Default)
Invoke-WSManAction [-Action] <String> [-ApplicationName <String>] [-ComputerName
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WSManAction` runs an action on the object that is specified by RESOURCE_URI, where parameters are specified by key value pairs. This cmdlet uses the WSMan connection/transport layer to run the action.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
the remote server01 computer.
The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started.
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-WmiMethod](../Microsoft.PowerShell.Management/Invoke-WmiMethod.md)
Microsoft.WSMan.Management New Wsmaninstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/New-WSManInstance.md
Title: New-WSManInstance
--- # New-WSManInstance
-## Synopsis
+## SYNOPSIS
Creates a new instance of a management resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-WSManInstance [-ConnectionURI <Uri>] [-FilePath <String>] [-OptionSet <Hasht
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-WSManInstance` cmdlet creates a new instance of a management resource. It uses a resource URI and a value set or input file to create the new instance of the management resource. This cmdlet uses the WinRM connection/transport layer to create the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Create a HTTPS listener
This command creates an instance of a WS-Management HTTPS listener on all IP add
New-WSManInstance winrm/config/Listener -SelectorSet @{Transport='HTTPS'; Address='*'} -ValueSet @{Hostname="HOST";CertificateThumbprint="XXXXXXXXXX"} ```
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The `Set-WmiInstance` cmdlet, a Windows Management Instrumentation (WMI) cmdlet, is similar. `Set-WmiInstance` uses the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmansessionoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/New-WSManSessionOption.md
Title: New-WSManSessionOption
# New-WSManSessionOption
-## Synopsis
+## SYNOPSIS
Creates session option hash table to use as input parameters for WS-Management cmdlets.
-## Syntax
+## SYNTAX
``` New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentication <ProxyAuthentication>]
New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthenticatio
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-WSManSessionOption` cmdlet creates a WSMan Session option hash table which can be passed to WSMan cmdlets:
WSMan cmdlets:
- `Invoke-WSManAction` - `Connect-WSMan`
-## Examples
+## EXAMPLES
### Example 1: Create a connection that uses connection options
computer, in this case the server01 computer. However, you can use the cmdlet to
connections to remote computers before you change to the WSMan provider. Those connections appear in the **ComputerName** list.
-## Parameters
+## PARAMETERS
### -NoEncryption
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SessionOption
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Remove Wsmaninstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Remove-WSManInstance.md
Title: Remove-WSManInstance
--- # Remove-WSManInstance
-## Synopsis
+## SYNOPSIS
Deletes a management resource instance.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Remove-WSManInstance [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-ResourceU
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-WSManInstance` cmdlet deletes an instance of a management resource that is specified in the **ResourceURI** and **SelectorSet** parameters. This cmdlet uses the WinRM connection/transport layer to delete the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Delete a listener
Remove-WSManInstance -ResourceUri winrm/config/Listener -SelectorSet Address=tes
This command deletes the WS-Management HTTP listener on a computer.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The cmdlets in the CimCmdlets module are similar. They use the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmaninstance (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Set-WSManInstance.md
Title: Set-WSManInstance
--- # Set-WSManInstance
-## Synopsis
+## SYNOPSIS
Modifies the management information that is related to a resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Set-WSManInstance [-ConnectionURI <Uri>] [-Dialect <Uri>] [-FilePath <String>] [
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The Set-WSManInstance cmdlet modifies the management information that is related to a resource. This cmdlet uses the WinRM connection/transport layer to modify the information.
-## Examples
+## EXAMPLES
### Example 1: Disable a listener on the local computer
This fails: -ValueSet @{enabled="False"}
This succeeds: -ValueSet @{Enabled="False"}
-## Parameters
+## PARAMETERS
### -ApplicationName
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).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmanquickconfig (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md
Title: Set-WSManQuickConfig
# Set-WSManQuickConfig
-## Synopsis
+## SYNOPSIS
Configures the local computer for remote management.
-## Syntax
+## SYNTAX
### All
Configures the local computer for remote management.
Set-WSManQuickConfig [-UseSSL] [-Force] [-SkipNetworkProfileCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-WSManQuickConfig` cmdlet configures the computer to receive PowerShell remote commands that are sent by using the Web Services for Management (WS-Management) technology.
are sent by using the Web Services for Management (WS-Management) technology.
To run `Set-WSManQuickConfig`, start PowerShell with the **Run as Administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Enable remote management of the local computer over HTTP
Set-WSManQuickConfig -UseSSL
> **HTTPS** requires manual configuration. For more information, see the **UseSSL** parameter's > description.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Test Wsman (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.WSMan.Management/Test-WSMan.md
Title: Test-WSMan
--- # Test-WSMan
-## Synopsis
+## SYNOPSIS
Tests whether the WinRM service is running on a local or remote computer.
-## Syntax
+## SYNTAX
``` Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>] [-Port <Int32>] [-UseSSL]
Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-WSMan` cmdlet submits an identification request that determines whether the WinRM service is running on a local or remote computer. If the tested computer is running the service, the cmdlet displays the WS-Management identity schema, the protocol version, the product vendor, and the product version of the tested service.
-## Examples
+## EXAMPLES
### Example 1: Determine the status of the WinRM service
server01 using the authentication parameter.
Using the authentication parameter enables `Test-WSMan` to return the operating system version.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output object.
-## Notes
+## NOTES
By default, the `Test-WSMan` cmdlet queries the WinRM service without using authentication, and it returns no information that is specific to the operating-system version. Instead, it displays null values for the operating system version and service pack level (OS: 0.0.0 SP: 0.0).
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
PSDiagnostics Disable Pstrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Disable-PSTrace.md
Title: Disable-PSTrace
--- # Disable-PSTrace
-## Synopsis
+## SYNOPSIS
Disables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Disable-PSTrace [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet disables the Operational and Analytic event logs of the Microsoft-Windows-PowerShell event provider. You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the Analytic event log for PowerShell
provider.
Disable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
Accept pipeline input: False
Accept wildcard characters: False ```
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Disable Pswsmancombinedtrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Disable-PSWSManCombinedTrace.md
Title: Disable-PSWSManCombinedTrace
--- # Disable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Stop the logging session started by Enable-PSWSManCombinedTrace.
-## Syntax
+## SYNTAX
``` Disable-PSWSManCombinedTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet stops the logging session started by `Enable-PSWSManCombinedTrace`.
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the combined logging session
You must run this cmdlet from an elevated PowerShell session.
Disable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Disable Wsmantrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Disable-WSManTrace.md
Title: Disable-WSManTrace
--- # Disable-WSManTrace
-## Synopsis
+## SYNOPSIS
Stop the WSMan logging session started by Enable-WSManTrace.
-## Syntax
+## SYNTAX
``` Disable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet stops the WSMan logging session started by Enable-WSManTrace. This cmdlet uses the `Stop-Trace` cmdlet. You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan trace
You must run this cmdlet from an elevated PowerShell session.
Disable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Pstrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Enable-PSTrace.md
Title: Enable-PSTrace
--- # Enable-PSTrace
-## Synopsis
+## SYNOPSIS
Enables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Enable-PSTrace [-Force] [-AnalyticOnly] ```
-## Description
+## DESCRIPTION
This cmdlet enables the Operational and Analytic event logs of the Microsoft-Windows-PowerShell event provider. You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Enable the Analytic event log for PowerShell
provider.
Enable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
Accept pipeline input: False
Accept wildcard characters: False ```
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Enable Pswsmancombinedtrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Enable-PSWSManCombinedTrace.md
Title: Enable-PSWSManCombinedTrace
--- # Enable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan and PowerShell providers enabled.
-## Syntax
+## SYNTAX
``` Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet starts a logging session with the following PowerShell providers enabled:
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a combined logging session
You must run this cmdlet from an elevated PowerShell session.
Enable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### -DoNotOverwriteExistingTrace
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Wsmantrace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Enable-WSManTrace.md
Title: Enable-WSManTrace
--- # Enable-WSManTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan providers enabled.
-## Syntax
+## SYNTAX
``` Enable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet starts a logging session with the WSMan providers enabled. The following event providers are enabled: - Event Forwarding
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan logging session.
You must run this cmdlet from an elevated PowerShell session.
Enable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Get Logproperties (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Get-LogProperties.md
Title: Get-LogProperties
--- # Get-LogProperties
-## Synopsis
+## SYNOPSIS
Retrieves the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Get-LogProperties [-Name] <string> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet gets the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Get the configuration settings of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails The **PSDiagnostics** module adds the **LogDetails** class to the `Microsoft.PowerShell.Diagnostics` namespace.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-LogProperties](Set-LogProperties.md)
PSDiagnostics Set Logproperties (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Set-LogProperties.md
Title: Set-LogProperties
# Set-LogProperties
-## Synopsis
+## SYNOPSIS
Changes the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet changes the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Change the retention setting of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails
You must pass a fully configured **LogDetails** object to the `Set-LogProperties
Therefore, to change one setting, you should use `Get-LogProperties` to retrieve the current configuration.
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Start Trace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Start-Trace.md
Title: Start-Trace
# Start-Trace
-## Synopsis
+## SYNOPSIS
Start an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFilePath] <String>]
Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFile
[-BufferSizeInKB <Int32>] [-MaxLogFileSizeInMB <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet starts a Windows Event Trace logging session. This cmdlet is used by the following cmdlets:
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Start-Trace -SessionName 'wsmlog' -ETS -OutputFilePath "$env:windir\system32\wsmtraces.log" -Format 'bincirc' -MinBuffers 16 -MaxBuffers 256 -BufferSizeInKb 64 -MaxLogFileSizeInMB 256 -ProviderFilePath "$env:windir\system32\wsmtraceproviders.txt" ```
-## Parameters
+## PARAMETERS
### -BufferSizeInKB Event Trace Session buffer size in kilobytes (KB).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Stop Trace (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSDiagnostics/Stop-Trace.md
Title: Stop-Trace
# Stop-Trace
-## Synopsis
+## SYNOPSIS
Stop an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Stop-Trace [-SessionName] <Object> [-ETS] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet stops a Windows Event Trace logging session.
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Stop-Trace -SessionName 'wsmlog' ```
-## Parameters
+## PARAMETERS
### -ETS Send commands to Event Trace Sessions directly without saving or scheduling.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSReadLine Get Psreadlinekeyhandler (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Get-PSReadLineKeyHandler.md
Title: Get-PSReadLineKeyHandler
# Get-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Gets the key bindings for the PSReadLine module.
-## Syntax
+## SYNTAX
``` Get-PSReadLineKeyHandler [-Bound] [-Unbound] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineKeyHandler` cmdlet returns the currently bound key bindings.
-## Examples
+## EXAMPLES
### Example 1: Get all key mappings
Tab TabCompleteNext Complete the input using the next
... ```
-## Parameters
+## PARAMETERS
### -Bound
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.KeyHandler
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Get Psreadlineoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Get-PSReadLineOption.md
Title: Get-PSReadLineOption
--- # Get-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Gets values for the options that can be configured.
-## Syntax
+## SYNTAX
``` Get-PSReadLineOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineOption` cmdlet returns the current state of the settings that can be configured by using the `Set-PSReadLineOption` cmdlet. You can use the returned object to change **PSReadLine** options. This provides a slightly simpler way to set syntax coloring options for multiple kinds of tokens.
-## Examples
+## EXAMPLES
### Example 1: Get options and their values
VariableColor : "$([char]0x1b)[92m"
This command returns the list of available PSReadLine options and their current values.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.PSConsoleReadLineOptions An instance of the current options. Changing the property values of this object updates the settings in PSReadLine directly without invoking `Set-PSReadLineOption`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Remove Psreadlinekeyhandler (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Remove-PSReadLineKeyHandler.md
Title: Remove-PSReadLineKeyHandler
# Remove-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Removes a key binding.
-## Syntax
+## SYNTAX
``` Remove-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSReadLineKeyHandler` cmdlet removes a specified key binding.
-## Examples
+## EXAMPLES
### Example 1: Remove a binding
Remove-PSReadLineKeyHandler -Chord Ctrl+B
This command removes the binding from the key combination, or chord, `Ctrl+B`. The `Ctrl+B` chord is created in the `Set-PSReadLineKeyHandler` article.
-## Parameters
+## PARAMETERS
### -Chord
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlinekeyhandler (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Set-PSReadLineKeyHandler.md
Title: Set-PSReadLineKeyHandler
--- # Set-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Binds keys to user-defined or PSReadLine key handler functions.
-## Syntax
+## SYNTAX
### ScriptBlock
Set-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [-Function] <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineKeyHandler` cmdlet customizes the result when a key or sequence of keys is pressed. With user-defined key bindings, you can do almost anything that is possible from within a PowerShell script.
-## Examples
+## EXAMPLES
### Example 1: Bind the arrow key to a function
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
} ```
-## Parameters
+## PARAMETERS
### -BriefDescription
This cmdlet supports the common parameters: -Debug, -ErrorAction,
For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlineoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSReadLine/Set-PSReadLineOption.md
Title: Set-PSReadLineOption
--- # Set-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Customizes the behavior of command line editing in **PSReadLine**.
-## Syntax
+## SYNTAX
``` Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-HistoryNoDuplicates]
Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-His
[-ViModeChangeHandler <ScriptBlock>] [-Colors <Hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineOption` cmdlet customizes the behavior of the **PSReadLine** module when you're editing the command line. To view the **PSReadLine** settings, use `Get-PSReadLineOption`.
-## Examples
+## EXAMPLES
### Example 1: Set foreground and background colors
block object.
For more information, see [about_Providers](/powershell/module/microsoft.powershell.core/about/about_providers).
-## Parameters
+## PARAMETERS
### -AddToHistoryHandler
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Set-PSReadLineOption.`
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_PSReadLine](./About/about_PSReadLine.md)
PSScheduledJob Add Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Add-JobTrigger.md
Title: Add-JobTrigger
# Add-JobTrigger
-## Synopsis
+## SYNOPSIS
Adds job triggers to scheduled jobs.
-## Syntax
+## SYNTAX
### JobDefinition (Default)
Add-JobTrigger [-Trigger] <ScheduledJobTrigger[]> [-Id] <Int32[]> [<CommonParame
Add-JobTrigger [-Trigger] <ScheduledJobTrigger[]> [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-JobTrigger` cmdlet adds job triggers to scheduled jobs. You can use it to add multiple triggers to multiple scheduled jobs.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Add a job trigger to a scheduled job
scheduled job. The command saves the trigger in the $t variable.
The second command uses the `Add-JobTrigger` cmdlet to add the job trigger in $t to the TestBackup and BackupLogs scheduled jobs.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger, Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe job triggers or scheduled jobs to `Add-JobTrigger`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Disable Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Disable-JobTrigger.md
Title: Disable-JobTrigger
# Disable-JobTrigger
-## Synopsis
+## SYNOPSIS
Disables the job triggers of scheduled jobs.
-## Syntax
+## SYNTAX
``` Disable-JobTrigger [-InputObject] <ScheduledJobTrigger[]> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-JobTrigger` cmdlet temporarily disables the job triggers of scheduled jobs. Disabling preserves all job trigger properties, but it prevents the job trigger from starting the scheduled
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Disable a job trigger
scheduled job. A pipeline operator sends the job triggers to the `Where-Object`
returns only daily job triggers. A pipeline operator sends the daily job triggers to the `Disable-JobTrigger` cmdlet, which disables them.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger You can pipe job triggers to `Disable-JobTrigger`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- `Disable-JobTrigger` does not generate errors or warnings if you disable a job trigger that is already disabled.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Disable Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Disable-ScheduledJob.md
Title: Disable-ScheduledJob
# Disable-ScheduledJob
-## Synopsis
+## SYNOPSIS
Disables a scheduled job.
-## Syntax
+## SYNTAX
### Definition (Default)
Disable-ScheduledJob [-Id] <Int32> [-PassThru] [-WhatIf] [-Confirm] [<CommonPara
Disable-ScheduledJob [-Name] <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ScheduledJob` cmdlet temporarily disables scheduled jobs. Disabling preserves all job properties and does not disable the job triggers, but it prevents the scheduled jobs from starting
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Disable a scheduled job
pipeline operator (`|`) sends the scheduled jobs to the `Where-Object` cmdlet, w
scheduled job with the specified global ID. Another pipeline operator sends the job to the `Disable-ScheduledJob` cmdlet, which disables it.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe a scheduled job to `Disable-ScheduledJob`.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition If you use the **Passthru** parameter, `Disable-ScheduledJob` returns the scheduled job that was disabled. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Disable-ScheduledJob` does not generate warnings or errors if you use it to disable a scheduled job that is already disabled.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Enable Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Enable-JobTrigger.md
Title: Enable-JobTrigger
# Enable-JobTrigger
-## Synopsis
+## SYNOPSIS
Enables the job triggers of scheduled jobs.
-## Syntax
+## SYNTAX
``` Enable-JobTrigger [-InputObject] <ScheduledJobTrigger[]> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-JobTrigger` cmdlet re-enables job triggers of scheduled jobs, such as those that were disabled by using the `Disable-JobTrigger` cmdlet. Enabled and re-enabled job triggers can start
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Enable a job trigger
displays the selected properties of the job triggers in a table. The properties
JobName property that displays the name of the scheduled job in the JobDefinition property of the job trigger.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger You can pipe job triggers to `Enable-JobTrigger`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- `Enable-JobTrigger` does not generate errors or warnings if you enable a job trigger that is already enabled.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Enable Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Enable-ScheduledJob.md
Title: Enable-ScheduledJob
# Enable-ScheduledJob
-## Synopsis
+## SYNOPSIS
Enables a scheduled job.
-## Syntax
+## SYNTAX
### Definition (Default)
Enable-ScheduledJob [-Id] <Int32> [-PassThru] [-WhatIf] [-Confirm] [<CommonParam
Enable-ScheduledJob [-Name] <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ScheduledJob` cmdlet re-enables scheduled jobs that are disabled, such as those that are disabled by using the `Disable-ScheduledJob` cmdlet. Enabled jobs run automatically when triggered.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Enable a scheduled job
The command uses the `Invoke-Command` cmdlet to run an `Enable-ScheduledJob` com
and Srv10 computers. The command uses the **Name** parameter of `Enable-ScheduledJob` to enable the Inventory scheduled job on each computer.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe a scheduled job to `Enable-ScheduledJob`.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition If you use the **Passthru** parameter, `Enable-ScheduledJob` returns the scheduled job that was enabled. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Enable-ScheduledJob` does not generate warnings or errors if you use it to enable a scheduled job that is already enabled.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Get Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Get-JobTrigger.md
Title: Get-JobTrigger
# Get-JobTrigger
-## Synopsis
+## SYNOPSIS
Gets the job triggers of scheduled jobs.
-## Syntax
+## SYNTAX
### JobDefinition (Default)
Get-JobTrigger [[-TriggerId] <Int32[]>] [-Id] <Int32> [<CommonParameters>]
Get-JobTrigger [[-TriggerId] <Int32[]>] [-Name] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-JobTrigger` cmdlet gets the job triggers of scheduled jobs. You can use this command to examine the job triggers or to pipe the job triggers to other cmdlets.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get a job trigger by scheduled job name
same, the HelpFiles job trigger includes a random delay of three (3) minutes.
This example shows how to compare the job triggers of two scheduled jobs.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe a scheduled job from `Get-ScheduledJob` to `Get-JobTrigger`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Get Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Get-ScheduledJob.md
Title: Get-ScheduledJob
# Get-ScheduledJob
-## Synopsis
+## SYNOPSIS
Gets scheduled jobs on the local computer.
-## Syntax
+## SYNTAX
### DefinitionId (Default)
Get-ScheduledJob [[-Id] <Int32[]>] [<CommonParameters>]
Get-ScheduledJob [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ScheduledJob` cmdlet gets scheduled jobs on the local computer. `Get-ScheduledJob` gets only scheduled jobs that are created by the current user using the `Register-ScheduledJob` cmdlet.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all scheduled jobs
Get-ScheduledJob DailyBackup, WeeklyBackup | Get-JobTrigger
It uses the `Get-ScheduledJob` cmdlet to get the scheduled jobs and pipes them to the `Get-JobTrigger` cmdlet to get the job triggers of the scheduled jobs.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None You cannot pipe input to `Get-ScheduledJob`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition
-## Notes
+## NOTES
- Each scheduled job is saved in a subdirectory of the `$home\AppData\Local\Microsoft\Windows\PowerShell\ScheduledJobs` directory on the local computer.
You cannot pipe input to `Get-ScheduledJob`.
to manage scheduled jobs that you create with the Scheduled Job cmdlets. However, you cannot use the Scheduled Job cmdlets to manage tasks that you create in Task Scheduler.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Get Scheduledjoboption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Get-ScheduledJobOption.md
Title: Get-ScheduledJobOption
# Get-ScheduledJobOption
-## Synopsis
+## SYNOPSIS
Gets the job options of scheduled jobs.
-## Syntax
+## SYNTAX
### JobDefinition (Default)
Get-ScheduledJobOption [-Id] <Int32> [<CommonParameters>]
Get-ScheduledJobOption [-Name] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ScheduledJobOption` cmdlet gets the job options of scheduled jobs. You can use this command to examine the job options or to pipe the job options to other cmdlets.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get job options
$O = Invoke-Command -ComputerName "Srv01" -ScriptBlock {Get-ScheduledJob -Name "
This command uses the `Invoke-Command` cmdlet to get the scheduled job options of the DataDemon job on the Srv01 computer. The command saves the options in the `$O` variable.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe a scheduled job from `Get-ScheduledJob` to `Get-ScheduledJobOption`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobOptions
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob New Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/New-JobTrigger.md
Title: New-JobTrigger
# New-JobTrigger
-## Synopsis
+## SYNOPSIS
Creates a job trigger for a scheduled job.
-## Syntax
+## SYNTAX
### Once (Default)
New-JobTrigger [-RandomDelay <TimeSpan>] [-AtStartup] [<CommonParameters>]
New-JobTrigger [-RandomDelay <TimeSpan>] [-User <String>] [-AtLogOn] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-JobTrigger` cmdlet creates a job trigger that starts a scheduled job on a one-time or recurring schedule, or when an event occurs.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Once Schedule
New-JobTrigger -Once -At "9/21/2012 0am" -RepetitionInterval (New-TimeSpan -Hour
The following command creates a job trigger that runs a scheduled job once every 12 hours for an indefinite period of time. The schedule begins tomorrow (9/21/2012) at midnight (0:00 AM).
-## Parameters
+## PARAMETERS
### -At
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger
-## Notes
+## NOTES
- Job triggers are not saved to disk. However, scheduled jobs are saved to disk, and you can use the `Get-JobTrigger` to get the job trigger of any scheduled job.
You cannot pipe input to this cmdlet.
`User="Domain1\User01` (or any valid user; used only with the **AtLogon** frequency value) }
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob New Scheduledjoboption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/New-ScheduledJobOption.md
Title: New-ScheduledJobOption
# New-ScheduledJobOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a scheduled job.
-## Syntax
+## SYNTAX
``` New-ScheduledJobOption [-RunElevated] [-HideInTaskScheduler] [-RestartOnIdleResume]
New-ScheduledJobOption [-RunElevated] [-HideInTaskScheduler] [-RestartOnIdleResu
[-IdleDuration <TimeSpan>] [-StartIfIdle] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScheduledJobOption` cmdlet creates an object that contains advanced options for a scheduled job.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Create a scheduled job option object with default values
then to the `Format-Table` cmdlet, which displays the names and values of the pr
This format makes it much easier to find the WakeToRun property of the **ScheduledJobOptions** object in `$options` and to verify that its value was changed from `$false` to `$true`.
-## Parameters
+## PARAMETERS
### -ContinueIfGoingOnBattery
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobOptions
-## Notes
+## NOTES
- You can use the **ScheduledJobOptions** object that `New-ScheduledJobOption` creates as the value of the **ScheduledJobOption** parameter of the `Register-ScheduledJob` cmdlet. However, the
You cannot pipe input to this cmdlet.
`@{ShowInTaskScheduler=$False; RunElevated=$True; IdleDuration="00:05"}`
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Register Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Register-ScheduledJob.md
Title: Register-ScheduledJob
# Register-ScheduledJob
-## Synopsis
+## SYNOPSIS
Creates a scheduled job.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
Register-ScheduledJob [-FilePath] <String> [-Name] <String> [-Trigger <Scheduled
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ScheduledJob` cmdlet creates scheduled jobs on the local computer.
Import the **PSScheduledJob** module and then type: `Get-Help about_Scheduled*`
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Create a scheduled job
run scripts on the remote computers. And, the **Authentication** parameter speci
The `Invoke-Command @params` runs the command with the parameters from the script block.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't send input down the pipeline to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition
-## Notes
+## NOTES
Each scheduled job is saved in a subdirectory of the `$home\AppData\Local\Microsoft\Windows\PowerShell\ScheduledJobs` directory on the local computer.
If a scheduled job doesn't run, use the following methods to find the reason:
For more information, see [about_Scheduled_Jobs_Troubleshooting](./about/about_scheduled_jobs_troubleshooting.md).
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Remove Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Remove-JobTrigger.md
Title: Remove-JobTrigger
# Remove-JobTrigger
-## Synopsis
+## SYNOPSIS
Delete job triggers from scheduled jobs.
-## Syntax
+## SYNTAX
### JobDefinition (Default)
Remove-JobTrigger [-TriggerId <Int32[]>] [-Id] <Int32[]> [<CommonParameters>]
Remove-JobTrigger [-TriggerId <Int32[]>] [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-JobTrigger` cmdlet deletes job triggers from scheduled jobs.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Delete all job triggers
computer. The `Remove-JobTrigger` cmdlet uses the **ID** parameter to identify t
scheduled job and the **TriggerID** parameter to specify the first trigger. The **ID** parameter is especially useful when multiple scheduled jobs have the same or similar names.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe scheduled jobs to the `Remove-JobTrigger` cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Set Jobtrigger (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Set-JobTrigger.md
Title: Set-JobTrigger
# Set-JobTrigger
-## Synopsis
+## SYNOPSIS
Changes the job trigger of a scheduled job.
-## Syntax
+## SYNTAX
``` Set-JobTrigger [-InputObject] <ScheduledJobTrigger[]> [-DaysInterval <Int32>] [-WeeksInterval <Int32>]
Set-JobTrigger [-InputObject] <ScheduledJobTrigger[]> [-DaysInterval <Int32>] [-
[-Daily] [-Weekly] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-JobTrigger` cmdlet changes the properties of the job triggers of scheduled jobs. You can use it to change the time or frequency at which the jobs start or to change from a time-based
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Change the days in a job trigger
The command does not return any output.
The fourth command displays the effect of the change.The output shows that the trigger starts the job once every 90 minutes (RepetitionInterval = 1 hour, 30 minutes) for one day (RepetitionDuration
-= 1 day). ## Parameters
+= 1 day). ## PARAMETERS
### -At
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger You can pipe multiple job triggers to `Set-JobTrigger`.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.ScheduledJob.ScheduledJobTrigger When you use the **Passthru** parameter, `Set-JobTrigger` returns the job triggers that were changed. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Job triggers have a **JobDefintion** property that associates them with the scheduled job. When you change the job trigger of a scheduled job, the job is changed. You do not need to use a `Set-ScheduledJob` command to apply the changed trigger to the scheduled job.
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Set Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Set-ScheduledJob.md
Title: Set-ScheduledJob
# Set-ScheduledJob
-## Synopsis
+## SYNOPSIS
Changes scheduled jobs.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
Set-ScheduledJob [-InputObject] <ScheduledJobDefinition> [-ClearExecutionHistory
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ScheduledJob` cmdlet changes the properties of scheduled jobs, such as the commands that the jobs run or the credentials required to run the job. You can also use it to clear the execution
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Change the script that a job runs
The remote command begins with a `Get-ScheduledJob` command that gets all schedu
computer. The scheduled jobs are piped to the `Set-ScheduledJob` cmdlet, which changes the initialization script to `SetForRun.ps1`.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe scheduled jobs to `Set-ScheduledJob`.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition If you use the **Passthru** parameter, `Set-ScheduledJob` returns the scheduled job that was changed. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Set Scheduledjoboption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Set-ScheduledJobOption.md
Title: Set-ScheduledJobOption
# Set-ScheduledJobOption
-## Synopsis
+## SYNOPSIS
Changes the job options of a scheduled job.
-## Syntax
+## SYNTAX
``` Set-ScheduledJobOption [-InputObject] <ScheduledJobOptions> [-PassThru] [-RunElevated] [-HideInTaskScheduler]
Set-ScheduledJobOption [-InputObject] <ScheduledJobOptions> [-PassThru] [-RunEle
[-IdleTimeout <TimeSpan>] [-IdleDuration <TimeSpan>] [-StartIfIdle] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ScheduledJobOptions` cmdlet changes the job options of scheduled jobs.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Change job options
when it is changed.
The job triggers are piped to the `Set-ScheduledJobOption` cmdlet, which changes the value of the **IdleTimeout** option to two hours (2:00:00).
-## Parameters
+## PARAMETERS
### -ContinueIfGoingOnBattery
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobOptions You can pipe a scheduled job options object to `Set-ScheduledJobOption`.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.ScheduledJob.ScheduledJobOptions When you use the **Passthru** parameter, `Set-ScheduledJobOption` returns the job options that were changed. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSScheduledJob Unregister Scheduledjob (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSScheduledJob/Unregister-ScheduledJob.md
Title: Unregister-ScheduledJob
# Unregister-ScheduledJob
-## Synopsis
+## SYNOPSIS
Deletes scheduled jobs on the local computer.
-## Syntax
+## SYNTAX
### Definition (Default)
Unregister-ScheduledJob [-Id] <Int32[]> [-Force] [-WhatIf] [-Confirm] [<CommonPa
Unregister-ScheduledJob [-Name] <String[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-ScheduledJob` cmdlet deletes scheduled jobs from the local computer.
the PSScheduledJob module and then type: `Get-Help about_Scheduled*` or see [abo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Delete a scheduled job
This command deletes scheduled jobs with names that begin with Test on the Serve
The command uses the `Invoke-Command` cmdlet to run the `Unregister-ScheduledJob` command on the Server02 computer.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.ScheduledJob.ScheduledJobDefinition You can pipe scheduled jobs to Unregister-ScheduledJob
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Add-JobTrigger](Add-JobTrigger.md)
PSWorkflow New Psworkflowexecutionoption (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSWorkflow/New-PSWorkflowExecutionOption.md
Title: New-PSWorkflowExecutionOption
--- # New-PSWorkflowExecutionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains session configuration options for workflow sessions.
-## Syntax
+## SYNTAX
``` New-PSWorkflowExecutionOption [-PersistencePath <String>] [-MaxPersistenceStoreSizeGB <Int64>]
New-PSWorkflowExecutionOption [-PersistencePath <String>] [-MaxPersistenceStoreS
[-WorkflowShutdownTimeoutMSec <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSWorkflowExecutionOption` cmdlet creates an object that contains advanced options for workflow session configurations, that is session configurations designed to run Windows PowerShell
common parameters, see [about_WorkflowCommonParameters](About/about_WorkflowComm
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Create a Workflow Options Object
list.The output shows that the workflow options in the session configuration. Sp
session configuration has a **MaxSessionsPerWorkflow** property with a value of 10 and a **MaxDisconnectedSessions** property with a value of 200.
-## Parameters
+## PARAMETERS
### -ActivityProcessIdleTimeoutSec
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSWorkflowExecutionOption
-## Notes
+## NOTES
When the maximum value set by an option is exceeded, the command to create another instance in the session fails, unless noted in the parameter description. For example, if the value of
session configuration includes a **PSWorkflowExecutionOptions** object that sets
for the **SessionThrottleLimit** property, the session configuration has a **SessionThrottleLimit** property. Otherwise, it does not.
-## Related links
+## RELATED LINKS
[New-PSWorkflowSession](New-PSWorkflowSession.md)
PSWorkflow New Psworkflowsession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSWorkflow/New-PSWorkflowSession.md
Title: New-PSWorkflowSession
# New-PSWorkflowSession
-## Synopsis
+## SYNOPSIS
Creates a workflow session.
-## Syntax
+## SYNTAX
``` New-PSWorkflowSession [[-ComputerName] <String[]>] [-Credential <Object>] [-Name <String[]>] [-Port <Int32>]
New-PSWorkflowSession [[-ComputerName] <String[]>] [-Credential <Object>] [-Name
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSWorkflowSession` cmdlet creates a user-managed session (**PSSession**) that is especially designed for running Windows PowerShell workflows. It uses the
common parameters, see [about_WorkflowCommonParameters](./about/about_WorkflowCo
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Create a workflow session on a remote computer
The command uses the **ThrottleLimit** parameter to increase the per-command thr
This value takes precedence over the default throttle limit of 100 that is set in the **Microsoft.PowerShell.Workflow** session configuration.
-## Parameters
+## PARAMETERS
### -ApplicationName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession[], System.String You can pipe a session or a computer name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
A `New-PSWorkflowSession` command is equivalent to the following command: `New-PSSession -ConfigurationName Microsoft.PowerShell.Workflow`
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](../Microsoft.PowerShell.Core/Disconnect-PSSession.md)
PSWorkflowUtility Invoke Asworkflow (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PSWorkflowUtility/Invoke-AsWorkflow.md
Title: Invoke-AsWorkflow
--- # Invoke-AsWorkflow
-## Synopsis
+## SYNOPSIS
Runs a command or expression as a Windows PowerShell Workflow.
-## Syntax
+## SYNTAX
### Command (Default)
Invoke-AsWorkflow [-CommandName <String>] [-Parameter <Hashtable>] [-InputObject
Invoke-AsWorkflow [-Expression <String>] [-InputObject <Object>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-AsWorkflow` workflow runs any command or expression as an inline script in a workflow. These workflows use the standard workflow semantics, have all workflow common parameters, and have all benefits of workflows, including the ability to stop, resume, and recover.
For more information about workflow common parameters, see [about_WorkflowCommon
This workflow is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Run a cmdlet as a workflow
The command also uses the `AsJob` and `JobName` workflow common parameters to ru
The command returns a `ContainerParentJob` object (`System.Management.Automation.ContainerParentJob`) that contains the workflow jobs on each computer.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
This cmdlet also supports workflow specific common parameters. For information, see [about_WorkflowCommonParameters](../PSWorkflow/About/about_WorkflowCommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to the `InputObject` parameter.
-## Outputs
+## OUTPUTS
### None This command does not generate any output. However, it runs the workflow, which might generate output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSWorkflowExecutionOption](../PSWorkflow/New-PSWorkflowExecutionOption.md)
PackageManagement Find Package (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Find-Package.md
Title: Find-Package
# Find-Package
-## Synopsis
+## SYNOPSIS
Finds software packages in available package sources.
-## Syntax
+## SYNTAX
### NuGet
Find-Package [-IncludeDependencies] [-AllVersions] [-Source <String[]>] [-Creden
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` and `Get-PackageSource` display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Find all available packages from a package provider
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transfor
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... ```
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### None `Find-Package` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentify[] `Find-Package` outputs a **SoftwareIdentity** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Find Packageprovider (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Find-PackageProvider.md
Title: Find-PackageProvider
# Find-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of Package Management package providers available for installation.
-## Syntax
+## SYNTAX
``` Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-IncludeDependencies]
Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-
[-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in package sources registered with PowerShellGet. These are package providers available for
the PowerShell Gallery with the **PackageManagement** and **Provider** tags.
`Find-PackageProvider` also finds matching Package Management providers that are available in the Package Management Azure Blob store. Use the bootstrapper provider to find and install them.
-## Examples
+## EXAMPLES
### Example 1: Find all available package providers
Find-PackageProvider -Name "Gistprovider" -Source "PSGallery"
This command finds a package provider available by using a specified package source.
-## Parameters
+## PARAMETERS
### -AllVersions
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
+## INPUTS
-## Outputs
+## OUTPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into `Install-PackageProvider` to install the results of `Find-PackageProvider`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Package (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Get-Package.md
Title: Get-Package
# Get-Package
-## Synopsis
+## SYNOPSIS
Returns a list of all software packages that were installed with **PackageManagement**.
-## Syntax
+## SYNTAX
### msi
Get-Package [[-Name] <String[]>] [-RequiredVersion <String>] [-MinimumVersion <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Package` cmdlet returns a list of all software packages on the local computer that were installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as part of an `Invoke-Command` or `Enter-PSSession` command or script.
-## Examples
+## EXAMPLES
### Example 1: Get all installed packages
Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package
**RequiredVersion** parameter is a specific version of the package. The object is sent down the pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package.
-## Parameters
+## PARAMETERS
### -AdditionalArguments
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packageprovider (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Get-PackageProvider.md
Title: Get-PackageProvider
--- # Get-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of package providers that are connected to Package Management.
-## Syntax
+## SYNTAX
``` Get-PackageProvider [[-Name] <String[]>] [-ListAvailable] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or part of one or more provider names.
-## Examples
+## EXAMPLES
### Example 1: Get all currently loaded package providers
Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider installed.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageProvider[]
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packagesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Get-PackageSource.md
Title: Get-PackageSource
# Get-PackageSource
-## Synopsis
+## SYNOPSIS
Gets a list of package sources that are registered for a package provider.
-## Syntax
+## SYNTAX
### NuGet
Get-PackageSource [[-Name] <String>] [-Location <String>] [-Force] [-ForceBootst
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageSource` cmdlet gets a list of package sources that are registered with **PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` gets only those sources that are associated with the specified provider. Otherwise, the command returns all package sources that are registered with **PackageManagement**.
-## Examples
+## EXAMPLES
### Example 1: Get all package sources
MyNuget NuGet False https://www.nuget.org/api/v2
`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object is sent down the pipeline to `Get-PackageSource`.
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageSource[] Specifies one or more package sources.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
Specifies one or more package sources.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Import Packageprovider (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Import-PackageProvider.md
Title: Import-PackageProvider
# Import-PackageProvider
-## Synopsis
+## SYNOPSIS
Adds Package Management package providers to the current session.
-## Syntax
+## SYNTAX
``` Import-PackageProvider [-Name] <String[]> [-RequiredVersion <String>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. The provider that you import must be installed on the local computer.
Due to security reasons, **PackageManagement** requires C#-based providers to co
injected, see the `.csproj` project files on [https://github.com/oneget/oneget](https://github.com/oneget/oneget).
-## Examples
+## EXAMPLES
### Example 1: Import a package provider from the local computer
Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose
This command finds, installs, and imports a specific version of the Nuget package provider.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Implementation.PackageProvider You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into `Import-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Package (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Install-Package.md
Title: Install-Package
# Install-Package
-## Synopsis
+## SYNOPSIS
Installs one or more software packages.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-Package [-Credential <PSCredential>] [-Proxy <Uri>] [-ProxyCredential <P
[-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Package` cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Install a package by package name
PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -Maxi
**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The highest version in the range is installed.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Install-Package` accepts input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Packageprovider (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Install-PackageProvider.md
Title: Install-PackageProvider
--- # Install-PackageProvider
-## Synopsis
+## SYNOPSIS
Installs one or more Package Management package providers.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-PackageProvider [-Scope <String>] [-InputObject] <SoftwareIdentity[]> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-PackageProvider` cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules
them to your target computer. Use the following steps to do this:
Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider to the current Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Install a package provider from the PowerShell Gallery
so that only the current user can use it.
Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser ```
-## Parameters
+## PARAMETERS
### -AllVersions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a **SoftwareIdentity** object that can be piped into `Install-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProv
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-PackageProvider](Find-PackageProvider.md)
PackageManagement Register Packagesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Register-PackageSource.md
Title: Register-PackageSource
# Register-PackageSource
-## Synopsis
+## SYNOPSIS
Adds a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch
Register-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [[-Name]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package sources are always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.
-## Examples
+## EXAMPLES
### Example 1: Register a package source for the NuGet provider
Name ProviderName IsTrusted Location
MyNuGet NuGet False https://www.nuget.org/api/v2 ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Save Package (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Save-Package.md
Title: Save-Package
# Save-Package
-## Synopsis
+## SYNOPSIS
Saves packages to the local computer without installing them.
-## Syntax
+## SYNTAX
### PackageBySearch
Save-Package [-Path <String>] [-LiteralPath <String>] [-Credential <PSCredential
[-RoleCapability <String[]>] [-Command <String[]>] [-AcceptLicense] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The **Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same command.
-## Examples
+## EXAMPLES
### Example 1: Save a package to the local computer
PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg
`Save-Package` downloads the package file and its dependencies to the local computer. `Install-Package` installs the package and dependencies from the specified directory.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Save-Package` accepts objects from the pipeline.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Set Packagesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Set-PackageSource.md
Title: Set-PackageSource
# Set-PackageSource
-## Synopsis
+## SYNOPSIS
Replaces a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch (Default)
Set-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PackageSource` replaces a package source for a specified package provider. Package sources are always managed by a package provider.
-## Examples
+## EXAMPLES
### Example 1: Change a package source
eliminates prompts to verify the source when packages are installed.
PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Set-PackageSource` doesn't accept pipeline input.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Uninstall Package (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Uninstall-Package.md
Title: Uninstall-Package
# Uninstall-Package
-## Synopsis
+## SYNOPSIS
Uninstalls one or more software packages.
-## Syntax
+## SYNTAX
### PackageByInputObject
Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm]
[-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To find installed packages, use the `Get-Package` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a package
parameter:
`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )`
-## Parameters
+## PARAMETERS
### -AdditionalArguments
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
+## INPUTS
### SoftwareIdentity `Uninstall-Package` accepts **SoftwareIdentity** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### SoftwareIdentity `Uninstall-Package` returns a **SoftwareIdentity** object for each package uninstalled.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
and includes the provider's parameter set. For example, `Uninstall-Package` has
**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Unregister Packagesource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PackageManagement/Unregister-PackageSource.md
Title: Unregister-PackageSource
# Unregister-PackageSource
-## Synopsis
+## SYNOPSIS
Removes a registered package source.
-## Syntax
+## SYNTAX
### SourceBySearch
Unregister-PackageSource [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Unregister a package source for the Nuget provider
parameter:
`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )`
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Unregister-PackageSource` accepts **PackageSource** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### `Unregister-PackageSource` doesn't generate any output.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets and includes the provider's parameter set.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PowershellGet Find Command (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Find-Command.md
Title: Find-Command
# Find-Command
-## Synopsis
+## SYNOPSIS
Finds PowerShell commands in modules.
-## Syntax
+## SYNTAX
### All
Find-Command [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <Strin
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and workflows. `Find-Command` searches modules in registered repositories.
For each command found by `Find-Command`, a **PSGetCommandInfo** object is retur
**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module that contains the command.
-## Examples
+## EXAMPLES
### Example 1: Find all commands in a specified repository
VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modul
optional parameter, but displays status output in the PowerShell console. The verbose output is beneficial for troubleshooting.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetCommandInfo `Find-Command` outputs a **PSGetCommandInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowershellGet Find Dscresource (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Find-DscResource.md
Title: Find-DscResource
# Find-DscResource
-## Synopsis
+## SYNOPSIS
Finds Desired State Configuration (DSC) resources.
-## Syntax
+## SYNTAX
### All
Find-DscResource [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <S
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in modules. By default `Find-DscResource` searches all registered repositories.
For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object i
**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module.
-## Examples
+## EXAMPLES
### Example 1: Find all DSC resources
xDSCFirewall 1.6.21 xDSCFirewall PSGallery
dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetDscResourceInfo `Find-DscResource` returns a **PSGetDscResourceInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowershellGet Find Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Find-Module.md
Title: Find-Module
# Find-Module
-## Synopsis
+## SYNOPSIS
Finds modules in a repository that match specified criteria.
-## Syntax
+## SYNTAX
### All
Find-Module [[-Name] <string[]>] [-MinimumVersion <string>] [-MaximumVersion <st
[-Credential <pscredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. `Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be
The following examples use the [PowerShell Gallery](https://www.powershellgaller
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find a module by name
Version Name Repository Description
The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo `Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets such as `Install-Module`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
such as `Install-Module`.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowershellGet Find Rolecapability (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Find-RoleCapability.md
Title: Find-RoleCapability
# Find-RoleCapability
-## Synopsis
+## SYNOPSIS
Finds role capabilities in modules.
-## Syntax
+## SYNTAX
### All
Find-RoleCapability [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role capabilities and modules.
PowerShell role capabilities define which commands and applications are availabl
Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` extension.
-## Examples
+## EXAMPLES
### Example 1: Find role capabilities
The object is sent down the pipeline. `Install-Module` uses the **Verbose** para
status messages during the installation. After the install is finished, the `Get-InstalledModule` output confirms that the **JeaExamples** module was installed.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetRoleCapabilityInfo The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md)
PowershellGet Find Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Find-Script.md
Title: Find-Script
--- # Find-Script
-## Synopsis
+## SYNOPSIS
Finds a script.
-## Syntax
+## SYNTAX
``` Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>]
Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <St
[-Repository <String[]>] [-Credential <PSCredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Script` cmdlet finds a specified script in registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Find all available scripts
Version Name Type Repository D
This command uses the wildcard character (`*`) to find scripts that begin with Required-Script.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowershellGet Get Installedmodule (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Get-InstalledModule.md
Title: Get-InstalledModule
--- # Get-InstalledModule
-## Synopsis
+## SYNOPSIS
Gets a list of modules on the computer that were installed by PowerShellGet.
-## Syntax
+## SYNTAX
``` Get-InstalledModule [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllVersions] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` command.
-## Examples
+## EXAMPLES
### Example 1: Get all installed modules
Version Name Type Repository Descrip
This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
PowershellGet Get Installedscript (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Get-InstalledScript.md
Title: Get-InstalledScript
--- # Get-InstalledScript
-## Synopsis
+## SYNOPSIS
Gets an installed script.
-## Syntax
+## SYNTAX
``` Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes.
-## Examples
+## EXAMPLES
### Example 1: Get all installed scripts
Version Name Type Repository D
This command gets scripts where the name begins with **Required-Scri**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowershellGet Get Psrepository (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Get-PSRepository.md
Title: Get-PSRepository
# Get-PSRepository
-## Synopsis
+## SYNOPSIS
Gets PowerShell repositories.
-## Syntax
+## SYNTAX
``` Get-PSRepository [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the current user.
-## Examples
+## EXAMPLES
### Example 1: Get all module repositories
ProviderOptions : {}
This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Register-PSRepository](Register-PSRepository.md)
PowershellGet Install Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Install-Module.md
Title: Install-Module
--- # Install-Module
-## Synopsis
+## SYNOPSIS
Downloads one or more modules from a repository, and installs them on the local computer.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Module [-InputObject] <PSObject[]> [-Credential <PSCredential>] [-Scope
[-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online repository. The cmdlet verifies that search results are valid modules and copies the module folders
These examples use the [PowerShell Gallery](https://www.powershellgallery.com/)
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find and install a module
The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet*
`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current user's directory, `$home\Documents\WindowsPowerShell\Modules`.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### PSRepositoryItemInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSRepositoryItemInfo When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object for the module. This is the same information that you get from the `Find-Module` cmdlet.
-## Notes
+## NOTES
`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later releases of Windows.
the **RequiredVersion** value.
A module installation will also install any dependent modules specified as required by the module publisher. The publisher will specify the required modules and their versions in the module manifest.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowershellGet Install Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Install-Script.md
Title: Install-Script
# Install-Script
-## Synopsis
+## SYNOPSIS
Installs a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Script [-InputObject] <PSObject[]> [-Scope <String>] [-NoPathUpdate] [-P
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the payload is a valid PowerShell script, and copies the script file to a specified installation
cmdlets. When operating against multiple repositories, `Install-Script` installs
that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) from the first repository without any error.
-## Examples
+## EXAMPLES
### Example 1: Find a script and install it
repository.
The final command gets installed scripts and displays the results.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowershellGet New Scriptfileinfo (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/New-ScriptFileInfo.md
Title: New-ScriptFileInfo
# New-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Creates a script file with metadata.
-## Syntax
+## SYNTAX
### All
New-ScriptFileInfo [[-Path] <String>] [-Version <String>] [-Author <String>] -De
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the script.
script.
The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more information, see [about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Create a script file and specify its version, author, and description
Feature 5
Param() ```
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md)
PowershellGet Publish Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Publish-Module.md
Title: Publish-Module
# Publish-Module
-## Synopsis
+## SYNOPSIS
Publishes a specified module from the local computer to an online gallery.
-## Syntax
+## SYNTAX
### ModuleNameParameterSet (Default)
Publish-Module -Path <String> [-NuGetApiKey <String>] [-Repository <String>]
[-SkipAutomaticTags] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, stored as part of a user's profile in the gallery. You can specify the module to publish either by
from the module manifest, some metadata must be specified in `Publish-Module` pa
**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters match fields in a NuGet-based gallery.
-## Examples
+## EXAMPLES
### Example 1: Publish a module
specifies a name, version, description, and author, an error occurs.
Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -LicenseUri "http://contoso.com/license" -Tag "Active Directory","DSC" -ReleaseNote "Updated the ActiveDirectory DSC Resources to support adding users." ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.
module manifest, but some metadata can be specified in `Publish-Module` paramete
**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. For more information, see [Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui).
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowershellGet Publish Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Publish-Script.md
Title: Publish-Script
--- # Publish-Script
-## Synopsis
+## SYNOPSIS
Publishes a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Publish-Script -LiteralPath <String> [-NuGetApiKey <String>] [-Repository <Strin
[-Credential <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Script` cmdlet publishes the specified script to the online gallery.
-## Examples
+## EXAMPLES
### Example 1: Create a script file, add content to it, and publish it
The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Scrip
the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for `Demo-Script.ps1` in the **LocalRepo1** repository.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowershellGet Register Psrepository (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Register-PSRepository.md
Title: Register-PSRepository
--- # Register-PSRepository
-## Synopsis
+## SYNOPSIS
Registers a PowerShell repository.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSRepository [-Default] [-InstallationPolicy <String>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and
specific type of repository. For example, the NuGet provider is designed to inte
NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet attempts to find a OneGet provider that can handle the specified source location.
-## Examples
+## EXAMPLES
### Example 1: Register a repository
PowerShellGet polls available package providers and associates it with the NuGet
The second command gets registered repositories and displays the results.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSCredential ### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowershellGet Save Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Save-Module.md
Title: Save-Module
# Save-Module
-## Synopsis
+## SYNOPSIS
Saves a module and its dependencies on the local computer but doesn't install the module.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Module [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. `Save-Module` downloads and saves the most current version of a module. The files are saved to a
inspection by an administrator. The saved module can then be copied into the app
`Get-PSRepository` displays the local computer's registered repositories. You can use the `Find-Module` cmdlet to search registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Save a module
The object is sent down the pipeline to `Save-Module`. The **Path** parameter sp
store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents of **Path** where the files are stored.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowershellGet Save Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Save-Script.md
Title: Save-Script
# Save-Script
-## Synopsis
+## SYNOPSIS
Saves a script.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Script [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Script` cmdlet saves the specified script.
-## Examples
+## EXAMPLES
### Example 1: Save a script and validate the script's metadata
Version Name Author Description
specifies where to find the script. The script is saved in the location specified by the **Path** parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowershellGet Set Psrepository (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Set-PSRepository.md
Title: Set-PSRepository
--- # Set-PSRepository
-## Synopsis
+## SYNOPSIS
Sets values for a registered repository.
-## Syntax
+## SYNTAX
``` Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <Uri>]
Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <U
[-PackageManagementProvider <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are persistent for the current user and apply to all versions of PowerShell installed for that user.
-## Examples
+## EXAMPLES
### Example 1: Set the installation policy for a repository
Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.
This command sets the source location and publish location for **myInternalSource** to the specified URIs.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowershellGet Test Scriptfileinfo (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Test-ScriptFileInfo.md
Title: Test-ScriptFileInfo
--- # Test-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Validates a comment block for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Test-ScriptFileInfo [-Path] <String> [<CommonParameters>]
Test-ScriptFileInfo -LiteralPath <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns information about where the error is located or how to correct it.
-## Examples
+## EXAMPLES
### Example 1: Test a script file
At line:1 char:1
This command tests the script file Hello-World.ps1, which has no metadata associated with it.
-## Parameters
+## PARAMETERS
### -LiteralPath
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
PowershellGet Uninstall Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Uninstall-Module.md
Title: Uninstall-Module
# Uninstall-Module
-## Synopsis
+## SYNOPSIS
Uninstalls a module.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Module [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Module [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a module
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the pipeline to `Uninstall-Module` and is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### PSRepositoryItemInfo `Uninstall-Module` accepts **PSRepositoryItemInfo** objects from the pipeline.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowershellGet Uninstall Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Uninstall-Script.md
Title: Uninstall-Script
# Uninstall-Script
-## Synopsis
+## SYNOPSIS
Uninstalls a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a script
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script
`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the pipeline to `Uninstall-Script` and the script is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowershellGet Unregister Psrepository (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Unregister-PSRepository.md
Title: Unregister-PSRepository
--- # Unregister-PSRepository
-## Synopsis
+## SYNOPSIS
Unregisters a repository.
-## Syntax
+## SYNTAX
``` Unregister-PSRepository [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSRepository` cmdlet unregisters a repository for the current user.
-## Examples
+## EXAMPLES
### Example 1: Unregister a repository
This example uses `Get-PSRepository` to get all registered repositories, and use
Get-PSRepository | Unregister-PSRepository ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowershellGet Update Module (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Update-Module.md
Title: Update-Module
--- # Update-Module
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest version of specified modules from an online gallery to the local computer.
-## Syntax
+## SYNTAX
### All
Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're prompted to confirm the update before it's installed. Updates are installed only for modules that
found in `$env:PSModulePath`, an error is displayed.
To display the installed modules, use `Get-InstalledModule`.
-## Examples
+## EXAMPLES
### Example 1: Update all modules
Update-Module -Name SpeculationControl -Force
`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The **Force** parameter updates the module without requesting user confirmation.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
For PowerShell 5.1 or below, the default scope in an elevated session is **AllUsers**, and in a non-elevated session, **CurrentUser**. Module updates for **AllUsers**,
If `Update-Module` attempts to update binaries that are in use, `Update-Module`
that identifies the problem processes. The user is informed to retry `Update-Module` after the processes are stopped.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowershellGet Update Modulemanifest (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Update-ModuleManifest.md
Title: Update-ModuleManifest
# Update-ModuleManifest
-## Synopsis
+## SYNOPSIS
Updates a module manifest file.
-## Syntax
+## SYNTAX
### All
Update-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>
[-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file.
-## Examples
+## EXAMPLES
### Example 1: Update a module manifest
Update-ModuleManifest @Parms
**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Parms` and updates the module manifest, **TestManifest.psd1**.
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowershellGet Update Script (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Update-Script.md
Title: Update-Script
# Update-Script
-## Synopsis
+## SYNOPSIS
Updates a script.
-## Syntax
+## SYNTAX
### All
Update-Script [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated script is downloaded from the same repository as the installed version.
-## Examples
+## EXAMPLES
### Example 1: Update the specified script
Version Name Repository Description
parameter specifies the script version. `Get-InstalledScript` displays the updated version of the script.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowershellGet Update Scriptfileinfo (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/PowershellGet/Update-ScriptFileInfo.md
Title: Update-ScriptFileInfo
# Update-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Updates information for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Update-ScriptFileInfo [-LiteralPath] <String> [-Version <String>] [-Author <Stri
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for version, author, or description.
-## Examples
+## EXAMPLES
### Example 1: Update the version of a script file
Param()
**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the script. The **PassThru** parameter displays the script's contents in the PowerShell console.
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values for version, GUID, description, and author.
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
CimCmdlets Get Cimassociatedinstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Get-CimAssociatedInstance.md
Title: Get-CimAssociatedInstance
# Get-CimAssociatedInstance
-## Synopsis
+## SYNOPSIS
Retrieves the CIM instances that are connected to a specific CIM instance by an association.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimAssociatedInstance [[-Association] <String>] [-ResultClassName <String>]
[-ResourceUri <Uri>] -CimSession <CimSession[]> [-KeyOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the InputObject parameter is not specified, the cmdlet works in one of the fo
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get all the associated instances of a specific instance
named `$s`. The association class name for the **Win32_DependentService** is ret
the `Get-CimAssociatedInstance` cmdlet to get all the associated instances of the retrieved association class.
-## Parameters
+## PARAMETERS
### -Association
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets Get Cimclass (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Get-CimClass.md
Title: Get-CimClass
# Get-CimClass
-## Synopsis
+## SYNOPSIS
Gets a list of CIM classes in a specific namespace.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutS
[-QualifierName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-CimClass` cmdlet retrieves a list of CIM classes in a specific namespac
class name supplied, then the cmdlet returns all the classes in the namespace. Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.
-## Examples
+## EXAMPLES
### Example 1: Get all the class definitions
Get-CimClass -ClassName *disk* -CimSession $s
This set of commands creates a session with multiple computers and stores it into a variable `$s` using the `New-CimSession` cmdlet, and then gets the classes using the `Get-CimClass` cmdlet.
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimClass This cmdlet returns a CIM class object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimSession](New-CimSession.md)
CimCmdlets Get Ciminstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Get-CimInstance.md
Title: Get-CimInstance
# Get-CimInstance
-## Synopsis
+## SYNOPSIS
Gets the CIM instances of a class from a CIM server.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-Namespace <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
- If the either the **ComputerName** parameter or the **CimSession** parameter is specified, then this cmdlet uses the either the CimSession parameter value or **ComputerName** parameter value.
-## Examples
+## EXAMPLES
### Example 1: Get the CIM instances of a specified class
$s = New-CimSession -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s ```
-## Parameters
+## PARAMETERS
### -CimSession
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
+## INPUTS
### CIM Instance This cmdlet accepts an input objects specified with the InputObject parameter.
-## Outputs
+## OUTPUTS
### CIM Instance This cmdlet returns one or more CIM instance objects representing a snapshot of the CIM instances on the CIM server.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Get Cimsession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Get-CimSession.md
Title: Get-CimSession
# Get-CimSession
-## Synopsis
+## SYNOPSIS
Gets the CIM session objects from the current session.
-## Syntax
+## SYNTAX
### ComputerNameSet (Default)
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
sessions that were created in other PowerShell sessions or that were created on
For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
-## Examples
+## EXAMPLES
### Example 1: Get CIM sessions from the current PowerShell session
ComputerName : Server02
Protocol : WSMAN ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Import Binarymilog (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Import-BinaryMiLog.md
Title: Import-BinaryMiLog
# Import-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Used to re-create the saved objects based on the contents of an export file.
-## Syntax
+## SYNTAX
``` Import-BinaryMiLog [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
Use this cmdlet to re-create saved objects based on the contents of an export fi
`Export-BinaryMILog`. This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Restore objects exported to a file
stores the resulting object in a binary encoded file.
Import-BinaryMiLog -Path "Processes.bmil" ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
CimCmdlets Invoke Cimmethod (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Invoke-CimMethod.md
Title: Invoke-CimMethod
# Invoke-CimMethod
-## Synopsis
+## SYNOPSIS
Invokes a method of a CIM class.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Invoke-CimMethod -Query <String> [-QueryDialect <String>] -CimSession <CimSessio
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not a common scenario.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' } ```
-## Parameters
+## PARAMETERS
### -Arguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### CIM class
This cmdlet accepts a CIM class as an input object.
This cmdlet accepts a CIM instance as an input object.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Ciminstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/New-CimInstance.md
Title: New-CimInstance
# New-CimInstance
-## Synopsis
+## SYNOPSIS
Creates a CIM instance.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
New-CimInstance [-CimClass] <CimClass> [[-Property] <IDictionary>] [-OperationTi
[-ComputerName <String[]>] [-ClientOnly] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `New-CimInstance` cmdlet creates an instance of a CIM class based on the cla
either the local computer or a remote computer. By default, the `New-CimInstance` cmdlet creates an instance on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Create an instance of a CIM class
that **Prop1** and **Prop2** actually exist and that the keys are marked correct
You cannot use the **ComputerName** or **CimSession** parameter with the **ClientOnly** parameter.
-## Parameters
+## PARAMETERS
### -CimClass
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains the CIM instance information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Cimsession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/New-CimSession.md
Title: New-CimSession
--- # New-CimSession
-## Synopsis
+## SYNOPSIS
Creates a CIM session.
-## Syntax
+## SYNTAX
### CredentialParameterSet (Default)
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-
[-SessionOption <CimSessionOptions>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
identifiers.
This cmdlet returns a CIM session object that can be used by all other CIM cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session with default options
$SessionOption = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server1 -SessionOption $SessionOption ```
-## Parameters
+## PARAMETERS
### -Authentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no inputs.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)
CimCmdlets New Cimsessionoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/New-CimSessionOption.md
Title: New-CimSessionOption
# New-CimSessionOption
-## Synopsis
+## SYNOPSIS
Specifies advanced options for the New-CimSession cmdlet.
-## Syntax
+## SYNTAX
### ProtocolTypeSet (Default)
New-CimSessionOption [-Impersonation <ImpersonationType>] [-PacketIntegrity] [-P
[-UICulture <CultureInfo>] [-Culture <CultureInfo>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet has two parameter sets, one for WsMan options and one for Distribute
Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session options object for DCOM
This example specifies the culture that is used for the CIM session. By default,
client is used when performing operations. However, the default culture can be overridden using the **Culture** parameter.
-## Parameters
+## PARAMETERS
### -Culture
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### CIMSessionOption This cmdlet returns an object that contains CIM session options information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
CimCmdlets Register Cimindicationevent (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Register-CimIndicationEvent.md
Title: Register-CimIndicationEvent
--- # Register-CimIndicationEvent
-## Synopsis
+## SYNOPSIS
Subscribes to indications using a filter expression or a query expression.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Register-CimIndicationEvent [-Namespace <String>] [-Query] <String> [-QueryDiale
[-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
a query expression. Use the **SourceIdentifier** parameter give a name to the su
This cmdlet returns an **EventSubscription** object. You can use this object to cancel the subscription.
-## Examples
+## EXAMPLES
### Example 1: Register the events generated by a class
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifi
Get-Event -SourceIdentifier "ProcessStarted" ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet outputs an **EventSubscription** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Event](../microsoft.powershell.utility/get-event.md)
CimCmdlets Remove Ciminstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Remove-CimInstance.md
Title: Remove-CimInstance
--- # Remove-CimInstance
-## Synopsis
+## SYNOPSIS
Removes a CIM instance from a computer.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Remove-CimInstance [-ComputerName <String[]>] [[-Namespace] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is not specified, the cmdlet works in one of th
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Remove the CIM instance
$var = Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "note
Remove-CimInstance -InputObject $var ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### None This cmdlet produces no outputs.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimInstance](New-CimInstance.md)
CimCmdlets Remove Cimsession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Remove-CimSession.md
Title: Remove-CimSession
# Remove-CimSession
-## Synopsis
+## SYNOPSIS
Removes one or more CIM sessions.
-## Syntax
+## SYNTAX
### CimSessionSet (Default)
Remove-CimSession -InstanceId <Guid[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CimSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Remove-CimSession` cmdlet removes one or more CIM session objects from the local PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove all the CIM sessions
but only output what would happen if it were done.
Remove-CimSession -Name a* -WhatIf ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains CIM session information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimSession](Get-CimSession.md)
CimCmdlets Set Ciminstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/CimCmdlets/Set-CimInstance.md
Title: Set-CimInstance
--- # Set-CimInstance
-## Synopsis
+## SYNOPSIS
Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Set-CimInstance [-ComputerName <String[]>] [-Namespace <String>] [-OperationTime
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not very common.
-## Examples
+## EXAMPLES
### Example 1: Set the CIM instance
$x = New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";Use
Set-CimInstance -CimInstance $x -Property @{VariableValue="somevalue"} -PassThru ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance When the **Passthru** parameter is specified, this cmdlet returns a modified CIM instance object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
Microsoft.PowerShell.Archive Compress Archive (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Archive/Compress-Archive.md
Title: Compress-Archive
# Compress-Archive
-## Synopsis
+## SYNOPSIS
Creates a compressed archive, or zipped file, from specified files and directories.
-## Syntax
+## SYNTAX
### Path (Default)
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-Compressi
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compress-Archive` cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, with optional compression, into
The maximum file size is 2 GB because there's a limitation of the underlying API
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Compress files to create an archive file
The command updates `Draft.Zip` with newer versions of existing files in the `C:
directory and its subdirectories. And, new files that were added to `C:\Reference` or its subdirectories are included in the updated `Draft.Zip` archive.
-## Parameters
+## PARAMETERS
### -CompressionLevel
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo The cmdlet only returns a **FileInfo** object when you use the **PassThru** parameter.
-## Notes
+## NOTES
Using recursion and sending objects down the pipeline can duplicate files in your archive. For example, if you use `Get-ChildItem` with the **Recurse** parameter, each **FileInfo** and
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Expand-Archive](Expand-Archive.md)
Microsoft.PowerShell.Archive Expand Archive (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Archive/Expand-Archive.md
Title: Expand-Archive
# Expand-Archive
-## Synopsis
+## SYNOPSIS
Extracts files from a specified archive (zipped) file.
-## Syntax
+## SYNTAX
### Path (Default)
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-Pa
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Expand-Archive` cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage.
-## Examples
+## EXAMPLES
### Example 1: Extract the contents of an archive
specified by the **DestinationPath** parameter.
Expand-Archive -Path Draftv2.Zip -DestinationPath C:\Reference ```
-## Parameters
+## PARAMETERS
### -DestinationPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to an existing archive file.
-## Outputs
+## OUTPUTS
### System.IO.FileSystemInfo When the `-PassThru` parameter is used, the cmdlet outputs a list of files that were expanded from the archive.
-## Notes
+## NOTES
The [ZIP file specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) does not specify a standard way of encoding filenames that contain non-ASCII characters. The
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Compress-Archive](compress-archive.md)
Microsoft.PowerShell.Core About Language Keywords (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Language_Keywords.md
--- description: Describes the keywords in the PowerShell scripting language. Locale: en-US Previously updated : 06/25/2021 Last updated : 03/07/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_keywords?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Language Keywords
about topic for the keyword and the information that follows the table.
| Keyword | Reference | | ------------ | ----------------------------------------------------------------------------------------------------------------- |
-| Begin | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Break | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
-| Catch | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Class | [about_Classes](about_Classes.md) |
-| Continue | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
-| Data | [about_Data_Sections](about_Data_Sections.md) |
-| Define | Reserved for future use |
-| Do | [about_Do](about_Do.md), [about_While](about_While.md) |
-| DynamicParam | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
-| Else | [about_If](about_If.md) |
-| Elseif | [about_If](about_If.md) |
-| End | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Enum | [about_Enum](about_Enum.md) |
-| Exit | [Described in this topic](#exit) |
-| Filter | [about_Functions](about_Functions.md) |
-| Finally | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| For | [about_For](about_For.md) |
-| ForEach | [about_ForEach](about_ForEach.md) |
-| From | Reserved for future use |
-| Function | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Hidden | [about_Hidden](about_Hidden.md) |
-| If | [about_If](about_If.md) |
-| In | [about_ForEach](about_ForEach.md) |
-| Param | [about_Functions](about_Functions.md) |
-| Process | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Return | [about_Return](about_Return.md) |
-| Static | [about_Classes](about_Classes.md) |
-| Switch | [about_Switch](about_Switch.md) |
-| Throw | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Trap | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Try | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Until | [about_Do](about_Do.md) |
-| Using | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
-| Var | Reserved for future use |
-| While | [about_While](about_While.md), [about_Do](about_Do.md) |
+| `begin` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `break` | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
+| `catch` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `class` | [about_Classes](about_Classes.md) |
+| `continue` | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
+| `data` | [about_Data_Sections](about_Data_Sections.md) |
+| `define` | Reserved for future use |
+| `do` | [about_Do](about_Do.md), [about_While](about_While.md) |
+| `dynamicparam` | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
+| `else` | [about_If](about_If.md) |
+| `elseif` | [about_If](about_If.md) |
+| `end` | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `enum` | [about_Enum](about_Enum.md) |
+| `exit` | [Described in this topic](#exit) |
+| `filter` | [about_Functions](about_Functions.md) |
+| `finally` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `for` | [about_For](about_For.md) |
+| `foreach` | [about_ForEach](about_ForEach.md) |
+| `from` | Reserved for future use |
+| `function` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `hidden` | [about_Hidden](about_Hidden.md) |
+| `if` | [about_If](about_If.md) |
+| `in` | [about_ForEach](about_ForEach.md) |
+| `param` | [about_Functions](about_Functions.md) |
+| `process` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `return` | [about_Return](about_Return.md) |
+| `static` | [about_Classes](about_Classes.md) |
+| `switch` | [about_Switch](about_Switch.md) |
+| `throw` | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `trap` | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `try` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `until` | [about_Do](about_Do.md) |
+| `using` | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
+| `var` | Reserved for future use |
+| `while` | [about_While](about_While.md), [about_Do](about_Do.md) |
The following keywords are used by PowerShell workflows: -- InlineScript-- Parallel-- Sequence-- Workflow
+- `inlinescript`
+- `parallel`
+- `sequence`
+- `workflow`
PowerShell workflows are only supported in PowerShell 5.1. For more information about workflows, see [Running PowerShell Commands in a Workflow](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574197(v=ws.11)).
-## Begin
+## `begin`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Process`, and `End` keywords. The `Begin` statement list runs one time before
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`process`, and `end` keywords. The `begin` statement list runs one time before
any objects are received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Break
+## `break`
Causes a script to exit a loop.
while (<condition>) {
} ```
-## Catch
+## `catch`
-Specifies a statement list to run if an error occurs in the accompanying `Try`
+Specifies a statement list to run if an error occurs in the accompanying `try`
statement list. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
try {<statement list>}
catch [[<error type>]] {<statement list>} ```
-## Class
+## `class`
Specifies a new class in PowerShell.
class <class-name> {
} ```
-## Continue
+## `continue`
Causes a script to stop running a loop and to go back to the condition. If the condition is met, the script begins the loop again.
while (<condition>) {
} ```
-## Data
+## `data`
In a script, defines a section that isolates data from the script logic. Can
-also include `If` statements and some limited commands.
+also include `if` statements and some limited commands.
Syntax:
Syntax:
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>} ```
-## Do
+## `do`
-Used with the `While` or `Until` keyword as a looping construct. PowerShell
-runs the statement list at least one time, unlike a loop that uses `While`.
+Used with the `while` or `until` keyword as a looping construct. PowerShell
+runs the statement list at least one time, unlike a loop that uses `while`.
-Syntax for `While`:
+Syntax for `while`:
```Syntax do {<statement list>} while (<condition>) ```
-Syntax for `Until`:
+Syntax for `until`:
```Syntax do {<statement list>} until (<condition>) ```
-## DynamicParam
+## `dynamicparam`
-Specifies one part of the body of a function, along with the `Begin`, `Process`,
-and `End` keywords. Dynamic parameters are added at run time.
+Specifies one part of the body of a function, along with the `begin`, `process`,
+and `end` keywords. Dynamic parameters are added at runtime.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Else
+## `else`
-Used with the `If` keyword to specify the default statement list.
+Used with the `if` keyword to specify the default statement list.
Syntax:
if (<condition>) {<statement list>}
else {<statement list>} ```
-## Elseif
+## `elseif`
-Used with the `If` and `Else` keywords to specify additional conditionals. The
-`Else` keyword is optional.
+Used with the `if` and `else` keywords to specify additional conditionals. The
+`else` keyword is optional.
Syntax:
elseif (<condition>) {<statement list>}
else {<statement list>} ```
-## End
+## `end`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. The `End` statement list runs one time after all
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. The `end` statement list runs one time after all
the objects have been received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Enum
+## `enum`
`enum` is used to declare an enumeration; a distinct type that consists of a set of named labels called the enumerator list.
enum <enum-name> {
} ```
-## Exit
+## `exit`
Causes PowerShell to exit a script or a PowerShell instance.
On Unix, only positive numbers between `[byte]::MinValue` and
example, `-2` is transformed to `254`. In PowerShell, the `exit` statement sets the value of the `$LASTEXITCODE`
-variable. In the Windows Command Shell (cmd.exe), the exit statement sets the
+variable. In the Windows Command Shell (`cmd.exe`), the exit statement sets the
value of the `%ERRORLEVEL%` environment variable. Any argument that is non-numeric or outside the platform-specific range is translated to the value of `0`.
-In the following example, the user sets the error level variable value to 4 by
-adding `exit 4` to the script file `test.ps1`.
+In the following example, the user sets the error level variable value to **4**
+by adding `exit 4` to the script file `test.ps1`.
```cmd C:\scripts\test>type test.ps1
the `exit` command. If the script has no `exit` statement, the exit code is
always `0` when the script completes without error or `1` when the script terminates from an unhandled exception.
-## Filter
+## `filter`
Specifies a function in which the statement list runs one time for each input
-object. It has the same effect as a function that contains only a Process
+object. It has the same effect as a function that contains only a `process`
block. Syntax:
Syntax:
filter <name> {<statement list>} ```
-## Finally
+## `finally`
Defines a statement list that runs after statements that are associated with
-`Try` and `Catch`. A `Finally` statement list runs even if you press
-<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the Exit keyword
+`try` and `catch`. A `finally` statement list runs even if you press
+<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the `exit` keyword
in the script. Syntax:
catch [<error type>] {<statement list>}
finally {<statement list>} ```
-## For
+## `for`
-Defines a loop by using a condition.
+Defines a loop with a condition.
Syntax:
Syntax:
for (<initialize>; <condition>; <iterate>) { <statement list> } ```
-## ForEach
+## `foreach`
-Defines a loop by using each member of a collection.
+Defines a loop using each member of a collection.
Syntax: ```Syntax
-ForEach (<item> in <collection>) { <statement list> }
+foreach (<item> in <collection>) { <statement list> }
```
-## From
+## `from`
Reserved for future use.
-## Function
+## `function`
Creates a named statement list of reusable code. You can name the scope a
-function belongs to. And, you can specify one or more named parameters by using
-the `Param` keyword. Within the function statement list, you can include
-`DynamicParam`, `Begin`, `Process`, and `End` statement lists.
+function belongs to. You can also specify one or more named parameters by using
+the `param` keyword. Within the function statement list, you can include
+`dynamicparam`, `begin`, `process`, and `end` statement lists.
Syntax: ```Syntax function [<scope:>]<name> { param ([type]<$pname1> [, [type]<$pname2>])
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>}
Syntax:
```Syntax function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## If
+## `if`
Defines a conditional.
Syntax:
if (<condition>) {<statement list>} ```
-## Hidden
+## `hidden`
-Hides class members from the default results of the `Get-Member` cmdlet, and
-from IntelliSense and tab completion results.
+Hides class members from the default results of the `Get-Member` cmdlet,
+IntelliSense, and tab completion results.
Syntax: ```Syntax
-Hidden [data type] $member_name
+hidden [data type] $member_name
```
-## In
+## `in`
-Used in a `ForEach` statement to create a loop that uses each member of a
+Used in a `foreach` statement to create a loop that uses each member of a
collection. Syntax: ```Syntax
-ForEach (<item> in <collection>){<statement list>}
+foreach (<item> in <collection>){<statement list>}
```
-## Param
+## `param`
Defines the parameters in a function.
function [<scope:>]<name> {
} ```
-## Process
+## `process`
-Specifies a part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. When a `Process` statement list receives input
-from the pipeline, the `Process` statement list runs one time for each element
-from the pipeline. If the pipeline provides no objects, the `Process` statement
+Specifies a part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. When a `process` statement list receives input
+from the pipeline, the `process` statement list runs one time for each element
+from the pipeline. If the pipeline provides no objects, the `process` statement
list does not run. If the command is the first command in the pipeline, the
-`Process` statement list runs one time.
+`process` statement list runs one time.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Return
+## `return`
Causes PowerShell to leave the current scope, such as a script or function, and writes the optional expression to the output.
Syntax:
return [<expression>] ```
-## Static
+## `static`
Specifies the property or method defined is common to all instances of the
-class in which is defined.
+class in which it is defined.
-See `Class` for usage examples.
+See `class` for usage examples.
-## Switch
+## `switch`
-To check multiple conditions, use a `Switch` statement. The `Switch` statement
-is equivalent to a series of `If` statements, but it is simpler.
+To check multiple conditions, use a `switch` statement. The `switch` statement
+is equivalent to a series of `if` statements, but it is simpler.
-The `Switch` statement lists each condition and an optional action. If a
+The `switch` statement lists each condition and an optional action. If a
condition obtains, the action is performed. Syntax 1:
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
} ```
-## Throw
+## `throw`
Throws an object as an error.
Syntax:
throw [<object>] ```
-## Trap
+## `trap`
Defines a statement list to be run if an error is encountered. An error type requires brackets. The second pair of brackets indicates that the error type
Syntax:
trap [[<error type>]] {<statement list>} ```
-## Try
+## `try`
Defines a statement list to be checked for errors while the statements run. If
-an error occurs, PowerShell continues running in a `Catch` or `Finally`
+an error occurs, PowerShell continues running in a `catch` or `finally`
statement. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
catch [[<error type>]] {<statement list>}
finally {<statement list>} ```
-## Until
+## `until`
-Used in a `Do` statement as a looping construct where the statement list is
+Used in a `do` statement as a looping construct where the statement list is
executed at least one time. Syntax:
Syntax:
do {<statement list>} until (<condition>) ```
-## Using
+## `using`
-Allows to indicate which namespaces are used in the session. Classes and
-members require less typing to mention them. You can also include classes from
-modules.
+Allows indicating which namespaces are used in the session. Classes and members
+require less typing to mention them. You can also include classes from modules.
Syntax #1:
Syntax #2:
using module <module-name> ```
-## While
+## `while`
The `while` statement is a looping construct where the condition is tested
-before the statements are executed. If the condition is FALSE, then the
+before the statements are executed. If the condition is false, then the
statements do not execute. Statement syntax:
while (<condition>) {
} ```
-When used in a `Do` statement, `while` is part of a looping construct where
+When used in a `do` statement, `while` is part of a looping construct where
the statement list is executed at least one time.
-Do loop Syntax:
+`do` loop Syntax:
```Syntax do {<statement list>} while (<condition>)
Microsoft.PowerShell.Core Add History (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Add-History.md
Title: Add-History
# Add-History
-## Synopsis
+## SYNOPSIS
Appends entries to the session history.
-## Syntax
+## SYNTAX
``` Add-History [[-InputObject] <PSObject[]>] [-Passthru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-History` cmdlet adds entries to the end of the session history, that is, the list of commands entered during the current session.
export the commands to a CSV or XML file, then import the commands, and pass the
`Add-History`. You can use this cmdlet to add specific commands to the history or to create a single history file that includes commands from more than one session.
-## Examples
+## EXAMPLES
### Example 1: Add commands to the history of a different session
The **InputObject** parameter passes the results of the command in parentheses t
cmdlet. The command in parentheses, which is executed first, imports the `history.xml` file into PowerShell. The `Add-History` cmdlet then adds the commands in the file to the session history.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.HistoryInfo You can pipe a **HistoryInfo** object to this cmdlet.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a **HistoryInfo** object if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the
the file.
To modify the session history, export the session to a CSV or XML file, modify the file, import the file, and use `Add-History` to append it to the current session history.
-## Related links
+## RELATED LINKS
[Clear-History](Clear-History.md)
Microsoft.PowerShell.Core Clear History (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Clear-History.md
Title: Clear-History
# Clear-History
-## Synopsis
+## SYNOPSIS
Deletes entries from the PowerShell session command history.
-## Syntax
+## SYNTAX
### IDParameter (Default)
Clear-History [[-Count] <int>] [-CommandLine <string[]>] [-Newest] [-WhatIf] [-C
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Clear-History` deletes the command history from a PowerShell session. Each PowerShell session has its own command history. To display the command history, use the `Get-History` cmdlet.
history. To display the `PSReadLine` configuration for command history, use `Get
`PSReadLine` shipped with PowerShell 5.0 and above. For more information, see [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Delete the command history from a PowerShell session
command history. The **Id** parameter specifies to begin with **Id 7**. The **Co
specifies to delete five commands, inclusive of the specified **Id**. `Get-History` displays the updated command history and confirms that five commands were deleted, **Id 3** - **Id 7**.
-## Parameters
+## PARAMETERS
### -CommandLine
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-History`.
-## Outputs
+## OUTPUTS
### None `Clear-History` does not generate any output.
-## Notes
+## NOTES
The PowerShell session history is a list of the commands entered during a PowerShell session. You can view the history, add and delete commands, and run commands from the history. For more
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Related links
+## RELATED LINKS
[about_History](About/about_History.md)
Microsoft.PowerShell.Core Clear Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Clear-Host.md
Title: Clear-Host
# Clear-Host
-## Synopsis
+## SYNOPSIS
Clears the display in the host program.
-## Syntax
+## SYNTAX
``` Clear-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Host` function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function
function.
Because the behavior of the `Clear-Host` function is determined by the host program, `Clear-Host` might work differently in different host programs.
-## Examples
+## EXAMPLES
### Example 1
PS C:>
This command uses the `cls` alias of `Clear-Host` to clear the current display.
-## Parameters
+## PARAMETERS
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Clear-Host`.
-## Outputs
+## OUTPUTS
### None `Clear-Host` does not generate any output
-## Notes
+## NOTES
`Clear-Host` is a simple function, not an advanced function. As such, you cannot use common parameters, such as **Debug**, in a `Clear-Host` command.
-## Related links
+## RELATED LINKS
[Get-Host](../Microsoft.PowerShell.Utility/Get-Host.md)
Microsoft.PowerShell.Core Connect Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Connect-PSSession.md
Title: Connect-PSSession
--- # Connect-PSSession
-## Synopsis
+## SYNOPSIS
Reconnects to disconnected sessions.
-## Syntax
+## SYNTAX
### Name (Default)
Connect-PSSession -InstanceId <Guid[]> [-ThrottleLimit <Int32>] [-WhatIf] [-Conf
Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Reconnect to a session
The ninth command disconnects from the session in the `$s` variable.The administ
PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session (**PSSession**) to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession This cmdlet returns an object that represents the session to which it reconnected.
-## Notes
+## NOTES
- This cmdlet is only available on Windows platforms.
This cmdlet returns an object that represents the session to which it reconnecte
sessions are considered to be idle from the moment that they are disconnected, even if commands are running in the disconnected session.
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](Disconnect-PSSession.md)
Microsoft.PowerShell.Core Debug Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Debug-Job.md
Title: Debug-Job
# Debug-Job
-## Synopsis
+## SYNOPSIS
Debugs a running background or remote job.
-## Syntax
+## SYNTAX
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
accepts a running job object, name, ID, or instance ID as input, and starts a de
the script it is running. The debugger `quit` command stops the job and running script. The `exit` command detaches the debugger, and allows the job to continue to run.
-## Examples
+## EXAMPLES
### Example 1: Debug a job by job ID
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Disable Experimentalfeature (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Disable-ExperimentalFeature.md
Title: Disable-ExperimentalFeature
--- # Disable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Disable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Disable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ExperimentalFeature` cmdlet disables experimental features by removing the named experimental features from the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Disable an experimental feature
PS C:\> Disable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to disable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Enable-ExperimentalFeature](Enable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Disable Psremoting (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Disable-PSRemoting.md
Title: Disable-PSRemoting
--- # Disable-PSRemoting
-## Synopsis
+## SYNOPSIS
Prevents PowerShell endpoints from receiving remote connections.
-## Syntax
+## SYNTAX
``` Disable-PSRemoting [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is only available on the Windows platform. It is not available on Li
versions of PowerShell. To run this cmdlet, start PowerShell with the **Run as administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Prevent remote access to all PowerShell session configurations
PowerShell.6 NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrat
PowerShell.6.2.0 NT AUTHORITY\NETWORK AccessDenied, NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Adm ... ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
configurations, you effectively prevent remote users from establishing sessions that connect to the computer.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disable Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Disable-PSSessionConfiguration.md
Title: Disable-PSSessionConfiguration
--- # Disable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Disables session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Disable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
connect to the computer.
To disable all session configurations on the computer, use `Disable-PSRemoting`.
-## Examples
+## EXAMPLES
### Example 1: Disable the default configuration
For more information, see the about_Remote_Troubleshooting Help topic.
> Disabling the configuration does not prevent you from changing the configuration using the > `Set-PSSessionConfiguration` cmdlet. It only prevents use of the configuration.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Enable-PSSessionConfiguration](Enable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disconnect Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Title: Disconnect-PSSession
# Disconnect-PSSession
-## Synopsis
+## SYNOPSIS
Disconnects from a session.
-## Syntax
+## SYNTAX
### Session (Default)
Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
[-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1 - Disconnect a session by name
timeout to the 12-hour maximum.
The seventh command gets the value of the **IdleTimeout** property of the disconnected session, which is measured in milliseconds. The output confirms that the command was successful.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session to `Disconnect-PSSession`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession `Disconnect-PSSession` returns an object that represents the session that it disconnected.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Enable Experimentalfeature (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Enable-ExperimentalFeature.md
Title: Enable-ExperimentalFeature
--- # Enable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Enable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Enable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ExperimentalFeature` cmdlet enables experimental features by adding the named experimental features to the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Enable an experimental feature
Enable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to enable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Enable Psremoting (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Title: Enable-PSRemoting
--- # Enable-PSRemoting
-## Synopsis
+## SYNOPSIS
Configures the computer to receive remote commands.
-## Syntax
+## SYNTAX
``` Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the > `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Configure a computer to receive remote commands
OS Microsoft Windows 10.0.18363
> The name of the firewall rule can be different depending on the version of Windows. Use the > `Get-NetFirewallRule` cmdlet to list the names of the rules on your system.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns strings that describe its results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
property of all session configurations to `$True`.
`Enable-PSRemoting` removes the **Deny_All** and **Network_Deny_All** settings. This provides remote access to session configurations that were reserved for local use.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enable Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Enable-PSSessionConfiguration.md
Title: Enable-PSSessionConfiguration
--- # Enable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Enables the session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Enable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-SecurityDescriptorSddl <String>] [-SkipNetworkProfileCheck] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
also sets the value of the **Enabled** property of the session configuration
(`AccessMode=Local`) security descriptor setting that allows only users of the local computer to use to the session configuration.
-## Examples
+## EXAMPLES
### Example 1: Re-enable the default session
$sddl = "O:NSG:BAD:P(A;;GXGWGR;;;BA)(A;;GAGR;;;S-1-5-21-123456789-188441444-3100
Enable-PSSessionConfiguration -Name MaintenanceShell -SecurityDescriptorSDDL $sddl ```
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To use this cmdlet, you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enter Pshostprocess (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Title: Enter-PSHostProcess
# Enter-PSHostProcess
-## Synopsis
+## SYNOPSIS
Connects to and enters into an interactive session with a local process.
-## Syntax
+## SYNTAX
### ProcessIdParameterSet (Default)
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
Enter-PSHostProcess -CustomPipeName <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSHostProcess` cmdlet connects to and enters into an interactive session with a local process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
To support attaching to processes on remote computers, the `Enter-PSHostProcess`
in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.
-## Examples
+## EXAMPLES
### Example Part 1: Start debugging a runspace within the PowerShell ISE process
cmdlet. This returns you to the `PS C:\>` prompt.
PS C:\> ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Enter-PSHostProcess` cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a PowerShell ISE
loaded the PowerShell engine.
To exit a process from within the process, type **exit**, and then press <kbd>Enter</kbd>.
-## Related links
+## RELATED LINKS
[Exit-PSHostProcess](Exit-PSHostProcess.md)
Microsoft.PowerShell.Core Enter Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Enter-PSSession.md
Title: Enter-PSSession
--- # Enter-PSSession
-## Synopsis
+## SYNOPSIS
Starts an interactive session with a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Enter-PSSession [-ContainerId] <String> [-ConfigurationName <String>] [-RunAsAdm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSSession` cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as if you were
information about how to set up PowerShell SSH remoting, see
To end the interactive session and disconnect from the remote computer, use the `Exit-PSSession` cmdlet, or type `exit`.
-## Examples
+## EXAMPLES
### Example 1: Start an interactive session
This example shows how to start an interactive session using SSH. It uses the **
specify the port to use and the **KeyFilePath** parameter to specify an RSA key used to authenticate the user on the remote computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.Runspaces.PSSession You can pipe a computer name, as a string, or a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
To connect to a remote computer, you must be a member of the Administrators group on the remote computer. To start an interactive session on the local computer, you must start PowerShell with the
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSSession](Exit-PSSession.md)
Microsoft.PowerShell.Core Exit Pshostprocess (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Exit-PSHostProcess.md
Title: Exit-PSHostProcess
--- # Exit-PSHostProcess
-## Synopsis
+## SYNOPSIS
Closes an interactive session with a local process.
-## Syntax
+## SYNTAX
``` Exit-PSHostProcess [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSHostProcess` cmdlet closes an interactive session with a local process that you have opened by running the `Enter-PSHostProcess` cmdlet. You run the `Exit-PSHostProcess` cmdlet from within the process, when you are finished debugging or troubleshooting a script that is running within a process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### Example 1: Exit a process
in the process, as described in `Enter-PSHostProcess`. After you type the `exit`
debugger, run the `Exit-PSHostProcess` cmdlet to close your interactive session with the process. The cmdlet closes your session in the process, and returns you to the `PS C:\>` prompt.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enter-PSHostProcess](Enter-PSHostProcess.md)
Microsoft.PowerShell.Core Exit Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Exit-PSSession.md
Title: Exit-PSSession
# Exit-PSSession
-## Synopsis
+## SYNOPSIS
Ends an interactive session with a remote computer.
-## Syntax
+## SYNTAX
``` Exit-PSSession [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the `Enter-PSSession` cmdlet.
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using
You can also use the `exit` keyword to end an interactive session. The effect is the same as using `Exit-PSSession`.
-## Examples
+## EXAMPLES
### Example 1: Start and stop an interactive session
PS>
This example uses the `exit` keyword to stop an interactive session started by using `Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet takes only the common parameters.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Export Modulemember (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Export-ModuleMember.md
Title: Export-ModuleMember
--- # Export-ModuleMember
-## Synopsis
+## SYNOPSIS
Specifies the module members that are exported.
-## Syntax
+## SYNTAX
``` Export-ModuleMember [[-Function] <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [-Alias <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ModuleMember` cmdlet specifies the module members that are exported from a script module (`.psm1`) file, or from a dynamic module created by using the `New-Module` cmdlet. Module members
module imports from other modules.
An `Export-ModuleMember` command is optional, but it is a best practice. Even if the command confirms the default values, it demonstrates the intention of the module author.
-## Examples
+## EXAMPLES
### Example 1: Export functions and aliases in a script module
This command shows how to use `Export-ModuleMember` in a dynamic module that is
In this example, `Export-ModuleMember` is used to export both the `Hi` alias and the `SayHello` function in the dynamic module.
-## Parameters
+## PARAMETERS
### -Alias
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
+## INPUTS
### System.String You can pipe function name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To exclude a member from the list of exported members, add an `Export-ModuleMember` command that lists all other members but omits the member that you want to exclude.
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Foreach Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/ForEach-Object.md
Title: ForEach-Object
--- # ForEach-Object
-## Synopsis
+## SYNOPSIS
Performs an operation against each item in a collection of input objects.
-## Syntax
+## SYNTAX
### ScriptBlockSet (Default)
ForEach-Object [-InputObject <PSObject>] -Parallel <ScriptBlock> [-ThrottleLimit
[-TimeoutSeconds <Int32>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ForEach-Object` cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified by using the **InputObject** parameter.
command.
Terminating errors can be converted to non-terminating errors using PowerShell try/catch or trap blocks.
-## Examples
+## EXAMPLES
### Example 1: Divide integers in an array
Line |
The nested scriptblock can't access the `$test2` variable and an error is thrown.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns objects that are determined by the input.
-## Notes
+## NOTES
- The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe input to a **Foreach** statement. For more information about the **Foreach** statement, see
This cmdlet returns objects that are determined by the input.
> referenced objects that don't change. But if the object state is being modified then you must > used thread safe objects, such as .Net **System.Collection.Concurrent** types (See Example 11).
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Core Get Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-Command.md
Title: Get-Command
--- # Get-Command
-## Synopsis
+## SYNOPSIS
Gets all commands.
-## Syntax
+## SYNTAX
### CmdletSet (Default)
Get-Command [[-Name] <String[]>] [-Module <String[]>]
[-UseAbbreviationExpansion] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Command` cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. `Get-Command` gets the commands from
information from help topics.
Starting in Windows PowerShell 5.0, results of the `Get-Command` cmdlet display a **Version** column by default. A new **Version** property has been added to the **CommandInfo** class.
-## Examples
+## EXAMPLES
### Example 1: Get cmdlets, functions, and aliases
Application getconf 0.0.0.0 /u
Application command 0.0.0.0 /usr/bin/command ```
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe command names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandInfo
Represents cmdlets.
Represents functions and filters.
-## Notes
+## NOTES
- When more than one command that has the same name is available to the session, `Get-Command` returns the command that runs when you type the command name. To get commands that have the same
Represents functions and filters.
`$PSModuleAutoLoadingPreference` preference variable. For more information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Export-PSSession](../Microsoft.PowerShell.Utility/Export-PSSession.md)
Microsoft.PowerShell.Core Get Experimentalfeature (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-ExperimentalFeature.md
Title: Get-ExperimentalFeature
--- # Get-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Gets experimental features.
-## Syntax
+## SYNTAX
``` Get-ExperimentalFeature [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ExperimentalFeature` cmdlet returns all experimental features discovered by PowerShell. Experimental features can come from modules or the PowerShell engine. Experimental features allow users to safely test new features and provide feedback (typically via GitHub) before the design is considered complete and any changes can become a breaking change.
-## Examples
+## EXAMPLES
### Example 1
Name Enabled Source Description
PSImplicitRemotingBatching False PSEngine Batch implicit remoting proxy commands to improve performance ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[] Name or names of experimental features to return.
-## Outputs
+## OUTPUTS
### ExperimentalFeature Returns instances that match the requested names or all experimental features if no name is specified.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Get Help (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-Help.md
Title: Get-Help
# Get-Help
-## Synopsis
+## SYNOPSIS
Displays information about PowerShell commands and concepts.
-## Syntax
+## SYNTAX
### AllUsersView (Default)
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Detailed]
[-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Examples
+### EXAMPLES
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Examples] [-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Parameters
+### PARAMETERS
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Parameter <String[]>
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] [-ShowWindow] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Help` cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, workflows, providers, aliases, and
For information about parameter attributes, such as **Required** and **Position*
> in a module, import the module, either by using the `Import-Module` cmdlet or by running a cmdlet > that's included in the module.
-## Examples
+## EXAMPLES
### Example 1: Display basic help information about a cmdlet
your functions and scripts, see [about_Comment_Based_Help](./About/about_Comment
Get-Help -Name C:\PS-Test\MyScript.ps1 ```
-## Parameters
+## PARAMETERS
### -Category
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-Help`.
-## Outputs
+## OUTPUTS
### ExtendedCmdletHelpInfo
If you get a conceptual help article, `Get-Help` returns it as a string.
If you get a command that has a help file, `Get-Help` returns a **MamlCommandHelpInfo** object.
-## Notes
+## NOTES
PowerShell 3.0 doesn't include help files. To download and install the help files that `Get-Help` reads, use the `Update-Help` cmdlet. You can use the `Update-Help` cmdlet to download and install
following fields:
- **Accepts wildcard characters**. Indicates whether the value of a parameter can include wildcard characters, such as an asterisk (`*`) or question mark (`?`).
-## Related links
+## RELATED LINKS
[about_Command_Syntax](About/about_Command_Syntax.md)
Microsoft.PowerShell.Core Get History (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-History.md
Title: Get-History
--- # Get-History
-## Synopsis
+## SYNOPSIS
Gets a list of the commands entered during the current session.
-## Syntax
+## SYNTAX
``` Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-History` cmdlet gets the session history, that is, the list of commands entered during the current session.
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Get the session history
command.
Get-History | Format-List -Property * ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64 You can pipe a history ID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a history object for each history item that it gets.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the run order, the status, and the start and end times of the command. As you enter each
Starting in Windows PowerShell 3.0, the default value of the `$MaximumHistoryCou
variable is `4096`. In Windows PowerShell 2.0, the default value is `64`. For more information about the `$MaximumHistoryCount` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core Get Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-Job.md
Title: Get-Job
--- # Get-Job
-## Synopsis
+## SYNOPSIS
Gets PowerShell background jobs that are running in the current session.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Get-Job [-IncludeChildJob] [-ChildJobState <JobState>] [-HasMoreData <Boolean>]
Get-Job [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Job` cmdlet gets objects that represent the background jobs that were started in the current session. You can use `Get-Job` to get jobs that were started by using the `Start-Job`
into the session before you run a `Get-Job` command, either by using the `Import
by using or getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get all background jobs started in the current session
Access is denied.
For more information, see the [about_Remote_Troubleshooting](./about/about_Remote_Troubleshooting.md) Help topic.
-## Parameters
+## PARAMETERS
### -After
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.RemotingJob This cmdlet returns objects that represent the jobs in the session.
-## Notes
+## NOTES
The **PSJobTypeName** property of jobs indicates the job type of the job. The property value is determined by the job type author. The following list shows common job types.
determined by the job type author. The following list shows common job types.
`Invoke-Command` cmdlet. - **PSWorkflowJob**. Job started by using the **AsJob** common parameter of workflows.
-## Related links
+## RELATED LINKS
[Invoke-Command](Invoke-Command.md)
Microsoft.PowerShell.Core Get Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-Module.md
Title: Get-Module
--- # Get-Module
-## Synopsis
+## SYNOPSIS
List the modules imported in the current session or that can be imported from the PSModulePath.
-## Syntax
+## SYNTAX
### Loaded (Default)
Get-Module [[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Module` cmdlet lists the PowerShell modules that have been imported, or that can be imported, into a PowerShell session. Without parameters, `Get-Module` gets modules that have been
Management Instrumentation (WMI) on the remote computer. Then use the **CIMSessi
`Import-Module` cmdlet and then run the imported commands, the commands run implicitly on the remote computer. You can use this WMI and CIM strategy to manage the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Get modules imported into the current session
The fourth command runs the `Get-Disk` command. Although the command is typed in
it runs implicitly on the remote computer from which it was imported. The command gets objects from the remote computer and returns them to the local session.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe module names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
This cmdlet returns objects that represent modules.
When you specify the **ListAvailable** parameter, `Get-Module` returns a **ModuleInfoGrouping** object, which is a type of **PSModuleInfo** object that has the same properties and methods.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are included in PowerShell are packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a snap-in
object, which is a type of **PSModuleInfo** object that has the same properties
remoting enabled. This includes the local computer. When you create a CIM session on the local computer, PowerShell uses DCOM, instead of WMI, to create the session.
-## Related links
+## RELATED LINKS
[Get-CimSession](../CimCmdlets/Get-CimSession.md)
Microsoft.PowerShell.Core Get Pshostprocessinfo (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-PSHostProcessInfo.md
Title: Get-PSHostProcessInfo
--- # Get-PSHostProcessInfo
-## Synopsis
+## SYNOPSIS
Gets process information about the PowerShell host.
-## Syntax
+## SYNTAX
### ProcessNameParameterSet (Default)
Get-PSHostProcessInfo [-Process] <Process[]> [<CommonParameters>]
Get-PSHostProcessInfo [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSHostProcessInfo` cmdlet gets information about PowerShell host processes running on the local computer. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### 1: Get a list of PowerShell hosts running on the system
ProcessName ProcessId AppDomainName
pwsh 13912 DefaultAppDomain ```
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### System.Diagnostics.Process You can pipe a **Process** object from `Get-Process` to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSHostProcessInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Process](../Microsoft.PowerShell.Management/get-process.md)
Microsoft.PowerShell.Core Get Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-PSSession.md
Title: Get-PSSession
--- # Get-PSSession
-## Synopsis
+## SYNOPSIS
Gets the PowerShell sessions on local and remote computers.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSSession [-InstanceId <Guid[]>] [<CommonParameters>]
Get-PSSession [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSession` cmdlet gets the user-managed PowerShell sessions (**PSSessions**) on local and remote computers.
the current session and connect to the specified computer.
For more information about PowerShell sessions, see [about_PSSessions](about/about_PSSessions.md).
-## Examples
+## EXAMPLES
### Example 1: Get sessions created in the current session
Get-PSSession -Id 2
This command gets the **PSSession** with ID 2. Because the value of the **ID** property is unique only in the current session, the **Id** parameter is valid only for local commands.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet gets user-managed sessions **PSSession** objects" such as those that are created by using the New-PSSession, `Enter-PSSession`, and Invoke-Command cmdlets. It does not get the
For more information about the values of the **State** property of sessions, see
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Get Pssessioncapability (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-PSSessionCapability.md
Title: Get-PSSessionCapability
--- # Get-PSSessionCapability
-## Synopsis
+## SYNOPSIS
Gets the capabilities of a specific user on a constrained session configuration.
-## Syntax
+## SYNTAX
``` Get-PSSessionCapability [-ConfigurationName] <String> [-Username] <String> [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionCapability` cmdlet gets the capabilities of a specific user on a constrained session configuration. Use this cmdlet to audit customized session configurations for users.
object. This object contains details about the PowerShell runspace the specified
with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.
-## Examples
+## EXAMPLES
### Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -F
This example returns details about the runspace the user CONTOSO\User would interact with when connecting to the Endpoint1 constrained endpoint.
-## Parameters
+## PARAMETERS
### -ConfigurationName
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.Runspaces.InitialSessionState
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSRoleCapabilityFile](New-PSRoleCapabilityFile.md)
Microsoft.PowerShell.Core Get Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Get-PSSessionConfiguration.md
Title: Get-PSSessionConfiguration
--- # Get-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Gets the registered session configurations on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSessionConfiguration [[-Name] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionConfiguration` cmdlet gets the session configurations that have been registered on the local computer. This is an advanced cmdlet that is designed to be used by system administrators
session configuration authors to examine and compare session configurations.
To create and register a session configuration, use the `Register-PSSessionConfiguration` cmdlet. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1 - Get session configurations on the local computer
create a session. This variable is set on the local computer, but it specifies a
the remote computer. For more information about the `$PSSessionConfiguration` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration
-## Notes
+## NOTES
- To run this cmdlet, start PowerShell with the **Run as administrator** option.
You cannot pipe input to this cmdlet.
commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Import Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Import-Module.md
Title: Import-Module
# Import-Module
-## Synopsis
+## SYNOPSIS
Adds modules to the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
[-NoClobber] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or
import CIM modules from the remote computer. The imported commands run implicitl
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Import the members of a module into the current session
Number Friendly Name OperationalStatus Total Size Partition Style
0 Virtual HD ATA Device Online 40 GB MBR ```
-## Parameters
+## PARAMETERS
### -Alias
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo, System.Reflection.Assembly You can pipe a module name, module object, or assembly object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSModuleInfo, or System.Management.Automation.PSCustomObject
By default, `Import-Module` does not generate any output. If you specify the **P
the cmdlet generates a **System.Management.Automation.PSModuleInfo** object that represents the module. If you specify the **AsCustomObject** parameter, it generates a **PSCustomObject** object.
-## Notes
+## NOTES
- Before you can import a module, the module must be installed on the local computer. That is, the module directory must be copied to a directory that is accessible to your local computer. For more
module. If you specify the **AsCustomObject** parameter, it generates a **PSCust
statement at the beginning of your script. This imports the module, including the class and enum definitions. For more information, see [about_Using](About/about_Using.md).
-## Related links
+## RELATED LINKS
[about_Modules](about/about_Modules.md)
Microsoft.PowerShell.Core Invoke Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Invoke-Command.md
Title: Invoke-Command
# Invoke-Command
-## Synopsis
+## SYNOPSIS
Runs commands on local and remote computers.
-## Syntax
+## SYNTAX
### InProcess (Default)
Invoke-Command [-AsJob] [-HideComputerName] -FilePath <String> -SSHConnection <H
[-RemoteDebug] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Command` cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single `Invoke-Command` command, you can run commands on
connection information. For more information about how to set up PowerShell SSH
Some code samples use splatting to reduce the line length. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Run a script on a server
$sshConnections =
$results = Invoke-Command -FilePath c:\Scripts\CollectEvents.ps1 -SSHConnection $sshConnections ```
-## Parameters
+## PARAMETERS
### -AllowRedirection
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
+## INPUTS
### System.Management.Automation.ScriptBlock You can pipe a command in a script block to `Invoke-Command`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob, System.Management.Automation.Runspaces.PSSession, or the output of the invoked command
This cmdlet returns a job object, if you use the **AsJob** parameter. If you spe
**InDisconnectedSession** parameter, `Invoke-Command` returns a **PSSession** object. Otherwise, it returns the output of the invoked command, which is the value of the **ScriptBlock** parameter.
-## Notes
+## NOTES
On Windows Vista, and later versions of the Windows operating system, to use the **ComputerName** parameter of `Invoke-Command` to run a command on the local computer, you must run PowerShell using
disconnect/reconnect features are currently not supported. For more information
PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Invoke History (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Invoke-History.md
Title: Invoke-History
--- # Invoke-History
-## Synopsis
+## SYNOPSIS
Runs commands from the session history.
-## Syntax
+## SYNTAX
``` Invoke-History [[-Id] <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-History` cmdlet runs commands from the session history. You can pass objects representing the commands from Get-History to `Invoke-History`, or you can identify commands in the
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Run the most recent command in the history
the command uses the `ForEach-Object` cmdlet to run the `Invoke-History` command
Get-History -Id 255 -Count 7 | ForEach {Invoke-History -Id $_.Id} ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a history **Id** to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output, but output might be generated by the commands that `Invoke-History` runs.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the order of execution, the status, and the start and end times of the command. As you
about the session history, see [about_History](About/about_History.md).
You can also refer to `Invoke-History` by its built-in aliases, `r` and `ihy`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core New Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-Module.md
Title: New-Module
--- # New-Module
-## Synopsis
+## SYNOPSIS
Creates a new dynamic module that exists only in memory.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
New-Module [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Function <String[]>]
[-ReturnResult] [-AsCustomObject] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Module` cmdlet creates a dynamic module from a script block. The members of the dynamic module, such as functions and variables, are immediately available in the session and remain
To make a dynamic module available to `Get-Module`, pipe a `New-Module` command
pipe the module object that `New-Module` returns to `Import-Module`. This action adds the dynamic module to the `Get-Module` list, but it does not save the module to disk or make it persistent.
-## Examples
+## EXAMPLES
### Example 1: Create a dynamic module
New-Module -ScriptBlock {function SayHello {"Hello, World!"}; SayHello} -ReturnR
Hello, World! ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a module name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo, System.Management.Automation.PSCustomObject, or None
This cmdlet generates a **PSModuleInfo** object, by default. If you use the **As
parameter, it generates a **PSCustomObject** object. If you use the **ReturnResult** parameter, it returns the result of evaluating the script block in the dynamic module.
-## Notes
+## NOTES
You can also refer to `New-Module` by its alias, `nmo`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Modulemanifest (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-ModuleManifest.md
Title: New-ModuleManifest
# New-ModuleManifest
-## Synopsis
+## SYNOPSIS
Creates a new module manifest.
-## Syntax
+## SYNTAX
### All
New-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>] [
[-DefaultCommandPrefix <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ModuleManifest` cmdlet creates a new module manifest (`.psd1`) file, populates its values, and saves the manifest file in the specified path.
values for certain properties. For more information, see
[Required metadata for items published to the PowerShell Gallery](/powershell/scripting/gallery/how-to/publishing-packages/publishing-a-package#required-metadata-for-items-published-to-the-powershell-gallery) in the Gallery documentation.
-## Examples
+## EXAMPLES
### Example 1 - Create a new module manifest
ExportedFormatFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\Event.
ExportedTypeFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml} ```
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.String By default, `New-ModuleManifest` doesn't generate any output. However, if you use the **PassThru** parameter, it generates a **System.String** object representing the module manifest.
-## Notes
+## NOTES
`New-ModuleManifest` running on Windows and non-Windows platforms creates module manifest (`.psd1`) files encoded as **UTF8NoBOM**.
The caller's session state is the session state into which a module is imported.
refers to the global session state, but when a module imports nested modules, the caller is the module and the caller's session state is the module's session state.
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Psrolecapabilityfile (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md
Title: New-PSRoleCapabilityFile
--- # New-PSRoleCapabilityFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a set of capabilities to be exposed through a session configuration.
-## Syntax
+## SYNTAX
``` New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-Description <String>]
New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that can be exposed through session configuration files. This includes determining which cmdlets,
in the **RoleDefinitions** field in a PowerShell Session Configuration (.pssc) f
This cmdlet was introduced in Windows PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Create a blank role capability file
$roleParameters = @{
New-PSRoleCapabilityFile @roleParameters ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSSessionConfigurationFile](New-PSSessionConfigurationFile.md)
Microsoft.PowerShell.Core New Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-PSSession.md
Title: New-PSSession
--- # New-PSSession
-## Synopsis
+## SYNOPSIS
Creates a persistent connection to a local or remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-PSSession [-Name <String[]>] [-Port <Int32>] [-HostName] <String[]> [-UserNa
New-PSSession [-Name <String[]>] -SSHConnection <Hashtable[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSession` cmdlet creates a PowerShell session (**PSSession**) on a local or remote computer. When you create a **PSSession**, PowerShell establishes a persistent connection to the
connection information. For more information about how to set up PowerShell SSH
> this if you are in an environment where you can be certain of the server certificate and the > network connection to the target system.
-## Examples
+## EXAMPLES
### Example 1: Create a session on the local computer
This example shows how to create multiple sessions using Secure Shell (SSH) and
contain connection information for each session. Note that this example requires that the target remote computers have SSH configured to support key based user authentication.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.URI, System.Management.Automation.Runspaces.PSSession You can pipe a string, URI, or session object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet uses the PowerShell remoting infrastructure. To use this cmdlet, the local computer and any remote computers must be configured for PowerShell remoting. For more
You can pipe a string, URI, or session object to this cmdlet.
more information about how to set up PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core New Pssessionconfigurationfile (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-PSSessionConfigurationFile.md
Title: New-PSSessionConfigurationFile
--- # New-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a session configuration.
-## Syntax
+## SYNTAX
``` New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Guid <Guid>]
New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Gui
[-FormatsToProcess <String[]>] [-AssembliesToLoad <String[]>] [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about session configurations and session configuration file
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Creating and using a NoLanguage session
AssembliesToLoad = 'System.Web.Services', 'FSharp.Compiler.CodeDom.dll'
} ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
Before using an edited session configuration file, use the `Test-PSSessionConfigurationFile` cmdlet to verify that the configuration file entries are valid.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core New Pssessionoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-PSSessionOption.md
Title: New-PSSessionOption
--- # New-PSSessionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a PSSession.
-## Syntax
+## SYNTAX
``` New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachineProfile] [-Culture <CultureInfo>]
New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachinePr
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [-IncludePortInSPN] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionOption` cmdlet creates an object that contains advanced options for a user-managed session (**PSSession**). You can use the object as the value of the **SessionOption**
in the session configuration. However, they do not take precedence over maximum
limits set in the session configuration. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Create a default session option
commands in the remote session. The data appears in the **ApplicationArguments**
The final `Invoke-Command` shows how the data might be used.
-## Parameters
+## PARAMETERS
### -ApplicationArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Remoting.PSSessionOption
-## Notes
+## NOTES
If the **SessionOption** parameter is not used in a command to create a **PSSession**, the session options are determined by the property values of the `$PSSessionOption` preference variable, if it
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Enter-PSSession](Enter-PSSession.md)
Microsoft.PowerShell.Core New Pstransportoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/New-PSTransportOption.md
Title: New-PSTransportOption
# New-PSTransportOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a session configuration.
-## Syntax
+## SYNTAX
``` New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int32>] [-MaxSessions <Int32>]
New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int3
[-OutputBufferingMode <OutputBufferingMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSTransportOption` cmdlet creates an object that contains transport options for session configurations. You can use the object as the value of the **TransportOption** parameter of cmdlets
session configurations, see [about_Session_Configurations](About/about_Session_C
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Generate a default transport option
The fourth command uses the `Format-List` cmdlet to display all properties of th
`$s` variable in a list. The output shows that the session has an idle time-out of one hour (360,000 milliseconds).
-## Parameters
+## PARAMETERS
### -IdleTimeoutSec
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.WSManConfigurationOption
-## Notes
+## NOTES
- The properties of a session configuration object vary with the options set for the session configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[New-PSSession](New-PSSession.md)
Microsoft.PowerShell.Core Out Default (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Out-Default.md
Title: Out-Default
--- # Out-Default
-## Synopsis
+## SYNOPSIS
Sends the output to the default formatter and to the default output cmdlet.
-## Syntax
+## SYNTAX
``` Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
This cmdlet isn't intended to be used by the end user. Other cmdlets are recomme
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md) file to control formatting.
-## Examples
+## EXAMPLES
### Example 1
Get-Process | Select-Object -First 5 | Out-Default
No error is thrown when using `Out-Default` but the output isn't changed if it's not explicitly called.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Custom](../Microsoft.PowerShell.Utility/Format-Custom.md)
Microsoft.PowerShell.Core Out Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Out-Host.md
Title: Out-Host
# Out-Host
-## Synopsis
+## SYNOPSIS
Sends output to the command line.
-## Syntax
+## SYNTAX
### All
Sends output to the command line.
Out-Host [-Paging] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
pipeline to the host executing the command. `Out-Host` ignores ANSI escape seque
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without trying to interpret or change them.
-## Examples
+## EXAMPLES
### Example 1: Display output one page at a time
Out-Host -InputObject $io
`Out-Host` uses the **InputObject** parameter to specify the `$io` variable and displays the history.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-Host`.
-## Outputs
+## OUTPUTS
### None `Out-Host` doesn't generate any output. It sends objects to the host for display.
-## Notes
+## NOTES
The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the **Paging** parameter in the PowerShell ISE, the following error is displayed:
variable and use the **InputObject** parameter to pass the data to the cmdlet.
`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Clear-Host](Clear-Host.md)
Microsoft.PowerShell.Core Out Null (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Out-Null.md
Title: Out-Null
--- # Out-Null
-## Synopsis
+## SYNOPSIS
Hides the output instead of sending it down the pipeline or displaying it.
-## Syntax
+## SYNTAX
``` Out-Null [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Null` cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen.
-## Examples
+## EXAMPLES
### Example 1: Delete output
Get-ChildItem | Out-Null
This command gets items in the current location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The cmdlets that contain the **Out** verb (the **Out** cmdlets) do not have parameters for names or file paths. To send data to an **Out** cmdlet, use a pipeline operator (`|`) to send the output
This cmdlet does not generate any output.
- `Out-Null` does not return any output objects. If you pipe the output of `Out-Null` to the Get-Member cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-Default](Out-Default.md)
Microsoft.PowerShell.Core Receive Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Receive-Job.md
Title: Receive-Job
--- # Receive-Job
-## Synopsis
+## SYNOPSIS
Gets the results of the PowerShell background jobs in the current session.
-## Syntax
+## SYNTAX
### Location (Default)
Receive-Job [-Keep] [-NoRecurse] [-Force] [-Wait] [-AutoRemoveJob] [-WriteEvents
[-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-Job` cmdlet gets the results of PowerShell background jobs, such as those started by using the `Start-Job` cmdlet or the **AsJob** parameter of any cmdlet.
custom job type into the session before it runs a `Receive-Job` command, either
For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get results for a particular job
Cannot find drive. A drive with the name 'Z' does not exist.
+ PSComputerName : localhost ```
-## Parameters
+## PARAMETERS
### -AutoRemoveJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe job objects to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the results of the commands in the job.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Receive Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Receive-PSSession.md
Title: Receive-PSSession
# Receive-PSSession
-## Synopsis
+## SYNOPSIS
Gets results of commands in disconnected sessions
-## Syntax
+## SYNTAX
### Session (Default)
Receive-PSSession -Name <String> [-OutTarget <OutTarget>] [-JobName <String>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
Some examples use splatting to reduce the line length and improve readability. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Connect to a PSSession
the command is run in the same session, `Receive-PSSession` returns the results
and reuses the same job object. The command saves the job in the `$j2` variable. The `Receive-Job` cmdlet gets the results of the job in the `$j` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession
You can pipe the instance Ids of sessions this cmdlet.
You can pipe session names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job or PSObject
This cmdlet returns the results of commands that ran in the disconnected session
value or default value of the **OutTarget** parameter is Job, `Receive-PSSession` returns a job object. Otherwise, it returns objects that represent that command results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
When you disconnect a **PSSession**, the session state is Disconnected and the a
- For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Register Argumentcompleter (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md
Title: Register-ArgumentCompleter
# Register-ArgumentCompleter
-## Synopsis
+## SYNOPSIS
Registers a custom argument completer.
-## Syntax
+## SYNTAX
### NativeSet
Register-ArgumentCompleter [-CommandName <String[]>] -ParameterName <String>
-ScriptBlock <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ArgumentCompleter` cmdlet registers a custom argument completer. An argument completer allows you to provide dynamic tab completion, at run time for any command that you specify.
-## Examples
+## EXAMPLES
### Example 1: Register a custom argument completer
The results are piped to the `ForEach-Object` cmdlet which use the **new** stati
[System.Management.Automation.CompletionResult](/dotnet/api/system.management.automation.completionresult) class to create a new **CompletionResult** object for each value.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet returns no output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Core Register Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md
Title: Register-PSSessionConfiguration
--- # Register-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Creates and registers a new session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSSessionConfiguration [-ProcessorArchitecture <String>] [-Name] <Strin
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration class and by using a script that runs in the session. Beginning in
For information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md). For information about session configuration files, see [about_Session_Configuration_Files](About/about_Session_Configuration_Files.md).
-## Examples
+## EXAMPLES
### Example 1: Register a NewShell session configuration
The script contains a single command that uses dot sourcing to run the user's
For more information about profiles, see [about_Profiles](./About/about_Profiles.md). For more information about dot sourcing, see [about_Scopes](./About/about_Scopes.md).
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigContainerElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Remove Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Remove-Job.md
Title: Remove-Job
# Remove-Job
-## Synopsis
+## SYNOPSIS
Deletes a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Remove-Job [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Job [-Command <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by the `Start-Job` cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
job. Or, use `Remove-Job` with the **Force** parameter to delete a running job.
Jobs remain in the global job cache until you delete the background job or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Delete a job by using its name
asterisk (`*`) to specify that all the object's properties are displayed in a li
`Remove-Job` uses the **InstanceId** parameter to specify the job to delete.
-## Parameters
+## PARAMETERS
### -Command
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
+## INPUTS
### System.Management.Automation.Job You can send a job object down the pipeline to `Remove-Job`.
-## Outputs
+## OUTPUTS
### None `Remove-Job` doesn't generate any output.
-## Notes
+## NOTES
A PowerShell job creates a new process. When the job completes, the process exits. When `Remove-Job` is run, the job's state is removed. If a job stops before completion and its process hasn't exited, the process is forcibly terminated.
-## Related links
+## RELATED LINKS
[about_Jobs](./About/about_Jobs.md)
Microsoft.PowerShell.Core Remove Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Remove-Module.md
Title: Remove-Module
--- # Remove-Module
-## Synopsis
+## SYNOPSIS
Removes modules from the current session.
-## Syntax
+## SYNTAX
### name
Remove-Module [-FullyQualifiedName] <ModuleSpecification[]> [-Force] [-WhatIf] [
Remove-Module [-ModuleInfo] <PSModuleInfo[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Module` cmdlet removes the members of a module, such as cmdlets and functions, from the current session.
removed, but the assembly is not unloaded.
This cmdlet does not uninstall the module or delete it from the computer. It affects only the current PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove a module
Remove-Module -ModuleInfo $a
This command uses the **ModuleInfo** parameter to remove the BitsTransfer module.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo You can pipe module names and module objects to `Remove-Module`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
When removing a module, there is an event on the module that will execute. This event allows a module to react to being removed and perform some cleanup such as freeing up resources. Example:
For full consistency, it might be also useful to react to the closing of the Pow
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Action $OnRemoveScript
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Remove Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Remove-PSSession.md
Title: Remove-PSSession
--- # Remove-PSSession
-## Synopsis
+## SYNOPSIS
Closes one or more PowerShell sessions (PSSessions).
-## Syntax
+## SYNTAX
### Id (Default)
Remove-PSSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PSSession [-ComputerName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSession` cmdlet closes PowerShell sessions (**PSSessions**) in the current session. It stops any commands that are running in the **PSSessions**, ends the **PSSession**, and releases the
session.
If you have saved the **PSSession** in a variable, the session object remains in the variable, but the state of the **PSSession** is Closed.
-## Examples
+## EXAMPLES
### Example 1: Remove sessions by using IDs
Function EndPSS { Get-PSSession | Remove-PSSession }
This function deletes all of the **PSSessions** in the current session. After you add this function to your PowerShell profile, to delete all sessions, type `EndPSS`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
- The **Id** parameter is mandatory. To delete all the **PSSessions** in the current session, type `Get-PSSession | Remove-PSSession`.
This cmdlet does not return any objects.
- **PSSessions** are specific to the current session. When you end a session, the **PSSessions** that you created in that session are forcibly closed.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Save Help (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Save-Help.md
Title: Save-Help
--- # Save-Help
-## Synopsis
+## SYNOPSIS
Downloads and saves the newest help files to a file system directory.
-## Syntax
+## SYNTAX
### Path (Default)
Save-Help -LiteralPath <String[]> [[-Module] <PSModuleInfo[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Help` cmdlet downloads the newest help files for PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not
group on the computer to download the help files for these modules.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Save the help for the DhcpServer module
The command uses the `Save-Help` cmdlet to download and save the help files to t
The **Force** parameter is required when you have to run a `Save-Help` command more than one time each day.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSModuleInfo You can pipe a module object from the `Get-Module` cmdlet to the **Module** parameter of `Save-Help`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To save help for modules in the $pshome\Modules folder, start PowerShell by using the Run as administrator option. Only members of the Administrators group on the computer can download help
This cmdlet does not generate any output.
- The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Help](Get-Help.md)
Microsoft.PowerShell.Core Set Psdebug (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Set-PSDebug.md
Title: Set-PSDebug
# Set-PSDebug
-## Synopsis
+## SYNOPSIS
Turns script debugging features on and off, sets the trace level, and toggles strict mode.
-## Syntax
+## SYNTAX
### on
Set-PSDebug [-Trace <Int32>] [-Step] [-Strict] [<CommonParameters>]
Set-PSDebug [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSDebug` cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. By default, the PowerShell debug features are off.
When the **Trace** parameter has a value of `1`, each line of script is traced a
parameter has a value of `2`, variable assignments, function calls, and script calls are also traced. If the **Step** parameter is specified, you're prompted before each line of the script runs.
-## Examples
+## EXAMPLES
### Example 1: Set the trace level
Set-PSDebug -Off; foreach ($i in 1..3) {$i}
3 ```
-## Parameters
+## PARAMETERS
### -Off
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
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Debuggers](./About/about_Debuggers.md)
Microsoft.PowerShell.Core Set Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md
Title: Set-PSSessionConfiguration
--- # Set-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Changes the properties of a registered session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Set-PSSessionConfiguration [-Name] <String> [-RunAsCredential <PSCredential>]
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
to the local computer. For more information about session configurations, see [a
To see the properties of a session configuration, use the `Get-PSSessionConfiguration` cmdlet or the WSMan Provider. For more information about the WSMan Provider, type `Get-Help WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Create and change a session configuration
PSVersion 2.0
startupscript c:\ps-test\Maintenance.ps1 ```
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigLeafElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
properties that are introduced in PowerShell 3.0, such as **OutputBufferingMode*
PowerShell 2.0 commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Set Strictmode (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Set-StrictMode.md
Title: Set-StrictMode
--- # Set-StrictMode
-## Synopsis
+## SYNOPSIS
Establishes and enforces coding rules in expressions, scripts, and script blocks.
-## Syntax
+## SYNTAX
### Version (Default)
Set-StrictMode -Version <Version> [<CommonParameters>]
Set-StrictMode [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-StrictMode` cmdlet configures strict mode for the current scope and all child scopes, and turns it on and off. When strict mode is on, PowerShell generates a terminating error when the
When `Set-StrictMode` is off, PowerShell has the following behaviors:
- Results of improper function syntax vary with the error conditions - Attempting to retrieve a value using an invalid index in an array returns `$Null`
-## Examples
+## EXAMPLES
### Example 1: Turn on strict mode as version 1.0
InvalidArgument: Cannot convert value "abc" to type "System.Int32". Error: "Inpu
With strict mode set to version 3 or higher, invalid or out of bounds indexes result in errors.
-## Parameters
+## PARAMETERS
### -Off
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
While `Set-StrictMode` **Version** parameter will accept values greater than `3.0`, currently there are no additional rules defined for anything higher than `3.0`.
are no additional rules defined for anything higher than `3.0`.
`Set-StrictMode` is effective only in the scope in which it is set and in its child scopes. For more information about scopes in PowerShell, see [about_Scopes](about/about_Scopes.md).
-## Related links
+## RELATED LINKS
[Set-PSDebug](Set-PSDebug.md)
Microsoft.PowerShell.Core Start Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Start-Job.md
Title: Start-Job
# Start-Job
-## Synopsis
+## SYNOPSIS
Starts a PowerShell background job.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Start-Job [-Name <String>] [-Credential <PSCredential>] -LiteralPath <String>
[-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Job` cmdlet starts a PowerShell background job on the local computer.
directory of the caller that started the job.
> > The substitute in that scenario is `Start-ThreadJob` from the module **[ThreadJob](https://www.powershellgallery.com/packages/ThreadJob)**.
-## Examples
+## EXAMPLES
### Example 1: Start a background job
Major Minor Build Revision
5 1 14393 3383 ```
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### System.String You can use the pipeline to send an object with the **Name** property to the **Name** parameter. For example, you can pipeline a **FileInfo** object from `Get-ChildItem` to `Start-Job`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob `Start-Job` returns a **PSRemotingJob** object that represents the job that it started.
-## Notes
+## NOTES
To run in the background, `Start-Job` runs in its own session in the current session. When you use the `Invoke-Command` cmdlet to run a `Start-Job` command in a session on a remote computer, `Start-Job` runs in a session in the remote session.
-## Related links
+## RELATED LINKS
[about_Arrays](./about/about_arrays.md)
Microsoft.PowerShell.Core Stop Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Stop-Job.md
Title: Stop-Job
--- # Stop-Job
-## Synopsis
+## SYNOPSIS
Stops a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Stop-Job [-PassThru] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters
Stop-Job [-PassThru] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Job` cmdlet stops PowerShell background jobs that are in progress. You can use this cmdlet to stop all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing
either by using the `Import-Module` cmdlet or by using or getting a cmdlet in th
information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Stop a job on a remote computer by using Invoke-Command
display confirms that the state of the job is Stopped.
For more information about remote background jobs, see [about_Remote_Jobs](About/about_Remote_Jobs.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSRemotingJob This cmdlet returns a job object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Test Modulemanifest (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Test-ModuleManifest.md
Title: Test-ModuleManifest
--- # Test-ModuleManifest
-## Synopsis
+## SYNOPSIS
Verifies that a module manifest file accurately describes the contents of a module.
-## Syntax
+## SYNTAX
``` Test-ModuleManifest [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ModuleManifest` cmdlet verifies that the files that are listed in the module manifest (`.psd1`) file are actually in the specified paths.
module.
that `Get-Module` returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
-## Examples
+## EXAMPLES
### Example 1: Test a manifest
previous command generates no error, the command displays `$True`, and `$False`
You can use this function in conditional statements, such as those that might precede an `Import-Module` command or a command that uses the module.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe the path to a module manifest to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo This cmdlet returns a **PSModuleInfo** object that represents the module. It returns this object even if the manifest has errors.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core Test Pssessionconfigurationfile (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md
Title: Test-PSSessionConfigurationFile
--- # Test-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Verifies the keys and values in a session configuration file.
-## Syntax
+## SYNTAX
``` Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration files, see [about_Session_Configuration_Files](About/about_Session
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Test a session configuration file
the **ConfigFilePath** property value. Then it uses the `Test-PSSessionConfigura
test the file in the **ConfigFilePath** value. The **Verbose** parameter returns the file error when the file fails the test.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe a session configuration file path to `Test-PSSessionConfigurationFile`.
-## Outputs
+## OUTPUTS
### System.Boolean
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Unregister Pssessionconfiguration (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Unregister-PSSessionConfiguration.md
Title: Unregister-PSSessionConfiguration
--- # Unregister-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Deletes registered session configurations from the computer.
-## Syntax
+## SYNTAX
``` Unregister-PSSessionConfiguration [-Name] <String> [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If you accidentally delete the default **Microsoft.PowerShell** or **Microsoft.P
session configurations, use the `Enable-PSRemoting` cmdlet to restore them. For more information, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Delete a session configuration
Finally, the `New-PSSession` cmdlet tries to create a session that uses the **Ma
configuration. This time, the session fails because the **MaintenanceShell** configuration was deleted when the WinRM service restarted.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration You can pipe a session configuration object from `Get-PSSessionConfiguration` to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Update Help (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Update-Help.md
Title: Update-Help
# Update-Help
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest help files on your computer.
-## Syntax
+## SYNTAX
### Path (Default)
Update-Help [[-Module] <String[]>] [-FullyQualifiedModule <ModuleSpecification[]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Help` cmdlet downloads the newest help files for PowerShell modules and installs them on your computer. You need not restart PowerShell to make the change effective. You can use the
The `Update-Help` cmdlet was introduced in Windows PowerShell 3.0.
> Core modules, start PowerShell by using the **Run as administrator** option. > For example: `Start-Process pwsh.exe -Verb RunAs`.
-## Examples
+## EXAMPLES
### Example 1: Update help files for all modules
ADDSDeployment en-US
ADFS en-US 3.0.0.0 ```
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.IO.DirectoryInfo
You can pipe a directory path to `Update-Help`.
You can pipe a module object from the `Get-Module` cmdlet to `Update-Help`.
-## Outputs
+## OUTPUTS
### None `Update-Help` doesn't generate any output.
-## Notes
+## NOTES
To update help for the core PowerShell modules, that contain the commands that are installed with PowerShell, or any module in the `$PSHOME\Modules` directory, start PowerShell with the option to
that you author, see [Supporting Updatable Help](/powershell/scripting/developer
The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
Microsoft.PowerShell.Core Wait Job (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Wait-Job.md
Title: Wait-Job
--- # Wait-Job
-## Synopsis
+## SYNOPSIS
Waits until one or all of the PowerShell jobs running in the session are in a terminating state.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-State] <JobState> [<CommonParamete
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Job` cmdlet waits for a job to be in a terminating state before continuing execution. The terminating states are:
type, import the module that supports the custom job type into the session befor
module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Wait for all jobs
Wait-Job -Id 1
This command waits for the job with an ID value of 1.
-## Parameters
+## PARAMETERS
### -Any
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob This cmdlet returns job objects that represent the jobs in a terminating state. If the wait ends because the value of the **Timeout** parameter is exceeded, `Wait-Job` does not return any objects.
-## Notes
+## NOTES
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the following states:
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the fo
- Disconnected To direct `Wait-Job` to continue to wait for Suspended and Disconnected jobs, use the **Force** parameter.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Where Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/Where-Object.md
Title: Where-Object
--- # Where-Object
-## Synopsis
+## SYNOPSIS
Selects objects from a collection based on their property values.
-## Syntax
+## SYNTAX
### EqualSet (Default)
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>]
Where-Object [-InputObject <PSObject>] [-Property] <String> -Not [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Where-Object` cmdlet selects objects that have particular property values from the collection of objects that are passed to it. For example, you can use the `Where-Object` cmdlet to select files
The previous example is functionally equivalent to:
For more information about how booleans are evaluated, see [about_Booleans](about/about_Booleans.md).
-## Examples
+## EXAMPLES
### Example 1: Get stopped services
valid only in script blocks. You cannot use them in the comparison statement for
- For more information about the Updatable Help feature, see [about_Updatable_Help](./About/about_Updatable_Help.md).
-## Parameters
+## PARAMETERS
### -CContains
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns selected items from the input object set.
-## Notes
+## NOTES
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Diagnostics Get Counter (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Diagnostics/Get-Counter.md
Title: Get-Counter
# Get-Counter
-## Synopsis
+## SYNOPSIS
Gets performance counter data from local and remote computers.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Get-Counter [[-Counter] <String[]>] [-SampleInterval <Int32>] [-MaxSamples <Int6
Get-Counter [-ListSet] <String[]> [-ComputerName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
> performance objects, counters, and instances. The names will be different on a system that uses > another language. Use the `Get-Counter -ListSet` command to see the localized names.
-## Examples
+## EXAMPLES
### Example 1: Get the counter set list
objects down the pipeline. `Sort-Object` uses the **Property** parameter to sort
the columns for the output. The **AutoSize** parameter adjusts the column widths to minimize truncation.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String[] `Get-Counter` accepts pipeline input for counter paths and counter set names.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample
that are output are as follows:
**CounterSamples** property: **Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample**
-## Notes
+## NOTES
If no parameters are specified, `Get-Counter` gets one sample for each specified performance counter. Use the **MaxSamples** and **Continuous** parameters to get more samples.
command. To set different values for different counters, enter separate `Get-Cou
In PowerShell 7, when using the **ListSet** parameter, `Get-Counter` can't retrieve the **Description** property of the counter set. The **Description** is set to `$null`.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Diagnostics Get Winevent (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md
Title: Get-WinEvent
# Get-WinEvent
-## Synopsis
+## SYNOPSIS
Gets events from event logs and event tracing log files on local and remote computers.
-## Syntax
+## SYNTAX
### GetLogSet (Default)
Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede
[-FilterXml] <XmlDocument> [-Oldest] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
table queries.
If you're not running PowerShell as an Administrator, you might see error messages that you cannot retrieve information about a log.
-## Examples
+## EXAMPLES
### Example 1: Get all the logs from a local computer
Get-WinEvent -FilterHashtable $filter
In this example, `Get-WinEvent` gets all events from the **Application** log for the last two days except those that have a **Level** of 4 (Information).
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String, System.Xml.XmlDocument, System.Collections.Hashtable You can pipeline a **LogName** (string), a **FilterXML** query, or a **FilterHashtable** query to `Get-WinEvent`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Eventing.Reader.EventLogConfiguration, System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics.Eventing.Reader.ProviderMetadata
With the **ListProvider** parameter, `Get-WinEvent` returns
With all other parameters, `Get-WinEvent` returns **System.Diagnostics.Eventing.Reader.EventLogRecord** objects.
-## Notes
+## NOTES
`Get-WinEvent` is designed to replace the `Get-EventLog` cmdlet on computers running Windows Vista and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
is retained for backward compatibility.
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md)
Microsoft.PowerShell.Diagnostics New Winevent (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Diagnostics/New-WinEvent.md
Title: New-WinEvent
--- # New-WinEvent
-## Synopsis
+## SYNOPSIS
Creates a new Windows event for the specified event provider.
-## Syntax
+## SYNTAX
``` New-WinEvent [-ProviderName] <String> [-Id] <Int32> [-Version <Byte>] [[-Payload] <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `New-WinEvent` cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from PowerShell.
-## Examples
+## EXAMPLES
### Example 1
New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Wo
This command uses the `New-WinEvent` cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does to generate any output.
-## Notes
+## NOTES
- After the provider writes the event to an eventlog, you can use the `Get-WinEvent` cmdlet to get the event from the event log.
-## Related links
+## RELATED LINKS
[Get-WinEvent](Get-WinEvent.md)
Microsoft.PowerShell.Host Start Transcript (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Host/Start-Transcript.md
Title: Start-Transcript
--- # Start-Transcript
-## Synopsis
+## SYNOPSIS
Creates a record of all or part of a PowerShell session to a text file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Start-Transcript [[-OutputDirectory] <String>] [-Append] [-Force] [-NoClobber]
[-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transcript` cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the
When using the **Append** parameter, if the target file doesn't have a Byte Orde
`Start-Transcript` defaults to `ASCII` encoding in the target file. This behavior can result in improper encoding of mulitbyte characters in the transcript.
-## Examples
+## EXAMPLES
### Example 1: Start a transcript file with default settings
This command starts a transcript in the `Transcript0.txt` file in `C:\transcript
**NoClobber** parameter is used, the command prevents any existing files from being overwritten. If the `Transcript0.txt` file already exists, the command fails.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a confirmation message and the path to the output file.
-## Notes
+## NOTES
To stop a transcript, use the `Stop-Transcript` cmdlet. To record an entire session, add the `Start-Transcript` command to your profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Stop-Transcript](Stop-Transcript.md)
Microsoft.PowerShell.Host Stop Transcript (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Host/Stop-Transcript.md
Title: Stop-Transcript
--- # Stop-Transcript
-## Synopsis
+## SYNOPSIS
Stops a transcript.
-## Syntax
+## SYNTAX
``` Stop-Transcript [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Transcript` cmdlet stops a transcript that was started by the `Start-Transcript` cmdlet. Alternatively, you can end a session to stop a transcript.
-## Examples
+## EXAMPLES
### Example 1: Stop all transcripts
Stop-Transcript
This command stops all transcripts.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a status message and the path to the output file.
-## Notes
+## NOTES
* If a transcript has not been started, the command fails. *
-## Related links
+## RELATED LINKS
[Start-Transcript](Start-Transcript.md)
Microsoft.PowerShell.Management Add Content (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Add-Content.md
Title: Add-Content
--- # Add-Content
-## Synopsis
+## SYNOPSIS
Adds content to the specified items, such as adding words to a file.
-## Syntax
+## SYNTAX
### Path (Default)
Add-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Content` cmdlet appends content to a specified item or file. You can specify the content by typing the content in the command or by specifying an object that contains the content. If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Add a string to all text files with an exception
directory.
Add-Content -Path C:\Temp\* -Filter *.txt -Value "Done" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object, System.Management.Automation.PSCredential You can pipe values, paths, or credentials to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Add-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- When you pipe an object to `Add-Content`, the object is converted to a string before it is added to the item. The object type determines the string format, but the format might be different than
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Clear Content (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Clear-Content.md
Title: Clear-Content
--- # Clear-Content
-## Synopsis
+## SYNOPSIS
Deletes the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Content -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Content` cmdlet deletes the contents of an item, such as deleting the text from a file, but it does not delete the item. As a result, the item exists, but it is empty. The `Clear-Content` is similar to `Clear-Item`, but it works on items with contents, instead of items with values.
-## Examples
+## EXAMPLES
### Example 1: Delete all content from a directory
PS C:\>Get-Content C:\Test\Copy-Script.ps1 -Stream Zone.Identifier
PS C:\> ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-Content`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
You can use `Clear-Content` with the PowerShell FileSystem provider and with other providers that manipulate content. To clear items that are not considered to be content, such as items managed by
The `Clear-Content` cmdlet is designed to work with the data exposed by any prov
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Add-Content](Add-Content.md)
Microsoft.PowerShell.Management Clear Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Clear-Item.md
Title: Clear-Item
--- # Clear-Item
-## Synopsis
+## SYNOPSIS
Clears the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of a variable
You can use the **Include** and **Exclude** parameters to identify particular re
Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the **Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you can use
This cmdlet does not generate any output.
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem provider does not support this cmdlet. To clear files, use the `Clear-Content`.
-## Related links
+## RELATED LINKS
[Copy-Item](Copy-Item.md)
Microsoft.PowerShell.Management Clear Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Clear-ItemProperty.md
Title: Clear-ItemProperty
--- # Clear-ItemProperty
-## Synopsis
+## SYNOPSIS
Clears the value of a property but does not delete the property.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-ItemProperty` cmdlet clears the value of a property, but it does not delete the property. You can use this cmdlet to delete the data from a registry value.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of registry key
This command clears the data in the "Options" registry value in the "MyApp" subk
Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, `Clear-ItemProperty` generates a **PSCustomObject** object that represents the cleared item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero.
that represents the cleared item property. Otherwise, this cmdlet does not gener
the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Copy-ItemProperty](Copy-ItemProperty.md)
Microsoft.PowerShell.Management Clear Recyclebin (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Title: Clear-RecycleBin
# Clear-RecycleBin
-## Synopsis
+## SYNOPSIS
Clears the contents of a recycle bin.
-## Syntax
+## SYNTAX
### All
Clears the contents of a recycle bin.
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
using Windows **Empty Recycle Bin**.
This cmdlet was readded in PowerShell 7.
-## Examples
+## EXAMPLES
### 1: Clear all recycle bins
clear all recycle bins on the local computer.
An alternative is to replace `-Force` with `-Confirm:$false`.
-## Parameters
+## PARAMETERS
### -DriveLetter
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
+## INPUTS
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Convert Path (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Convert-Path.md
Title: Convert-Path
--- # Convert-Path
-## Synopsis
+## SYNOPSIS
Converts a path from a PowerShell path to a PowerShell provider path.
-## Syntax
+## SYNTAX
### Path (Default)
Convert-Path [-Path] <String[]> [<CommonParameters>]
Convert-Path -LiteralPath <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Convert-Path` cmdlet converts a path from a PowerShell path to a PowerShell provider path.
-## Examples
+## EXAMPLES
### Example 1: Convert the working directory to a standard file system path
PS C:\> Convert-Path ~
C:\Users\User01 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the converted path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use in programs and
available in your session, type `Get-PSProvider`. For more information, see
`Convert-Path` only converts existing paths. It cannot be used to convert a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Join-Path](Join-Path.md)
Microsoft.PowerShell.Management Copy Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Copy-Item.md
Title: Copy-Item
# Copy-Item
-## Synopsis
+## SYNOPSIS
Copies an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-Item -LiteralPath <String[]> [[-Destination] <String>] [-Container] [-Force
[-WhatIf] [-Confirm] [-FromSession <PSSession>] [-ToSession <PSSession>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-Item` cmdlet copies an item from one location to another location in the same namespace. For instance, it can copy a file to a folder, but it can't copy a file to a certificate drive.
This cmdlet can copy and rename items in the same command. To rename an item, en
the value of the **Destination** parameter. To rename an item and not copy it, use the `Rename-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Copy a file to the specified directory
The `Copy-Item` cmdlet has the **Container** parameter set to `$false`. This cau
the source folder to be copied but does not preserve the folder structure. Notice that files with the same name are overwritten in the destination folder.
-## Parameters
+## PARAMETERS
### -Container
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the copied item When you use the **PassThru** parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management Copy Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Copy-ItemProperty.md
Title: Copy-ItemProperty
--- # Copy-ItemProperty
-## Synopsis
+## SYNOPSIS
Copies a property and value from a specified location to another location.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key.
-## Examples
+## EXAMPLES
### Example 1: Copy a property from a registry key to another registry key
This command copies the property named "MyProperty" from the "MyApplication" reg
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **Passthru** parameter, this cmdlet generates a **PsCustomObject** representing the copied item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Debug Process (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Debug-Process.md
Title: Debug-Process
--- # Debug-Process
-## Synopsis
+## SYNOPSIS
Debugs one or more processes running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Debug-Process [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Process -InputObject <Process[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Process` cmdlet attaches a debugger to one or more running processes on a local computer. You can specify the processes by their process name or process ID (PID), or you can pipe process
objects to this cmdlet.
This cmdlet attaches the debugger that is currently registered for the process. Before using this cmdlet, verify that a debugger is downloaded and correctly configured.
-## Examples
+## EXAMPLES
### Example 1: Attach a debugger to a process on the computer
computer. It saves the resulting process object in the variable named `$P`.
The second command uses the **InputObject** parameter of the `Debug-Process` cmdlet to submit the process object in the `$P` variable.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32, System.Diagnostics.Process, System.String You can pipe a process ID (Int32), a process object (System.Diagnostics.Process), or a process name (String) to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see [AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Childitem (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-ChildItem.md
Title: Get-ChildItem
--- # Get-ChildItem
-## Synopsis
+## SYNOPSIS
Gets the items and child items in one or more specified locations.
-## Syntax
+## SYNTAX
### Items (Default)
Get-ChildItem [[-Filter] <string>] -LiteralPath <string[]> [-Include <string[]>]
[-ReadOnly] [-System] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the **Recurse**
of levels to recurse.
Locations are exposed to `Get-ChildItem` by PowerShell providers. A location can be a file system directory, registry hive, or a certificate store. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Get child items from a file system directory
Mode LastWriteTime Length Name
l---- 12/16/2021 9:29 AM tmp -> C:\Users\user1\AppData\Local\Temp ```
-## Parameters
+## PARAMETERS
### -Attributes
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
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ChildItem`.
-## Outputs
+## OUTPUTS
### System.Object
path.
If you use the **Name** parameter, `Get-ChildItem` returns the object names as strings.
-## Notes
+## NOTES
- `Get-ChildItem` can be run using any of the built-in aliases, `ls`, `dir`, and `gci`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
If you use the **Name** parameter, `Get-ChildItem` returns the object names as s
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md)
Microsoft.PowerShell.Management Get Clipboard (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Clipboard.md
Title: Get-Clipboard
--- # Get-Clipboard
-## Synopsis
+## SYNOPSIS
Gets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Get-Clipboard [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is not supported on macOS.**
returned as an array of strings similar to `Get-Content`.
> [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Get the content of the clipboard and display it to the command-line
Get-Clipboard
hello ```
-## Parameters
+## PARAMETERS
### -Raw
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-Clipboard](Set-Clipboard.md)
Microsoft.PowerShell.Management Get Computerinfo (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-ComputerInfo.md
Title: Get-ComputerInfo
--- # Get-ComputerInfo
-## Synopsis
+## SYNOPSIS
Gets a consolidated object of system and operating system properties.
-## Syntax
+## SYNTAX
``` Get-ComputerInfo [[-Property] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-ComputerInfo` cmdlet gets a consolidated object of system and operating system properties. This cmdlet was introduced in Windows PowerShell 5.1.
-## Examples
+## EXAMPLES
### Example 1: Get all computer properties
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0 ```
-## Parameters
+## PARAMETERS
### -Property
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Management.ComputerInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Content (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Content.md
Title: Get-Content
--- # Get-Content
-## Synopsis
+## SYNOPSIS
Gets the content of the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Content [-ReadCount <Int64>] [-TotalCount <Int64>] [-Tail <Int32>] -LiteralP
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Content` cmdlet gets the content of the item at the location specified by the path, such as the text in a file or the content of a function. For files, the content is read one line at a time
and returns a collection of objects, each of which represents a line of content.
Beginning in PowerShell 3.0, `Get-Content` can also get a specified number of lines from the beginning or end of an item.
-## Examples
+## EXAMPLES
### Example 1: Get the content of a text file
The **Raw** parameter ensures that the bytes are returned as a `[System.Byte[]]`
parameter was absent, the return value is a stream of bytes, which is interpreted by PowerShell as `[System.Object[]]`.
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int64, System.String[], System.Management.Automation.PSCredential You can pipe the read count, total count, paths, or credentials to `Get-Content`.
-## Outputs
+## OUTPUTS
### System.Byte, System.String `Get-Content` returns strings or bytes. The output type depends upon the type of content that you specify as input.
-## Notes
+## NOTES
The `Get-Content` cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Management Get Hotfix (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-HotFix.md
Title: Get-HotFix
# Get-HotFix
-## Synopsis
+## SYNOPSIS
Gets the hotfixes that are installed on local or remote computers.
-## Syntax
+## SYNTAX
### Default (Default)
Gets the hotfixes that are installed on local or remote computers.
Get-HotFix [[-Id] <string[]>] [-ComputerName <string[]>] [-Credential <pscredential>] ```
-### Description
+### DESCRIPTION
``` Get-HotFix [-Description <string[]>] [-ComputerName <string[]>] [-Credential <pscredential>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-Hotfix` cmdlet gets hotfixes, or updates, that are installed on the loc
specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.
-## Examples
+## EXAMPLES
### Example 1: Get all hotfixes on the local computer
This example gets the most recent hotfix installed on a computer.
objects by ascending order and uses the **Property** parameter to evaluate each **InstalledOn** date. The array notation `[-1]` selects the most recent installed hotfix.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### String You can pipe one or more computer names to Get-HotFix.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\CIMV2\Win32_QuickFixEngineering `Get-HotFix` returns objects that represent the hotfixes on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Installer (MSI) or the [Windows Update](https://update.microsoft.com) site are n
The `Get-HotFix` output might vary on different operating systems.
-## Related links
+## RELATED LINKS
[about_Arrays](../Microsoft.PowerShell.Core/About/about_Arrays.md)
Microsoft.PowerShell.Management Get Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Item.md
Title: Get-Item
--- # Get-Item
-## Synopsis
+## SYNOPSIS
Gets the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Excl
[-Force] [-Credential <PSCredential>] [-Stream <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Item` cmdlet gets the item at the specified location. It doesn't get the contents of the item at the location unless you use a wildcard character (`*`) to request all the contents of the
item.
This cmdlet is used by PowerShell providers to navigate through different types of data stores.
-## Examples
+## EXAMPLES
### Example 1: Get the current directory
The new properties that are now part of the output are:
- **Group** is the group owner - **Size** is the size of the file or directory as represented on a Unix system
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the objects that it gets. The type is determined by the type of objects in the path.
-## Notes
+## NOTES
This cmdlet does not have a **Recurse** parameter, because it gets only an item, not its contents. To get the contents of an item recursively, use `Get-ChildItem`.
This cmdlet is designed to work with the data exposed by any provider. To list t
available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Get Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-ItemProperty.md
Title: Get-ItemProperty
--- # Get-ItemProperty
-## Synopsis
+## SYNOPSIS
Gets the properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemProperty -LiteralPath <String[]> [[-Name] <String[]>] [-Filter <String>]
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemProperty` cmdlet gets the properties of the specified items. For example, you can use this cmdlet to get the value of the LastAccessTime property of a file object. You can also use this cmdlet to view registry entries and their values.
-## Examples
+## EXAMPLES
### Example 1: Get information about a specific directory
CTPVersion : 5
PSCompatibleVersion : 1.0,2.0 ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ItemProperty`.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime `Get-ItemProperty` returns an object for each item property that it gets. The object type depends on the object that is retrieved. For example, in a file system drive, it might return a file or folder.
-## Notes
+## NOTES
The `Get-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Get Itempropertyvalue (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md
Title: Get-ItemPropertyValue
--- # Get-ItemPropertyValue
-## Synopsis
+## SYNOPSIS
Gets the value for one or more properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <Strin
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemPropertyValue` gets the current value for a property that you specify when you use the **Name** parameter, located in a path that you specify with either the **Path** or **LiteralPath** parameters.
-## Examples
+## EXAMPLES
### Example 1: Get the value of the ProductID property
Target :
LinkType : ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime
This cmdlet returns an object for each item property value that it gets.
The object type depends on the property value that is retrieved. For example, in a file system drive, the cmdlet might return a file or folder.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, run the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-ItemProperty](Get-ItemProperty.md)
Microsoft.PowerShell.Management Get Location (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Location.md
Title: Get-Location
--- # Get-Location
-## Synopsis
+## SYNOPSIS
Gets information about the current working location or a location stack.
-## Syntax
+## SYNTAX
### Location (Default)
Get-Location [-PSProvider <String[]>] [-PSDrive <String[]>] [<CommonParameters>]
Get-Location [-Stack] [-StackName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Location` cmdlet gets an object that represents the current directory, much like the print working directory (pwd) command.
scripts, such as in a function that displays the current directory in the PowerS
You can also use this cmdlet to display the locations in a location stack. For more information, see the Notes and the descriptions of the **Stack** and **StackName** parameters.
-## Examples
+## EXAMPLES
### Example 1: Display your current drive location
change the prompt in your console by creating a new function named `prompt`.
To see the current prompt function, type the following command: `Get-Content Function:\prompt`
-## Parameters
+## PARAMETERS
### -PSDrive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo or System.Management.Automation.PathInfoStack If you use the **Stack** or **StackName** parameters, this cmdlet returns a **PathInfoStack** object. Otherwise, it returns a **PathInfo** object.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
cmdlet to display the locations in the unnamed stack. To make the unnamed stack
use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Pop-Location](Pop-Location.md)
Microsoft.PowerShell.Management Get Psdrive (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-PSDrive.md
Title: Get-PSDrive
--- # Get-PSDrive
-## Synopsis
+## SYNOPSIS
Gets drives in the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSDrive [[-Name] <String[]>] [-Scope <String>] [-PSProvider <String[]>] [<Co
Get-PSDrive [-LiteralName] <String[]> [-Scope <String>] [-PSProvider <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSDrive` cmdlet gets the drives in the current session. You can get a particular drive or all drives in the session.
You do not need to restart Windows PowerShell. Similarly, when an external drive
from the computer, Windows PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Get drives in the current session
The last command uses the `Get-CimInstance` cmdlet to display the instances of t
**Win32_NetworkConnection** class. Like **net use**, it returns only the persistent G: drive created by `New-PSDrive`.
-## Parameters
+## PARAMETERS
### -LiteralName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo This cmdlet returns objects that represent the drives in the session.
-## Notes
+## NOTES
* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the `Get-PSProvider` cmdlet. For more information, see
This cmdlet returns objects that represent the drives in the session.
sessions that are started without explicit credentials or with the credentials of the current user.
-## Related links
+## RELATED LINKS
[New-PSDrive](New-PSDrive.md)
Microsoft.PowerShell.Management Get Psprovider (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-PSProvider.md
Title: Get-PSProvider
--- # Get-PSProvider
-## Synopsis
+## SYNOPSIS
Gets information about the specified PowerShell provider.
-## Syntax
+## SYNTAX
``` Get-PSProvider [[-PSProvider] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSProvider` cmdlet gets the PowerShell providers in the current session. You can get a particular drive or all drives in the session.
PowerShell providers let you access a variety of data stores as though they were
For information about PowerShell providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Display a list of all available providers
This example shows that the tilde symbol (~) represents the value of the **Home*
FileSystem provider. The **Home** property value is optional, but for the **FileSystem** provider, it is defined as `$env:homedrive\$env:homepath` or `$home`.
-## Parameters
+## PARAMETERS
### -PSProvider
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### String[] You can pipe one or more provider name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ProviderInfo This cmdlet returns objects that represent the PowerShell providers in the session.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Process (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Process.md
Title: Get-Process
--- # Get-Process
-## Synopsis
+## SYNOPSIS
Gets the processes that are running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Get-Process -InputObject <Process[]> [-Module] [-FileVersionInfo] [<CommonParame
Get-Process -InputObject <Process[]> -IncludeUserName [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Process` cmdlet gets the processes on a local or remote computer.
supports methods that let you start and stop the process. You can also use the p
`Get-Process` cmdlet to get file version information for the program that runs in the process and to get the modules that the process loaded.
-## Examples
+## EXAMPLES
### Example 1: Get a list of all active processes on the local computer
The **mainWindowTitle** property is just one of many useful properties of the **
that `Get-Process` returns. To view all of the properties, pipe the results of a `Get-Process` command to the `Get-Member` cmdlet `Get-Process | Get-Member`.
-## Parameters
+## PARAMETERS
### -FileVersionInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Diagnostics.ProcessModule
By default, this cmdlet returns a **System.Diagnostics.Process** object. If you
use the **Module** parameter, without the **FileVersionInfo** parameter, it returns a **System.Diagnostics.ProcessModule** object.
-## Notes
+## NOTES
- You can also refer to this cmdlet by its built-in aliases, ps and gps. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
use the **Module** parameter, without the **FileVersionInfo** parameter, it retu
- You can also use the built-in alternate views of the processes available with `Format-Table`, such as **StartTime** and **Priority**, and you can design your own views.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-Service.md
Title: Get-Service
# Get-Service
-## Synopsis
+## SYNOPSIS
Gets the services on the computer.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Service [-DependentServices] [-RequiredServices] [-Include <String[]>] [-Exc
[-InputObject <ServiceController[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
computer's services are returned.
You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get all services on the computer
quotation marks, is sent down the pipeline to `Get-Service`.
"WinRM" | Get-Service ```
-## Parameters
+## PARAMETERS
### -DependentServices
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns objects that represent the services on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
appears before because Running because Stopped has a value of 1, and Running has
more information, see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Get Timezone (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Get-TimeZone.md
Title: Get-TimeZone
--- # Get-TimeZone
-## Synopsis
+## SYNOPSIS
Gets the current time zone or a list of available time zones.
-## Syntax
+## SYNTAX
### Name (Default)
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-TimeZone` cmdlet gets the current time zone or a list of available time zones.
-## Examples
+## EXAMPLES
### Example 1: Get the current time zone
Get-TimeZone -ListAvailable
This command gets all available time zones.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.TimeZoneInfo[]
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Set-TimeZone](Set-TimeZone.md)
Microsoft.PowerShell.Management Invoke Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Invoke-Item.md
Title: Invoke-Item
--- # Invoke-Item
-## Synopsis
+## SYNOPSIS
Performs the default action on the specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Invoke-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Item` cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with
the document file type.
The default action depends on the type of item and is determined by the PowerShell provider that provides access to the data.
-## Examples
+## EXAMPLES
### Example 1: Open a file
In this case, opening in Excel is the default action for `.xls` files.
Invoke-Item "C:\Documents and Settings\Lister\My Documents\*.xls" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None The command does not generate any output. However, output might be generated by the item that it invokes.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Join Path (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Join-Path.md
Title: Join-Path
--- # Join-Path
-## Synopsis
+## SYNOPSIS
Combines a path and a child path into a single path.
-## Syntax
+## SYNTAX
``` Join-Path [-Path] <String[]> [-ChildPath] <String> [[-AdditionalChildPath] <String[]>] [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-Path` cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.
-## Examples
+## EXAMPLES
### Example 1: Combine a path with a child path
The `AdditionalChildPath` parameter allows the joining of an unlimited number of
In this example, no parameter names are used, thus "a" binds to `Path`, "b" to `ChildPath` and "c-g" to `AdditionalChildPath`
-## Parameters
+## PARAMETERS
### -AdditionalChildPath
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the resulting path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun (the Path cmdlets) manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Move Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Move-Item.md
Title: Move-Item
--- # Move-Item
-## Synopsis
+## SYNOPSIS
Moves an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-Item -LiteralPath <String[]> [[-Destination] <String>] [-Force] [-Filter <S
[-Exclude <String[]>] [-PassThru] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-Item` cmdlet moves an item, including its properties, contents, and child items, from one location to another location. The locations must be supported by the same provider.
For example, it can move a file or subdirectory from one directory to another or
subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a file to another directory and rename it
misinterpreted.
The **Destination** parameter does not require a literal path, because the Destination variable also must be enclosed in single quotation marks, because it includes brackets that can be misinterpreted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the moved item When you use the *PassThru* parameter, this cmdlet generates an object representing the moved item. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet will move files between drives that are supported by the same provider, but it will move directories only within the same drive.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Move Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Move-ItemProperty.md
Title: Move-ItemProperty
--- # Move-ItemProperty
-## Synopsis
+## SYNOPSIS
Moves a property from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Destination] <Str
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-ItemProperty` cmdlet moves a property of an item from one item to another item. For instance, it can move a registry entry from one registry key to another registry key. When you move an item property, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a registry value and its data to another key
subkey of the `HKLM\Software\MyCompany` registry key.
Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, this cmdlet generates a **PSCustomObject** representing the moved item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/New-Item.md
Title: New-Item
--- # New-Item
-## Synopsis
+## SYNOPSIS
Creates a new item.
-## Syntax
+## SYNTAX
### pathSet (Default)
New-Item [[-Path] <String[]>] -Name <String> [-ItemType <String>] [-Value <Objec
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Item` cmdlet creates a new item and sets its value. The types of items that can be created depend on the location of the item. For example, in the file system, `New-Item` creates files and
folders. In the registry, `New-Item` creates registry keys and entries.
`New-Item` can also set the value of the items that it creates. For example, when it creates a new file, `New-Item` can add initial content to the file.
-## Examples
+## EXAMPLES
### Example 1: Create a file in the current directory
Mode LastWriteTime Length Name
> the same as when overwriting a file. If the registry key already exists, the key and all > properties and values will be overwritten with an empty registry key.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe a value for the new item to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the item that it creates.
-## Notes
+## NOTES
`New-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management New Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/New-ItemProperty.md
Title: New-ItemProperty
--- # New-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates a new property for an item and sets its value.
-## Syntax
+## SYNTAX
### Path (Default)
New-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PropertyType <String
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ItemProperty` cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet is used to create new registry values, because registry values are properties
This cmdlet does not add properties to an object.
- To add a property to an instance of an object, use the `Add-Member` cmdlet. - To add a property to all objects of a particular type, modify the Types.ps1xml file.
-## Examples
+## EXAMPLES
### Example 1: Add a registry entry
$newValue.multistring[0]
a ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject `New-ItemProperty` returns a custom object that contains the new property.
-## Notes
+## NOTES
`New-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Psdrive (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/New-PSDrive.md
Title: New-PSDrive
# New-PSDrive
-## Synopsis
+## SYNOPSIS
Creates temporary and persistent drives that are associated with a location in an item data store.
-## Syntax
+## SYNTAX
### All
New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Descripti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSDrive` cmdlet creates temporary and persistent drives that are mapped to or associated with a location in a data store, such as a network drive, a directory on the local computer, or a
information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Spla
> Unless you use the **Scope** parameter, PSDrives are created in the scope in which the > `New-PSDrive` command is run.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary drive mapped to a network share
New-PSDrive -Persist -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public
To ensure that the drive is available outside of the script to must use the **Scope** parameter to create the drive in the **Global** scope.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo
-## Notes
+## NOTES
`New-PSDrive` is designed to work with the data exposed by any provider. To list the providers available in your session, use `Get-PSProvider`. For more information about providers, see
Mapped network drives are specific to a user account. Mapped drives created in e
sessions using the credential of another user aren't visible in sessions started using different credentials.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management New Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/New-Service.md
Title: New-Service
--- # New-Service
-## Synopsis
+## SYNOPSIS
Creates a new Windows service.
-## Syntax
+## SYNTAX
``` New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>] [-Description <String>]
New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>]
[-DependsOn <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
service database. A new service requires an executable file that runs during the
The parameters of this cmdlet let you set the display name, description, startup type, and dependencies of the service.
-## Examples
+## EXAMPLES
### Example 1: Create a service
New-Service @params
The **SecurityDescriptor** is stored in the `$SDDLToSet` variable. The **SecurityDescriptorSddl** parameter uses `$SDDL` to set the **SecurityDescriptor** of the new service.
-## Parameters
+## PARAMETERS
### -BinaryPathName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns an object that represents the new service.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Pop Location (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Pop-Location.md
Title: Pop-Location
--- # Pop-Location
-## Synopsis
+## SYNOPSIS
Changes the current location to the location most recently pushed onto the stack.
-## Syntax
+## SYNTAX
``` Pop-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Pop-Location` cmdlet changes the current location to the location most recently pushed onto the stack by using the `Push-Location` cmdlet. You can pop a location from the default stack or from a stack that you create by using a `Push-Location` command.
-## Examples
+## EXAMPLES
### Example 1: Change to most recent location
the PowerShell certificate provider.
The last two commands pop those locations off the stack. The first `popd` command returns to the Registry drive, and the second command returns to the file system drive.
-## Parameters
+## PARAMETERS
### -PassThru
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo
This cmdlet generates a **System.Management.Automation.PathInfo** object that re
location, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
You can also refer to `Pop-Location` by its built-in alias, `popd`. For more inf
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Push Location (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Push-Location.md
Title: Push-Location
--- # Push-Location
-## Synopsis
+## SYNOPSIS
Adds the current location to the top of a location stack.
-## Syntax
+## SYNTAX
### Path (Default)
Push-Location [[-Path] <String>] [-PassThru] [-StackName <String>] [<CommonParam
Push-Location [-LiteralPath <String>] [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Push-Location` cmdlet adds ("pushes") the current location onto a location stack. If you specify a path, `Push-Location` pushes the current location onto a location stack and then changes
does not exist, `Push-Location` creates it.
For more information about location stacks, see the [Notes](#notes).
-## Examples
+## EXAMPLES
### Example 1
the `Pop-Location` cmdlet to pop the original location (`C:\`) from the Stack2 s
For more information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path (but not a literal path) to `Push-Location`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PathInfo
When you use the **PassThru** parameter, `Push-Location` generates a
**System.Management.Automation.PathInfo** object that represents the location. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
The `Push-Location` cmdlet is designed to work with the data exposed by any prov
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Remove Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Remove-Item.md
Title: Remove-Item
--- # Remove-Item
-## Synopsis
+## SYNOPSIS
Deletes the specified items.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Item` cmdlet deletes one or more items. Because it is supported by many providers, it can delete many different types of items, including files, folders, registry keys, variables, aliases, and functions.
-## Examples
+## EXAMPLES
### Example 1: Delete files that have any file name extension
The **Stream** parameter `Get-Item` gets the `Zone.Identifier` stream of the `Co
file. `Remove-Item` uses the **Stream** parameter to remove the `Zone.Identifier` stream of the file. Finally, the `Get-Item` cmdlet shows that the `Zone.Identifier` stream was deleted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
The `Remove-Item` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see
When you try to delete a folder that contains items without using the **Recurse*
cmdlet prompts for confirmation. Using `-Confirm:$false` does not suppress the prompt. This is by design.
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Remove Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Remove-ItemProperty.md
Title: Remove-ItemProperty
--- # Remove-ItemProperty
-## Synopsis
+## SYNOPSIS
Deletes the property and its value from an item.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Force] [-Filter
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.
-## Examples
+## EXAMPLES
### Example 1: Delete a registry value
It uses a pipeline operator (`|`) to send the object to `Remove-ItemProperty`.
Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the name of the registry value.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values.
This cmdlet does not return any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Item](Get-Item.md)
Microsoft.PowerShell.Management Remove Psdrive (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Remove-PSDrive.md
Title: Remove-PSDrive
--- # Remove-PSDrive
-## Synopsis
+## SYNOPSIS
Deletes temporary PowerShell drives and disconnects mapped network drives.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-PSDrive [-LiteralName] <String[]> [-PSProvider <String[]>] [-Scope <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSDrive` cmdlet deletes temporary PowerShell drives that were created by using the `New-PSDrive` cmdlet.
Beginning in Windows PowerShell 3.0, when an external drive is connected to the
You do not need to restart PowerShell. Similarly, when an external drive is disconnected from the computer, PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Remove a file system drive
This command uses `Remove-PSDrive` to disconnect the X: and S: mapped network dr
Get-PSDrive X, S | Remove-PSDrive ```
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.Management.Automation.PSDriveInfo You can pipe a drive object, such as one from the `Get-PSDrive` cmdlet, to the `Remove-PSDrive` cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- The `Remove-PSDrive` cmdlet is designed to work with the data exposed by any PowerShell provider. To list the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-PSDrive](Get-PSDrive.md)
Microsoft.PowerShell.Management Remove Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Remove-Service.md
Title: Remove-Service
--- # Remove-Service
-## Synopsis
+## SYNOPSIS
Removes a Windows service.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-Service [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Service [-InputObject <ServiceController>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Service` cmdlet removes a Windows service in the registry and in the service database. The `Remove-Service` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1: Remove a service
the object to `Remove-Service`, which removes the service.
Get-Service -DisplayName "Test Service" | Remove-Service ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Rename Computer (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Rename-Computer.md
Title: Rename-Computer
--- # Rename-Computer
-## Synopsis
+## SYNOPSIS
Renames a computer.
-## Syntax
+## SYNTAX
``` Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCredential>]
Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCrede
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
It renames one computer in each command.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Rename the local computer
The **Force** parameter suppresses the confirmation prompt.
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not have parameters that take input by value. However, you can pipe the values of the **ComputerName** and **NewName** properties of objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo This cmdlet returns a **ComputerChangeInfo** object, if you specify the **PassThru** parameter. Otherwise, it does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Rename Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Rename-Item.md
Title: Rename-Item
--- # Rename-Item
-## Synopsis
+## SYNOPSIS
Renames an item in a PowerShell provider namespace.
-## Syntax
+## SYNTAX
### ByPath (Default)
Rename-Item -LiteralPath <String> [-NewName] <String> [-Force] [-PassThru]
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Item` cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
content of the item being renamed.
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Rename a file
command through the pipeline. The script block uses the `-replace` operator to r
extension of each file with `.log`. Notice that matching using the `-replace` operator is not case sensitive.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object that represents the renamed item. This cmdlet generates an object that represents the renamed item, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Rename-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Rename Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Title: Rename-ItemProperty
--- # Rename-ItemProperty
-## Synopsis
+## SYNOPSIS
Renames a property of an item.
-## Syntax
+## SYNTAX
### Path (Default)
Rename-ItemProperty -LiteralPath <String> [-Name] <String> [-NewName] <String> [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-ItemProperty` cmdlet changes the name of a specified item property. The value of the property is not changed. For example, you can use `Rename-ItemProperty` to change the name of a registry entry.
-## Examples
+## EXAMPLES
### Example 1: Rename a registry entry
This command renames the config registry entry that is contained in the
Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject This cmdlet generates a **PSCustomObject** that represents the renamed item property, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Resolve Path (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Resolve-Path.md
Title: Resolve-Path
--- # Resolve-Path
-## Synopsis
+## SYNOPSIS
Resolves the wildcard characters in a path, and displays the path contents.
-## Syntax
+## SYNTAX
### Path (Default)
Resolve-Path [-Path] <String[]> [-Relative] [-Credential <PSCredential>] [<Commo
Resolve-Path -LiteralPath <String[]> [-Relative] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resolve-Path` cmdlet displays the items and containers that match the wildcard pattern at the location specified. The match can include files, folders, registry keys, or any other object accessible from a PSDrive provider.
-## Examples
+## EXAMPLES
### Example 1: Resolve the home folder path
expression.
PS C:\> Resolve-Path -LiteralPath 'test[xml]' ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo, System.String Returns a **PathInfo** object. Returns a string value for the resolved path if you specify the **Relative** parameter.
-## Notes
+## NOTES
The `*-Path` cmdlets work with the FileSystem, Registry, and Certificate providers.
session, type `Get-PSProvider`. For more information, see
`Resolve-Path` only resolves existing paths. It cannot be used to resolve a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Restart Computer (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Restart-Computer.md
Title: Restart-Computer
# Restart-Computer
-## Synopsis
+## SYNOPSIS
Restarts the operating system on local and remote computers.
-## Syntax
+## SYNTAX
### DefaultSet (Default)
Restart-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[-Delay <Int16>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
command. Specify a waiting time-out and query interval, and wait for particular
available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions.
-## Examples
+## EXAMPLES
### Example 1: Restart the local computer
Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos
`Restart-Computer` uses the **ComputerName** parameter to specify the remote computer, **Server01**. The **WsmanAuthentication** parameter specifies the authentication method as **Kerberos**.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String `Restart-Computer` accepts computer names from the pipeline or variables.
-## Outputs
+## OUTPUTS
### None `Restart-Computer` doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine.
-## Related links
+## RELATED LINKS
[About Windows Remote Management](/windows/desktop/WinRM/about-windows-remote-management)
Microsoft.PowerShell.Management Restart Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Restart-Service.md
Title: Restart-Service
--- # Restart-Service
-## Synopsis
+## SYNOPSIS
Stops and then starts one or more services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
notifying you of an error. You can specify the services by their service names o
you can use the **InputObject** parameter to pass an object that represents each service that you want to restart.
-## Examples
+## EXAMPLES
### Example 1: Restart a service on the local computer
sends the selected services to `Restart-Service`.
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
restarted service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Resume Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Resume-Service.md
Title: Resume-Service
--- # Resume-Service
-## Synopsis
+## SYNOPSIS
Resumes one or more suspended (paused) services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclu
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is ignored. You can specify the services by their service names or display names
**InputObject** parameter to pass a service object that represents the services that you want to resume.
-## Examples
+## EXAMPLES
### Example 1: Resume a service on the local computer
next pipeline operator sends the results to `Resume-Service`, which resumes the
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
resumed service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Clipboard (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-Clipboard.md
Title: Set-Clipboard
--- # Set-Clipboard
-## Synopsis
+## SYNOPSIS
Sets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Set-Clipboard [-Value] <string[]> [-Append] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Clipboard` cmdlet sets the contents of the clipboard. > [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Copy text to the clipboard
ssh key so that it can be pasted into another application, like GitHub.
Get-Content C:\Users\user1\.ssh\id_ed25519.pub | Set-Clipboard ```
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
In rare cases when using `Set-Clipboard` with a high number of values in rapid succession, like in a loop, you might sporadically get a blank value from the clipboard. This can be fixed by using `Start-Sleep -Milliseconds 1` in the loop.
-## Related links
+## RELATED LINKS
[Get-Clipboard](Get-Clipboard.md)
Microsoft.PowerShell.Management Set Content (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-Content.md
Title: Set-Content
--- # Set-Content
-## Synopsis
+## SYNOPSIS
Writes new content or replaces existing content in a file.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Set-Content` is a string-processing cmdlet that writes new content or replaces the content in a file. `Set-Content` replaces the existing content and differs from the `Add-Content` cmdlet that
the command line or send content through the pipeline.
If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Replace the contents of multiple files in a directory
directory to the **Value** empty.
Set-Content -Path C:\Temp\* -Filter *.txt -Value "Empty" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that contains the new value for the item to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Set-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Set-Content` by its built-in alias, `sc`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Set Item (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-Item.md
Title: Set-Item
--- # Set-Item
-## Synopsis
+## SYNOPSIS
Changes the value of an item to the value specified in the command.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Item -LiteralPath <String[]> [[-Value] <Object>] [-Force] [-PassThru] [-Filt
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Item` cmdlet changes the value of an item, such as a variable or registry key, to the value specified in the command.
-## Examples
+## EXAMPLES
### Example 1: Create an alias
The **Options** parameter is available in `Set-Item` only when you use it with t
Set-Item -Path function:prompt -Options "AllScope,ReadOnly" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the new value of the item to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the new or changed item. This cmdlet generates an object that represent the item, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in the file system, use the `Set-Content` cmdlet.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Set Itemproperty (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-ItemProperty.md
Title: Set-ItemProperty
--- # Set-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates or changes the value of a property of an item.
-## Syntax
+## SYNTAX
### propertyValuePathSet (Default)
Set-ItemProperty -LiteralPath <String[]> -InputObject <PSObject> [-PassThru] [-F
[-WhatIf] [-Confirm] [-Type <RegistryValueKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item. You can use the cmdlet to establish or change the properties of items.
file object to `$True`.
You also use `Set-ItemProperty` to create and change registry values and data. For example, you can add a new registry entry to a key and establish or change its value.
-## Examples
+## EXAMPLES
### Example 1: Set a property of a file
specify the property and its new value.
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject
This cmdlet generates a **PSCustomObject** object that represents the item that
new property value, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Set-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Set Location (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-Location.md
Title: Set-Location
--- # Set-Location
-## Synopsis
+## SYNOPSIS
Sets the current working location to a specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Location -LiteralPath <String> [-PassThru] [<CommonParameters>]
Set-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Location` cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.
PowerShell 6.2 added support for `-` and `+` as a values for the **Path** parame
maintains a history of the last 20 locations that can be accessed with `-` and `+`. This list is independent from the location stack that is accessed using the **StackName** parameter.
-## Examples
+## EXAMPLES
### Example 1: Set the current location
PS Cert:\>
Using the alias, `cd -` or `cd +` is an easy way to navigate through your location history while in your terminal. For more information on navigating with `-`/`+`, see the **Path** parameter.
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo, System.Management.Automation.PathInfoStack
This cmdlet does not generate any output unless you specify the **PassThru** par
new location. Using **PassThru** with **StackName** generates a **PathInfoStack** object representing the new stack context.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
If you make a named location stack the current location stack, you can no longer
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Set Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-Service.md
Title: Set-Service
# Set-Service
-## Synopsis
+## SYNOPSIS
Starts, stops, and suspends a service, and changes its properties.
-## Syntax
+## SYNTAX
### Name (Default)
Set-Service [-InputObject] <ServiceController> [-DisplayName <String>] [-Credent
[-Status <String>] [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Set-Service` cmdlet changes the properties of a service such as the **Statu
pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to `Set-Service`.
-## Examples
+## EXAMPLES
### Example 1: Change a display name
The **SecurityDescriptor** is stored in the `$SDDL` variable. `Set-Service` uses
parameter to specify the **BITS** service. The **SecurityDescriptorSddl** parameter uses `$SDDL` to change the **SecurityDescriptor** for the **BITS** service.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can use the pipeline to send a service object or a string that contains a service name to `Set-Service`.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController By default, `Set-Service` doesn't return any objects. Use the **PassThru** parameter to output a **ServiceController** object.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the **Name** column and the display names are in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Timezone (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Set-TimeZone.md
Title: Set-TimeZone
--- # Set-TimeZone
-## Synopsis
+## SYNOPSIS
Sets the system time zone to a specified time zone.
-## Syntax
+## SYNTAX
### Name (Default)
Set-TimeZone -Id <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-TimeZone [-InputObject] <TimeZoneInfo> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone.
-## Examples
+## EXAMPLES
### Example 1: Set the time zone by Id
As we saw in the previous example, the **Id** and the **Name** of the Time Zone
The **Name** parameter must match the **StandardName** or **DaylightName** properties of the **TimeZoneInfo** object.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.TimeZoneInfo, System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-TimeZone](Get-TimeZone.md)
Microsoft.PowerShell.Management Split Path (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Split-Path.md
Title: Split-Path
--- # Split-Path
-## Synopsis
+## SYNOPSIS
Returns the specified part of a path.
-## Syntax
+## SYNTAX
### ParentSet (Default)
Split-Path [-Path] <String[]> [-Resolve] [-IsAbsolute] [-Credential <PSCredentia
Split-Path -LiteralPath <String[]> [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Split-Path` cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell
whether the path is relative or absolute.
You can use this cmdlet to get or submit only a selected part of a path.
-## Examples
+## EXAMPLES
### Example 1: Get the qualifier of a path
C:\Documents and Settings\User01\My Documents
This command uses a pipeline operator (`|`) to send a path to `Split-Path`. The path is enclosed in quotation marks to indicate that it is a single token.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String, System.Boolean
items, such as a **FileInfo** or **RegistryKey** object.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean** value.
-## Notes
+## NOTES
- The split location parameters (**Qualifier**, **Parent**, **Extension**, **Leaf**, **LeafBase**, and **NoQualifier**) are exclusive. You can use only one in each command.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean*
- `Split-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Start Process (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Start-Process.md
Title: Start-Process
--- # Start-Process
-## Synopsis
+## SYNOPSIS
Starts one or more processes on the local computer.
-## Syntax
+## SYNTAX
### Default (Default)
Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-WorkingDirecto
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Process` cmdlet starts one or more processes on the local computer. By default, `Start-Process` creates a new process that inherits all the environment variables that are defined
cmdlet.
You can use the parameters of `Start-Process` to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.
-## Examples
+## EXAMPLES
### Example 1: Start a process that uses default values
In this example, `Start-Process` is running the Linux `nohup` command, which lau
detached process. For more information, see the man page for [nohup](https://linux.die.net/man/1/nohup).
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet generates a **System.Diagnostics.Process** object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not return any output.
-## Notes
+## NOTES
By default, `Start-Process` launches a process _asynchronously_. Control is instantly returned to PowerShell even if the new process is still running.
This cmdlet is implemented by using the **Start** method of the **System.Diagnos
class. For more information about this method, see [Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Management Start Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Start-Service.md
Title: Start-Service
--- # Start-Service
-## Synopsis
+## SYNOPSIS
Starts one or more stopped services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclud
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. If a service is already running, the message is ignored with
specify the services by their service names or display names, or you can use the **InputObject** parameter to supply a service object that represents the services that you want to start.
-## Examples
+## EXAMPLES
### Example 1: Start a service by using its name
that the **StartMode** property of the Tlntsvr service is **Disabled**. The `Set
changes the start type to **Manual**. Now, we can resubmit the `Start-Service` command. This time, the command succeeds. To verify that the command succeeded, run `Get-Service`.
-## Parameters
+## PARAMETERS
### -DisplayName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you specify **PassThru**. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \<display-name\> start failed.`
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Stop Computer (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Stop-Computer.md
Title: Stop-Computer
# Stop-Computer
-## Synopsis
+## SYNOPSIS
Stops (shuts down) local and remote computers.
-## Syntax
+## SYNTAX
### All
Stop-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[[-Credential] <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Computer` cmdlet shuts down the local computer and remote computers. You can use the parameters of `Stop-Computer` to specify the authentication levels and alternate credentials, and to force an immediate shut down.
-## Examples
+## EXAMPLES
### Example 1: Shut down the local computer
administrator. The credentials are stored in the `$c` variable.
computers in the `$s` variable. The **Force** parameter forces an immediate shutdown. The **Credential** parameter submits the credentials saved in the `$c` variable.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet only works on Windows and uses the **Win32Shutdown** method of the **Win32_OperatingSystem** WMI class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to restart the machine.
-## Related links
+## RELATED LINKS
[Rename-Computer](Rename-Computer.md)
Microsoft.PowerShell.Management Stop Process (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Stop-Process.md
Title: Stop-Process
--- # Stop-Process
-## Synopsis
+## SYNOPSIS
Stops one or more running processes.
-## Syntax
+## SYNTAX
### Id (Default)
Stop-Process -Name <String[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<Common
Stop-Process [-InputObject] <Process[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Process` cmdlet stops one or more running processes. You can specify a process by process name or process ID (PID), or pass a process object to `Stop-Process`. `Stop-Process` works only on
On Windows Vista and later versions of the Windows operating system, to stop a p
owned by the current user, you must start PowerShell by using the Run as administrator option. Also, you are not prompted for confirmation unless you specify the **Confirm** parameter.
-## Examples
+## EXAMPLES
### Example 1: Stop all instances of a process
PowerShell prompts you for confirmation.
The second command specifies **Force** to suppress the prompt. As a result, the process is stopped without confirmation.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet returns a **System.Diagnostics.Process** object that represents the stopped process, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Stop-Process` by its built-in aliases, `kill` and `spps` For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate
- When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Stop Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Stop-Service.md
Title: Stop-Service
--- # Stop-Service
-## Synopsis
+## SYNOPSIS
Stops one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName <String[]> [-Include <S
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. You can specify the services by their service names or displ
use the **InputObject** parameter to pass a service object that represents the service that you want to stop.
-## Examples
+## EXAMPLES
### Example 1: Stop a service on the local computer
The second command stops the IISAdmin service. The **Force** parameter is requir
that has dependent services. The command uses the **Confirm** parameter to request confirmation from the user before it stops each service.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Suspend Service (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Suspend-Service.md
Title: Suspend-Service
--- # Suspend-Service
-## Synopsis
+## SYNOPSIS
Suspends (pauses) one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Excl
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
until resumed, such as by usingthe `Resume-Service` cmdlet. You can specify the
service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the services that you want to suspend.
-## Examples
+## EXAMPLES
### Example 1: Suspend a service
of `$True` for the **CanPauseAndContinue** property. Another pipeline operator p
`Suspend-Service`. The **Confirm** parameter prompts you for confirmation before suspending each of the services.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Test Connection (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Test-Connection.md
Title: Test-Connection
# Test-Connection
-## Synopsis
+## SYNOPSIS
Sends ICMP echo request packets, or pings, to one or more computers.
-## Syntax
+## SYNTAX
### DefaultPing (Default)
Test-Connection [-TargetName] <string[]> -TcpPort <int> [-IPv4] [-IPv6] [-Resolv
[-Source <string>] [-TimeoutSeconds <int>] [-Quiet] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Connection` cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this
Unlike the familiar **ping** command, `Test-Connection` returns a
parameter returns a **Boolean** value in a **System.Boolean** object for each tested connection. If multiple connections are tested, an array of **Boolean** values is returned.
-## Examples
+## EXAMPLES
### Example 1: Send echo requests to a remote computer
The `Test-Connection` command is called with the **Traceroute** parameter. The r
`[Microsoft.PowerShell.Commands.TestConnectionCommand+TraceStatus]` objects, are output to the **Success** output stream.
-## Parameters
+## PARAMETERS
### -BufferSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### TestConnectionCommand+PingStatus, TestConnectionCommand+TraceStatus, Boolean, TestConnectionCommand+PingMtuStatus
If you specify the **Traceroute** parameter, the cmdlet will return a
If you specify the **Quiet** or **TcpPort** parameters, it returns a **Boolean** value. If multiple connections are tested, an array of **Boolean** values is returned.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Test Path (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Test-Path.md
Title: Test-Path
--- # Test-Path
-## Synopsis
+## SYNOPSIS
Determines whether all elements of a path exist.
-## Syntax
+## SYNTAX
### Path (Default)
Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
[-OlderThan <DateTime>] [-NewerThan <DateTime>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the
whitespace or empty string, then `$False` is returned. If the **Path** is `$null`, array of `$null` or empty array, a non-terminating error is returned.
-## Examples
+## EXAMPLES
### Example 1: Test a path
False
False ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean The cmdlet returns a **Boolean** value.
-## Notes
+## NOTES
The cmdlets that contain the **Path** noun (the **Path** cmdlets) work with path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use
manipulators.
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Wait Process (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Management/Wait-Process.md
Title: Wait-Process
--- # Wait-Process
-## Synopsis
+## SYNOPSIS
Waits for the processes to be stopped before accepting more input.
-## Syntax
+## SYNTAX
### Name (Default)
Wait-Process [-Id] <Int32[]> [[-Timeout] <Int32>] [<CommonParameters>]
Wait-Process [[-Timeout] <Int32>] -InputObject <Process[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet does not work on Linux or macOS.**
stopped. You can specify a process by process name or process ID (PID), or pipe
`Wait-Process` works only on processes running on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Stop a process and wait
prompt.
Wait-Process -Name outlook, winword -Timeout 30 ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **WaitForExit** method of the **System.Diagnostics.Process** class.
This cmdlet does not generate any output.
`Start-Process -Wait` waits for the process tree (the process and all its descendants) to exit before returning control.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Security Convertfrom Securestring (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md
Title: ConvertFrom-SecureString
--- # ConvertFrom-SecureString
-## Synopsis
+## SYNOPSIS
Converts a secure string to an encrypted standard string.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertFrom-SecureString [-SecureString] <SecureString> [-AsPlainText] [<CommonP
ConvertFrom-SecureString [-SecureString] <SecureString> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SecureString` cmdlet converts a secure string (**System.Security.SecureString**) into an encrypted standard string (**System.String**). Unlike a secure string, an encrypted standard
representation.
> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Create a secure string
$secureString # 'System.Security.SecureString'
ConvertFrom-SecureString -SecureString $secureString -AsPlainText # 'Example' ```
-## Parameters
+## PARAMETERS
### -AsPlainText
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
+## INPUTS
### System.Security.SecureString You can pipe a **SecureString** object to ConvertFrom-SecureString.
-## Outputs
+## OUTPUTS
### System.String ConvertFrom-SecureString returns a standard string object.
-## Notes
+## NOTES
- To create a secure string from characters that are typed at the command prompt, use the **AsSecureString** parameter of the `Read-Host` cmdlet.
ConvertFrom-SecureString returns a standard string object.
them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertTo-SecureString](ConvertTo-SecureString.md)
Microsoft.PowerShell.Security Convertto Securestring (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/ConvertTo-SecureString.md
Title: ConvertTo-SecureString
--- # ConvertTo-SecureString
-## Synopsis
+## SYNOPSIS
Converts plain text or encrypted strings to secure strings.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParame
ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-SecureString` cmdlet converts encrypted standard strings into secure strings. It can also convert plain text to secure strings. It is used with `ConvertFrom-SecureString` and
of the `ConvertTo-SecureString` cmdlet.
> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Convert a secure string to an encrypted string
$Secure_String_Pwd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
> You should avoid using plain text strings in script or from the command line. The plain text can > show up in event logs and command history logs.
-## Parameters
+## PARAMETERS
### -AsPlainText
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a standard encrypted string to `ConvertTo-SecureString`.
-## Outputs
+## OUTPUTS
### System.Security.SecureString `ConvertTo-SecureString` returns a **SecureString** object.
-## Notes
+## NOTES
Some characters, such as emoticons, correspond to several code points in the string that contains them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertFrom-SecureString](ConvertFrom-SecureString.md)
Microsoft.PowerShell.Security Get Acl (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-Acl.md
Title: Get-Acl
--- # Get-Acl
-## Synopsis
+## SYNOPSIS
Gets the security descriptor for a resource, such as a file or registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-Acl [-LiteralPath <String[]>] [-Audit] [-Filter <String>] [-Include <String[
[-Exclude <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
permissions that users and user groups have to access the resource.
Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of `Get-Acl` to get the security descriptor of objects that do not have a path.
-## Examples
+## EXAMPLES
### Example 1- Get an ACL for a folder
storage subsystem object.
Get-Acl -InputObject (Get-StorageSubSystem -Name S087) ```
-## Parameters
+## PARAMETERS
### -Audit
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity, System.Security.AccessControl.DirectorySecurity, System.Security.AccessControl.RegistrySecurity `Get-Acl` returns an object that represents the ACLs that it gets. The object type depends upon the ACL type.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Because `Get-Acl` is supported by the file system and registry providers, you ca
view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.
-## Related links
+## RELATED LINKS
[Set-Acl](Set-Acl.md)
Microsoft.PowerShell.Security Get Authenticodesignature (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md
Title: Get-AuthenticodeSignature
--- # Get-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Gets information about the Authenticode signature for a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Windows catalog signature is used.
If the file is not signed, the information is retrieved, but the fields are blank.
-## Examples
+## EXAMPLES
### Example 1: Get the Authenticode signature for a file
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePa
This command gets information about the Authenticode signature for the content of a file. In this example, the file extension is specified along with the content of the file.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature `Get-AuthenticodeSignature` returns a signature object for each signature that it gets.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. For information about Authenticode signatures in PowerShell, see [about_Signing](../Microsoft.PowerShell.Core/About/about_Signing.md).
-## Related links
+## RELATED LINKS
[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Microsoft.PowerShell.Security Get Cmsmessage (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-CmsMessage.md
Title: Get-CmsMessage
--- # Get-CmsMessage
-## Synopsis
+## SYNOPSIS
Gets content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent
Get-CmsMessage [-Path] <String> [<CommonParameters>]
Get-CmsMessage [-LiteralPath] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
encryption certificate that was used to encrypt the content.
> [!NOTE] > This cmdlet is only available on Windows.
-## Examples
+## EXAMPLES
### Example 1: Get encrypted content
This command pipes the results of the `Get-CmsMessage` cmdlet from Example 1 to
the **To** parameter is the value of the encrypting certificate's Subject line. The decrypted message, "Try the new Break All command," is the result.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Get Credential (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-Credential.md
Title: Get-Credential
--- # Get-Credential
-## Synopsis
+## SYNOPSIS
Gets a credential object based on a user name and password.
-## Syntax
+## SYNTAX
### CredentialSet (Default)
Get-Credential [[-Credential] <PSCredential>] [<CommonParameters>]
Get-Credential [-Message <String>] [[-UserName] <String>] [-Title <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Credential` cmdlet creates a credential object for a specified user name and password. You can use the credential object in security operations.
can use the credential object in security operations.
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use the **Message** parameter to specify a customized message in the command line prompt.
-## Examples
+## EXAMPLES
### Example 1
This command gets a credential from the Server01 remote computer. The command us
`Invoke-Command` cmdlet to run a `Get-Credential` command on the remote computer. The output shows the remote security message that `Get-Credential` includes in the authentication prompt.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCredential `Get-Credential` returns a credential object.
-## Notes
+## NOTES
You can use the **PSCredential** object that `Get-Credential` creates in cmdlets that request user authentication, such as those with a **Credential** parameter.
The **Credential** parameter is not supported by all providers that are installe
Beginning in PowerShell 3.0, it is supported on select cmdlets, such as the `Get-Content` and `New-PSDrive` cmdlets.
-## Related links
+## RELATED LINKS
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
Microsoft.PowerShell.Security Get Executionpolicy (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md
Title: Get-ExecutionPolicy
# Get-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Gets the execution policies for the current session.
-## Syntax
+## SYNTAX
### All
Gets the execution policies for the current session.
Get-ExecutionPolicy [[-Scope] <ExecutionPolicyScope>] [-List] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
To display the execution policies for each scope in the order of precedence, use `Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use
The effective execution policy is determined by execution policies that are set
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
-## Examples
+## EXAMPLES
### Example 1: Get all execution policies
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -List
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
+## INPUTS
### None `Get-ExecutionPolicy` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ExecutionPolicy The cmdlet always returns **Unrestricted** on Linux and macOS platforms.
-## Notes
+## NOTES
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, whether scripts must be digitally signed before they are run.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
Microsoft.PowerShell.Security Get Pfxcertificate (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Get-PfxCertificate.md
Title: Get-PfxCertificate
--- # Get-PfxCertificate
-## Synopsis
+## SYNOPSIS
Gets information about PFX certificate files on the computer.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-PfxCertificate -LiteralPath <String[]> [-Password <SecureString>] [-NoPrompt
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PfxCertificate` cmdlet gets an object representing each specified PFX certificate file. A PFX file includes both the certificate and a private key.
-## Examples
+## EXAMPLES
### Example 1: Get a PFX certificate
to run a `Get-PfxCertificate` command remotely.
When the PFX certificate file is not password-protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Parameters
+## PARAMETERS
### -FilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-PfxCertificate`.
-## Outputs
+## OUTPUTS
### System.Security.Cryptography.X509Certificates.X509Certificate2 `Get-PfxCertificate` returns an object for each certificate that it gets.
-## Notes
+## NOTES
When using the `Invoke-Command` cmdlet to run a `Get-PfxCertificate` command remotely, and the PFX certificate file is not password protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security New Filecatalog (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/New-FileCatalog.md
Title: New-FileCatalog
--- # New-FileCatalog
-## Synopsis
+## SYNOPSIS
`New-FileCatalog` creates a catalog file of file hashes that can be used to validate the authenticity of a file.
-## Syntax
+## SYNTAX
``` New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
create file hashes, and version 2 uses SHA256. Catalog version 2 is not supporte
2008 R2 or Windows 7. You should use catalog version 2 on Windows 8, Windows Server 2012, and later operating systems.
-## Examples
+## EXAMPLES
### Example 1: Create a file catalog for `Microsoft.PowerShell.Utility`
Mode LastWriteTime Length Name
-a---- 11/2/2018 11:58 AM 950 Microsoft.PowerShell.Utility.cat ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String The pipeline takes a string that is used as the catalog filename.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Test-FileCatalog](Test-FileCatalog.md)
Microsoft.PowerShell.Security Protect Cmsmessage (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Protect-CmsMessage.md
Title: Protect-CmsMessage
--- # Protect-CmsMessage
-## Synopsis
+## SYNOPSIS
Encrypts content by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent (Default)
Protect-CmsMessage [-To] <CmsMessageRecipient[]> [-LiteralPath] <String> [[-OutF
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
document encryption, see Example 1 in this topic.
> [!NOTE] > This cmdlet is only available on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create a certificate for encrypting content
To view document encryption certificates in the certificate provider, you can ad
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md), available only when the certificate provider is loaded.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Set Acl (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Set-Acl.md
Title: Set-Acl
--- # Set-Acl
-## Synopsis
+## SYNOPSIS
Changes the security descriptor of a specified item, such as a file or a registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-Acl -LiteralPath <String[]> [-AclObject] <Object> [-ClearCentralAccessPolicy
[-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
supply a security descriptor that has the values you want to apply. `Set-Acl` ap
descriptor that is supplied. It uses the value of the **AclObject** parameter as a model and changes the values in the item's security descriptor to match the values in the **AclObject** parameter.
-## Examples
+## EXAMPLES
### Example 1: Copy a security descriptor from one file to another
is an argument list is to be passed when making the new **FileSystemAccessRule**
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
+## PARAMETERS
### -AclObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.CommonSecurityDescriptor You can pipe an ACL object or a security descriptor to `Set-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity By default, `Set-Acl` does not generate any output. However, if you use the **Passthru** parameter, it generates a security object. The type of the security object depends on the type of the item.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. The `Set-Acl` cmdlet is supported by the PowerShell file system and registry providers. As such, you can use it to change the security descriptors of files, directories, and registry keys.
-## Related links
+## RELATED LINKS
[Get-Acl](Get-Acl.md)
Microsoft.PowerShell.Security Set Authenticodesignature (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md
Title: Set-AuthenticodeSignature
--- # Set-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Adds an [Authenticode](/windows-hardware/drivers/install/authenticode) signature to a PowerShell script or other file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-AuthenticodeSignature [-Certificate] <X509Certificate2> [-IncludeChain <Stri
-Content <Byte[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
In a PowerShell script file, the signature takes the form of a block of text tha
of the instructions that are executed in the script. If there is a signature in the file when this cmdlet runs, that signature is removed.
-## Examples
+## EXAMPLES
### Example 1 - Sign a script using a certificate from the local certificate store
the **IncludeChain** parameter to include all of the signatures in the trust cha
root authority. It also uses the **TimeStampServer** parameter to add a timestamp to the signature. This prevents the script from failing when the certificate expires.
-## Parameters
+## PARAMETERS
### -Certificate
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the file path to `Set-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security Set Executionpolicy (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md
Title: Set-ExecutionPolicy
# Set-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Sets the PowerShell execution policies for Windows computers.
-## Syntax
+## SYNTAX
### All
Set-ExecutionPolicy [-ExecutionPolicy] <ExecutionPolicy> [[-Scope] <ExecutionPol
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## 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).
To display the execution policies for each scope in the order of precedence, use
`Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use `Get-ExecutionPolicy` with no parameters.
-## Examples
+## EXAMPLES
### Example 1: Set an execution policy
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -ExecutionPolicy
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
+## INPUTS
### Microsoft.PowerShell.ExecutionPolicy, System.String You can pipe an execution policy object or a string that contains the name of an execution policy to `Set-ExecutionPolicy`.
-## Outputs
+## OUTPUTS
### None `Set-ExecutionPolicy` doesn't return any output.
-## Notes
+## NOTES
`Set-ExecutionPolicy` doesn't change the **MachinePolicy** and **UserPolicy** scopes because they are set by Group Policies.
If the Group Policy **Turn on Script Execution** is enabled for the computer or
preference is saved, but it is not effective. PowerShell displays a message that explains the conflict.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Security Test Filecatalog (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Test-FileCatalog.md
Title: Test-FileCatalog
--- # Test-FileCatalog
-## Synopsis
+## SYNOPSIS
`Test-FileCatalog` validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity. This cmdlet is only supported on Windows.
-## Syntax
+## SYNTAX
``` Test-FileCatalog [-Detailed] [-FilesToSkip <String[]>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
validation by using the -FilesToSkip parameter.
This cmdlet is only supported on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create and validate a file catalog
PathItems : {[Microsoft.PowerShell.Utility.psd1,
Signature : System.Management.Automation.Signature ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.IO.DirectoryInfo[], System.String[] The pipeline accepts an array of strings or `DirectoryInfo` objects that represent paths to the files that need to be validated.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CatalogValidationStatus
A more detailed object returned when using `-Detailed` which can be used to anal
that may or may not have passed validation, which hashes were expected vs. found, and the algorithm used in the catalog.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[New-FileCatalog](New-FileCatalog.md)
Microsoft.PowerShell.Security Unprotect Cmsmessage (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md
Title: Unprotect-CmsMessage
--- # Unprotect-CmsMessage
-## Synopsis
+## SYNOPSIS
Decrypts content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByWinEvent (Default)
Unprotect-CmsMessage [-LiteralPath] <String> [-IncludeContext] [[-To] <CmsMessag
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
content.
> [!NOTE] > This cmdlet is only available on Windows.
-## Examples
+## EXAMPLES
### Example 1: Decrypt a message
Unprotect-CmsMessage -LiteralPath @parameters
Try the new Break All command ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Eventing.Reader.EventLogRecord or System.String You can pipe an object containing encrypted content to `Unprotect-CmsMessage`.
-## Outputs
+## OUTPUTS
### System.String The unencrypted message.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Add Member (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Add-Member.md
Title: Add-Member
--- # Add-Member
-## Synopsis
+## SYNOPSIS
Adds custom properties and methods to an instance of a PowerShell object.
-## Syntax
+## SYNTAX
### TypeNameSet (Default)
Add-Member -InputObject <PSObject> [-MemberType] <PSMemberTypes> [-Name] <String
[[-SecondValue] <Object>] [-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Member` cmdlet lets you add members (properties and methods) to an instance of a PowerShell object. For instance, you can add a NoteProperty member that contains a description of the object or
Also, beginning in Windows PowerShell 3.0, the **PassThru** parameter, which gen
object, is needed less frequently. `Add-Member` now adds the new members directly to the input object of more types. For more information, see the **PassThru** parameter description.
-## Examples
+## EXAMPLES
### Example 1: Add a note property to a PSObject
PSVersion NoteProperty System.String PSVersion=4.0
System NoteProperty System.String System=Server Core ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object type to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Object When you use the **PassThru** parameter, this cmdlet returns the newly-extended object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can add members only to **PSObject** objects. To determine whether an object is a **PSObject** object, use the `-is` operator.
and methods.
The `$this` variable refers to the instance of the object to which the properties and methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Add Type (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Add-Type.md
Title: Add-Type
# Add-Type
-## Synopsis
+## SYNOPSIS
Adds a Microsoft .NET class to a PowerShell session.
-## Syntax
+## SYNTAX
### FromSource (Default)
Add-Type -LiteralPath <String[]> [-ReferencedAssemblies <String[]>] [-OutputAsse
Add-Type -AssemblyName <String[]> [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Type` cmdlet lets you define a Microsoft .NET Core class in your PowerShell session. You can then instantiate objects, by using the `New-Object` cmdlet, and use the objects just as you
Beginning in PowerShell 7, `Add-Type` does not compile a type if a type with the
exists. Also, `Add-Type` looks for assemblies in a `ref` folder under the folder that contains `pwsh.dll`.
-## Examples
+## EXAMPLES
### Example 1: Add a .NET type to a session
represents the `SW_RESTORE` value.
To maximize the window, use the value of `3` that represents `SW_MAXIMIZE`.
-## Parameters
+## PARAMETERS
### -AssemblyName
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
+## INPUTS
### None You can't send objects down the pipeline to `Add-Type`.
-## Outputs
+## OUTPUTS
### None or System.Type When you use the **PassThru** parameter, `Add-Type` returns a **System.Type** object that represents the new type. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
The types that you add exist only in the current session. To use the types in all sessions, add them to your PowerShell profile. For more information about the profile, see
any version of PowerShell.
Assemblies in the GAC can be loaded by type name, rather than by path. Loading assemblies from an arbitrary path requires `Add-Type`, since those assemblies cannot not be loaded automatically.
-## Related links
+## RELATED LINKS
[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md)
Microsoft.PowerShell.Utility Clear Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Clear-Variable.md
Title: Clear-Variable
--- # Clear-Variable
-## Synopsis
+## SYNOPSIS
Deletes the value of a variable.
-## Syntax
+## SYNTAX
``` Clear-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Variable` cmdlet deletes the data stored in a variable, but it does not delete the variable. As a result, the value of the variable is NULL (empty). If the variable has a specified data or object type, this cmdlet preserves the type of the object stored in the variable.
-## Examples
+## EXAMPLES
### Example 1: Remove the value of global variables that begin with a search string
Clear-Variable -Name "Processes"
This command deletes the value of the variable named Processes. After the cmdlet completes the operation, the variable named Processes still exists, but the value is null.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, this cmdlet generates a
**System.Management.Automation.PSVariable** object representing the cleared variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To delete a variable, along with its value, use `Remove-Variable` or `Remove-Item`.
this cmdlet does not generate any output.
You can also refer to `Clear-Variable` by its built-in alias, `clv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Get-Variable](Get-Variable.md)
Microsoft.PowerShell.Utility Compare Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Compare-Object.md
Title: Compare-Object
--- # Compare-Object
-## Synopsis
+## SYNOPSIS
Compares two sets of objects.
-## Syntax
+## SYNTAX
``` Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compare-Object` cmdlet compares two sets of objects. One set of objects is the **reference**, and the other set of objects is the **difference**.
terminating error.
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1 - Compare the content of two text files
InputObject SideIndicator
In the second case, the **TimeSpan** is converted to a string so the object are different.
-## Parameters
+## PARAMETERS
### -CaseSensitive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send an object down the pipeline to the **DifferenceObject** parameter.
-## Outputs
+## OUTPUTS
### None
When you use the **PassThru** parameter, the **Type** of the object is not chang
of the object returned has an added **NoteProperty** named **SideIndicator**. **SideIndicator** shows which input object the output belongs to.
-## Notes
+## NOTES
When using the **PassThru** parameter, the output displayed in the console may not include the **SideIndicator** property. The default format view for the object type output by `Compare-Object` does not include the **SideIndicator** property. For more information see [Example 3](#ex3) in this article.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertfrom Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Title: ConvertFrom-Csv
--- # ConvertFrom-Csv
-## Synopsis
+## SYNOPSIS
Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertFrom-Csv [[-Delimiter] <Char>] [-InputObject] <PSObject[]> [-Header <Stri
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Csv` cmdlet creates objects from CSV variable-length strings that are generated by the `ConvertTo-Csv` cmdlet.
You can also use the `Export-Csv` and `Import-Csv` cmdlets to convert objects to
file (and back). These cmdlets are the same as the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets, except that they save the CSV strings in a file.
-## Examples
+## EXAMPLES
### Example 1: Convert processes on the local computer to CSV format
When the **UseCulture** parameter is used, be sure that the current culture's de
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` cannot generate objects from the CSV strings.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe CSV strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns the objects described by the properties in the CSV strings.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings (by using the **ToString()*
object), so they are represented by the name of the property value. This cmdlet does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Convertfrom Json (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertFrom-Json.md
Title: ConvertFrom-Json
# ConvertFrom-Json
-## Synopsis
+## SYNOPSIS
Converts a JSON-formatted string to a custom object or a hash table.
-## Syntax
+## SYNTAX
``` ConvertFrom-Json [-InputObject] <String> [-AsHashtable] [-Depth <Int32>] [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Json` cmdlet converts a JavaScript Object Notation (JSON) formatted string to a custom **PSCustomObject** object that has a property for each field in the JSON string. JSON is
This cmdlet was introduced in PowerShell 3.0.
> be written in the file without corrupting the data or throwing an error as it did in PowerShell > 5.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a DateTime object to a JSON object
The JSON string contains an array with a single element. Without the switch, con
a PSObject and then converting it back with the `ConvertTo-Json` command results in a single integer.
-## Parameters
+## PARAMETERS
### -AsHashtable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `ConvertFrom-Json`.
-## Outputs
+## OUTPUTS
### PSCustomObject ### System.Collections.Hashtable
-## Notes
+## NOTES
This cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
follows:
offset is properly converted to the caller's configured time zone. The default output formatting does not indicate the original time zone offset.
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertfrom Markdown (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md
Title: ConvertFrom-Markdown
# ConvertFrom-Markdown
-## Synopsis
+## SYNOPSIS
Convert the contents of a string or a file to a **MarkdownInfo** object.
-## Syntax
+## SYNTAX
### PathParamSet (Default)
ConvertFrom-Markdown -LiteralPath <String[]> [-AsVT100EncodedString] [<CommonPar
ConvertFrom-Markdown -InputObject <PSObject> [-AsVT100EncodedString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet converts the specified content into a **MarkdownInfo**. When a file path is specified for the **Path** parameter, the contents on the file are converted. The output object has three
properties:
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a file containing Markdown content to HTML
of the `README.md` file.
The **MarkdownInfo** object is returned. The specified string `**Bold text**` is converted to a VT100-encoded string and available in **VT100EncodedString** property.
-## Parameters
+## PARAMETERS
### -AsVT100EncodedString
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
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.MarkdownInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Markdown Parser](https://github.com/lunet-io/markdig)
Microsoft.PowerShell.Utility Convertfrom Sddlstring (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md
Title: ConvertFrom-SddlString
--- # ConvertFrom-SddlString
-## Synopsis
+## SYNOPSIS
Converts a SDDL string to a custom object.
-## Syntax
+## SYNTAX
### All
Converts a SDDL string to a custom object.
ConvertFrom-SddlString [-Sddl] <String> [-Type <AccessRightTypeNames>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the access rights specified in a SDDL string.
This cmdlet was introduced in PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Convert file system access rights SDDL to a PSCustomObject
It doesn't use the `-Type` parameter, so the access rights shown are for file sy
The third command uses the `ConvertFrom-SddlString` cmdlet with the `-Type` parameter, so the access rights returned are for registry.
-## Parameters
+## PARAMETERS
### -Sddl
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a SDDL string to `ConvertFrom-SddlString`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Security Descriptor Definition Language](/windows/win32/secauthz/security-descriptor-definition-language)
Microsoft.PowerShell.Utility Convertfrom Stringdata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md
Title: ConvertFrom-StringData
--- # ConvertFrom-StringData
-## Synopsis
+## SYNOPSIS
Converts a string containing one or more key and value pairs to a hash table.
-## Syntax
+## SYNTAX
### All
Converts a string containing one or more key and value pairs to a hash table.
ConvertFrom-StringData [-StringData] <String> [[-Delimiter] <Char>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-StringData` cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often
sequences in your results.
PowerShell 7 adds the **Delimiter** parameter.
-## Examples
+## EXAMPLES
### Example 1: Convert a single-quoted here-string to a hash table
Name Value
Message Look in c:\Windows\System32 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string containing a key-value pair to `ConvertFrom-StringData`.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable This cmdlet returns a hash table that it creates from the key-value pairs.
-## Notes
+## NOTES
A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally.
This cmdlet can be useful in scripts that display user messages in multiple spok
can use the dictionary-style hash tables to isolate text strings from code, such as in resource files, and to format the text strings for use in translation tools.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Convertto Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## Synopsis
+## SYNOPSIS
Converts .NET objects into a series of character-separated value (CSV) strings.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## Examples
+## EXAMPLES
### Example 1: Convert an object to CSV
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV output is returned as a collection of strings.
-## Notes
+## NOTES
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Convertto Html (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Title: ConvertTo-Html
--- # ConvertTo-Html
-## Synopsis
+## SYNOPSIS
Converts .NET objects into HTML that can be displayed in a Web browser.
-## Syntax
+## SYNTAX
### Page (Default)
ConvertTo-Html [-InputObject <PSObject>] [[-Property] <Object[]>] [-As <String>]
[-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
on the properties of the first object that you submit. If the remaining objects
the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.
-## Examples
+## EXAMPLES
### Example 1: Create a web page to display the date
Get-Service | ConvertTo-HTML -Transitional
This command sets the DOCTYPE of the returned HTML to XHTML Transitional DTD
-## Parameters
+## PARAMETERS
### -As
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any .NET object to `ConvertTo-Html`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument `ConvertTo-Html` returns series of strings that comprise valid HTML.
-## Notes
+## NOTES
To use this cmdlet, pipe one or more objects to the cmdlet or use the **InputObject** parameter to specify the object. When the input consists of multiple objects, the output of these two methods is
quite different.
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>`
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertto Json (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Title: ConvertTo-Json
--- # ConvertTo-Json
-## Synopsis
+## SYNOPSIS
Converts an object to a JSON-formatted string.
-## Syntax
+## SYNTAX
``` ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript Object Notation (JSON) format. The properties are converted to field names, the field values are converted to
web-based apps.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1
Year : 2018
This example shows how to use the `ConvertTo-Json` and `ConvertFrom-Json` cmdlets to convert an object to a JSON string and a JSON object.
-## Parameters
+## PARAMETERS
### -AsArray
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to `ConvertTo-Json`.
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
The `ConvertTo-Json` cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertto Xml (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Xml.md
Title: ConvertTo-Xml
--- # ConvertTo-Xml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object.
-## Syntax
+## SYNTAX
``` ConvertTo-Xml [-Depth <Int32>] [-InputObject] <PSObject> [-NoTypeInformation] [-As <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Xml` cmdlet creates an [XML-based](/dotnet/api/system.xml.xmldocument) representation of one or more .NET objects. To use this cmdlet, pipe one or more objects to the cmdlet, or use the
file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md).
returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` does not have an option to convert objects to CLI XML.
-## Examples
+## EXAMPLES
### Example 1: Convert a date to XML
ConvertTo-Xml -As "Document" -InputObject (Get-Process) -Depth 3
This command converts the process objects that represent all of the processes on the computer into an XML document. The objects are expanded to a depth of three levels.
-## Parameters
+## PARAMETERS
### -As
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `ConvertTo-XML`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument The value of the **As** parameter determines the type of object that `ConvertTo-XML` returns.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Debug Runspace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Debug-Runspace.md
Title: Debug-Runspace
--- # Debug-Runspace
-## Synopsis
+## SYNOPSIS
Starts an interactive debugging session with a runspace.
-## Syntax
+## SYNTAX
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Debug a remote runspace
In the last command, you start debugging an opened runspace that is running a sc
`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## Related links
+## RELATED LINKS
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
Title: Disable-PSBreakpoint
--- # Disable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Disables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets des
PowerShell scripts. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint and disable it
This command disables all breakpoints in the current console.
`Get-PSBreakpoint` | Disable-PSBreakpoint ```
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Disable Runspacedebug (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md
Title: Disable-RunspaceDebug
--- # Disable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Disable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Disable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-RunspaceDebug` cmdlet disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Examples
+## EXAMPLES
### 1: Disable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-RunspaceDebug](Enable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Enables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Id (Default)
Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't gene
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Runspacedebug (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md
Title: Enable-RunspaceDebug
--- # Enable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Enable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-RunspaceDebug` cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Examples
+## EXAMPLES
### 1: Enable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 True False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Export Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-Alias.md
Title: Export-Alias
--- # Export-Alias
-## Synopsis
+## SYNOPSIS
Exports information about currently defined aliases to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file does not exist, the cmdlet will create it. `Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
-## Examples
+## EXAMPLES
### Example 1: Export an alias
The third and fourth commands add the aliases in the Alias.ps1 file to a remote
The third command uses the `New-PSSession` cmdlet to create the session. The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
-## Parameters
+## PARAMETERS
### -Append
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).
-## Inputs
+## INPUTS
### None. You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Export-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
* You can only Export-Aliases to a file.
-## Related links
+## RELATED LINKS
[Get-Alias](Get-Alias.md)
Microsoft.PowerShell.Utility Export Clixml (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-Clixml.md
Title: Export-Clixml
# Export-Clixml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-F
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Clixml` cmdlet creates a Common Language Infrastructure (CLI) XML-based representation of an object or objects and stores it in a file. You can then use the `Import-Clixml` cmdlet to
file. `ConvertTo-XML` returns the XML, so you can continue to process it in Powe
A valuable use of `Export-Clixml` on Windows computers is to export credentials and secure strings securely as XML. For an example, see Example 3.
-## Examples
+## EXAMPLES
### Example 1: Export a string to an XML file
The output of `Get-Content` in this example has been truncate to focus on the cr
in the XML file. Note that the plain text value of the password is stored in the XML file as a Unicode character array as proven by `Format-Hex`. So the value is encoded but not encrypted.
-## Parameters
+## PARAMETERS
### -Depth
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
+## INPUTS
### System.Management.Automation.PSObject You can pipeline any object to `Export-Clixml`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-Clixml` creates a file that contains the XML.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Html](ConvertTo-Html.md)
Microsoft.PowerShell.Utility Export Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## Synopsis
+## SYNOPSIS
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Export process properties to a CSV file
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## Parameters
+## PARAMETERS
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV list is sent to the file designated in the Path parameter.
-## Notes
+## NOTES
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Formatdata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-FormatData.md
Title: Export-FormatData
--- # Export-FormatData
-## Synopsis
+## SYNOPSIS
Saves formatting data from the current session in a formatting file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
[-IncludeScriptBlock] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
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).
-## Examples
+## EXAMPLES
### Example 1: Export session format data
The third command shows the effects of this change. The command uses the `Get-Pr
get processes that have names that begin with P. The output shows that property values that are calculated by using script blocks are missing from the display.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Management.Automation.ExtendedTypeDefinition You can pipe **ExtendedTypeDefinition** objects from `Get-FormatData` to `Export-FormatData`.
-## Outputs
+## OUTPUTS
### None `Export-FormatData` does not return any objects. It generates a file and saves it in the specified path.
-## Notes
+## NOTES
- To use any formatting file, including an exported formatting file, the execution policy for the session must allow scripts and configuration files to run. For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Export Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md
Title: Export-PSSession
# Export-PSSession
-## Synopsis
+## SYNOPSIS
Exports commands from another session and saves them in a PowerShell module.
-## Syntax
+## SYNTAX
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## Examples
+## EXAMPLES
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Export-PSSession`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-PSSession` returns a list of files that comprise the module that it created.
-## Notes
+## NOTES
`Export-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for remoting. For more information, see
The module that `Export-PSSession` creates might include a formatting file, even
does not import formatting data. If the command does not import formatting data, any formatting files that are created will not contain formatting data.
-## Related links
+## RELATED LINKS
[about_Command_Precedence](../Microsoft.PowerShell.Core/About/about_Command_Precedence.md)
Microsoft.PowerShell.Utility Format Custom (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Format-Custom.md
Title: Format-Custom
--- # Format-Custom
-## Synopsis
+## SYNOPSIS
Uses a customized view to format the output.
-## Syntax
+## SYNTAX
``` Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-View <String>]
Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-Vi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Custom` cmdlet formats the output of a command as defined in an alternate view. `Format-Custom` is designed to display views that are not just tables or just lists. You can use the views defined in PowerShell, or you can create your own views in a new `format.ps1xml` file and use the `Update-FormatData` cmdlet to add them to PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Format output with a custom view
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -Depth
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Custom`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Custom` returns the format objects that represent the display.
-## Notes
+## NOTES
`Format-Custom` is designed to display views that are not just tables or just lists. To display an alternate table view, use `Format-Table`. To display an alternate list view, use `Format-List`.
You can also refer to `Format-Custom` by its built-in alias, `fc`. For more info
The **GroupBy** parameter assumes that the objects are sorted. Before using `Format-Custom` to group the objects, use `Sort-Object` to sort them.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Hex (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Format-Hex.md
Title: Format-Hex
# Format-Hex
-## Synopsis
+## SYNOPSIS
Displays a file or other input as hexadecimal.
-## Syntax
+## SYNTAX
### Path (Default)
Format-Hex -InputObject <PSObject> [-Encoding <Encoding>] [-Count <Int64>] [-Off
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Hex` cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at
to get file information.
When using `Format-Hex` on a file, the cmdlet ignores newline characters and returns the entire contents of a file in one string with the newline characters preserved.
-## Examples
+## EXAMPLES
### Example 1: Get the hexadecimal representation of a string
data, and the adjacent object is also numeric, it will group them into a single
0000000000000000 01 00 00 00 00 00 00 00 � ```
-## Parameters
+## PARAMETERS
### -Count
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ByteCollection
by `Format-Hex`. The output also states they type of bytes being processed. If y
**Path** or **LiteralPath** parameter, the object contains the path of the file that contains each byte. If you pass a string, boolean, integer, etc, it will be labeled appropriately.
-## Notes
+## NOTES
The right-most column of output tries to render the bytes as ASCII characters:
Generally, each byte is interpreted as a Unicode code point, which means that:
- Multi-byte UTF-8 characters never render correctly - UTF-16 characters render correctly only if their high-order byte happens be `NUL`.
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Utility Format List (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Format-List.md
Title: Format-List
--- # Format-List
-## Synopsis
+## SYNOPSIS
Formats the output as a list of properties in which each property appears on a new line.
-## Syntax
+## SYNTAX
``` Format-List [[-Property] <Object[]>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-List` cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use `Format-List` to format and display all or
selected properties of an object as a list (format-list *).
Because more space is available for each item in a list than in a table, PowerShell displays more properties of the object in the list, and the property values are less likely to be truncated.
-## Examples
+## EXAMPLES
### Example 1: Format computer services
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -DisplayError
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-List`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-List` returns the format objects that represent the list.
-## Notes
+## NOTES
You can also refer to Format-List by its built-in alias, FL. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use the list format, otherwis
fails. If the alternate view is a table, use `Format-Table`. If the alternate view is not a list or a table, use `Format-Custom`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Table (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Format-Table.md
Title: Format-Table
# Format-Table
-## Synopsis
+## SYNOPSIS
Formats the output as a table.
-## Syntax
+## SYNTAX
### All
Format-Table [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [[-Property
[-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Table` cmdlet formats the output of a command as a table with the selected properties of the object in each column. The object type determines the default layout and properties that are
specify the column headings in the table. To add a calculated property, use the
**GroupBy** parameter. For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
-## Examples
+## EXAMPLES
### Example 1: Format PowerShell host
Wednesday
InvalidArgument: Failed to evaluate expression " $_ / $null ". ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object down the pipeline to `Format-Table`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Table` returns format objects that represent the table.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Wide (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Format-Wide.md
Title: Format-Wide
--- # Format-Wide
-## Synopsis
+## SYNOPSIS
Formats objects as a wide table that displays only one property of each object.
-## Syntax
+## SYNTAX
``` Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>]
Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Wide` cmdlet formats objects as a wide table that displays only one property of each object. You can use the **Property** parameter to determine which property is displayed.
-## Examples
+## EXAMPLES
### Example 1: Format names of files in the current directory
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Wide`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Wide` returns format objects that represent the table.
-## Notes
+## NOTES
You can also refer to `Format-Wide` by its built-in alias, `fw`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use table format; if it does
fails. If the alternate view is a list, use `Format-List`. If the alternate view is neither a list nor a table, use Format-Custom.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Get Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Alias.md
Title: Get-Alias
--- # Get-Alias
-## Synopsis
+## SYNOPSIS
Gets the aliases for the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Alias [[-Name] <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonP
Get-Alias [-Exclude <String[]>] [-Scope <String>] [-Definition <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Alias` cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your PowerShell profile.
parameter, `Get-Alias` takes a command name and returns its aliases.
Beginning in Windows PowerShell 3.0, `Get-Alias` displays non-hyphenated alias names in an `<alias> -> <definition>` format to make it even easier to find the information that you need.
-## Examples
+## EXAMPLES
### Example 1: Get all aliases in the current session
that begin with "e".
The command uses the **Scope** parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.
-## Parameters
+## PARAMETERS
### -Definition
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
+## INPUTS
### System.String You can pipe alias names to `Get-Alias`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
You can pipe alias names to `Get-Alias`.
every alias, but PowerShell uses an arrow-based format to display the names of non-hyphenated aliases.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To delete an alias, use `Remove-Item`. - The arrow-based alias name format is not used for aliases that include a hyphen. These are likely to be preferred substitute names for cmdlets and functions, instead of typical abbreviations or nicknames.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Get Culture (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Culture.md
Title: Get-Culture
# Get-Culture
-## Synopsis
+## SYNOPSIS
Gets the current culture set in the operating system.
-## Syntax
+## SYNTAX
### CurrentCulture (Default)
Get-Culture [-Name <String[]>] [-NoUserOverrides] [<CommonParameters>]
Get-Culture [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Culture` cmdlet gets information about the current culture settings. This includes information about the current language settings on the system, such as the keyboard layout, and the
system, and the [Set-Culture](/powershell/module/international/set-culture) cmdl
International module. The user-interface (UI) culture determines which text strings are used for user interface elements, such as menus and messages.
-## Examples
+## EXAMPLES
### Example 1: Get culture settings
LCID Name DisplayName
1036 fr-FR French (France) ```
-## Parameters
+## PARAMETERS
### -ListAvailable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo `Get-Culture` returns an object that represents the current culture.
-## Notes
+## NOTES
You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the name of the current culture and the `$PsUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
[Set-Culture](/powershell/module/international/set-culture)
Microsoft.PowerShell.Utility Get Date (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Date.md
Title: Get-Date
# Get-Date
-## Synopsis
+## SYNOPSIS
Gets the current date and time.
-## Syntax
+## SYNTAX
### net (Default)
Get-Date [[-Date] <DateTime>] [-Year <Int32>] [-Month <Int32>] [-Day <Int32>] [-
[-UFormat <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Date` cmdlet gets a **DateTime** object that represents the current date or a date that you specify. `Get-Date` can format the date and time in several .NET and UNIX formats. You can use
programs.
`Get-Date` uses the computer's culture settings to determine how the output is formatted. To view your computer's settings, use `(Get-Culture).DateTimeFormat`.
-## Examples
+## EXAMPLES
### Example 1: Get the current date and time
replaced by periods.
includes the `$timestamp` variable as the directory name. The **Type** parameter specifies that a directory is created.
-## Parameters
+## PARAMETERS
### -Date
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
+## INPUTS
### Pipeline input `Get-Date` accepts pipeline input. For example, `Get-ChildItem | Get-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime or System.String
The method `(Get-Date).ToString()` converts a **DateTime** object a **String** o
To display an object's properties and methods, send the object down the pipeline to `Get-Member`. For example, `Get-Date | Get-Member`.
-## Notes
+## NOTES
**DateTime** objects are in long-date and long-time formats for the system locale.
The valid **UFormat specifiers** are displayed in the following table:
| `%y` | Year in 2-digit format | 19 | | `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |
-## Related links
+## RELATED LINKS
[ForEach-Object](../Microsoft.PowerShell.Core/ForEach-Object.md)
Microsoft.PowerShell.Utility Get Error (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Error.md
Title: Get-Error
# Get-Error
-## Synopsis
+## SYNOPSIS
Gets and displays the most recent error messages from the current session.
-## Syntax
+## SYNTAX
### Newest (Default)
Get-Error [[-Newest] <Int32>] [<CommonParameters>]
Get-Error [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Error` cmdlet gets a **PSExtendedError** object that represents the current error details from the last error that occurred in the session.
session using the **Newest** parameter.
The `Get-Error` cmdlet also receives error objects from a collection, such as `$Error`, to display multiple errors from the current session.
-## Examples
+## EXAMPLES
### Example 1: Get the most recent error details
messages, similar to the result of Example 1.
$Error | Get-Error ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### PSObject Supports input from any **PSObject**, but results vary unless either an **ErrorRecord** or **Exception** object are supplied.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ErrorRecord#PSExtendedError Output in a **PSExtendedError** object.
-## Notes
+## NOTES
`Get-Error` accepts pipeline input. For example, `$Error | Get-Error`.
-## Related links
+## RELATED LINKS
[about_Try_Catch_Finally](../Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md)
Microsoft.PowerShell.Utility Get Event (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Event.md
Title: Get-Event
--- # Get-Event
-## Synopsis
+## SYNOPSIS
Gets the events in the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-Event [[-SourceIdentifier] <String>] [<CommonParameters>]
Get-Event [-EventIdentifier] <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Event` cmdlet gets events in the PowerShell event queue for the current session. You can get all events or use the **EventIdentifier** or **SourceIdentifier** parameter to specify the
PowerShell exits. You can use `Get-Event` or `Wait-Event` to get the events.
This cmdlet does not get events from the Event Viewer logs. To get those events, use `Get-WinEvent` or `Get-EventLog`.
-## Examples
+## EXAMPLES
### Example 1: Get all events
PS C:\> Get-Event -EventIdentifier 2
This command gets the event with an event identifier of 2.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs `Get-Event` returns a **PSEventArgs** object for each event. To see a description of this object, type `Get-Help Get-Event -Full` and see the Notes section of the help topic.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The `Get-Event` cmdlet returns a **PSEventArgs** object
register an event. In the value of the **Action** parameter, the **MessageData** property of the `$Event` automatic variable contains this value.
-## Related links
+## RELATED LINKS
[New-Event](New-Event.md)
Microsoft.PowerShell.Utility Get Eventsubscriber (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-EventSubscriber.md
Title: Get-EventSubscriber
--- # Get-EventSubscriber
-## Synopsis
+## SYNOPSIS
Gets the event subscribers in the current session.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-EventSubscriber [[-SourceIdentifier] <String>] [-Force] [<CommonParameters>]
Get-EventSubscriber [-SubscriptionId] <Int32> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventSubscriber` cmdlet gets the event subscribers in the current session.
your Windows PowerShell session, and the events to which you subscribed are adde
queue whenever they are raised. To cancel an event subscription, delete the event subscriber by using the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get the event subscriber for a timer event
being generated when the Elapsed event occurs.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventSubscriber `Get-EventSubscriber` returns an object that represents each event subscriber.
-## Notes
+## NOTES
The `New-Event` cmdlet, which creates a custom event, does not generate a subscriber. Therefore, the `Get-EventSubscriber` cmdlet will not find a subscriber object for these events. However, if you use
generates.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Get Filehash (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-FileHash.md
Title: Get-FileHash
--- # Get-FileHash
-## Synopsis
+## SYNOPSIS
Computes the hash value for a file by using a specified hash algorithm.
-## Syntax
+## SYNTAX
### Path (Default)
Get-FileHash [-LiteralPath] <String[]> [[-Algorithm] <String>] [<CommonParameter
Get-FileHash [-InputStream] <Stream> [[-Algorithm] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FileHash` cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying
are also identical.
By default, the `Get-FileHash` cmdlet uses the SHA256 algorithm, although any hash algorithm that is supported by the target operating system can be used.
-## Examples
+## EXAMPLES
### Example 1: Compute the hash value for a file
Hash
64EC88CA00B268E5BA1A35678A1B5316D212F4F366B2477232534A8AECA37F3C ```
-## Parameters
+## PARAMETERS
### -Algorithm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string to the `Get-FileHash` cmdlet that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### Microsoft.Powershell.Utility.FileHash `Get-FileHash` returns an object that represents the path to the specified file, the value of the computed hash, and the algorithm used to compute the hash.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Get Formatdata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-FormatData.md
Title: Get-FormatData
--- # Get-FormatData
-## Synopsis
+## SYNOPSIS
Gets the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FormatData` cmdlet gets the formatting data in the current session.
cmdlet to serialize the objects, convert them to XML, and save them in `Format.p
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Get all formatting data
TypeNames FormatViewDefinition
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash} ```
-## Parameters
+## PARAMETERS
### -PowerShellVersion
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExtendedTypeDefinition
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-FormatData](Export-FormatData.md)
Microsoft.PowerShell.Utility Get Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Host.md
Title: Get-Host
--- # Get-Host
-## Synopsis
+## SYNOPSIS
Gets an object that represents the current host program.
-## Syntax
+## SYNTAX
``` Get-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Host` cmdlet gets an object that represents the program that is hosting Windows PowerShell.
including detailed information about the version of Windows PowerShell that is c
the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
-## Examples
+## EXAMPLES
### Example 1: Get information about the PowerShell console host
This command uses the **PrivateData** property of `$Host` as its ErrorBackground
see all of the properties of the object in the `$Host`.PrivateData property, type `$host.PrivateData | format-list *`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Internal.Host.InternalHost `Get-Host` returns a **System.Management.Automation.Internal.Host.InternalHost** object.
-## Notes
+## NOTES
The `$Host` automatic variable contains the same object that `Get-Host` returns, and you can use it in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variables contain the same
use these features interchangeably.
For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Get Markdownoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-MarkdownOption.md
Title: Get-MarkdownOption
# Get-MarkdownOption
-## Synopsis
+## SYNOPSIS
Returns the current colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
``` Get-MarkdownOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Returns the current colors and styles used for rendering Markdown content in the console. The strings displayed in the output of this cmdlet contain the ANSI escape codes used to change the
color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org/) website.
-## Examples
+## EXAMPLES
### Example 1 - Get the current colors and style
EmphasisItalics : [36m
> (`[char]0x1B`) for the ANSI escape sequence. For more information about ANSI escape codes work, > see [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-MarkdownOption](Set-MarkdownOption.md)
Microsoft.PowerShell.Utility Get Member (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Member.md
Title: Get-Member
--- # Get-Member
-## Synopsis
+## SYNOPSIS
Gets the properties and methods of objects.
-## Syntax
+## SYNTAX
``` Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Member` cmdlet gets the members, the properties and methods, of objects.
information about static members, the members of the class, not of the instance,
parameter. To get only certain types of members, such as **NoteProperties**, use the **MemberType** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get the members of process objects
LastWriteTimeUtc
Attributes ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Get-Member`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MemberDefinition `Get-Member` returns an object for each property or method that its gets.
-## Notes
+## NOTES
You can get information about a collection object either by using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`.
return information about the `[System.RuntimeType]` type. However, when you use
parameter, `Get-Member` returns the static members of the specific type represented by the `System.RuntimeType` instance.
-## Related links
+## RELATED LINKS
[Add-Member](Add-Member.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Title: Get-PSBreakpoint
--- # Get-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Gets the breakpoints that are set in the current session.
-## Syntax
+## SYNTAX
### Script (Default)
Get-PSBreakpoint [-Script <String[]>] [-Type] <BreakpointType[]> [<CommonParamet
Get-PSBreakpoint [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints.
examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed
PowerShell scripts and commands. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Get all breakpoints for all scripts and functions
This command gets all line and variable breakpoints in the `Sample.ps1` script.
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1" ```
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## Notes
+## NOTES
You can use `Get-PSBreakpoint` or its alias, "gbp".
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Pscallstack (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-PSCallStack.md
Title: Get-PSCallStack
--- # Get-PSCallStack
-## Synopsis
+## SYNOPSIS
Displays the current call stack.
-## Syntax
+## SYNTAX
``` Get-PSCallStack [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSCallStack` cmdlet displays the current call stack.
display the call stack in a script or function outside of the debugger.
To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCallStack`.
-## Examples
+## EXAMPLES
### Example 1: Get the call stack for a function
stack.
The final command is a `Step-Out` command (`o`) that exits the debugger and continues executing the script to completion.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CallStackFrame `Get-PSCallStack` returns an object that represents the items in the call stack.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Random (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Random.md
Title: Get-Random
--- # Get-Random
-## Synopsis
+## SYNOPSIS
Gets a random number, or selects objects randomly from a collection.
-## Syntax
+## SYNTAX
### RandomNumberParameterSet (Default)
Get-Random [-SetSeed <Int32>] [[-Maximum] <Object>] [-Minimum <Object>] [-Count
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Random` cmdlet gets a randomly selected number. If you submit a collection of objects to `Get-Random`, it gets one or more randomly selected objects from the collection.
objects returned from a collection, or a seed number.
> the current session until you use **SetSeed** again or close the session. You can't reset the seed > to its default value.
-## Examples
+## EXAMPLES
### Example 1: Get a random integer
Get-Random -InputObject @('a','',$null)
`Get-Random` will return either `a`, empty string, or `$null`. The empty sting displays as a blank line and `$null` returns to a PowerShell prompt.
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe one or more objects. `Get-Random` selects values randomly from the piped objects.
-## Outputs
+## OUTPUTS
### System.Int32, System.Int64, System.Double `Get-Random` returns an integer or floating-point number, or an object selected randomly from a submitted collection.
-## Notes
+## NOTES
By default, `Get-Random` generates cryptographically secure randomness using the [RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class.
parameter set accepts arrays that contain an empty string or `$null`. In earlier
versions, only the **Maximum** parameter in the **RandomNumberParameterSet** parameter set accepted an empty string or `$null`.
-## Related links
+## RELATED LINKS
[System.Security.Cryptography.RandomNumberGenerator()](/dotnet/api/system.security.cryptography.randomnumbergenerator)
Microsoft.PowerShell.Utility Get Runspace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Runspace.md
Title: Get-Runspace
--- # Get-Runspace
-## Synopsis
+## SYNOPSIS
Gets active runspaces within a PowerShell host process.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Get-Runspace [-Id] <Int32[]> [<CommonParameters>]
Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Runspace` cmdlet gets active runspaces in a PowerShell host process.
-## Examples
+## EXAMPLES
### Example 1: Get runspaces
Id Name ComputerName Type State Availability
1 Runspace1 localhost Local Opened Busy ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to `Debug-Runspace`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Debug-Runspace](Debug-Runspace.md)
Microsoft.PowerShell.Utility Get Runspacedebug (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md
Title: Get-RunspaceDebug
--- # Get-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Shows runspace debugging options.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Get-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Get-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-RunspaceDebug` cmdlet shows runspace debugging options.
-## Examples
+## EXAMPLES
### 1: Show the state of the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Get Tracesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-TraceSource.md
Title: Get-TraceSource
--- # Get-TraceSource
-## Synopsis
+## SYNOPSIS
Gets PowerShell components that are instrumented for tracing.
-## Syntax
+## SYNTAX
``` Get-TraceSource [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TraceSource` cmdlet gets the trace sources for PowerShell components that are currently in use. You can use the data to determine which PowerShell components you can trace. When tracing, the
trace data to monitor data flow, program execution, and errors.
The tracing cmdlets were designed for PowerShell developers, but they are available to all users.
-## Examples
+## EXAMPLES
### Example 1: Get trace sources by name
Get-TraceSource
This command gets all of the PowerShell components that can be traced.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String You can pipe a string that contains the name of a trace source to `Get-TraceSource`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTraceSource `Get-TraceSource` returns objects that represent the trace sources.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TraceSource](Set-TraceSource.md)
Microsoft.PowerShell.Utility Get Typedata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-TypeData.md
Title: Get-TypeData
--- # Get-TypeData
-## Synopsis
+## SYNOPSIS
Gets the extended type data in the current session.
-## Syntax
+## SYNTAX
``` Get-TypeData [[-TypeName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TypeData` cmdlet gets the extended type data in the current session. This includes type data that was added to the session by `Types.ps1xml` file and dynamic type data that was added by
about dynamic type data that the `Update-TypeData` cmdlet adds, see `Update-Type
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all extended type data
The command gets the **DateTime** key in **Members** and its **GetScriptBlock**
The output shows the script block that creates the value of the **DateTime** property of every **System.DateTime** object in PowerShell.
-## Parameters
+## PARAMETERS
### -TypeName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe type names to `Get-TypeData`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.TypeData
-## Notes
+## NOTES
`Get-TypeData` gets only the extended type data in the current session. It does not get extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Get Uiculture (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-UICulture.md
Title: Get-UICulture
--- # Get-UICulture
-## Synopsis
+## SYNOPSIS
Gets the current UI culture settings in the operating system.
-## Syntax
+## SYNTAX
``` Get-UICulture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-UICulture` cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such
as menus and messages.
You can also use the `Get-Culture` cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.
-## Examples
+## EXAMPLES
### Example 1: Get the UI culture
This command displays the short date pattern for the current UI culture. To see
subproperties of the **DateTimeFormat** property of the UI culture, type `(Get-UICulture).DateTimeFormat | Get-Member`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo, Microsoft.PowerShell.VistaCultureInfo
You cannot pipe input to this cmdlet.
it returns a **CultureInfo** object. In Windows PowerShell 2.0, it returns a **VistaCultureInfo** object.
-## Notes
+## NOTES
You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the name of the current culture, and the `$PSUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Get Unique (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Unique.md
Title: Get-Unique
--- # Get-Unique
-## Synopsis
+## SYNOPSIS
Returns unique items from a sorted list.
-## Syntax
+## SYNTAX
### AsString (Default)
Get-Unique [-InputObject <PSObject>] [-AsString] [<CommonParameters>]
Get-Unique [-InputObject <PSObject>] [-OnType] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Unique` cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. The list must be sorted for the cmdlet to work properly.
and returns only one instance of each item. The list must be sorted for the cmdl
`Get-Unique` is case-sensitive. As a result, strings that differ only in character casing are considered to be unique.
-## Examples
+## EXAMPLES
### Example 1: Get unique words in a text file
The **AsString** parameter tells `Get-Unique` to treat the **ProcessName** value
Without this parameter, `Get-Unique` treats the **ProcessName** values as objects and returns only one instance of the object, that is, the first process name in the list.
-## Parameters
+## PARAMETERS
### -AsString
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any type of object to `Get-Unique`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject The type of object that `Get-Unique` returns is determined by the input.
-## Notes
+## NOTES
You can also refer to `Get-Unique` by its built-in alias, `gu`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md). To sort a list, use Sort-Object. You can also use the **Unique** parameter of `Sort-Object` to find the unique items in a list.
-## Related links
+## RELATED LINKS
[Select-Object](Select-Object.md)
Microsoft.PowerShell.Utility Get Uptime (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Uptime.md
Title: Get-Uptime
# Get-Uptime
-## Synopsis
+## SYNOPSIS
Get the **TimeSpan** since last boot.
-## Syntax
+## SYNTAX
### Timespan (Default)
Get-Uptime [<CommonParameters>]
Get-Uptime [-Since] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet returns the time elapsed since the last boot of the operating system. The `Get-Uptime` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Show time since last boot
Get-Uptime -Since
Tuesday, June 18, 2019 2:34:56 PM ```
-## Parameters
+## PARAMETERS
### -Since
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
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.TimeSpan
This type is returned when using the **Since** parameter.
> For more information about Windows fast startup, see > [Distinguishing Fast Startup from Wake-from-Hibernation](/windows-hardware/drivers/kernel/distinguishing-fast-startup-from-wake-from-hibernation).
-## Notes
+## NOTES
On Windows, the value returned is the same as the **LastBootUpTime** property of the **Win32_OperatingSystem** class in WMI.
-## Related links
+## RELATED LINKS
[Win32_OperatingSystem](/windows/win32/cimwin32prov/win32-operatingsystem#properties)
Microsoft.PowerShell.Utility Get Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Variable.md
Title: Get-Variable
--- # Get-Variable
-## Synopsis
+## SYNOPSIS
Gets the variables in the current console.
-## Syntax
+## SYNTAX
``` Get-Variable [[-Name] <String[]>] [-ValueOnly] [-Include <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Variable` cmdlet gets the PowerShell variables in the current console. You can retrieve just the values of the variables by specifying the **ValueOnly** parameter, and you can filter the variables returned by name.
-## Examples
+## EXAMPLES
### Example 1: Get variables by letter
Get-Variable -Scope 0
Compare-Object (Get-Variable -Scope 0) (Get-Variable -Scope 1) ```
-## Parameters
+## PARAMETERS
### -Exclude
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the variable name to `Get-Variable`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSVariable
When you specify the **ValueOnly** parameter, if the specified variable's value
processing the variable's values one at a time. A workaround to force collection enumeration is to enclose the `Get-Variable` command in parenthesis.
-## Notes
+## NOTES
- This cmdlet does not manage environment variables. To manage environment variables, you can use the environment variable provider.
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Get Verb (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Get-Verb.md
Title: Get-Verb
--- # Get-Verb
-## Synopsis
+## SYNOPSIS
Gets approved PowerShell verbs.
-## Syntax
+## SYNTAX
``` Get-Verb [[-Verb] <String[]>] [[-Group] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Verb` function gets verbs that are approved for use in PowerShell commands.
warning message.
> [Approved Verbs](../../docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md) in > the Microsoft Docs.
-## Examples
+## EXAMPLES
### Example 1 - Get a list of all verbs
Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility ```
-## Parameters
+## PARAMETERS
### -Group
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Management.Automation.VerbInfo
-## Notes
+## NOTES
PowerShell verbs are assigned to a group based on their most common use. The groups are designed to make the verbs easy to find and compare, not to restrict their use. You can use any approved verb
Some of the cmdlets that are installed with PowerShell, such as `Tee-Object` and
unapproved verbs. These cmdlets are historic exceptions and their verbs are classified as **reserved**.
-## Related links
+## RELATED LINKS
[Import-Module](../microsoft.powershell.core/import-module.md)
Microsoft.PowerShell.Utility Group Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Group-Object.md
Title: Group-Object
# Group-Object
-## Synopsis
+## SYNOPSIS
Groups objects that contain the same value for specified properties.
-## Syntax
+## SYNTAX
### HashTable
Group-Object [-NoElement] [-AsHashTable] [-AsString] [-InputObject <PSObject>]
[[-Property] <Object[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Group-Object` cmdlet displays objects in groups based on the value of a specified property. `Group-Object` returns a table with one row for each property value and a column that displays the
Beginning in PowerShell 7, `Group-Object` can combine the **CaseSensitive** and
parameters to create a case-sensitive hash table. The hash table keys use case-sensitive comparisons and output a **System.Collections.Hashtable** object.
-## Examples
+## EXAMPLES
### Example 1: Group files by extension
pipeline. `Group-Object` groups the objects using the **Property** value **Exten
**CaseSensitive** and **AsHashTable** parameters create the hash table and the keys are grouped using the case-sensitive keys `.txt` and `.TXT`.
-## Parameters
+## PARAMETERS
### -AsHashTable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Group-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GroupInfo or System.Collections.Hashtable When you use the **AsHashTable** parameter, `Group-Object` returns a **Hashtable** object. Otherwise, it returns a **GroupInfo** object.
-## Notes
+## NOTES
You can use the **GroupBy** parameter of the formatting cmdlets, such as `Format-Table` and `Format-List`, to group objects. Unlike `Group-Object`, which creates a single table with a row for
type. When grouping objects of different .NET Core types, `Group-Object` uses th
Objects that don't have a specified property can't be grouped. Objects that aren't grouped appear in the final **GroupInfo** object output in a group named `AutomationNull.Value`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Import Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-Alias.md
Title: Import-Alias
--- # Import-Alias
-## Synopsis
+## SYNOPSIS
Imports an alias list from a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-What
[<CommonParameters>] ```
-## Description
+## 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.
-## Examples
+## EXAMPLES
### Example 1: Import aliases from a file
Import-Alias test.txt
This command imports alias information from a file named test.txt.
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Alias`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Import-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Import Clixml (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-Clixml.md
Title: Import-Clixml
# Import-Clixml
-## Synopsis
+## SYNOPSIS
Imports a CLIXML file and creates corresponding objects in PowerShell.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Clixml -LiteralPath <String[]> [-IncludeTotalCount] [-Skip <UInt64>] [-Fi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Clixml` cmdlet imports a Common Language Infrastructure (CLI) XML file with data that represents Microsoft .NET Framework objects and creates the PowerShell objects. For more information
that were exported as secure XML using `Export-Clixml`. For an example, see Exam
`Import-Clixml` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import a serialized file and recreate an object
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -First
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
+## INPUTS
### System.String You can pipeline a string that contains a path to `Import-Clixml`.
-## Outputs
+## OUTPUTS
### PSObject `Import-Clixml` returns objects that were deserialized from the stored XML files.
-## Notes
+## NOTES
When specifying multiple values for a parameter, use commas to separate the values. For example, `<parameter-name> <value1>, <value2>`.
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Import Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-Csv.md
Title: Import-Csv
--- # Import-Csv
-## Synopsis
+## SYNOPSIS
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## Syntax
+## SYNTAX
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## Examples
+## EXAMPLES
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns the objects described by the content in the CSV file.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Localizeddata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-LocalizedData.md
Title: Import-LocalizedData
--- # Import-LocalizedData
-## Synopsis
+## SYNOPSIS
Imports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
-## Syntax
+## SYNTAX
``` Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-LocalizedData` cmdlet dynamically retrieves strings from a subdirectory whose name matches the UI language set for the current user of the operating system. It is designed to enable
it easy for scripts to display user messages in the UI language of the current u
information about this and about the format of the `.psd1` files, see [about_Script_Internationalization](../Microsoft.PowerShell.Core/About/about_Script_Internationalization.md).
-## Examples
+## EXAMPLES
### Example 1: Import text strings
The sample output shows the results of running both scripts when the UI culture
and there are no matching files or directories for that UI culture. `Day1.ps1` displays an error message and English output. `Day2.ps1` just displays the English output.
-## Parameters
+## PARAMETERS
### -BaseDirectory
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable `Import-LocalizedData` saves the hash table in the variable that is specified by the value of the **BindingVariable** parameter.
-## Notes
+## NOTES
- Before using `Import-LocalizedData`, localize your user messages. Format the messages for each locale (UI culture) in a hash table of key-value pairs, and save the hash table in a file with the
You cannot pipe input to this cmdlet.
For more information, see [about_Script_Internationalization](../Microsoft.Powershell.Core/About/about_Script_Internationalization.md).
-## Related links
+## RELATED LINKS
[Write-Host](Write-Host.md)
Microsoft.PowerShell.Utility Import Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-PSSession.md
Title: Import-PSSession
--- # Import-PSSession
-## Synopsis
+## SYNOPSIS
Imports commands from another session into the current session.
-## Syntax
+## SYNTAX
``` Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <Stri
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PSSession` cmdlet imports commands , such as cmdlets, functions, and aliases, from a PSSession on a local or remote computer into the current session. You can import any command that
Beginning in Windows PowerShell 3.0, you can use the `Import-Module` cmdlet to i
remote session into the current session. This feature uses implicit remoting. It is equivalent to using `Import-PSSession` to import selected modules from a remote session into the current session.
-## Examples
+## EXAMPLES
### Example 1: Import all commands from a PSSession
which returns the module name.
The `Get-Command` command is the equivalent of `Get-Command $M.Name`".
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
You cannot pipe objects to this cmdlet.
However, the imported module is temporary and exists only in the current session. To create a permanent module on disk, use the `Export-PSSession` cmdlet.
-## Notes
+## NOTES
- `Import-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for WS-Management remoting. For more information, see
permanent module on disk, use the `Export-PSSession` cmdlet.
include the prefix that you assign by using the **Prefix** parameter. To get help for an imported command in Windows PowerShell 2.0, use the original (non-prefixed) command name.
-## Related links
+## RELATED LINKS
[Export-PSSession](Export-PSSession.md)
Microsoft.PowerShell.Utility Import Powershelldatafile (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md
Title: Import-PowerShellDataFile
--- # Import-PowerShellDataFile
-## Synopsis
+## SYNOPSIS
Imports values from a `.PSD1` file without invoking its contents.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-PowerShellDataFile [-Path] <String[]> [<CommonParameters>]
Import-PowerShellDataFile [-LiteralPath] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a `.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
However, `Invoke-Expression` runs any code contained in the file. This could pro
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the code.
-## Examples
+## EXAMPLES
### Example 1: Retrieve values from PSD1
NodeName DSC-01
NodeName DSC-02 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Expression](Invoke-Expression.md)
Microsoft.PowerShell.Utility Invoke Expression (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Invoke-Expression.md
Title: Invoke-Expression
--- # Invoke-Expression
-## Synopsis
+## SYNOPSIS
Runs commands or expressions on the local computer.
-## Syntax
+## SYNTAX
``` Invoke-Expression [-Command] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Expression` cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without `Invoke-Expression`, a string submitted at the command
Expressions are evaluated and run in the current scope. For more information, se
> before running it. In general, it is best to design your script with predefined input options, > rather than allowing freeform input.
-## Examples
+## EXAMPLES
### Example 1: Evaluate an expression
command fails if the example number is not valid.
> If the example code from the help file has output in the example, PowerShell attempts to run the > output along with the code and an error will be thrown.
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String or PSObject You can pipe an object that represents the command to `Invoke-Expression`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### PSObject Returns the output that is generated by the invoked command (the value of the **Command** parameter).
-## Notes
+## NOTES
In most cases, you invoke expressions using PowerShell's call operator and achieve the same results. The call operator is a safer method. For more information, see [about_Operators](../microsoft.powershell.core/about/about_operators.md#call-operator-).
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Invoke Restmethod (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
Title: Invoke-RestMethod
# Invoke-RestMethod
-## Synopsis
+## SYNOPSIS
Sends an HTTP or HTTPS request to a RESTful web service.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-RestMethod -CustomMethod <String> [-FollowRelLink] [-MaximumFollowRelLink
[-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that return richly structured data.
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## Examples
+## EXAMPLES
### Example 1: Get the PowerShell RSS feed
$x
30 ```
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## Outputs
+## OUTPUTS
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## Notes
+## NOTES
Some features may not be available on all platforms.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Invoke Webrequest (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
Title: Invoke-WebRequest
# Invoke-WebRequest
-## Synopsis
+## SYNOPSIS
Gets content from a web page on the internet.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSessio
[-PreserveAuthorizationOnRedirect] [-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WebRequest` cmdlet sends HTTP and HTTPS requests to a web page or web service. It parses the response and returns collections of links, images, and other significant HTML elements.
variables. See the [Notes](#notes) section of this article.
> However, since the `contoso.com` sites do not exist, the examples do not work. Adapt the examples > to hosts in your environment.
-## Examples
+## EXAMPLES
### Example 1: Send a web request
$StatusCode
The terminating error is caught by the `catch` block, which retrieves the **StatusCode** from the **Exception** object.
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-WebRequest`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject
-## Notes
+## NOTES
Beginning with PowerShell 6.0.0 `Invoke-WebRequest` supports basic parsing only.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[Invoke-RestMethod](Invoke-RestMethod.md)
Microsoft.PowerShell.Utility Join String (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Join-String.md
Title: Join-String
# Join-String
-## Synopsis
+## SYNOPSIS
Combines objects from the pipeline into a single string.
-## Syntax
+## SYNTAX
### Default (Default)
Join-String [[-Property] <PSPropertyExpression>] [[-Separator] <String>] [-Outpu
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-String` cmdlet joins, or combines, text from pipeline objects into a single string.
or the result of the object that was converted to a string.
This cmdlet was introduced in PowerShell 6.2.
-## Examples
+## EXAMPLES
### Example 1: Join directory names
class {
} ```
-## Parameters
+## PARAMETERS
### -DoubleQuote
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Measure Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Measure-Command.md
Title: Measure-Command
--- # Measure-Command
-## Synopsis
+## SYNOPSIS
Measures the time it takes to run script blocks and cmdlets.
-## Syntax
+## SYNTAX
``` Measure-Command [-InputObject <PSObject>] [-Expression] <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Command` cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.
operation, and returns the execution time.
> [!NOTE] > Script blocks run by `Measure-Command` run in the current scope, not a child scope.
-## Examples
+## EXAMPLES
### Example 1: Measure a command
Value 2
For more information about the invocation operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#call-operator-).
-## Parameters
+## PARAMETERS
### -Expression
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe an object to `Measure-Command`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `Measure-Command` returns a time span object that represents the result.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Measure Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Measure-Object.md
Title: Measure-Object
--- # Measure-Object
-## Synopsis
+## SYNOPSIS
Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
-## Syntax
+## SYNTAX
### GenericMeasure (Default)
Measure-Object [[-Property] <PSPropertyExpression[]>] [-InputObject <PSObject>]
[-Character] [-IgnoreWhiteSpace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Object` cmdlet calculates the property values of certain types of object. `Measure-Object` performs three types of measurements, depending on the parameters in the command.
The `Measure-Object` cmdlet performs calculations on the property values of obje
**Average** of numeric values. For **String** objects, you can also use `Measure-Object` to count the number of lines, words, and characters.
-## Examples
+## EXAMPLES
### Example 1: Count the files and folders in a directory
StandardDeviation :
Property : PeakPagedMemorySize ```
-## Parameters
+## PARAMETERS
### -AllStats
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Measure-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GenericMeasureInfo
You can pipe objects to `Measure-Object`.
If you use the **Word** parameter, `Measure-Object` returns a **TextMeasureInfo** object. Otherwise, it returns a **GenericMeasureInfo** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility New Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-Alias.md
Title: New-Alias
# New-Alias
-## Synopsis
+## SYNOPSIS
Creates a new alias.
-## Syntax
+## SYNTAX
``` New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Alias` cmdlet creates a new alias in the current PowerShell session. Aliases created by using `New-Alias` are not saved after you exit the session or close PowerShell. You can use the `Export-Alias` cmdlet to save your alias information to a file. You can later use `Import-Alias` to retrieve that saved alias information.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
description, quick wmi alias, for the alias and makes it read-only. The last lin
uses `Get-Alias` to get the new alias and pipes it to Format-List to display all of the information about it.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **Passthru** parameter, `New-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the new alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To change an alias, use `Set-Alias`. To delete an alias, use `Remove-Item`.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility New Event (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-Event.md
Title: New-Event
--- # New-Event
-## Synopsis
+## SYNOPSIS
Creates a new event.
-## Syntax
+## SYNTAX
``` New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Event` cmdlet creates a new custom event.
the event subscription by using the `Unregister-Event` cmdlet, the event subscri
are deleted from the session. If you do not subscribe to the custom event, to delete the event, you must change the program conditions or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Create a new event in the event queue
Instrumentation (WMI) event that is raised when a new process is created. The co
Because the events that `New-Event` raises are automatically added to the PowerShell event queue, you do not need to register for that event.
-## Parameters
+## PARAMETERS
### -EventArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The new custom event, the event subscription, and the event queue exist only in
If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility New Guid (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-Guid.md
Title: New-Guid
--- # New-Guid
-## Synopsis
+## SYNOPSIS
Creates a GUID.
-## Syntax
+## SYNTAX
``` New-Guid [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Guid` cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
-## Examples
+## EXAMPLES
### Example 1: Create a GUID
New-Guid
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Guid This cmdlet returns a GUID.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-Object.md
Title: New-Object
--- # New-Object
-## Synopsis
+## SYNOPSIS
Creates an instance of a Microsoft .NET Framework or COM object.
-## Syntax
+## SYNTAX
### Net (Default)
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictio
New-Object [-ComObject] <String> [-Strict] [-Property <IDictionary>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Object` cmdlet creates an instance of a .NET Framework or COM object.
you type the fully qualified name of a .NET Framework class and the cmdlet retur
instance of that class. To create an instance of a COM object, use the **ComObject** parameter and specify the ProgID of the object as its value.
-## Examples
+## EXAMPLES
### Example 1: Create a System.Version object
members of `$array` to parameters of the constructor but the constructor does no
parameter. Wrapping `$array` in another array prevents PowerShell from attempting to bind the three members of `$array` to parameters of the constructor.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Object `New-Object` returns the object that is created.
-## Notes
+## NOTES
- `New-Object` provides the most commonly-used functionality of the VBScript CreateObject function. A statement like `Set objShell = CreateObject("Shell.Application")` in VBScript can be
You cannot pipe input to this cmdlet.
- `New-Object` expands upon the functionality available in the Windows Script Host environment by making it easy to work with .NET Framework objects from the command line and within scripts.
-## Related links
+## RELATED LINKS
[about_Object_Creation](../Microsoft.PowerShell.Core/About/about_Object_Creation.md)
Microsoft.PowerShell.Utility New Temporaryfile (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-TemporaryFile.md
Title: New-TemporaryFile
--- # New-TemporaryFile
-## Synopsis
+## SYNOPSIS
Creates a temporary file.
-## Syntax
+## SYNTAX
``` New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates temporary files that you can use in scripts.
order and uses the first path found:
- On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary file
$TempFile = New-TemporaryFile
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file in the `$TempFile` variable. You can use this file later in your script.
-## Parameters
+## PARAMETERS
### -Confirm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a **FileInfo** object that represents the temporary file.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Timespan (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-TimeSpan.md
Title: New-TimeSpan
--- # New-TimeSpan
-## Synopsis
+## SYNOPSIS
Creates a TimeSpan object.
-## Syntax
+## SYNTAX
### Date (Default)
New-TimeSpan [[-Start] <DateTime>] [[-End] <DateTime>] [<CommonParameters>]
New-TimeSpan [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Seconds <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-TimeSpan` cmdlet creates a **TimeSpan** object that represents a time interval. You can use a **TimeSpan** object to add or subtract time from **DateTime** objects.
You can use a **TimeSpan** object to add or subtract time from **DateTime** obje
Without parameters, a `New-TimeSpan` command returns a **TimeSpan** object that represents a time interval of zero.
-## Examples
+## EXAMPLES
### Example 1: Create a TimeSpan object for a specified duration
TotalSeconds : 27813562.3127728
TotalMilliseconds : 27813562312.7728 ```
-## Parameters
+## PARAMETERS
### -Days
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a **DateTime** object that represents that start time to `New-TimeSpan`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `New-TimeSpan` returns an object that represents the time span.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility New Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/New-Variable.md
Title: New-Variable
# New-Variable
-## Synopsis
+## SYNOPSIS
Creates a new variable.
-## Syntax
+## SYNTAX
``` New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Opti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Variable` cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
a variable, and determine whether variables are public or private.
Typically, you create a new variable by typing the variable name and its value, such as `$Var = 3`, but you can use the `New-Variable` cmdlet to use its parameters.
-## Examples
+## EXAMPLES
### Example 1: Create a variable
abc123xyz
This command demonstrates that variables with spaces can be created. The variables can be accessed using the `Get-Variable` cmdlet or directly by delimiting a variable with braces.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### System.Object You can pipe a value to `New-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `New-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Out File (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Out-File.md
Title: Out-File
# Out-File
-## Synopsis
+## SYNOPSIS
Sends output to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Out-File [[-Encoding] <Encoding>] -LiteralPath <string> [-Append] [-Force] [-NoC
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means
that the output may not be ideal for programmatic processing unless all input ob
When you need to specify parameters for the output, use `Out-File` rather than the redirection operator (`>`). For more information about redirection, see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md).
-## Examples
+## EXAMPLES
### Example 1: Send output and create a file
DemoDefaultOutFileWidth
For more information about `$PSDefaultParameterValues`, see [about_Preference_Variables](../Microsoft.Powershell.Core/About/about_preference_variables.md#psdefaultparametervalues).
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-File`.
-## Outputs
+## OUTPUTS
### None `Out-File` does not generate any output.
-## Notes
+## NOTES
Input objects are automatically formatted as they would be in the terminal, but you can use a `Format-*` cmdlet to explicitly control the formatting of the output to the file. For example,
cmdlet.
`Out-File` saves data to a file but it does not produce any output objects to the pipeline.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.Powershell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Out Gridview (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Out-GridView.md
Title: Out-GridView
--- # Out-GridView
-## Synopsis
+## SYNOPSIS
Sends output to an interactive table in a separate window.
-## Syntax
+## SYNTAX
### PassThru (Default)
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputMod
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For full instructions, see the [Notes](#notes) section of this article.
> [GraphicalTools](https://www.powershellgallery.com/packages/Microsoft.PowerShell.GraphicalTools) > module in the PowerShell Gallery.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a grid view
This command line can be used in a Windows shortcut. Without the **Wait** parame
would exit as soon as the `Out-GridView` window opened, which would close the `Out-GridView` window almost immediately.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None Normally, `Out-GridView` does not return any objects. When using the **PassThru** parameter, the objects representing the selected rows are returned to the pipeline.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The criteria only affects the display. It does not delete items from the table.
- To delete selected criteria, click the red X beside each criterion. - To delete all criteria, click the **Clear All** button.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out Printer (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Out-Printer.md
Title: Out-Printer
# Out-Printer
-## Synopsis
+## SYNOPSIS
Sends output to a printer.
-## Syntax
+## SYNTAX
``` Out-Printer [[-Name] <String>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified.
> This cmdlet was reintroduced in PowerShell 7. This cmdlet is only available on Windows systems > that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1 - Send a file to be printed on the default printer
Out-Printer -InputObject $H
`Get-Help` gets the full version of the Help topic for `Get-CimInstance` and stores it in the `$H` variable. The **InputObject** parameter passes the value of `$H` to `Out-Printer`.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-Printer`.
-## Outputs
+## OUTPUTS
### None `Out-Printer` does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
cmdlet sends it to a formatting cmdlet before rendering it.
you pipe the output of `Out-Printer` to `Get-Member`, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out String (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Out-String.md
Title: Out-String
# Out-String
-## Synopsis
+## SYNOPSIS
Outputs input objects as a string.
-## Syntax
+## SYNTAX
### NoNewLineFormatting (Default)
Out-String [-Width <Int32>] [-NoNewline] [-InputObject <PSObject>] [<CommonParam
Out-String [-Stream] [-Width <Int32>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-String` cmdlet converts input objects into strings. By default, `Out-String` accumulates the strings and returns them as a single string, but you can use the **Stream**
parameter to direct `Out-String` to return one line at a time or create an array
cmdlet lets you search and manipulate string output as you would in traditional shells when object manipulation is less convenient.
-## Examples
+## EXAMPLES
### Example 1: Get the current culture and convert the data to strings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-String`.
-## Outputs
+## OUTPUTS
### System.String `Out-String` returns the string that it creates from the input object.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb don't format objects. The `Out` cmdlets send objects to the formatter for the specified display destination.
-## Related links
+## RELATED LINKS
[about_Formatting](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md)
Microsoft.PowerShell.Utility Read Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Read-Host.md
Title: Read-Host
--- # Read-Host
-## Synopsis
+## SYNOPSIS
Reads a line of input from the console.
-## Syntax
+## SYNTAX
``` Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
-## Examples
+## EXAMPLES
### Example 1: Save console input to a variable
value is stored as a **SecureString** object in the `$pwd_secure_string` variabl
$pwd_secure_string = Read-Host "Enter a Password" -AsSecureString ```
-## Parameters
+## PARAMETERS
### -AsSecureString
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept input from the PowerShell pipeline.
-## Outputs
+## OUTPUTS
### System.String or System.Security.SecureString If the **AsSecureString** parameter is used, `Read-Host` returns a **SecureString**. Otherwise, it returns a string.
-## Notes
+## NOTES
This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is connected to the keyboard of the host console.
-## Related links
+## RELATED LINKS
[Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Utility Register Engineevent (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Register-EngineEvent.md
Title: Register-EngineEvent
# Register-EngineEvent
-## Synopsis
+## SYNOPSIS
Subscribes to events that are generated by the PowerShell engine and by the `New-Event` cmdlet.
-## Syntax
+## SYNTAX
``` Register-EngineEvent [-SourceIdentifier] <String> [[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-EngineEvent` cmdlet subscribes to events that are generated by the PowerShell engine and the `New-Event` cmdlet. Use the **SourceIdentifier** parameter to specify the event.
the `Unregister-Event` cmdlet, which deletes the event subscriber from the sessi
When the subscribed event is raised, it is added to the event queue in your session. To get events in the event queue, use the `Get-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Register a PowerShell engine event on remote computers
The `Unregister-Event` cmdlet stops the job associated with the event subscripti
Id 19 is still running and creating new events. We use the **Job** cmdlets stop the job and remove the unneeded job objects. `Get-Content` displays the contents of the log file.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Register-EngineEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob If you use the **Action** parameter, `Register-EngineEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
when PowerShell has been idle for 300 milliseconds (ms).
> 2.2.0-beta4, **OnIdle** behavior changed to signal the event only if there is a `ReadKey()` > timeout and the current editing buffer is empty.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Register Objectevent (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Register-ObjectEvent.md
Title: Register-ObjectEvent
--- # Register-ObjectEvent
-## Synopsis
+## SYNOPSIS
Subscribes to the events that are generated by a Microsoft .NET Framework object.
-## Syntax
+## SYNTAX
``` Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceId
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ObjectEvent` cmdlet subscribes to events that are generated by .NET objects on the local computer or on a remote computer.
When you subscribe to an event, an event subscriber is added to your session. To
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events when a new process starts
value of the `$Random` variable.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None You cannot pipe objects to `Register-ObjectEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob When you use the **Action** parameter, `Register-ObjectEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-Alias.md
Title: Remove-Alias
# Remove-Alias
-## Synopsis
+## SYNOPSIS
Remove an alias from the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Remove an alias from the current session.
Remove-Alias [-Name] <String[]> [-Scope <String>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Alias` cmdlet removes an alias from the current PowerShell session. To remove an alias with the **Option** property set to **ReadOnly**, use the **Force** parameter. The `Remove-Alias` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Remove an alias
represent the current pipeline object. The parameter **NE** (not equal), selects
have an **Options** value set to **Constant**. `Remove-Alias` uses the **Force** parameter to remove aliases, including read-only aliases, from the PowerShell session.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String[] You can pipe an alias object to `Remove-Alias`.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
Changes only affect the current scope. To remove an alias from all sessions, add a `Remove-Alias` command to your PowerShell profile. For more information, see [about_Aliases](../microsoft.powershell.core/about/about_aliases.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Remove Event (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-Event.md
Title: Remove-Event
# Remove-Event
-## Synopsis
+## SYNOPSIS
Deletes events from the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Remove-Event [-SourceIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameter
Remove-Event [-EventIdentifier] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Event` cmdlet deletes events from the event queue in the current session. This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Remove an event by source identifier
PS C:\> Get-Event | Remove-Event
This command deletes all events from the event queue.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventArgs You can pipe events from `Get-Event` to `Remove-Event`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms. Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Deletes breakpoints from the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
not function.
information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Remove all breakpoints
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator (`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint[]
You can pipe breakpoint objects to `Remove-PSBreakpoint`.
### System.Management.Automation.Runspaces.Runspace
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Typedata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-TypeData.md
Title: Remove-TypeData
# Remove-TypeData
-## Synopsis
+## SYNOPSIS
Deletes extended types from the current session.
-## Syntax
+## SYNTAX
### RemoveTypeDataSet (Default)
Remove-TypeData [-TypeName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-TypeData -Path <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-TypeData` cmdlet deletes extended type data from the current session. This cmdlet affects only the current session and sessions that are created in the current session.
files, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/about/about_Types.p
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Remove type data for a specified type
cmdlet to remove extended type data for all CIM types in the sessions in the `$S
Invoke-Command -Session $S {Get-TypeData -TypeName *CIM* | Remove-TypeData} ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.TypeData
You can pipe **TypeData** object, such as the ones that the `Get-TypeData` cmdle
You can pipe the type names to `Remove-TypeData`. When you pipe an object to `Remove-TypeData`, `Remove-TypeData` gets the type name of the object and removes all type data for the object type.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-TypeData` can remove only the extended type data in the current session. It cannot remove extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[Get-TypeData](Get-TypeData.md)
Microsoft.PowerShell.Utility Remove Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Remove-Variable.md
Title: Remove-Variable
--- # Remove-Variable
-## Synopsis
+## SYNOPSIS
Deletes a variable and its value.
-## Syntax
+## SYNTAX
``` Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Variable` cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
-## Examples
+## EXAMPLES
### Example 1: Remove a variable
Remove-Variable Smp
This command deletes the `$Smp` variable.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### System.Management.Automation.PSVariable You can pipe a variable object to `Remove-Variable`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- Changes affect only the current scope, such as a session. To delete a variable from all sessions, add a `Remove-Variable` command to your PowerShell profile.
This cmdlet does not return any output.
- You can also refer to `Remove-Variable` by its built-in alias, `rv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Select Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Select-Object.md
Title: Select-Object
--- # Select-Object
-## Synopsis
+## SYNOPSIS
Selects objects or object properties.
-## Syntax
+## SYNTAX
### DefaultParameter (Default)
Select-Object [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<C
Select-Object [-InputObject <PSObject>] [-Unique] [-SkipIndex <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Object` cmdlet selects specified properties of an object or set of objects. It can also select unique objects, a specified number of objects, or objects in a specified position in an
objects is generated, even when the command that generates the objects appears b
`Select-Object` command in the pipeline. To turn off this optimizing behavior, use the **Wait** parameter.
-## Examples
+## EXAMPLES
### Example 1: Select objects by property
Diagnostics.Format.ps1xml 4.955078125 223
DotNetTypes.format.ps1xml 134.9833984375 223 ```
-## Parameters
+## PARAMETERS
### -ExcludeProperty
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Select-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject
-## Notes
+## NOTES
- You can also refer to the `Select-Object` cmdlet by its built-in alias, `select`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
You can pipe any object to `Select-Object`.
information, see _Write Single Records to the Pipeline_ in [Strongly Encouraged Development Guidelines](/powershell/scripting/developer/windows-powershell).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Select String (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Select-String.md
Title: Select-String
# Select-String
-## Synopsis
+## SYNOPSIS
Finds text in strings and files.
-## Syntax
+## SYNTAX
### File (Default)
Select-String [-Culture <String>] [-Pattern] <String[]> -LiteralPath <String[]>
[-NotMatch] [-AllMatches] [-Encoding <Encoding>] [-Context <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
You can also specify that `Select-String` should expect a particular character e
when you're searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Find a case-sensitive match
Name foo
Piping to `Out-String -Stream` converts the formatted output into a multiple single-line string objects. This means that when `Select-String` finds a match it outputs only the matching line.
-## Parameters
+## PARAMETERS
### -AllMatches
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has a `ToString()` method to `Select-String`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MatchInfo, System.Boolean, System.String
By default, the output is a set of **MatchInfo** objects with one for each match
the **Quiet** parameter, the output is a **Boolean** value indicating whether the pattern was found. If you use the **Raw** parameter, the output is a set of **String** objects that match the pattern.
-## Notes
+## NOTES
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
To find the properties of a **MatchInfo** object, type the following command:
`Select-String -Path test.txt -Pattern 'test' | Get-Member | Format-List -Property *`
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Select Xml (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Select-Xml.md
Title: Select-Xml
--- # Select-Xml
-## Synopsis
+## SYNOPSIS
Finds text in an XML string or document.
-## Syntax
+## SYNTAX
### Xml (Default)
Select-Xml [-XPath] <string> -LiteralPath <string[]> [-Namespace <hashtable>] [<
Select-Xml [-XPath] <string> -Content <string[]> [-Namespace <hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Xml` cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the **Content**, **Path**, or **Xml** parameter to specify the XML to be searched.
-## Examples
+## EXAMPLES
### Example 1: Select AliasProperty nodes
Select-Xml -Path $Home\Documents\WindowsPowerShell\Snippets -Namespace $SnippetN
ForEach-Object {$_.Node.Innerxml} ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String or System.Xml.XmlNode You can pipe a path or XML node to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.SelectXmlInfo
-## Notes
+## NOTES
XPath is a standard language that is designed to identify parts of an XML document. For more information about the XPath language, see [XPath Reference](/dotnet/standard/data/xml/select-nodes-using-xpath-navigation) and the Selection Filters section of [Event Selection](/previous-versions//aa385231(v=vs.85)).
-## Related links
+## RELATED LINKS
[ConvertTo-Xml](ConvertTo-Xml.md)
Microsoft.PowerShell.Utility Send Mailmessage (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Send-MailMessage.md
Title: Send-MailMessage
--- # Send-MailMessage
-## Synopsis
+## SYNOPSIS
Sends an email message.
-## Syntax
+## SYNTAX
### All
Send-MailMessage [-Attachments <String[]>] [-Bcc <String[]>] [[-Body] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Send-MailMessage` cmdlet sends an email message from within PowerShell.
information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About
> not use `Send-MailMessage`. For more information, see > [Platform Compatibility note DE0005](https://aka.ms/SendMailMessage).
-## Examples
+## EXAMPLES
### Example 1: Send an email from one person to another person
The **Credential** parameter specifies a domain administrator's credentials are
message. The **UseSsl** parameter specifies that Secure Socket Layer (SSL) creates a secure connection.
-## Parameters
+## PARAMETERS
### -Attachments
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
+## INPUTS
### System.String You can pipe the path and file names of attachments to `Send-MailMessage`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
Microsoft.PowerShell.Utility Set Alias (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-Alias.md
Title: Set-Alias
# Set-Alias
-## Synopsis
+## SYNOPSIS
Creates or changes an alias for a cmdlet or other command in the current PowerShell session.
-## Syntax
+## SYNTAX
### Default (Default)
Set-Alias [-Name] <string> [-Value] <string> [-Description <string>] [-Option <S
[-PassThru] [-Scope <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Alias` cmdlet creates or changes an alias for a cmdlet or a command, such as a function, script, file, or other executable. An alias is an alternate name that refers to a cmdlet or command.
as the description.
An alias that is created or changed by `Set-Alias` is not permanent and is only available during the current PowerShell session. When the PowerShell session is closed, the alias is removed.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
Set-Alias -Name Go -Option ReadOnly, Private
The alias `Go` should already exist. After running the command above, the alias is not be able to be changed without using the **Force** parameter and is only available in the current scope.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### None `Set-Alias` does not accept input from the pipeline.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **PassThru** parameter, `Set-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the alias. Otherwise, `Set-Alias` does not generate any output.
-## Notes
+## NOTES
PowerShell includes built-in aliases that are available in each PowerShell session. The `Get-Alias` cmdlet displays the aliases available in a PowerShell session.
An alias can be saved and reused in another PowerShell session by doing an expor
save an alias to a file, use `Export-Alias`. To add a saved alias to a new PowerShell session, use `Import-Alias`.
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Utility Set Date (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-Date.md
Title: Set-Date
--- # Set-Date
-## Synopsis
+## SYNOPSIS
Changes the system time on the computer to a time that you specify.
-## Syntax
+## SYNTAX
### Date (Default)
Set-Date [-Date] <DateTime> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm
Set-Date [-Adjust] <TimeSpan> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Date` cmdlet changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a **Date
**TimeSpan** object to `Set-Date`. To specify a new date or time, use the **Date** parameter. To specify a change interval, use the **Adjust** parameter.
-## Examples
+## EXAMPLES
### Example 1: Add three days to the system date
$90mins = New-TimeSpan -Minutes 90
Set-Date -Adjust $90mins ```
-## Parameters
+## PARAMETERS
### -Adjust
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a date to `Set-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime `Set-Date` returns an object that represents the date that it set.
-## Notes
+## NOTES
- Use this cmdlet cautiously when changing the date and time on the computer. The change might prevent the computer from receiving system-wide events and updates that are triggered by a date or
You can pipe a date to `Set-Date`.
[TimeSpan Methods](/dotnet/api/system.timespan) in the .NET SDK.
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility Set Markdownoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-MarkdownOption.md
Title: Set-MarkdownOption
--- # Set-MarkdownOption
-## Synopsis
+## SYNOPSIS
Sets the colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
### IndividualSetting (Default)
Set-MarkdownOption [-PassThru] -Theme <String> [<CommonParameters>]
Set-MarkdownOption [-PassThru] [-InputObject] <PSObject> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Sets the colors and styles used for rendering Markdown content in the console. These styles are defined using ANSI escape codes that change the color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org
> string. For more information about ANSI escape codes work, see > [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Examples
+## EXAMPLES
### Example 1 - Switch to the Light Theme
EmphasisBold : [1m
EmphasisItalics : [36m ```
-## Parameters
+## PARAMETERS
### -BoldForegroundColor
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
The string values used to define the color and style must match the regular expression `^\[*[0-9;]*?m{1}`.
-## Related links
+## RELATED LINKS
[Get-MarkdownOption](Get-MarkdownOption.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
Title: Set-PSBreakpoint
--- # Set-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Sets a breakpoint on a line, command, or variable.
-## Syntax
+## SYNTAX
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging P
For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint on a line
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Set-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You cannot pipe input to `Set-PSBreakpoint`.
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## Notes
+## NOTES
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Tracesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-TraceSource.md
Title: Set-TraceSource
--- # Set-TraceSource
-## Synopsis
+## SYNOPSIS
Configures, starts, and stops a trace of PowerShell components.
-## Syntax
+## SYNTAX
### optionsSet (Default)
Set-TraceSource [-Name] <String[]> [-RemoveListener <String[]>] [<CommonParamete
Set-TraceSource [-Name] <String[]> [-RemoveFileListener <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TraceSource` cmdlet configures, starts, and stops a trace of a PowerShell component. You can use it to specify which components will be traced and where the tracing output is sent.
-## Examples
+## EXAMPLES
### Example 1: Trace the ParameterBinding component
This command stops the trace of the **ParameterBinding** component of PowerShell
**Name** parameter to identify the component that was being traced and the **RemoveListener** parameter to identify the trace listener.
-## Parameters
+## PARAMETERS
### -Debugger
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a name to `Set-TraceSource`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSTraceSource
When you use the **PassThru** parameter, `Set-TraceSource` generates a
**System.Management.Automation.PSTraceSource** object representing the trace session. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
this cmdlet does not generate any output.
module are loaded automatically when the component is in use, and they appear in the output of `Get-TraceSource`.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Set Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-Variable.md
Title: Set-Variable
--- # Set-Variable
-## Synopsis
+## SYNOPSIS
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## Syntax
+## SYNTAX
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## Examples
+## EXAMPLES
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## Parameters
+## PARAMETERS
### -Description
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Show Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Show-Command.md
Title: Show-Command
# Show-Command
-## Synopsis
+## SYNOPSIS
Displays PowerShell command information in a graphical window.
-## Syntax
+## SYNTAX
``` Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1: Open the Commands window
command, instead of creating a new command. When you run this command, the `Show
opens. You can use the window features to set parameter values. To run the command, click the **Run** button in the `Show-Command` window.
-## Parameters
+## PARAMETERS
### -ErrorPopup
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
+## INPUTS
### None You cannot pipe input to `Show-Command`.
-## Outputs
+## OUTPUTS
### None, System.String, System.Object
When you use the **PassThru** parameter, `Show-Command` returns a command string
**ErrorPopup** parameter, `Show-Command` returns the command output (any object). Otherwise, `Show-Command` does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. `Show-Command` does not work in remote sessions.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Show Markdown (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Show-Markdown.md
Title: Show-Markdown
# Show-Markdown
-## Synopsis
+## SYNOPSIS
Shows a Markdown file or string in the console in a friendly way using VT100 escape sequences or in a browser using HTML.
-## Syntax
+## SYNTAX
### Path (Default)
Show-Markdown -InputObject <PSObject> [-UseBrowser] [<CommonParameters>]
Show-Markdown -LiteralPath <String[]> [-UseBrowser] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-Markdown` cmdlet is used to render Markdown in a human readable format either in a terminal or in a browser.
You can change how `Show-Markdown` renders Markdown in a terminal by using `Set-
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Simple example specifying a path
__underlines__
Show-Markdown -Path ./README.md -UseBrowser ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject ### System.String[]
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-Markdown](ConvertFrom-Markdown.md)
Microsoft.PowerShell.Utility Sort Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Sort-Object.md
Title: Sort-Object
# Sort-Object
-## Synopsis
+## SYNOPSIS
Sorts objects by property values.
-## Syntax
+## SYNTAX
### Default (Default)
Sort-Object [-Descending] [-Unique] -Bottom <Int32> [-InputObject <PSObject>] [[
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Sort-Object` cmdlet sorts objects in ascending or descending order based on object property values. If sort properties are not included in a command, PowerShell uses default sort properties
tables to sort in ascending order, descending order, or a combination of sort or
sorted as case-sensitive or case-insensitive. Use the **Unique** parameter to eliminate duplicates from the output.
-## Examples
+## EXAMPLES
### Example 1: Sort the current directory by name
The `Get-ChildItem` cmdlet gets the files from the directory specified by the **
down the pipeline to the `Sort-Object` cmdlet. `Sort-Object` uses the **Length** and **Name** parameter to sort the files by length in ascending order. Since `File01.txt` and `File03.txt` have the same length, they are further sorted by their property **Name**.
-## Parameters
+## PARAMETERS
### -Bottom
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be sorted to `Sort-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Sort-Object` returns the sorted objects.
-## Notes
+## NOTES
The `Sort-Object` cmdlet sorts objects based on properties specified in the command or the default sort properties for the object type. Default sort properties are defined using the `PropertySet`
see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrolle
The performance of the sorting algorithm is slower when doing a stable sort.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Start Sleep (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Start-Sleep.md
Title: Start-Sleep
--- # Start-Sleep
-## Synopsis
+## SYNOPSIS
Suspends the activity in a script or session for the specified period of time.
-## Syntax
+## SYNTAX
### Seconds (Default)
Start-Sleep [-Seconds] <Double> [<CommonParameters>]
Start-Sleep -Milliseconds <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Sleep` cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.
-## Examples
+## EXAMPLES
### Example 1: Sleep all commands for 15 seconds
This example makes all the commands in the session sleep for one and one-half of
Start-Sleep -Seconds 1.5 ```
-## Parameters
+## PARAMETERS
### -Milliseconds
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int32 You can pipe the number of seconds to `Start-Sleep`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You can also refer to `Start-Sleep` by its built-in alias, `sleep`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
This cmdlet does not return any output.
- `Ctrl+C` does not break out of `[Threading.Thread]::Sleep`. For more information, see [Thread.Sleep Method](/dotnet/api/system.threading.thread.sleep).
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Tee Object (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Tee-Object.md
Title: Tee-Object
--- # Tee-Object
-## Synopsis
+## SYNOPSIS
Saves command output in a file or variable and also sends it down the pipeline.
-## Syntax
+## SYNTAX
### File (Default)
Tee-Object [-InputObject <PSObject>] -LiteralPath <String> [<CommonParameters>]
Tee-Object [-InputObject <PSObject>] -Variable <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Tee-Object` cmdlet redirects output, that is, it sends the output of a command in two directions (like the letter T). It stores the output in a file or variable and also sends it down the pipeline. If `Tee-Object` is the last command in the pipeline, the command output is displayed at the prompt.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a file and to the console
drive. A pipeline operator (`|`) sends the list to `Tee-Object`, which appends t
AllSystemFiles.txt file and passes the list down the pipeline to the `Out-File` cmdlet, which saves the list in the `NewSystemFiles.txt file`.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Tee-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Tee-Object` returns the object that it redirects.
-## Notes
+## NOTES
You can also use the `Out-File` cmdlet or the redirection operator, both of which save the output in a file but do not send it down the pipeline.
a file but do not send it down the pipeline.
Beginning in PowerShell 6, `Tee-Object` uses BOM-less UTF-8 encoding when it writes to files. If you need a different encoding, use the `Out-File` cmdlet with the **Encoding** parameter.
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility Test Json (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Test-Json.md
Title: Test-Json
# Test-Json
-## Synopsis
+## SYNOPSIS
Tests whether a string is a valid JSON document
-## Syntax
+## SYNTAX
``` Test-Json [-Json] <string> [[-Schema] <string>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Json` cmdlet tests whether a string is a valid JavaScript Object Notation (JSON) document and can optionally verify that JSON document against a provided schema.
web-based apps.
This cmdlet was introduced in PowerShell 6.1
-## Examples
+## EXAMPLES
### Example 1: Test if an object is valid JSON
input we tested uses a string value instead.
For more information, see [JSON Schema](https://json-schema.org/).
-## Parameters
+## PARAMETERS
### -Json
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `Test-Json`.
-## Outputs
+## OUTPUTS
### Boolean
-## Notes
+## NOTES
The `Test-Json` cmdlet is implemented by using the [NJsonSchema Class](https://github.com/RSuter/NJsonSchema).
Newtonsoft's implementation includes several extensions to the JSON standard, su
comments and use of single quotes. For a full list of features, see the Newtonsoft documentation at [https://www.newtonsoft.com/json](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Trace Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Trace-Command.md
Title: Trace-Command
# Trace-Command
-## Synopsis
+## SYNOPSIS
Configures and starts a trace of the specified expression or command.
-## Syntax
+## SYNTAX
### expressionSet (Default)
Trace-Command [-InputObject <PSObject>] [-Name] <String[]> [[-Option] <PSTraceSo
[-Debugger] [-PSHost] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Trace-Command` cmdlet configures and starts a trace of the specified expression or command. It works like Set-TraceSource, except that it applies only to the specified command.
-## Examples
+## EXAMPLES
### Example 1: Trace metadata processing, parameter binding, and an expression
the **InputObject** parameter. The **InputObject** parameter passes the variable
expression. In effect, the command being processed during the trace is `Get-Alias -InputObject $A" or "$A | Get-Alias`.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects that represent input to the expression to `Trace-Command`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject Returns the command trace in the debug stream.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
Returns the command trace in the debug stream.
**Expression**, **Option** or **Name**, **Command**, **Option**. If you include the parameter names, the parameters can appear in any order.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Unblock File (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Unblock-File.md
Title: Unblock-File
--- # Unblock-File
-## Synopsis
+## SYNOPSIS
Unblocks files that were downloaded from the Internet.
-## Syntax
+## SYNTAX
### ByPath (Default)
Unblock-File [-Path] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Unblock-File -LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet only works on the Windows and macOS platforms.**
For more information about PowerShell execution policies, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Unblock a file
At line:1 char:1
PS C:\> Get-Item C:\ps-test\Start-ActivityTracker.ps1 | Unblock-File ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a file path to `Unblock-File`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Support for macOS was added in PowerShell 7. - The `Unblock-File` cmdlet works only in file system drives.
This cmdlet does not generate any output.
- If you use the `Unblock-File` cmdlet on a file that is not blocked, the command has no effect on the unblocked file and the cmdlet does not generate errors.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Utility Unregister Event (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Unregister-Event.md
Title: Unregister-Event
# Unregister-Event
-## Synopsis
+## SYNOPSIS
Cancels an event subscription.
-## Syntax
+## SYNTAX
### BySource (Default)
Unregister-Event [-SourceIdentifier] <String> [-Force] [-WhatIf] [-Confirm] [<Co
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-Event` cmdlet cancels an event subscription that was created by using the `Register-EngineEvent`, `Register-ObjectEvent`, or `Register-WmiEvent` cmdlet.
created by using the `New-Event` cmdlet, the new event is also deleted from the
`Unregister-Event` does not delete events from the event queue. To delete events, use the `Remove-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Cancel an event subscription by source identifier
It uses a pipeline operator (`|`) to send the subscriber objects to `Unregister-
deletes them from the session. To complete the task, the **Force** parameter is also required on `Unregister-Event`.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventSubscriber You can pipe the output from `Get-EventSubscriber` to `Unregister-Event`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
current session, the event queue is discarded and the event subscription is canc
subscribed to the event by using the `Register-EngineEvent` cmdlet. To delete a custom event from the session, you must remove it programmatically or close the session.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Update Formatdata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Update-FormatData.md
Title: Update-FormatData
# Update-FormatData
-## Synopsis
+## SYNOPSIS
Updates the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-FormatData` cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell.
interrupt the session.
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Reload previously loaded formatting files
The second command uses the `Update-FormatData` cmdlet to reload the formatting
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it without using parameters.
-## Parameters
+## PARAMETERS
### -AppendPath
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
+## INPUTS
### System.String You can pipe a string that contains the append path to `Update-FormatData`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
- `Update-FormatData` also updates the formatting data for commands in the session that were imported from modules. If the formatting file for a module changes, you can run an `Update-FormatData` command to update the formatting data for imported commands. You do not need to import the module again.
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Update List (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Update-List.md
Title: Update-List
# Update-List
-## Synopsis
+## SYNOPSIS
Adds items to and removes items from a property value that contains a collection of objects.
-## Syntax
+## SYNTAX
### AddRemoveSet (Default)
Update-List [-Add <Object[]>] [-Remove <Object[]>] [-InputObject <PSObject>] [[-
Update-List -Replace <Object[]> [-InputObject <PSObject>] [[-Property] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-List` cmdlet adds, removes, or replaces items in a property value of an object and returns the updated object. This cmdlet is designed for properties that contain collections of
determine whether a cmdlet supports `Update-List`, see the cmdlet Help topic.
This cmdlet was reintroduced in PowerShell 7.
-## Examples
+## EXAMPLES
### Example 1: Add items to a property value
Deck : 2ΓÖú KΓÖÑ 4ΓÖá 10ΓÖÑ 8ΓÖá 10ΓÖª 9ΓÖá 6ΓÖá KΓÖª 7ΓÖú 3ΓÖú QΓÖú AΓÖÑ
8ΓÖÑ ```
-## Parameters
+## PARAMETERS
### -Add
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be updated to `Update-List`.
-## Outputs
+## OUTPUTS
### Objects or System.Management.Automation.PSListModifier `Update-List` returns the updated object, or it returns an object that represents the update action.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Update Typedata (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Update-TypeData.md
Title: Update-TypeData
# Update-TypeData
-## Synopsis
+## SYNOPSIS
Updates the extended type data in the session.
-## Syntax
+## SYNTAX
### FileSet (Default)
Update-TypeData [-MemberType <PSMemberTypes>] [-MemberName <String>] [-Value <Ob
Update-TypeData [-Force] [-TypeData] <TypeData[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-TypeData` cmdlet updates the extended type data in the session by reloading the `Types.ps1xml` files into memory and adding new extended type data.
the `Update-TypeData` cmdlet cannot use method syntax.
For more information about the `Types.ps1xml` files in PowerShell, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Update extended types
modules. The value of the **Value** parameter is a script that returns `$True` i
The second command pipes the module objects from `Get-Module` to the `Format-Table` cmdlet, which displays the **Name** and **SupportsUpdatableHelp** properties of all modules in a list.
-## Parameters
+## PARAMETERS
### -AppendPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the values of the **AppendPath**, **TypeName**, or **TypeData** parameters to `Update-TypeData`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Wait Debugger (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Wait-Debugger.md
Title: Wait-Debugger
--- # Wait-Debugger
-## Synopsis
+## SYNOPSIS
Stops a script in the debugger before running the next statement in the script.
-## Syntax
+## SYNTAX
``` Wait-Debugger [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Stops the PowerShell script execution engine at the point immediately after the `Wait-Debugger` cmdlet and waits for a debugger to be attached. This is similar to using
cmdlet and waits for a debugger to be attached. This is similar to using
> Make sure you remove the `Wait-Debugger` lines after you are done. A running script appears to be > hung when it is stopped at a `Wait-Debugger`.
-## Examples
+## EXAMPLES
### Example 1: Insert breakpoint for debugging
class FileResource
} ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-DscDebug](/powershell/module/PSDesiredStateConfiguration/Enable-DscDebug)
Microsoft.PowerShell.Utility Wait Event (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Wait-Event.md
Title: Wait-Event
# Wait-Event
-## Synopsis
+## SYNOPSIS
Waits until a particular event is raised before continuing to run.
-## Syntax
+## SYNTAX
``` Wait-Event [[-SourceIdentifier] <String>] [-Timeout <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Event` cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes when the event is detected. To cancel the wait, press
response to an event in two different ways:
- using the **Action** parameter of the event subscription - waiting for an event to return and then respond with an action
-## Examples
+## EXAMPLES
### Example 1: Wait for the next event
identifier of **ProcessStarted**. If the specified time expires, the wait ends.
Wait-Event -SourceIdentifier "ProcessStarted" -Timeout 90 ```
-## Parameters
+## PARAMETERS
### -SourceIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Write Debug (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Debug.md
Title: Write-Debug
--- # Write-Debug
-## Synopsis
+## SYNOPSIS
Writes a debug message to the console.
-## Syntax
+## SYNTAX
``` Write-Debug [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Debug` cmdlet writes debug messages to the host from a script or command. By default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the `$DebugPreference` variable.
-## Examples
+## EXAMPLES
### Example 1: Understand $DebugPreference
change only affects the scope of the function. The value is not affected outside
For more information about the **Debug** common parameter, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a debug message to `Write-Debug`.
-## Outputs
+## OUTPUTS
### None `Write-Debug` only writes to the debug stream. It does not write any objects to the pipeline.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Error (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Error.md
Title: Write-Error
# Write-Error
-## Synopsis
+## SYNOPSIS
Writes an object to the error stream.
-## Syntax
+## SYNTAX
### NoException (Default)
Write-Error -ErrorRecord <ErrorRecord> [-RecommendedAction <String>] [-CategoryA
[-CategoryReason <String>] [-CategoryTargetName <String>] [-CategoryTargetType <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Error` cmdlet declares a non-terminating error. By default, errors are sent in the error stream to the host program to be displayed, along with output.
continues to process the other items in the collection.
To declare a terminating error, use the `Throw` keyword. For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
-## Examples
+## EXAMPLES
### Example 1: Write an error for RegistryKey object
has a null constructor.
The second command uses the `Write-Error` cmdlet to declare a non-terminating error. The value of the **Exception** parameter is the **Exception** object in the `$E` variable.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains an error message to `Write-Error`.
-## Outputs
+## OUTPUTS
### Error object `Write-Error` writes only to the error stream. It does not return any objects.
-## Notes
+## NOTES
`Write-Error` does not change the value of the `$?` automatic variable, therefore it does not signal a terminating error condition. To signal a terminating error, use the [$PSCmdlet.WriteError()](/dotnet/api/system.management.automation.cmdlet.writeerror) method.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Write Host (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Host.md
Title: Write-Host
# Write-Host
-## Synopsis
+## SYNOPSIS
Writes customized output to a host.
-## Syntax
+## SYNTAX
``` Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
hosting PowerShell.
> affect `Write-Host` messages. The exception to this rule is `-InformationAction Ignore`, which > effectively suppresses `Write-Host` output. (see "Example 5")
-## Examples
+## EXAMPLES
### Example 1: Write to the console without adding a new line
These commands effectively suppress output of the `Write-Host` cmdlet. The first
The second example redirects the information stream of the command to the `$null` variable and thereby suppresses it.
-## Parameters
+## PARAMETERS
### -BackgroundColor
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).
-## Inputs
+## INPUTS
### System.Object You can pipe objects to be written to the host.
-## Outputs
+## OUTPUTS
### None `Write-Host` sends the objects to the host. It does not return any objects. However, the host displays the objects that `Write-Host` sends to it.
-## Notes
+## NOTES
- When writing a collection to the host, elements of the collection are printed on the same line separated by a single space. This can be overridden with the **Separator** parameter.
displays the objects that `Write-Host` sends to it.
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Write Information (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Information.md
Title: Write-Information
# Write-Information
-## Synopsis
+## SYNOPSIS
Specifies how PowerShell handles information stream data for a command.
-## Syntax
+## SYNTAX
``` Write-Information [-MessageData] <Object> [[-Tags] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Information` cmdlet specifies how PowerShell handles information stream data for a command.
the `InformationAction` common parameter to your command. For more information,
`Write-Information` is also a supported workflow activity in PowerShell 5.x.
-## Examples
+## EXAMPLES
### Example 1: Write information for Get- results
Get-Process | Sort-Object CPU -Descending |
@{Id=9044; ProcessName=explorer; CPU=2358.765625} ```
-## Parameters
+## PARAMETERS
### -MessageData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object `Write-Information` accepts piped objects to pass to the information stream.
-## Outputs
+## OUTPUTS
### System.Management.Automation.InformationRecord
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Output (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Output.md
Title: Write-Output
--- # Write-Output
-## Synopsis
+## SYNOPSIS
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
-## Syntax
+## SYNTAX
``` Write-Output [-InputObject] <PSObject[]> [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
be written, `"Home directory: $HOME"`.
By default, `Write-Output` enumerates through collection objects. However, `Write-Output` can also be used to pass collections down the pipeline as a single object with the **NoEnumerate** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get objects and write them to the console
Count : 1
... ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Write-Output`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Write-Output` returns the objects that are submitted as input.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Progress (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Progress.md
Title: Write-Progress
--- # Write-Progress
-## Synopsis
+## SYNOPSIS
Displays a progress bar within a PowerShell command window.
-## Syntax
+## SYNTAX
``` Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-PercentComplete <Int32>]
Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-Perce
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script. You can select the indicators that the bar reflects and the text that appears above and below the progress bar.
-## Examples
+## EXAMPLES
### Example 1: Display the progress of a For loop
Step 1
In this example you can use the **ParentId** parameter to have indented output to show parent/child relationships in the progress of each step.
-## Parameters
+## PARAMETERS
### -Activity
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None `Write-Progress` does not generate any output.
-## Notes
+## NOTES
If the progress bar does not appear, check the value of the `$ProgressPreference` variable. If the value is set to SilentlyContinue, the progress bar is not displayed. For more information about
The parameters of the cmdlet correspond to the properties of the
**System.Management.Automation.ProgressRecord** class. For more information, see [ProgressRecord Class](/dotnet/api/system.management.automation.progressrecord).
-## Related links
+## RELATED LINKS
[Write-Debug](Write-Debug.md)
Microsoft.PowerShell.Utility Write Verbose (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Verbose.md
Title: Write-Verbose
--- # Write-Verbose
-## Synopsis
+## SYNOPSIS
Writes text to the verbose message stream.
-## Syntax
+## SYNTAX
``` Write-Verbose [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Verbose` cmdlet writes text to the verbose message stream in PowerShell. Typically, the verbose message stream is used to deliver more in depth information about command processing.
By default, the verbose message stream is not displayed, but you can display it
value of the `$VerbosePreference` variable or using the **Verbose** common parameter in any command.
-## Examples
+## EXAMPLES
### Example 1: Write a status message
The first command assigns a value of Continue to the `$VerbosePreference` prefer
default value, `SilentlyContinue`, suppresses verbose messages. The second command writes a verbose message.
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the message to `Write-Verbose`.
-## Outputs
+## OUTPUTS
### None `Write-Verbose` writes only to the verbose message stream.
-## Notes
+## NOTES
- Verbose messages are returned only when the command uses the **Verbose** common parameter. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
You can pipe a string that contains the message to `Write-Verbose`.
For more information about the `$VerbosePreference` variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Warning (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Write-Warning.md
Title: Write-Warning
# Write-Warning
-## Synopsis
+## SYNOPSIS
Writes a warning message.
-## Syntax
+## SYNTAX
``` Write-Warning [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Warning` cmdlet writes a warning message to the PowerShell host. The response to the warning depends on the value of the user's `$WarningPreference` variable and the use of the **WarningAction** common parameter.
-## Examples
+## EXAMPLES
### Example 1: Write a warning message
warning.
For more information about the **WarningAction** common parameter, see [about_CommonParameters](../Microsoft.Powershell.Core/About/about_CommonParameters.md).
-## Parameters
+## PARAMETERS
### -Message Specifies the warning message.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the warning to `Write-Warning`.
-## Outputs
+## OUTPUTS
### None `Write-Warning` writes only to the warning stream. It does not generate any other output.
-## Notes
+## NOTES
The default value for the `$WarningPreference` variable is `Continue`, which displays the warning and then continues executing the command. To determine valid values for a preference variable such as `$WarningPreference`, set it to a string of random characters, such as "abc". The resulting error message lists the valid values.
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.WSMan.Management Connect Wsman (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Connect-WSMan.md
Title: Connect-WSMan
# Connect-WSMan
-## Synopsis
+## SYNOPSIS
Connects to the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Connect-WSMan [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-Port <Int32>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
workgroups.
For information about how to disconnect from the WinRM service on a remote computer, see the `Disconnect-WSMan` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Connect to a remote computer
The second command uses the **SessionOption** parameter to pass the credentials
the `$a` variable to `Connect-WSMan`. Then, `Connect-WSMan` connects to the remote server01 computer by using the specified session options.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
You can run management commands or query management data on a remote computer without creating a WS-Management session. You can do this by using the **ComputerName** parameters of
WS-Management session. You can do this by using the **ComputerName** parameters
PowerShell creates a temporary connection that is used for the single command. After the command runs, the connection is closed.
-## Related links
+## RELATED LINKS
[Disable-WSManCredSSP](Disable-WSManCredSSP.md)
Microsoft.WSMan.Management Disable Wsmancredssp (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Disable-WSManCredSSP.md
Title: Disable-WSManCredSSP
# Disable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Disables CredSSP authentication on a computer.
-## Syntax
+## SYNTAX
``` Disable-WSManCredSSP [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
performs the following action:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Disable CredSSP on a client
Disable-WSManCredSSP -Role Server
This command disables CredSSP on the server, which prevents delegation from clients.
-## Parameters
+## PARAMETERS
### -Role
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To enable CredSSP authentication, use the Enable-WSManCredSSP cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Disconnect Wsman (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Disconnect-WSMan.md
Title: Disconnect-WSMan
# Disconnect-WSMan
-## Synopsis
+## SYNOPSIS
Disconnects the client from the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
``` Disconnect-WSMan [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
change to the WSMan provider.
For more information about how to connect to the WinRM service on a remote computer, see `Connect-WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Delete a connection to a remote computer
computer, in this case the server01 computer. However, you can also use `Disconn
connections to remote computers before you change to the WSMan provider. Those connections do not appear in the ComputerName list.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Enable Wsmancredssp (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Enable-WSManCredSSP.md
Title: Enable-WSManCredSSP
# Enable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Enables Credential Security Support Provider (CredSSP) authentication on a computer.
-## Syntax
+## SYNTAX
### All
Enables Credential Security Support Provider (CredSSP) authentication on a compu
Enable-WSManCredSSP [-Role] <String> [[-DelegateComputer] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Parameters section.
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Delegate client credentials
Set-Item -Path "WSMan:\server02\service\auth\credSSP" -Value $True
parameter to specify the **WSMan** provider's location. The **Value** parameter sets the **Service** setting to true.
-## Parameters
+## PARAMETERS
### -DelegateComputer
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement If CredSSP authentication is successfully enabled, this cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmancredssp (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Get-WSManCredSSP.md
Title: Get-WSManCredSSP
--- # Get-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Gets the Credential Security Support Provider-related configuration for the client.
-## Syntax
+## SYNTAX
``` Get-WSManCredSSP [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The cmdlet performs the following actions:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Display CredSSP configuration
If the computer is not configured for CredSSP, this is the output:
`The machine is not configured to allow delegating fresh credentials.`
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet. To enable CredSSP authentication, use the `Enable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmaninstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Get-WSManInstance.md
Title: Get-WSManInstance
# Get-WSManInstance
-## Synopsis
+## SYNOPSIS
Displays management information for a resource instance specified by a Resource URI.
-## Syntax
+## SYNTAX
### GetInstance (Default)
Get-WSManInstance [-ApplicationName <String>] [-BasePropertiesOnly] [-ComputerNa
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
standard Web Services for Management (WS-Management) **Get** command.
This cmdlet uses the WS-Management connection/transport layer to retrieve information.
-## Examples
+## EXAMPLES
### Example 1: Get all information from WMI
returns association instances, not associated instances.
You must enclose the filter in quotation marks, as shown in the example.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This command does not accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement This cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Invoke Wsmanaction (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Invoke-WSManAction.md
Title: Invoke-WSManAction
--- # Invoke-WSManAction
-## Synopsis
+## SYNOPSIS
Invokes an action on the object that is specified by the Resource URI and by the selectors.
-## Syntax
+## SYNTAX
### URI (Default)
Invoke-WSManAction [-Action] <String> [-ApplicationName <String>] [-ComputerName
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
parameters are specified by key value pairs.
This cmdlet uses the WSMan connection/transport layer to run the action.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
the remote server01 computer.
The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started.
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmaninstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/New-WSManInstance.md
Title: New-WSManInstance
--- # New-WSManInstance
-## Synopsis
+## SYNOPSIS
Creates a new instance of a management resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-WSManInstance [-ConnectionURI <Uri>] [-FilePath <String>] [-OptionSet <Hasht
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
URI and a value set or input file to create the new instance of the management r
This cmdlet uses the WinRM connection/transport layer to create the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Create a HTTPS listener
This command creates an instance of a WS-Management HTTPS listener on all IP add
New-WSManInstance winrm/config/Listener -SelectorSet @{Transport='HTTPS'; Address='*'} -ValueSet @{Hostname="HOST";CertificateThumbprint="XXXXXXXXXX"} ```
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The `Set-WmiInstance` cmdlet, a Windows Management Instrumentation (WMI) cmdlet, is similar. `Set-WmiInstance` uses the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmansessionoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/New-WSManSessionOption.md
Title: New-WSManSessionOption
# New-WSManSessionOption
-## Synopsis
+## SYNOPSIS
Creates session option hash table to use as input parameters for WS-Management cmdlets.
-## Syntax
+## SYNTAX
``` New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentication <ProxyAuthentication>]
New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthenticatio
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
WSMan cmdlets:
- `Invoke-WSManAction` - `Connect-WSMan`
-## Examples
+## EXAMPLES
### Example 1: Create a connection that uses connection options
computer, in this case the server01 computer. However, you can use the cmdlet to
connections to remote computers before you change to the WSMan provider. Those connections appear in the **ComputerName** list.
-## Parameters
+## PARAMETERS
### -NoEncryption
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SessionOption
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Remove Wsmaninstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Remove-WSManInstance.md
Title: Remove-WSManInstance
--- # Remove-WSManInstance
-## Synopsis
+## SYNOPSIS
Deletes a management resource instance.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Remove-WSManInstance [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-ResourceU
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the **ResourceURI** and **SelectorSet** parameters.
This cmdlet uses the WinRM connection/transport layer to delete the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Delete a listener
Remove-WSManInstance -ResourceUri winrm/config/Listener -SelectorSet Address=tes
This command deletes the WS-Management HTTP listener on a computer.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The cmdlets in the CimCmdlets module are similar. They use the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmaninstance (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Set-WSManInstance.md
Title: Set-WSManInstance
--- # Set-WSManInstance
-## Synopsis
+## SYNOPSIS
Modifies the management information that is related to a resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Set-WSManInstance [-ConnectionURI <Uri>] [-Dialect <Uri>] [-FilePath <String>] [
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The Set-WSManInstance cmdlet modifies the management information that is related
This cmdlet uses the WinRM connection/transport layer to modify the information.
-## Examples
+## EXAMPLES
### Example 1: Disable a listener on the local computer
This fails: -ValueSet @{enabled="False"}
This succeeds: -ValueSet @{Enabled="False"}
-## Parameters
+## PARAMETERS
### -ApplicationName
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).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmanquickconfig (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Set-WSManQuickConfig.md
Title: Set-WSManQuickConfig
# Set-WSManQuickConfig
-## Synopsis
+## SYNOPSIS
Configures the local computer for remote management.
-## Syntax
+## SYNTAX
### All
Configures the local computer for remote management.
Set-WSManQuickConfig [-UseSSL] [-Force] [-SkipNetworkProfileCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
are sent by using the Web Services for Management (WS-Management) technology.
To run `Set-WSManQuickConfig`, start PowerShell with the **Run as Administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Enable remote management of the local computer over HTTP
Set-WSManQuickConfig -UseSSL
> **HTTPS** requires manual configuration. For more information, see the **UseSSL** parameter's > description.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Test Wsman (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.WSMan.Management/Test-WSMan.md
Title: Test-WSMan
--- # Test-WSMan
-## Synopsis
+## SYNOPSIS
Tests whether the WinRM service is running on a local or remote computer.
-## Syntax
+## SYNTAX
``` Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>] [-Port <Int32>] [-UseSSL]
Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is running on a local or remote computer. If the tested computer is running the
displays the WS-Management identity schema, the protocol version, the product vendor, and the product version of the tested service.
-## Examples
+## EXAMPLES
### Example 1: Determine the status of the WinRM service
server01 using the authentication parameter.
Using the authentication parameter enables `Test-WSMan` to return the operating system version.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output object.
-## Notes
+## NOTES
By default, the `Test-WSMan` cmdlet queries the WinRM service without using authentication, and it returns no information that is specific to the operating-system version. Instead, it displays null values for the operating system version and service pack level (OS: 0.0.0 SP: 0.0).
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
PSDiagnostics Disable Pstrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Disable-PSTrace.md
Title: Disable-PSTrace
--- # Disable-PSTrace
-## Synopsis
+## SYNOPSIS
Disables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Disable-PSTrace [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the Analytic event log for PowerShell
provider.
Disable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Disable Pswsmancombinedtrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Disable-PSWSManCombinedTrace.md
Title: Disable-PSWSManCombinedTrace
--- # Disable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Stop the logging session started by Enable-PSWSManCombinedTrace.
-## Syntax
+## SYNTAX
``` Disable-PSWSManCombinedTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the combined logging session
You must run this cmdlet from an elevated PowerShell session.
Disable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Disable Wsmantrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Disable-WSManTrace.md
Title: Disable-WSManTrace
--- # Disable-WSManTrace
-## Synopsis
+## SYNOPSIS
Stop the WSMan logging session started by Enable-WSManTrace.
-## Syntax
+## SYNTAX
``` Disable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan trace
You must run this cmdlet from an elevated PowerShell session.
Disable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Pstrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Enable-PSTrace.md
Title: Enable-PSTrace
--- # Enable-PSTrace
-## Synopsis
+## SYNOPSIS
Enables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Enable-PSTrace [-Force] [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Enable the Analytic event log for PowerShell
provider.
Enable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Enable Pswsmancombinedtrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Enable-PSWSManCombinedTrace.md
Title: Enable-PSWSManCombinedTrace
--- # Enable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan and PowerShell providers enabled.
-## Syntax
+## SYNTAX
``` Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a combined logging session
You must run this cmdlet from an elevated PowerShell session.
Enable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### -DoNotOverwriteExistingTrace
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Wsmantrace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Enable-WSManTrace.md
Title: Enable-WSManTrace
--- # Enable-WSManTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan providers enabled.
-## Syntax
+## SYNTAX
``` Enable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan logging session.
You must run this cmdlet from an elevated PowerShell session.
Enable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Get Logproperties (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Get-LogProperties.md
Title: Get-LogProperties
--- # Get-LogProperties
-## Synopsis
+## SYNOPSIS
Retrieves the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Get-LogProperties [-Name] <Object> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** This cmdlet gets the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Get the configuration settings of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails The **PSDiagnostics** module adds the **LogDetails** class to the `Microsoft.PowerShell.Diagnostics` namespace.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-LogProperties](Set-LogProperties.md)
PSDiagnostics Set Logproperties (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Set-LogProperties.md
Title: Set-LogProperties
--- # Set-LogProperties
-## Synopsis
+## SYNOPSIS
Changes the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet changes the configuration settings of a Windows event log. This cmdl
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Change the retention setting of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails
You must pass a fully configured **LogDetails** object to the `Set-LogProperties
Therefore, to change one setting, you should use `Get-LogProperties` to retrieve the current configuration.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Start Trace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Start-Trace.md
Title: Start-Trace
# Start-Trace
-## Synopsis
+## SYNOPSIS
Start an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFilePath] <String>]
Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFile
[-BufferSizeInKB <Int32>] [-MaxLogFileSizeInMB <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Start-Trace -SessionName 'wsmlog' -ETS -OutputFilePath "$env:windir\system32\wsmtraces.log" -Format 'bincirc' -MinBuffers 16 -MaxBuffers 256 -BufferSizeInKb 64 -MaxLogFileSizeInMB 256 -ProviderFilePath "$env:windir\system32\wsmtraceproviders.txt" ```
-## Parameters
+## PARAMETERS
### -BufferSizeInKB Event Trace Session buffer size in kilobytes (KB).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Stop Trace (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSDiagnostics/Stop-Trace.md
Title: Stop-Trace
--- # Stop-Trace
-## Synopsis
+## SYNOPSIS
Stop an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Stop-Trace [-SessionName] <Object> [-ETS] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Stop-Trace -SessionName 'wsmlog' ```
-## Parameters
+## PARAMETERS
### -ETS Send commands to Event Trace Sessions directly without saving or scheduling.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSReadLine Get Psreadlinekeyhandler (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Get-PSReadLineKeyHandler.md
Title: Get-PSReadLineKeyHandler
# Get-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Gets the key bindings for the PSReadLine module.
-## Syntax
+## SYNTAX
``` Get-PSReadLineKeyHandler [-Bound] [-Unbound] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineKeyHandler` cmdlet returns the currently bound key bindings.
-## Examples
+## EXAMPLES
### Example 1: Get all key mappings
Tab TabCompleteNext Complete the input using the next
... ```
-## Parameters
+## PARAMETERS
### -Bound
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.KeyHandler
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Get Psreadlineoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Get-PSReadLineOption.md
Title: Get-PSReadLineOption
--- # Get-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Gets values for the options that can be configured.
-## Syntax
+## SYNTAX
``` Get-PSReadLineOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineOption` cmdlet returns the current state of the settings that can be configured by using the `Set-PSReadLineOption` cmdlet. You can use the returned object to change **PSReadLine** options. This provides a slightly simpler way to set syntax coloring options for multiple kinds of tokens.
-## Examples
+## EXAMPLES
### Example 1: Get options and their values
VariableColor : "`e[92m"
This command returns the list of available PSReadLine options and their current values.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.PSConsoleReadLineOptions An instance of the current options. Changing the property values of this object updates the settings in PSReadLine directly without invoking `Set-PSReadLineOption`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Remove Psreadlinekeyhandler (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Remove-PSReadLineKeyHandler.md
Title: Remove-PSReadLineKeyHandler
# Remove-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Removes a key binding.
-## Syntax
+## SYNTAX
``` Remove-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSReadLineKeyHandler` cmdlet removes a specified key binding.
-## Examples
+## EXAMPLES
### Example 1: Remove a binding
Remove-PSReadLineKeyHandler -Chord Ctrl+B
This command removes the binding from the key combination, or chord, `Ctrl+B`. The `Ctrl+B` chord is created in the `Set-PSReadLineKeyHandler` article.
-## Parameters
+## PARAMETERS
### -Chord
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlinekeyhandler (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Set-PSReadLineKeyHandler.md
Title: Set-PSReadLineKeyHandler
--- # Set-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Binds keys to user-defined or PSReadLine key handler functions.
-## Syntax
+## SYNTAX
### ScriptBlock
Set-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [-Function] <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineKeyHandler` cmdlet customizes the result when a key or sequence of keys is pressed. With user-defined key bindings, you can do almost anything that is possible from within a PowerShell script.
-## Examples
+## EXAMPLES
### Example 1: Bind the arrow key to a function
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
} ```
-## Parameters
+## PARAMETERS
### -BriefDescription
This cmdlet supports the common parameters: -Debug, -ErrorAction,
For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlineoption (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PSReadLine/Set-PSReadLineOption.md
Title: Set-PSReadLineOption
--- # Set-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Customizes the behavior of command line editing in **PSReadLine**.
-## Syntax
+## SYNTAX
``` Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-HistoryNoDuplicates]
Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-His
[-ViModeChangeHandler <ScriptBlock>] [-Colors <Hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineOption` cmdlet customizes the behavior of the **PSReadLine** module when you're editing the command line. To view the **PSReadLine** settings, use `Get-PSReadLineOption`.
-## Examples
+## EXAMPLES
### Example 1: Set foreground and background colors
block object.
For more information, see [about_Providers](/powershell/module/microsoft.powershell.core/about/about_providers).
-## Parameters
+## PARAMETERS
### -AddToHistoryHandler
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Set-PSReadLineOption.`
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_PSReadLine](./About/about_PSReadLine.md)
PackageManagement Find Package (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Find-Package.md
Title: Find-Package
--- # Find-Package
-## Synopsis
+## SYNOPSIS
Finds software packages in available package sources.
-## Syntax
+## SYNTAX
### NuGet
Find-Package [-IncludeDependencies] [-AllVersions] [-Source <String[]>] [-Creden
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` and `Get-PackageSource` display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Find all available packages from a package provider
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transfor
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... ```
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### None `Find-Package` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentify[] `Find-Package` outputs a **SoftwareIdentity** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Find Packageprovider (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Find-PackageProvider.md
Title: Find-PackageProvider
--- # Find-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of Package Management package providers available for installation.
-## Syntax
+## SYNTAX
``` Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-IncludeDependencies]
Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-
[-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in package sources registered with PowerShellGet. These are package providers available for
the PowerShell Gallery with the **PackageManagement** and **Provider** tags.
`Find-PackageProvider` also finds matching Package Management providers that are available in the Package Management Azure Blob store. Use the bootstrapper provider to find and install them.
-## Examples
+## EXAMPLES
### Example 1: Find all available package providers
Find-PackageProvider -Name "Gistprovider" -Source "PSGallery"
This command finds a package provider available by using a specified package source.
-## Parameters
+## PARAMETERS
### -AllVersions
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
+## INPUTS
-## Outputs
+## OUTPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into `Install-PackageProvider` to install the results of `Find-PackageProvider`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Package (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Get-Package.md
Title: Get-Package
# Get-Package
-## Synopsis
+## SYNOPSIS
Returns a list of all software packages that were installed with **PackageManagement**.
-## Syntax
+## SYNTAX
### NuGet
Get-Package [[-Name] <String[]>] [-RequiredVersion <String>] [-MinimumVersion <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Package` cmdlet returns a list of all software packages on the local computer that were installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as part of an `Invoke-Command` or `Enter-PSSession` command or script.
-## Examples
+## EXAMPLES
### Example 1: Get all installed packages
Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package
**RequiredVersion** parameter is a specific version of the package. The object is sent down the pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package.
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packageprovider (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Get-PackageProvider.md
Title: Get-PackageProvider
--- # Get-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of package providers that are connected to Package Management.
-## Syntax
+## SYNTAX
``` Get-PackageProvider [[-Name] <String[]>] [-ListAvailable] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or part of one or more provider names.
-## Examples
+## EXAMPLES
### Example 1: Get all currently loaded package providers
Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider installed.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageProvider[]
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packagesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Get-PackageSource.md
Title: Get-PackageSource
--- # Get-PackageSource
-## Synopsis
+## SYNOPSIS
Gets a list of package sources that are registered for a package provider.
-## Syntax
+## SYNTAX
### NuGet
Get-PackageSource [[-Name] <String>] [-Location <String>] [-Force] [-ForceBootst
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageSource` cmdlet gets a list of package sources that are registered with **PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` gets only those sources that are associated with the specified provider. Otherwise, the command returns all package sources that are registered with **PackageManagement**.
-## Examples
+## EXAMPLES
### Example 1: Get all package sources
MyNuget NuGet False https://www.nuget.org/api/v2
`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object is sent down the pipeline to `Get-PackageSource`.
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageSource[] Specifies one or more package sources.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
Specifies one or more package sources.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Import Packageprovider (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Import-PackageProvider.md
Title: Import-PackageProvider
--- # Import-PackageProvider
-## Synopsis
+## SYNOPSIS
Adds Package Management package providers to the current session.
-## Syntax
+## SYNTAX
``` Import-PackageProvider [-Name] <String[]> [-RequiredVersion <String>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. The provider that you import must be installed on the local computer.
Due to security reasons, **PackageManagement** requires C#-based providers to co
injected, see the `.csproj` project files on [https://github.com/oneget/oneget](https://github.com/oneget/oneget).
-## Examples
+## EXAMPLES
### Example 1: Import a package provider from the local computer
Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose
This command finds, installs, and imports a specific version of the Nuget package provider.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Implementation.PackageProvider You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into `Import-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Package (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Install-Package.md
Title: Install-Package
# Install-Package
-## Synopsis
+## SYNOPSIS
Installs one or more software packages.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-Package [-Credential <PSCredential>] [-Proxy <Uri>] [-ProxyCredential <P
[-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Package` cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Install a package by package name
PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -Maxi
**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The highest version in the range is installed.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Install-Package` accepts input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Packageprovider (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Install-PackageProvider.md
Title: Install-PackageProvider
--- # Install-PackageProvider
-## Synopsis
+## SYNOPSIS
Installs one or more Package Management package providers.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-PackageProvider [-Scope <String>] [-InputObject] <SoftwareIdentity[]> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-PackageProvider` cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules
them to your target computer. Use the following steps to do this:
Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider to the current Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Install a package provider from the PowerShell Gallery
so that only the current user can use it.
Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser ```
-## Parameters
+## PARAMETERS
### -AllVersions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a **SoftwareIdentity** object that can be piped into `Install-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProv
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-PackageProvider](Find-PackageProvider.md)
PackageManagement Register Packagesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Register-PackageSource.md
Title: Register-PackageSource
--- # Register-PackageSource
-## Synopsis
+## SYNOPSIS
Adds a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch
Register-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [[-Name]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package sources are always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.
-## Examples
+## EXAMPLES
### Example 1: Register a package source for the NuGet provider
Name ProviderName IsTrusted Location
MyNuGet NuGet False https://www.nuget.org/api/v2 ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Save Package (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Save-Package.md
Title: Save-Package
--- # Save-Package
-## Synopsis
+## SYNOPSIS
Saves packages to the local computer without installing them.
-## Syntax
+## SYNTAX
### PackageBySearch
Save-Package [-Path <String>] [-LiteralPath <String>] [-Credential <PSCredential
[-RoleCapability <String[]>] [-Command <String[]>] [-AcceptLicense] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The **Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same command.
-## Examples
+## EXAMPLES
### Example 1: Save a package to the local computer
PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg
`Save-Package` downloads the package file and its dependencies to the local computer. `Install-Package` installs the package and dependencies from the specified directory.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Save-Package` accepts objects from the pipeline.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Set Packagesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Set-PackageSource.md
Title: Set-PackageSource
--- # Set-PackageSource
-## Synopsis
+## SYNOPSIS
Replaces a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch (Default)
Set-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PackageSource` replaces a package source for a specified package provider. Package sources are always managed by a package provider.
-## Examples
+## EXAMPLES
### Example 1: Change a package source
eliminates prompts to verify the source when packages are installed.
PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Set-PackageSource` doesn't accept pipeline input.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Uninstall Package (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Uninstall-Package.md
Title: Uninstall-Package
# Uninstall-Package
-## Synopsis
+## SYNOPSIS
Uninstalls one or more software packages.
-## Syntax
+## SYNTAX
### PackageByInputObject
Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm]
[-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To find installed packages, use the `Get-Package` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a package
parameter:
`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )`
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
### SoftwareIdentity `Uninstall-Package` accepts **SoftwareIdentity** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### SoftwareIdentity `Uninstall-Package` returns a **SoftwareIdentity** object for each package uninstalled.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
and includes the provider's parameter set. For example, `Uninstall-Package` has
**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Unregister Packagesource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PackageManagement/Unregister-PackageSource.md
Title: Unregister-PackageSource
# Unregister-PackageSource
-## Synopsis
+## SYNOPSIS
Removes a registered package source.
-## Syntax
+## SYNTAX
### SourceBySearch
Unregister-PackageSource [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Unregister a package source for the Nuget provider
parameter:
`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )`
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Unregister-PackageSource` accepts **PackageSource** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### `Unregister-PackageSource` doesn't generate any output.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets and includes the provider's parameter set.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PowerShellGet Find Command (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Find-Command.md
Title: Find-Command
# Find-Command
-## Synopsis
+## SYNOPSIS
Finds PowerShell commands in modules.
-## Syntax
+## SYNTAX
### All
Find-Command [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <Strin
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and workflows. `Find-Command` searches modules in registered repositories.
For each command found by `Find-Command`, a **PSGetCommandInfo** object is retur
**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module that contains the command.
-## Examples
+## EXAMPLES
### Example 1: Find all commands in a specified repository
VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modul
optional parameter, but displays status output in the PowerShell console. The verbose output is beneficial for troubleshooting.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetCommandInfo `Find-Command` outputs a **PSGetCommandInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Dscresource (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Find-DscResource.md
Title: Find-DscResource
# Find-DscResource
-## Synopsis
+## SYNOPSIS
Finds Desired State Configuration (DSC) resources.
-## Syntax
+## SYNTAX
### All
Find-DscResource [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <S
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in modules. By default `Find-DscResource` searches all registered repositories.
For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object i
**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module.
-## Examples
+## EXAMPLES
### Example 1: Find all DSC resources
xDSCFirewall 1.6.21 xDSCFirewall PSGallery
dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetDscResourceInfo `Find-DscResource` returns a **PSGetDscResourceInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Find-Module.md
Title: Find-Module
--- # Find-Module
-## Synopsis
+## SYNOPSIS
Finds modules in a repository that match specified criteria.
-## Syntax
+## SYNTAX
### All
Find-Module [[-Name] <string[]>] [-MinimumVersion <string>] [-MaximumVersion <st
[-Credential <pscredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. `Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be
The following examples use the [PowerShell Gallery](https://www.powershellgaller
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find a module by name
Version Name Repository Description
The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo `Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets such as `Install-Module`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
such as `Install-Module`.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Find Rolecapability (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Find-RoleCapability.md
Title: Find-RoleCapability
# Find-RoleCapability
-## Synopsis
+## SYNOPSIS
Finds role capabilities in modules.
-## Syntax
+## SYNTAX
### All
Find-RoleCapability [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role capabilities and modules.
PowerShell role capabilities define which commands and applications are availabl
Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` extension.
-## Examples
+## EXAMPLES
### Example 1: Find role capabilities
The object is sent down the pipeline. `Install-Module` uses the **Verbose** para
status messages during the installation. After the install is finished, the `Get-InstalledModule` output confirms that the **JeaExamples** module was installed.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.Uri ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSGetRoleCapabilityInfo The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md)
PowerShellGet Find Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Find-Script.md
Title: Find-Script
--- # Find-Script
-## Synopsis
+## SYNOPSIS
Finds a script.
-## Syntax
+## SYNTAX
``` Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>]
Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <St
[-Repository <String[]>] [-Credential <PSCredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Script` cmdlet finds a specified script in registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Find all available scripts
Version Name Type Repository D
This command uses the wildcard character (`*`) to find scripts that begin with Required-Script.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Installedmodule (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Get-InstalledModule.md
Title: Get-InstalledModule
--- # Get-InstalledModule
-## Synopsis
+## SYNOPSIS
Gets a list of modules on the computer that were installed by PowerShellGet.
-## Syntax
+## SYNTAX
``` Get-InstalledModule [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllVersions] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` command.
-## Examples
+## EXAMPLES
### Example 1: Get all installed modules
Version Name Type Repository Descrip
This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
PowerShellGet Get Installedscript (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Get-InstalledScript.md
Title: Get-InstalledScript
--- # Get-InstalledScript
-## Synopsis
+## SYNOPSIS
Gets an installed script.
-## Syntax
+## SYNTAX
``` Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes.
-## Examples
+## EXAMPLES
### Example 1: Get all installed scripts
Version Name Type Repository D
This command gets scripts where the name begins with **Required-Scri**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Psrepository (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Get-PSRepository.md
Title: Get-PSRepository
--- # Get-PSRepository
-## Synopsis
+## SYNOPSIS
Gets PowerShell repositories.
-## Syntax
+## SYNTAX
``` Get-PSRepository [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the current user.
-## Examples
+## EXAMPLES
### Example 1: Get all module repositories
ProviderOptions : {}
This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Register-PSRepository](Register-PSRepository.md)
PowerShellGet Install Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Install-Module.md
Title: Install-Module
--- # Install-Module
-## Synopsis
+## SYNOPSIS
Downloads one or more modules from a repository, and installs them on the local computer.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Module [-InputObject] <PSObject[]> [-Credential <PSCredential>] [-Scope
[-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online repository. The cmdlet verifies that search results are valid modules and copies the module folders
These examples use the [PowerShell Gallery](https://www.powershellgallery.com/)
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find and install a module
The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet*
`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current user's directory, `$home\Documents\PowerShell\Modules`.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### PSRepositoryItemInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSRepositoryItemInfo When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object for the module. This is the same information that you get from the `Find-Module` cmdlet.
-## Notes
+## NOTES
`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later releases of Windows.
the **RequiredVersion** value.
A module installation will also install any dependent modules specified as required by the module publisher. The publisher will specify the required modules and their versions in the module manifest.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Install Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Install-Script.md
Title: Install-Script
--- # Install-Script
-## Synopsis
+## SYNOPSIS
Installs a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Script [-InputObject] <PSObject[]> [-Scope <String>] [-NoPathUpdate] [-P
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the payload is a valid PowerShell script, and copies the script file to a specified installation
cmdlets. When operating against multiple repositories, `Install-Script` installs
that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) from the first repository without any error.
-## Examples
+## EXAMPLES
### Example 1: Find a script and install it
repository.
The final command gets installed scripts and displays the results.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet New Scriptfileinfo (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/New-ScriptFileInfo.md
Title: New-ScriptFileInfo
# New-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Creates a script file with metadata.
-## Syntax
+## SYNTAX
### All
New-ScriptFileInfo [[-Path] <String>] [-Version <String>] [-Author <String>] -De
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the script.
script.
The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more information, see [about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Create a script file and specify its version, author, and description
Feature 5
Param() ```
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md)
PowerShellGet Publish Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Publish-Module.md
Title: Publish-Module
# Publish-Module
-## Synopsis
+## SYNOPSIS
Publishes a specified module from the local computer to an online gallery.
-## Syntax
+## SYNTAX
### ModuleNameParameterSet (Default)
Publish-Module -Path <String> [-NuGetApiKey <String>] [-Repository <String>]
[-SkipAutomaticTags] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, stored as part of a user's profile in the gallery. You can specify the module to publish either by
from the module manifest, some metadata must be specified in `Publish-Module` pa
**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters match fields in a NuGet-based gallery.
-## Examples
+## EXAMPLES
### Example 1: Publish a module
specifies a name, version, description, and author, an error occurs.
Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -LicenseUri "http://contoso.com/license" -Tag "Active Directory","DSC" -ReleaseNote "Updated the ActiveDirectory DSC Resources to support adding users." ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.
module manifest, but some metadata can be specified in `Publish-Module` paramete
**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. For more information, see [Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui).
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Publish Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Publish-Script.md
Title: Publish-Script
--- # Publish-Script
-## Synopsis
+## SYNOPSIS
Publishes a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Publish-Script -LiteralPath <String> [-NuGetApiKey <String>] [-Repository <Strin
[-Credential <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Script` cmdlet publishes the specified script to the online gallery.
-## Examples
+## EXAMPLES
### Example 1: Create a script file, add content to it, and publish it
The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Scrip
the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for `Demo-Script.ps1` in the **LocalRepo1** repository.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Register Psrepository (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Register-PSRepository.md
Title: Register-PSRepository
--- # Register-PSRepository
-## Synopsis
+## SYNOPSIS
Registers a PowerShell repository.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSRepository [-Default] [-InstallationPolicy <String>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and
specific type of repository. For example, the NuGet provider is designed to inte
NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet attempts to find a OneGet provider that can handle the specified source location.
-## Examples
+## EXAMPLES
### Example 1: Register a repository
PowerShellGet polls available package providers and associates it with the NuGet
The second command gets registered repositories and displays the results.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSCredential ### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Save Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Save-Module.md
Title: Save-Module
# Save-Module
-## Synopsis
+## SYNOPSIS
Saves a module and its dependencies on the local computer but doesn't install the module.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Module [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. `Save-Module` downloads and saves the most current version of a module. The files are saved to a
inspection by an administrator. The saved module can then be copied into the app
`Get-PSRepository` displays the local computer's registered repositories. You can use the `Find-Module` cmdlet to search registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Save a module
The object is sent down the pipeline to `Save-Module`. The **Path** parameter sp
store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents of **Path** where the files are stored.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Save Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Save-Script.md
Title: Save-Script
# Save-Script
-## Synopsis
+## SYNOPSIS
Saves a script.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Script [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Script` cmdlet saves the specified script.
-## Examples
+## EXAMPLES
### Example 1: Save a script and validate the script's metadata
Version Name Author Description
specifies where to find the script. The script is saved in the location specified by the **Path** parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Set Psrepository (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Set-PSRepository.md
Title: Set-PSRepository
--- # Set-PSRepository
-## Synopsis
+## SYNOPSIS
Sets values for a registered repository.
-## Syntax
+## SYNTAX
``` Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <Uri>]
Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <U
[-PackageManagementProvider <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are persistent for the current user and apply to all versions of PowerShell installed for that user.
-## Examples
+## EXAMPLES
### Example 1: Set the installation policy for a repository
Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.
This command sets the source location and publish location for **myInternalSource** to the specified URIs.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Test Scriptfileinfo (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Test-ScriptFileInfo.md
Title: Test-ScriptFileInfo
--- # Test-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Validates a comment block for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Test-ScriptFileInfo [-Path] <String> [<CommonParameters>]
Test-ScriptFileInfo -LiteralPath <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns information about where the error is located or how to correct it.
-## Examples
+## EXAMPLES
### Example 1: Test a script file
At line:1 char:1
This command tests the script file Hello-World.ps1, which has no metadata associated with it.
-## Parameters
+## PARAMETERS
### -LiteralPath
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
PowerShellGet Uninstall Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Uninstall-Module.md
Title: Uninstall-Module
# Uninstall-Module
-## Synopsis
+## SYNOPSIS
Uninstalls a module.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Module [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Module [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a module
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the pipeline to `Uninstall-Module` and is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Uninstall Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Uninstall-Script.md
Title: Uninstall-Script
# Uninstall-Script
-## Synopsis
+## SYNOPSIS
Uninstalls a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a script
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script
`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the pipeline to `Uninstall-Script` and the script is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Unregister Psrepository (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Unregister-PSRepository.md
Title: Unregister-PSRepository
--- # Unregister-PSRepository
-## Synopsis
+## SYNOPSIS
Unregisters a repository.
-## Syntax
+## SYNTAX
``` Unregister-PSRepository [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSRepository` cmdlet unregisters a repository for the current user.
-## Examples
+## EXAMPLES
### Example 1: Unregister a repository
This example uses `Get-PSRepository` to get all registered repositories, and use
Get-PSRepository | Unregister-PSRepository ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Update Module (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Update-Module.md
Title: Update-Module
# Update-Module
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest version of specified modules from an online gallery to the local computer.
-## Syntax
+## SYNTAX
### All
Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're prompted to confirm the update before it's installed. Updates are installed only for modules that
found in `$env:PSModulePath`, an error is displayed.
To display the installed modules, use `Get-InstalledModule`.
-## Examples
+## EXAMPLES
### Example 1: Update all modules
Update-Module -Name SpeculationControl -Force
`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The **Force** parameter updates the module without requesting user confirmation.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
For PowerShell version 6.0 and above, the default installation scope is always **CurrentUser**. Module updates for **CurrentUser**, `$home\Documents\PowerShell\Modules`, don't need elevated
If `Update-Module` attempts to update binaries that are in use, `Update-Module`
that identifies the problem processes. The user is informed to retry `Update-Module` after the processes are stopped.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Update Modulemanifest (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Update-ModuleManifest.md
Title: Update-ModuleManifest
# Update-ModuleManifest
-## Synopsis
+## SYNOPSIS
Updates a module manifest file.
-## Syntax
+## SYNTAX
### All
Update-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>
[-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file.
-## Examples
+## EXAMPLES
### Example 1: Update a module manifest
Update-ModuleManifest @Parms
**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Parms` and updates the module manifest, **TestManifest.psd1**.
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Update Script (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Update-Script.md
Title: Update-Script
# Update-Script
-## Synopsis
+## SYNOPSIS
Updates a script.
-## Syntax
+## SYNTAX
### All
Update-Script [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated script is downloaded from the same repository as the installed version.
-## Examples
+## EXAMPLES
### Example 1: Update the specified script
Version Name Repository Description
parameter specifies the script version. `Get-InstalledScript` displays the updated version of the script.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Update Scriptfileinfo (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/PowerShellGet/Update-ScriptFileInfo.md
Title: Update-ScriptFileInfo
# Update-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Updates information for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Update-ScriptFileInfo [-LiteralPath] <String> [-Version <String>] [-Author <Stri
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for version, author, or description.
-## Examples
+## EXAMPLES
### Example 1: Update the version of a script file
Param()
**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the script. The **PassThru** parameter displays the script's contents in the PowerShell console.
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values for version, GUID, description, and author.
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
ThreadJob Start Threadjob (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/ThreadJob/Start-ThreadJob.md
Title: Start-ThreadJob
--- # Start-ThreadJob
-## Synopsis
+## SYNOPSIS
Creates background jobs similar to the `Start-Job` cmdlet.
-## Syntax
+## SYNTAX
### ScriptBlock
Start-ThreadJob [-FilePath] <String> [-Name <String>] [-InitializationScript <Sc
[-StreamingHost <PSHost>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Start-ThreadJob` creates background jobs similar to the `Start-Job` cmdlet. The main difference is that the jobs which are created run in separate threads within the local process. By default, the
The cmdlet also supports a **ThrottleLimit** parameter to limit the number of jo
time. As more jobs are started, they are queued and wait until the current number of jobs drops below the throttle limit.
-## Examples
+## EXAMPLES
### Example 1 - Create background jobs with a thread limit of 2
Notice that the prompt from `Read-Host` is displayed and you are able to type in
message from `Write-Warning` is displayed. The `Receive-Job` cmdlet returns all the output from the job.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### ThreadJob.ThreadJob
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Start-Job](../Microsoft.PowerShell.Core/Start-Job.md)
CimCmdlets Get Cimassociatedinstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Get-CimAssociatedInstance.md
Title: Get-CimAssociatedInstance
# Get-CimAssociatedInstance
-## Synopsis
+## SYNOPSIS
Retrieves the CIM instances that are connected to a specific CIM instance by an association.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimAssociatedInstance [[-Association] <String>] [-ResultClassName <String>]
[-ResourceUri <Uri>] -CimSession <CimSession[]> [-KeyOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the InputObject parameter is not specified, the cmdlet works in one of the fo
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get all the associated instances of a specific instance
named `$s`. The association class name for the **Win32_DependentService** is ret
the `Get-CimAssociatedInstance` cmdlet to get all the associated instances of the retrieved association class.
-## Parameters
+## PARAMETERS
### -Association
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets Get Cimclass (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Get-CimClass.md
Title: Get-CimClass
# Get-CimClass
-## Synopsis
+## SYNOPSIS
Gets a list of CIM classes in a specific namespace.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutS
[-QualifierName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-CimClass` cmdlet retrieves a list of CIM classes in a specific namespac
class name supplied, then the cmdlet returns all the classes in the namespace. Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.
-## Examples
+## EXAMPLES
### Example 1: Get all the class definitions
Get-CimClass -ClassName *disk* -CimSession $s
This set of commands creates a session with multiple computers and stores it into a variable `$s` using the `New-CimSession` cmdlet, and then gets the classes using the `Get-CimClass` cmdlet.
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimClass This cmdlet returns a CIM class object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimSession](New-CimSession.md)
CimCmdlets Get Ciminstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Get-CimInstance.md
Title: Get-CimInstance
# Get-CimInstance
-## Synopsis
+## SYNOPSIS
Gets the CIM instances of a class from a CIM server.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-Namespace <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
- If the either the **ComputerName** parameter or the **CimSession** parameter is specified, then this cmdlet uses the either the CimSession parameter value or **ComputerName** parameter value.
-## Examples
+## EXAMPLES
### Example 1: Get the CIM instances of a specified class
$s = New-CimSession -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s ```
-## Parameters
+## PARAMETERS
### -CimSession
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
+## INPUTS
### CIM Instance This cmdlet accepts an input objects specified with the InputObject parameter.
-## Outputs
+## OUTPUTS
### CIM Instance This cmdlet returns one or more CIM instance objects representing a snapshot of the CIM instances on the CIM server.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Get Cimsession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Get-CimSession.md
Title: Get-CimSession
# Get-CimSession
-## Synopsis
+## SYNOPSIS
Gets the CIM session objects from the current session.
-## Syntax
+## SYNTAX
### ComputerNameSet (Default)
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
sessions that were created in other PowerShell sessions or that were created on
For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
-## Examples
+## EXAMPLES
### Example 1: Get CIM sessions from the current PowerShell session
ComputerName : Server02
Protocol : WSMAN ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Import Binarymilog (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Import-BinaryMiLog.md
Title: Import-BinaryMiLog
# Import-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Used to re-create the saved objects based on the contents of an export file.
-## Syntax
+## SYNTAX
``` Import-BinaryMiLog [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
Use this cmdlet to re-create saved objects based on the contents of an export fi
`Export-BinaryMILog`. This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Restore objects exported to a file
stores the resulting object in a binary encoded file.
Import-BinaryMiLog -Path "Processes.bmil" ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
CimCmdlets Invoke Cimmethod (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Invoke-CimMethod.md
Title: Invoke-CimMethod
# Invoke-CimMethod
-## Synopsis
+## SYNOPSIS
Invokes a method of a CIM class.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Invoke-CimMethod -Query <String> [-QueryDialect <String>] -CimSession <CimSessio
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not a common scenario.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' } ```
-## Parameters
+## PARAMETERS
### -Arguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### CIM class
This cmdlet accepts a CIM class as an input object.
This cmdlet accepts a CIM instance as an input object.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Ciminstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/New-CimInstance.md
Title: New-CimInstance
# New-CimInstance
-## Synopsis
+## SYNOPSIS
Creates a CIM instance.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
New-CimInstance [-CimClass] <CimClass> [[-Property] <IDictionary>] [-OperationTi
[-ComputerName <String[]>] [-ClientOnly] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `New-CimInstance` cmdlet creates an instance of a CIM class based on the cla
either the local computer or a remote computer. By default, the `New-CimInstance` cmdlet creates an instance on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Create an instance of a CIM class
that **Prop1** and **Prop2** actually exist and that the keys are marked correct
You cannot use the **ComputerName** or **CimSession** parameter with the **ClientOnly** parameter.
-## Parameters
+## PARAMETERS
### -CimClass
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains the CIM instance information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Cimsession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/New-CimSession.md
Title: New-CimSession
--- # New-CimSession
-## Synopsis
+## SYNOPSIS
Creates a CIM session.
-## Syntax
+## SYNTAX
### CredentialParameterSet (Default)
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-
[-SessionOption <CimSessionOptions>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
identifiers.
This cmdlet returns a CIM session object that can be used by all other CIM cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session with default options
$SessionOption = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server1 -SessionOption $SessionOption ```
-## Parameters
+## PARAMETERS
### -Authentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no inputs.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)
CimCmdlets New Cimsessionoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/New-CimSessionOption.md
Title: New-CimSessionOption
# New-CimSessionOption
-## Synopsis
+## SYNOPSIS
Specifies advanced options for the New-CimSession cmdlet.
-## Syntax
+## SYNTAX
### ProtocolTypeSet (Default)
New-CimSessionOption [-Impersonation <ImpersonationType>] [-PacketIntegrity] [-P
[-UICulture <CultureInfo>] [-Culture <CultureInfo>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet has two parameter sets, one for WsMan options and one for Distribute
Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session options object for DCOM
This example specifies the culture that is used for the CIM session. By default,
client is used when performing operations. However, the default culture can be overridden using the **Culture** parameter.
-## Parameters
+## PARAMETERS
### -Culture
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### CIMSessionOption This cmdlet returns an object that contains CIM session options information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
CimCmdlets Register Cimindicationevent (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Register-CimIndicationEvent.md
Title: Register-CimIndicationEvent
--- # Register-CimIndicationEvent
-## Synopsis
+## SYNOPSIS
Subscribes to indications using a filter expression or a query expression.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Register-CimIndicationEvent [-Namespace <String>] [-Query] <String> [-QueryDiale
[-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
a query expression. Use the **SourceIdentifier** parameter give a name to the su
This cmdlet returns an **EventSubscription** object. You can use this object to cancel the subscription.
-## Examples
+## EXAMPLES
### Example 1: Register the events generated by a class
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifi
Get-Event -SourceIdentifier "ProcessStarted" ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet outputs an **EventSubscription** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Event](../microsoft.powershell.utility/get-event.md)
CimCmdlets Remove Ciminstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Remove-CimInstance.md
Title: Remove-CimInstance
--- # Remove-CimInstance
-## Synopsis
+## SYNOPSIS
Removes a CIM instance from a computer.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Remove-CimInstance [-ComputerName <String[]>] [[-Namespace] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is not specified, the cmdlet works in one of th
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Remove the CIM instance
$var = Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "note
Remove-CimInstance -InputObject $var ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### None This cmdlet produces no outputs.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimInstance](New-CimInstance.md)
CimCmdlets Remove Cimsession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Remove-CimSession.md
Title: Remove-CimSession
# Remove-CimSession
-## Synopsis
+## SYNOPSIS
Removes one or more CIM sessions.
-## Syntax
+## SYNTAX
### CimSessionSet (Default)
Remove-CimSession -InstanceId <Guid[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CimSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Remove-CimSession` cmdlet removes one or more CIM session objects from the local PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove all the CIM sessions
but only output what would happen if it were done.
Remove-CimSession -Name a* -WhatIf ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains CIM session information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimSession](Get-CimSession.md)
CimCmdlets Set Ciminstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/CimCmdlets/Set-CimInstance.md
Title: Set-CimInstance
--- # Set-CimInstance
-## Synopsis
+## SYNOPSIS
Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Set-CimInstance [-ComputerName <String[]>] [-Namespace <String>] [-OperationTime
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not very common.
-## Examples
+## EXAMPLES
### Example 1: Set the CIM instance
$x = New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";Use
Set-CimInstance -CimInstance $x -Property @{VariableValue="somevalue"} -PassThru ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance When the **Passthru** parameter is specified, this cmdlet returns a modified CIM instance object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
Microsoft.PowerShell.Archive Compress Archive (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Archive/Compress-Archive.md
Title: Compress-Archive
# Compress-Archive
-## Synopsis
+## SYNOPSIS
Creates a compressed archive, or zipped file, from specified files and directories.
-## Syntax
+## SYNTAX
### Path (Default)
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-Compressi
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compress-Archive` cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, with optional compression, into
The maximum file size is 2 GB because there's a limitation of the underlying API
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Compress files to create an archive file
The command updates `Draft.Zip` with newer versions of existing files in the `C:
directory and its subdirectories. And, new files that were added to `C:\Reference` or its subdirectories are included in the updated `Draft.Zip` archive.
-## Parameters
+## PARAMETERS
### -CompressionLevel
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo The cmdlet only returns a **FileInfo** object when you use the **PassThru** parameter.
-## Notes
+## NOTES
Using recursion and sending objects down the pipeline can duplicate files in your archive. For example, if you use `Get-ChildItem` with the **Recurse** parameter, each **FileInfo** and
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Expand-Archive](Expand-Archive.md)
Microsoft.PowerShell.Archive Expand Archive (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Archive/Expand-Archive.md
Title: Expand-Archive
# Expand-Archive
-## Synopsis
+## SYNOPSIS
Extracts files from a specified archive (zipped) file.
-## Syntax
+## SYNTAX
### Path (Default)
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-Pa
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Expand-Archive` cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage.
-## Examples
+## EXAMPLES
### Example 1: Extract the contents of an archive
specified by the **DestinationPath** parameter.
Expand-Archive -Path Draftv2.Zip -DestinationPath C:\Reference ```
-## Parameters
+## PARAMETERS
### -DestinationPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to an existing archive file.
-## Outputs
+## OUTPUTS
### System.IO.FileSystemInfo When the `-PassThru` parameter is used, the cmdlet outputs a list of files that were expanded from the archive.
-## Notes
+## NOTES
The [ZIP file specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) does not specify a standard way of encoding filenames that contain non-ASCII characters. The
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Compress-Archive](compress-archive.md)
Microsoft.PowerShell.Core About Language Keywords (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md
--- description: Describes the keywords in the PowerShell scripting language. Locale: en-US Previously updated : 06/25/2021 Last updated : 03/07/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_keywords?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Language Keywords
about topic for the keyword and the information that follows the table.
| Keyword | Reference | | ------------ | ----------------------------------------------------------------------------------------------------------------- |
-| Begin | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Break | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
-| Catch | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Class | [about_Classes](about_Classes.md) |
-| Continue | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
-| Data | [about_Data_Sections](about_Data_Sections.md) |
-| Define | Reserved for future use |
-| Do | [about_Do](about_Do.md), [about_While](about_While.md) |
-| DynamicParam | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
-| Else | [about_If](about_If.md) |
-| Elseif | [about_If](about_If.md) |
-| End | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Enum | [about_Enum](about_Enum.md) |
-| Exit | [Described in this topic](#exit) |
-| Filter | [about_Functions](about_Functions.md) |
-| Finally | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| For | [about_For](about_For.md) |
-| ForEach | [about_ForEach](about_ForEach.md) |
-| From | Reserved for future use |
-| Function | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Hidden | [about_Hidden](about_Hidden.md) |
-| If | [about_If](about_If.md) |
-| In | [about_ForEach](about_ForEach.md) |
-| Param | [about_Functions](about_Functions.md) |
-| Process | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Return | [about_Return](about_Return.md) |
-| Static | [about_Classes](about_Classes.md) |
-| Switch | [about_Switch](about_Switch.md) |
-| Throw | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Trap | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Try | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Until | [about_Do](about_Do.md) |
-| Using | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
-| Var | Reserved for future use |
-| While | [about_While](about_While.md), [about_Do](about_Do.md) |
+| `begin` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `break` | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
+| `catch` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `class` | [about_Classes](about_Classes.md) |
+| `continue` | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
+| `data` | [about_Data_Sections](about_Data_Sections.md) |
+| `define` | Reserved for future use |
+| `do` | [about_Do](about_Do.md), [about_While](about_While.md) |
+| `dynamicparam` | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
+| `else` | [about_If](about_If.md) |
+| `elseif` | [about_If](about_If.md) |
+| `end` | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `enum` | [about_Enum](about_Enum.md) |
+| `exit` | [Described in this topic](#exit) |
+| `filter` | [about_Functions](about_Functions.md) |
+| `finally` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `for` | [about_For](about_For.md) |
+| `foreach` | [about_ForEach](about_ForEach.md) |
+| `from` | Reserved for future use |
+| `function` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `hidden` | [about_Hidden](about_Hidden.md) |
+| `if` | [about_If](about_If.md) |
+| `in` | [about_ForEach](about_ForEach.md) |
+| `param` | [about_Functions](about_Functions.md) |
+| `process` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `return` | [about_Return](about_Return.md) |
+| `static` | [about_Classes](about_Classes.md) |
+| `switch` | [about_Switch](about_Switch.md) |
+| `throw` | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `trap` | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `try` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `until` | [about_Do](about_Do.md) |
+| `using` | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
+| `var` | Reserved for future use |
+| `while` | [about_While](about_While.md), [about_Do](about_Do.md) |
The following keywords are used by PowerShell workflows: -- InlineScript-- Parallel-- Sequence-- Workflow
+- `inlinescript`
+- `parallel`
+- `sequence`
+- `workflow`
PowerShell workflows are only supported in PowerShell 5.1. For more information about workflows, see [Running PowerShell Commands in a Workflow](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574197(v=ws.11)).
-## Begin
+## `begin`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Process`, and `End` keywords. The `Begin` statement list runs one time before
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`process`, and `end` keywords. The `begin` statement list runs one time before
any objects are received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Break
+## `break`
Causes a script to exit a loop.
while (<condition>) {
} ```
-## Catch
+## `catch`
-Specifies a statement list to run if an error occurs in the accompanying `Try`
+Specifies a statement list to run if an error occurs in the accompanying `try`
statement list. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
try {<statement list>}
catch [[<error type>]] {<statement list>} ```
-## Class
+## `class`
Specifies a new class in PowerShell.
class <class-name> {
} ```
-## Continue
+## `continue`
Causes a script to stop running a loop and to go back to the condition. If the condition is met, the script begins the loop again.
while (<condition>) {
} ```
-## Data
+## `data`
In a script, defines a section that isolates data from the script logic. Can
-also include `If` statements and some limited commands.
+also include `if` statements and some limited commands.
Syntax:
Syntax:
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>} ```
-## Do
+## `do`
-Used with the `While` or `Until` keyword as a looping construct. PowerShell
-runs the statement list at least one time, unlike a loop that uses `While`.
+Used with the `while` or `until` keyword as a looping construct. PowerShell
+runs the statement list at least one time, unlike a loop that uses `while`.
-Syntax for `While`:
+Syntax for `while`:
```Syntax do {<statement list>} while (<condition>) ```
-Syntax for `Until`:
+Syntax for `until`:
```Syntax do {<statement list>} until (<condition>) ```
-## DynamicParam
+## `dynamicparam`
-Specifies one part of the body of a function, along with the `Begin`, `Process`,
-and `End` keywords. Dynamic parameters are added at run time.
+Specifies one part of the body of a function, along with the `begin`, `process`,
+and `end` keywords. Dynamic parameters are added at runtime.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Else
+## `else`
-Used with the `If` keyword to specify the default statement list.
+Used with the `if` keyword to specify the default statement list.
Syntax:
if (<condition>) {<statement list>}
else {<statement list>} ```
-## Elseif
+## `elseif`
-Used with the `If` and `Else` keywords to specify additional conditionals. The
-`Else` keyword is optional.
+Used with the `if` and `else` keywords to specify additional conditionals. The
+`else` keyword is optional.
Syntax:
elseif (<condition>) {<statement list>}
else {<statement list>} ```
-## End
+## `end`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. The `End` statement list runs one time after all
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. The `end` statement list runs one time after all
the objects have been received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Enum
+## `enum`
`enum` is used to declare an enumeration; a distinct type that consists of a set of named labels called the enumerator list.
enum <enum-name> {
} ```
-## Exit
+## `exit`
Causes PowerShell to exit a script or a PowerShell instance.
On Unix, only positive numbers between `[byte]::MinValue` and
example, `-2` is transformed to `254`. In PowerShell, the `exit` statement sets the value of the `$LASTEXITCODE`
-variable. In the Windows Command Shell (cmd.exe), the exit statement sets the
+variable. In the Windows Command Shell (`cmd.exe`), the exit statement sets the
value of the `%ERRORLEVEL%` environment variable. Any argument that is non-numeric or outside the platform-specific range is translated to the value of `0`.
-In the following example, the user sets the error level variable value to 4 by
-adding `exit 4` to the script file `test.ps1`.
+In the following example, the user sets the error level variable value to **4**
+by adding `exit 4` to the script file `test.ps1`.
```cmd C:\scripts\test>type test.ps1
the `exit` command. If the script has no `exit` statement, the exit code is
always `0` when the script completes without error or `1` when the script terminates from an unhandled exception.
-## Filter
+## `filter`
Specifies a function in which the statement list runs one time for each input
-object. It has the same effect as a function that contains only a Process
+object. It has the same effect as a function that contains only a `process`
block. Syntax:
Syntax:
filter <name> {<statement list>} ```
-## Finally
+## `finally`
Defines a statement list that runs after statements that are associated with
-`Try` and `Catch`. A `Finally` statement list runs even if you press
-<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the Exit keyword
+`try` and `catch`. A `finally` statement list runs even if you press
+<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the `exit` keyword
in the script. Syntax:
catch [<error type>] {<statement list>}
finally {<statement list>} ```
-## For
+## `for`
-Defines a loop by using a condition.
+Defines a loop with a condition.
Syntax:
Syntax:
for (<initialize>; <condition>; <iterate>) { <statement list> } ```
-## ForEach
+## `foreach`
-Defines a loop by using each member of a collection.
+Defines a loop using each member of a collection.
Syntax: ```Syntax
-ForEach (<item> in <collection>) { <statement list> }
+foreach (<item> in <collection>) { <statement list> }
```
-## From
+## `from`
Reserved for future use.
-## Function
+## `function`
Creates a named statement list of reusable code. You can name the scope a
-function belongs to. And, you can specify one or more named parameters by using
-the `Param` keyword. Within the function statement list, you can include
-`DynamicParam`, `Begin`, `Process`, and `End` statement lists.
+function belongs to. You can also specify one or more named parameters by using
+the `param` keyword. Within the function statement list, you can include
+`dynamicparam`, `begin`, `process`, and `end` statement lists.
Syntax: ```Syntax function [<scope:>]<name> { param ([type]<$pname1> [, [type]<$pname2>])
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>}
Syntax:
```Syntax function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## If
+## `if`
Defines a conditional.
Syntax:
if (<condition>) {<statement list>} ```
-## Hidden
+## `hidden`
-Hides class members from the default results of the `Get-Member` cmdlet, and
-from IntelliSense and tab completion results.
+Hides class members from the default results of the `Get-Member` cmdlet,
+IntelliSense, and tab completion results.
Syntax: ```Syntax
-Hidden [data type] $member_name
+hidden [data type] $member_name
```
-## In
+## `in`
-Used in a `ForEach` statement to create a loop that uses each member of a
+Used in a `foreach` statement to create a loop that uses each member of a
collection. Syntax: ```Syntax
-ForEach (<item> in <collection>){<statement list>}
+foreach (<item> in <collection>){<statement list>}
```
-## Param
+## `param`
Defines the parameters in a function.
function [<scope:>]<name> {
} ```
-## Process
+## `process`
-Specifies a part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. When a `Process` statement list receives input
-from the pipeline, the `Process` statement list runs one time for each element
-from the pipeline. If the pipeline provides no objects, the `Process` statement
+Specifies a part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. When a `process` statement list receives input
+from the pipeline, the `process` statement list runs one time for each element
+from the pipeline. If the pipeline provides no objects, the `process` statement
list does not run. If the command is the first command in the pipeline, the
-`Process` statement list runs one time.
+`process` statement list runs one time.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Return
+## `return`
Causes PowerShell to leave the current scope, such as a script or function, and writes the optional expression to the output.
Syntax:
return [<expression>] ```
-## Static
+## `static`
Specifies the property or method defined is common to all instances of the
-class in which is defined.
+class in which it is defined.
-See `Class` for usage examples.
+See `class` for usage examples.
-## Switch
+## `switch`
-To check multiple conditions, use a `Switch` statement. The `Switch` statement
-is equivalent to a series of `If` statements, but it is simpler.
+To check multiple conditions, use a `switch` statement. The `switch` statement
+is equivalent to a series of `if` statements, but it is simpler.
-The `Switch` statement lists each condition and an optional action. If a
+The `switch` statement lists each condition and an optional action. If a
condition obtains, the action is performed. Syntax 1:
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
} ```
-## Throw
+## `throw`
Throws an object as an error.
Syntax:
throw [<object>] ```
-## Trap
+## `trap`
Defines a statement list to be run if an error is encountered. An error type requires brackets. The second pair of brackets indicates that the error type
Syntax:
trap [[<error type>]] {<statement list>} ```
-## Try
+## `try`
Defines a statement list to be checked for errors while the statements run. If
-an error occurs, PowerShell continues running in a `Catch` or `Finally`
+an error occurs, PowerShell continues running in a `catch` or `finally`
statement. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
catch [[<error type>]] {<statement list>}
finally {<statement list>} ```
-## Until
+## `until`
-Used in a `Do` statement as a looping construct where the statement list is
+Used in a `do` statement as a looping construct where the statement list is
executed at least one time. Syntax:
Syntax:
do {<statement list>} until (<condition>) ```
-## Using
+## `using`
-Allows to indicate which namespaces are used in the session. Classes and
-members require less typing to mention them. You can also include classes from
-modules.
+Allows indicating which namespaces are used in the session. Classes and members
+require less typing to mention them. You can also include classes from modules.
Syntax #1:
Syntax #2:
using module <module-name> ```
-## While
+## `while`
The `while` statement is a looping construct where the condition is tested
-before the statements are executed. If the condition is FALSE, then the
+before the statements are executed. If the condition is false, then the
statements do not execute. Statement syntax:
while (<condition>) {
} ```
-When used in a `Do` statement, `while` is part of a looping construct where
+When used in a `do` statement, `while` is part of a looping construct where
the statement list is executed at least one time.
-Do loop Syntax:
+`do` loop Syntax:
```Syntax do {<statement list>} while (<condition>)
Microsoft.PowerShell.Core Add History (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Add-History.md
Title: Add-History
# Add-History
-## Synopsis
+## SYNOPSIS
Appends entries to the session history.
-## Syntax
+## SYNTAX
``` Add-History [[-InputObject] <PSObject[]>] [-Passthru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-History` cmdlet adds entries to the end of the session history, that is, the list of commands entered during the current session.
export the commands to a CSV or XML file, then import the commands, and pass the
`Add-History`. You can use this cmdlet to add specific commands to the history or to create a single history file that includes commands from more than one session.
-## Examples
+## EXAMPLES
### Example 1: Add commands to the history of a different session
The **InputObject** parameter passes the results of the command in parentheses t
cmdlet. The command in parentheses, which is executed first, imports the `history.xml` file into PowerShell. The `Add-History` cmdlet then adds the commands in the file to the session history.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.HistoryInfo You can pipe a **HistoryInfo** object to this cmdlet.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a **HistoryInfo** object if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the
the file.
To modify the session history, export the session to a CSV or XML file, modify the file, import the file, and use `Add-History` to append it to the current session history.
-## Related links
+## RELATED LINKS
[Clear-History](Clear-History.md)
Microsoft.PowerShell.Core Clear History (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Clear-History.md
Title: Clear-History
# Clear-History
-## Synopsis
+## SYNOPSIS
Deletes entries from the PowerShell session command history.
-## Syntax
+## SYNTAX
### IDParameter (Default)
Clear-History [[-Count] <int>] [-CommandLine <string[]>] [-Newest] [-WhatIf] [-C
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Clear-History` deletes the command history from a PowerShell session. Each PowerShell session has its own command history. To display the command history, use the `Get-History` cmdlet.
history. To display the `PSReadLine` configuration for command history, use `Get
`PSReadLine` shipped with PowerShell 5.0 and above. For more information, see [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Delete the command history from a PowerShell session
command history. The **Id** parameter specifies to begin with **Id 7**. The **Co
specifies to delete five commands, inclusive of the specified **Id**. `Get-History` displays the updated command history and confirms that five commands were deleted, **Id 3** - **Id 7**.
-## Parameters
+## PARAMETERS
### -CommandLine
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-History`.
-## Outputs
+## OUTPUTS
### None `Clear-History` does not generate any output.
-## Notes
+## NOTES
The PowerShell session history is a list of the commands entered during a PowerShell session. You can view the history, add and delete commands, and run commands from the history. For more
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Related links
+## RELATED LINKS
[about_History](About/about_History.md)
Microsoft.PowerShell.Core Clear Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Clear-Host.md
Title: Clear-Host
# Clear-Host
-## Synopsis
+## SYNOPSIS
Clears the display in the host program.
-## Syntax
+## SYNTAX
``` Clear-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Host` function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function
function.
Because the behavior of the `Clear-Host` function is determined by the host program, `Clear-Host` might work differently in different host programs.
-## Examples
+## EXAMPLES
### Example 1
PS C:>
This command uses the `cls` alias of `Clear-Host` to clear the current display.
-## Parameters
+## PARAMETERS
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Clear-Host`.
-## Outputs
+## OUTPUTS
### None `Clear-Host` does not generate any output
-## Notes
+## NOTES
`Clear-Host` is a simple function, not an advanced function. As such, you cannot use common parameters, such as **Debug**, in a `Clear-Host` command.
-## Related links
+## RELATED LINKS
[Get-Host](../Microsoft.PowerShell.Utility/Get-Host.md)
Microsoft.PowerShell.Core Connect Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Connect-PSSession.md
Title: Connect-PSSession
--- # Connect-PSSession
-## Synopsis
+## SYNOPSIS
Reconnects to disconnected sessions.
-## Syntax
+## SYNTAX
### Name (Default)
Connect-PSSession -InstanceId <Guid[]> [-ThrottleLimit <Int32>] [-WhatIf] [-Conf
Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Reconnect to a session
The ninth command disconnects from the session in the `$s` variable.The administ
PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session (**PSSession**) to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession This cmdlet returns an object that represents the session to which it reconnected.
-## Notes
+## NOTES
- This cmdlet is only available on Windows platforms.
This cmdlet returns an object that represents the session to which it reconnecte
sessions are considered to be idle from the moment that they are disconnected, even if commands are running in the disconnected session.
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](Disconnect-PSSession.md)
Microsoft.PowerShell.Core Debug Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Debug-Job.md
Title: Debug-Job
# Debug-Job
-## Synopsis
+## SYNOPSIS
Debugs a running background or remote job.
-## Syntax
+## SYNTAX
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
accepts a running job object, name, ID, or instance ID as input, and starts a de
the script it is running. The debugger `quit` command stops the job and running script. The `exit` command detaches the debugger, and allows the job to continue to run.
-## Examples
+## EXAMPLES
### Example 1: Debug a job by job ID
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Disable Experimentalfeature (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Disable-ExperimentalFeature.md
Title: Disable-ExperimentalFeature
--- # Disable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Disable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Disable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ExperimentalFeature` cmdlet disables experimental features by removing the named experimental features from the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Disable an experimental feature
PS C:\> Disable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to disable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Enable-ExperimentalFeature](Enable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Disable Psremoting (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Disable-PSRemoting.md
Title: Disable-PSRemoting
--- # Disable-PSRemoting
-## Synopsis
+## SYNOPSIS
Prevents PowerShell endpoints from receiving remote connections.
-## Syntax
+## SYNTAX
``` Disable-PSRemoting [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is only available on the Windows platform. It is not available on Li
versions of PowerShell. To run this cmdlet, start PowerShell with the **Run as administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Prevent remote access to all PowerShell session configurations
PowerShell.6 NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrat
PowerShell.6.2.0 NT AUTHORITY\NETWORK AccessDenied, NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Adm ... ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
configurations, you effectively prevent remote users from establishing sessions that connect to the computer.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disable Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Disable-PSSessionConfiguration.md
Title: Disable-PSSessionConfiguration
--- # Disable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Disables session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Disable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
connect to the computer.
To disable all session configurations on the computer, use `Disable-PSRemoting`.
-## Examples
+## EXAMPLES
### Example 1: Disable the default configuration
For more information, see the about_Remote_Troubleshooting Help topic.
> Disabling the configuration does not prevent you from changing the configuration using the > `Set-PSSessionConfiguration` cmdlet. It only prevents use of the configuration.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Enable-PSSessionConfiguration](Enable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disconnect Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Title: Disconnect-PSSession
# Disconnect-PSSession
-## Synopsis
+## SYNOPSIS
Disconnects from a session.
-## Syntax
+## SYNTAX
### Session (Default)
Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
[-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1 - Disconnect a session by name
timeout to the 12-hour maximum.
The seventh command gets the value of the **IdleTimeout** property of the disconnected session, which is measured in milliseconds. The output confirms that the command was successful.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session to `Disconnect-PSSession`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession `Disconnect-PSSession` returns an object that represents the session that it disconnected.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Enable Experimentalfeature (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Enable-ExperimentalFeature.md
Title: Enable-ExperimentalFeature
--- # Enable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Enable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Enable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ExperimentalFeature` cmdlet enables experimental features by adding the named experimental features to the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Enable an experimental feature
Enable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to enable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Enable Psremoting (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Title: Enable-PSRemoting
--- # Enable-PSRemoting
-## Synopsis
+## SYNOPSIS
Configures the computer to receive remote commands.
-## Syntax
+## SYNTAX
``` Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the > `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Configure a computer to receive remote commands
OS Microsoft Windows 10.0.18363
> The name of the firewall rule can be different depending on the version of Windows. Use the > `Get-NetFirewallRule` cmdlet to list the names of the rules on your system.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns strings that describe its results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
property of all session configurations to `$True`.
`Enable-PSRemoting` removes the **Deny_All** and **Network_Deny_All** settings. This provides remote access to session configurations that were reserved for local use.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enable Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Enable-PSSessionConfiguration.md
Title: Enable-PSSessionConfiguration
--- # Enable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Enables the session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Enable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-SecurityDescriptorSddl <String>] [-SkipNetworkProfileCheck] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
also sets the value of the **Enabled** property of the session configuration
(`AccessMode=Local`) security descriptor setting that allows only users of the local computer to use to the session configuration.
-## Examples
+## EXAMPLES
### Example 1: Re-enable the default session
$sddl = "O:NSG:BAD:P(A;;GXGWGR;;;BA)(A;;GAGR;;;S-1-5-21-123456789-188441444-3100
Enable-PSSessionConfiguration -Name MaintenanceShell -SecurityDescriptorSDDL $sddl ```
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To use this cmdlet, you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enter Pshostprocess (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Title: Enter-PSHostProcess
# Enter-PSHostProcess
-## Synopsis
+## SYNOPSIS
Connects to and enters into an interactive session with a local process.
-## Syntax
+## SYNTAX
### ProcessIdParameterSet (Default)
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
Enter-PSHostProcess -CustomPipeName <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSHostProcess` cmdlet connects to and enters into an interactive session with a local process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
To support attaching to processes on remote computers, the `Enter-PSHostProcess`
in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.
-## Examples
+## EXAMPLES
### Example Part 1: Start debugging a runspace within the PowerShell ISE process
cmdlet. This returns you to the `PS C:\>` prompt.
PS C:\> ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Enter-PSHostProcess` cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a PowerShell ISE
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSHostProcess](Exit-PSHostProcess.md)
Microsoft.PowerShell.Core Enter Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Enter-PSSession.md
Title: Enter-PSSession
--- # Enter-PSSession
-## Synopsis
+## SYNOPSIS
Starts an interactive session with a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Enter-PSSession [-ContainerId] <String> [-ConfigurationName <String>] [-RunAsAdm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSSession` cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as if you were
information about how to set up PowerShell SSH remoting, see
To end the interactive session and disconnect from the remote computer, use the `Exit-PSSession` cmdlet, or type `exit`.
-## Examples
+## EXAMPLES
### Example 1: Start an interactive session
This example shows how to start an interactive session using SSH. It uses the **
specify the port to use and the **KeyFilePath** parameter to specify an RSA key used to authenticate the user on the remote computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.Runspaces.PSSession You can pipe a computer name, as a string, or a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
To connect to a remote computer, you must be a member of the Administrators group on the remote computer. To start an interactive session on the local computer, you must start PowerShell with the
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSSession](Exit-PSSession.md)
Microsoft.PowerShell.Core Exit Pshostprocess (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Exit-PSHostProcess.md
Title: Exit-PSHostProcess
--- # Exit-PSHostProcess
-## Synopsis
+## SYNOPSIS
Closes an interactive session with a local process.
-## Syntax
+## SYNTAX
``` Exit-PSHostProcess [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSHostProcess` cmdlet closes an interactive session with a local process that you have opened by running the `Enter-PSHostProcess` cmdlet. You run the `Exit-PSHostProcess` cmdlet from within the process, when you are finished debugging or troubleshooting a script that is running within a process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### Example 1: Exit a process
in the process, as described in `Enter-PSHostProcess`. After you type the `exit`
debugger, run the `Exit-PSHostProcess` cmdlet to close your interactive session with the process. The cmdlet closes your session in the process, and returns you to the `PS C:\>` prompt.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enter-PSHostProcess](Enter-PSHostProcess.md)
Microsoft.PowerShell.Core Exit Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Exit-PSSession.md
Title: Exit-PSSession
# Exit-PSSession
-## Synopsis
+## SYNOPSIS
Ends an interactive session with a remote computer.
-## Syntax
+## SYNTAX
``` Exit-PSSession [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the `Enter-PSSession` cmdlet.
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using
You can also use the `exit` keyword to end an interactive session. The effect is the same as using `Exit-PSSession`.
-## Examples
+## EXAMPLES
### Example 1: Start and stop an interactive session
PS>
This example uses the `exit` keyword to stop an interactive session started by using `Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet takes only the common parameters.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Export Modulemember (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Export-ModuleMember.md
Title: Export-ModuleMember
--- # Export-ModuleMember
-## Synopsis
+## SYNOPSIS
Specifies the module members that are exported.
-## Syntax
+## SYNTAX
``` Export-ModuleMember [[-Function] <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [-Alias <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ModuleMember` cmdlet specifies the module members that are exported from a script module (`.psm1`) file, or from a dynamic module created by using the `New-Module` cmdlet. Module members
module imports from other modules.
An `Export-ModuleMember` command is optional, but it is a best practice. Even if the command confirms the default values, it demonstrates the intention of the module author.
-## Examples
+## EXAMPLES
### Example 1: Export functions and aliases in a script module
This command shows how to use `Export-ModuleMember` in a dynamic module that is
In this example, `Export-ModuleMember` is used to export both the `Hi` alias and the `SayHello` function in the dynamic module.
-## Parameters
+## PARAMETERS
### -Alias
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
+## INPUTS
### System.String You can pipe function name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To exclude a member from the list of exported members, add an `Export-ModuleMember` command that lists all other members but omits the member that you want to exclude.
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Foreach Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/ForEach-Object.md
Title: ForEach-Object
--- # ForEach-Object
-## Synopsis
+## SYNOPSIS
Performs an operation against each item in a collection of input objects.
-## Syntax
+## SYNTAX
### ScriptBlockSet (Default)
ForEach-Object -Parallel <scriptblock> [-InputObject <PSObject>] [-ThrottleLimit
[-UseNewRunspace] [-TimeoutSeconds <int>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ForEach-Object` cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified by using the **InputObject** parameter.
command.
Terminating errors can be converted to non-terminating errors using PowerShell try/catch or trap blocks.
-## Examples
+## EXAMPLES
### Example 1: Divide integers in an array
Line |
The nested scriptblock can't access the `$test2` variable and an error is thrown.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns objects that are determined by the input.
-## Notes
+## NOTES
- The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe input to a **Foreach** statement. For more information about the **Foreach** statement, see
This cmdlet returns objects that are determined by the input.
> referenced objects that don't change. But if the object state is being modified then you must > used thread safe objects, such as .Net **System.Collection.Concurrent** types (See Example 11).
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Core Get Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-Command.md
Title: Get-Command
--- # Get-Command
-## Synopsis
+## SYNOPSIS
Gets all commands.
-## Syntax
+## SYNTAX
### CmdletSet (Default)
Get-Command [[-Name] <String[]>] [-Module <String[]>]
[-UseAbbreviationExpansion] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Command` cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. `Get-Command` gets the commands from
information from help topics.
Starting in Windows PowerShell 5.0, results of the `Get-Command` cmdlet display a **Version** column by default. A new **Version** property has been added to the **CommandInfo** class.
-## Examples
+## EXAMPLES
### Example 1: Get cmdlets, functions, and aliases
Application getconf 0.0.0.0 /u
Application command 0.0.0.0 /usr/bin/command ```
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe command names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandInfo
Represents cmdlets.
Represents functions and filters.
-## Notes
+## NOTES
- When more than one command that has the same name is available to the session, `Get-Command` returns the command that runs when you type the command name. To get commands that have the same
Represents functions and filters.
`$PSModuleAutoLoadingPreference` preference variable. For more information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Export-PSSession](../Microsoft.PowerShell.Utility/Export-PSSession.md)
Microsoft.PowerShell.Core Get Experimentalfeature (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-ExperimentalFeature.md
Title: Get-ExperimentalFeature
--- # Get-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Gets experimental features.
-## Syntax
+## SYNTAX
``` Get-ExperimentalFeature [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ExperimentalFeature` cmdlet returns all experimental features discovered by PowerShell. Experimental features can come from modules or the PowerShell engine. Experimental features allow users to safely test new features and provide feedback (typically via GitHub) before the design is considered complete and any changes can become a breaking change.
-## Examples
+## EXAMPLES
### Example 1
Name Enabled Source Description
PSImplicitRemotingBatching False PSEngine Batch implicit remoting proxy commands to improve performance ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[] Name or names of experimental features to return.
-## Outputs
+## OUTPUTS
### ExperimentalFeature Returns instances that match the requested names or all experimental features if no name is specified.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Get Help (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-Help.md
Title: Get-Help
# Get-Help
-## Synopsis
+## SYNOPSIS
Displays information about PowerShell commands and concepts.
-## Syntax
+## SYNTAX
### AllUsersView (Default)
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Detailed
[-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Examples
+### EXAMPLES
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Examples [-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Parameters
+### PARAMETERS
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Parameter <String[]>
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] -ShowWindow [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Help` cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, workflows, providers, aliases, and
For information about parameter attributes, such as **Required** and **Position*
> in a module, import the module, either by using the `Import-Module` cmdlet or by running a cmdlet > that's included in the module.
-## Examples
+## EXAMPLES
### Example 1: Display basic help information about a cmdlet
your functions and scripts, see [about_Comment_Based_Help](./About/about_Comment
Get-Help -Name C:\PS-Test\MyScript.ps1 ```
-## Parameters
+## PARAMETERS
### -Category
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-Help`.
-## Outputs
+## OUTPUTS
### ExtendedCmdletHelpInfo
If you get a conceptual help article, `Get-Help` returns it as a string.
If you get a command that has a help file, `Get-Help` returns a **MamlCommandHelpInfo** object.
-## Notes
+## NOTES
PowerShell 3.0 doesn't include help files. To download and install the help files that `Get-Help` reads, use the `Update-Help` cmdlet. You can use the `Update-Help` cmdlet to download and install
following fields:
- **Accepts wildcard characters**. Indicates whether the value of a parameter can include wildcard characters, such as an asterisk (`*`) or question mark (`?`).
-## Related links
+## RELATED LINKS
[about_Command_Syntax](About/about_Command_Syntax.md)
Microsoft.PowerShell.Core Get History (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-History.md
Title: Get-History
--- # Get-History
-## Synopsis
+## SYNOPSIS
Gets a list of the commands entered during the current session.
-## Syntax
+## SYNTAX
``` Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-History` cmdlet gets the session history, that is, the list of commands entered during the current session.
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Get the session history
command.
Get-History | Format-List -Property * ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64 You can pipe a history ID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a history object for each history item that it gets.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the run order, the status, and the start and end times of the command. As you enter each
Starting in Windows PowerShell 3.0, the default value of the `$MaximumHistoryCou
variable is `4096`. In Windows PowerShell 2.0, the default value is `64`. For more information about the `$MaximumHistoryCount` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core Get Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-Job.md
Title: Get-Job
--- # Get-Job
-## Synopsis
+## SYNOPSIS
Gets PowerShell background jobs that are running in the current session.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Get-Job [-IncludeChildJob] [-ChildJobState <JobState>] [-HasMoreData <Boolean>]
Get-Job [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Job` cmdlet gets objects that represent the background jobs that were started in the current session. You can use `Get-Job` to get jobs that were started by using the `Start-Job`
into the session before you run a `Get-Job` command, either by using the `Import
by using or getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get all background jobs started in the current session
Access is denied.
For more information, see the [about_Remote_Troubleshooting](./about/about_Remote_Troubleshooting.md) Help topic.
-## Parameters
+## PARAMETERS
### -After
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.RemotingJob This cmdlet returns objects that represent the jobs in the session.
-## Notes
+## NOTES
The **PSJobTypeName** property of jobs indicates the job type of the job. The property value is determined by the job type author. The following list shows common job types.
determined by the job type author. The following list shows common job types.
`Invoke-Command` cmdlet. - **PSWorkflowJob**. Job started by using the **AsJob** common parameter of workflows.
-## Related links
+## RELATED LINKS
[Invoke-Command](Invoke-Command.md)
Microsoft.PowerShell.Core Get Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-Module.md
Title: Get-Module
--- # Get-Module
-## Synopsis
+## SYNOPSIS
List the modules imported in the current session or that can be imported from the PSModulePath.
-## Syntax
+## SYNTAX
### Loaded (Default)
Get-Module [[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Module` cmdlet lists the PowerShell modules that have been imported, or that can be imported, into a PowerShell session. Without parameters, `Get-Module` gets modules that have been
Management Instrumentation (WMI) on the remote computer. Then use the **CIMSessi
`Import-Module` cmdlet and then run the imported commands, the commands run implicitly on the remote computer. You can use this WMI and CIM strategy to manage the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Get modules imported into the current session
The fourth command runs the `Get-Disk` command. Although the command is typed in
it runs implicitly on the remote computer from which it was imported. The command gets objects from the remote computer and returns them to the local session.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe module names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
This cmdlet returns objects that represent modules.
When you specify the **ListAvailable** parameter, `Get-Module` returns a **ModuleInfoGrouping** object, which is a type of **PSModuleInfo** object that has the same properties and methods.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are included in PowerShell are packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a snap-in
object, which is a type of **PSModuleInfo** object that has the same properties
remoting enabled. This includes the local computer. When you create a CIM session on the local computer, PowerShell uses DCOM, instead of WMI, to create the session.
-## Related links
+## RELATED LINKS
[Get-CimSession](../CimCmdlets/Get-CimSession.md)
Microsoft.PowerShell.Core Get Pshostprocessinfo (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-PSHostProcessInfo.md
Title: Get-PSHostProcessInfo
--- # Get-PSHostProcessInfo
-## Synopsis
+## SYNOPSIS
Gets process information about the PowerShell host.
-## Syntax
+## SYNTAX
### ProcessNameParameterSet (Default)
Get-PSHostProcessInfo [-Process] <Process[]> [<CommonParameters>]
Get-PSHostProcessInfo [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSHostProcessInfo` cmdlet gets information about PowerShell host processes running on the local computer. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### 1: Get a list of PowerShell hosts running on the system
ProcessName ProcessId AppDomainName
pwsh 13912 DefaultAppDomain ```
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### System.Diagnostics.Process You can pipe a **Process** object from `Get-Process` to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSHostProcessInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Process](../Microsoft.PowerShell.Management/get-process.md)
Microsoft.PowerShell.Core Get Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-PSSession.md
Title: Get-PSSession
--- # Get-PSSession
-## Synopsis
+## SYNOPSIS
Gets the PowerShell sessions on local and remote computers.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSSession [-InstanceId <Guid[]>] [<CommonParameters>]
Get-PSSession [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSession` cmdlet gets the user-managed PowerShell sessions (**PSSessions**) on local and remote computers.
the current session and connect to the specified computer.
For more information about PowerShell sessions, see [about_PSSessions](about/about_PSSessions.md).
-## Examples
+## EXAMPLES
### Example 1: Get sessions created in the current session
Get-PSSession -Id 2
This command gets the **PSSession** with ID 2. Because the value of the **ID** property is unique only in the current session, the **Id** parameter is valid only for local commands.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet gets user-managed sessions **PSSession** objects" such as those that are created by using the New-PSSession, `Enter-PSSession`, and Invoke-Command cmdlets. It does not get the
For more information about the values of the **State** property of sessions, see
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Get Pssessioncapability (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-PSSessionCapability.md
Title: Get-PSSessionCapability
--- # Get-PSSessionCapability
-## Synopsis
+## SYNOPSIS
Gets the capabilities of a specific user on a constrained session configuration.
-## Syntax
+## SYNTAX
``` Get-PSSessionCapability [-ConfigurationName] <String> [-Username] <String> [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionCapability` cmdlet gets the capabilities of a specific user on a constrained session configuration. Use this cmdlet to audit customized session configurations for users.
object. This object contains details about the PowerShell runspace the specified
with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.
-## Examples
+## EXAMPLES
### Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -F
This example returns details about the runspace the user CONTOSO\User would interact with when connecting to the Endpoint1 constrained endpoint.
-## Parameters
+## PARAMETERS
### -ConfigurationName
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.Runspaces.InitialSessionState
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSRoleCapabilityFile](New-PSRoleCapabilityFile.md)
Microsoft.PowerShell.Core Get Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-PSSessionConfiguration.md
Title: Get-PSSessionConfiguration
--- # Get-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Gets the registered session configurations on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSessionConfiguration [[-Name] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionConfiguration` cmdlet gets the session configurations that have been registered on the local computer. This is an advanced cmdlet that is designed to be used by system administrators
session configuration authors to examine and compare session configurations.
To create and register a session configuration, use the `Register-PSSessionConfiguration` cmdlet. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1 - Get session configurations on the local computer
create a session. This variable is set on the local computer, but it specifies a
the remote computer. For more information about the `$PSSessionConfiguration` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration
-## Notes
+## NOTES
- To run this cmdlet, start PowerShell with the **Run as administrator** option.
You cannot pipe input to this cmdlet.
commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Get Pssubsystem (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Get-PSSubsystem.md
Title: Get-PSSubsystem
--- # Get-PSSubsystem
-## Synopsis
+## SYNOPSIS
Retrieves information about the subsystems registered in PowerShell.
-## Syntax
+## SYNTAX
### GetAllSet (Default)
Get-PSSubsystem -Kind <SubsystemKind> [<CommonParameters>]
Get-PSSubsystem -SubsystemType <Type> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Retrieves information about the subsystems registered in PowerShell.
the PSReadLine module to provide custom prediction plugins. In future, **Job**,
**CommandCompleter**, **Remoting** and other components could be separated into subsystem assemblies outside of `System.Management.Automation.dll`.
-## Examples
+## EXAMPLES
### Example 1 - Display all available subsystems
IsRegistered : False
Implementations : {} ```
-## Parameters
+## PARAMETERS
### -Kind
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Subsystem.SubsystemKind ### System.Type
-## Outputs
+## OUTPUTS
### System.Management.Automation.Subsystem.SubsystemInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_experimental_features](about/about_experimental_features.md)
Microsoft.PowerShell.Core Import Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Import-Module.md
Title: Import-Module
# Import-Module
-## Synopsis
+## SYNOPSIS
Adds modules to the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
[-NoClobber] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or
import CIM modules from the remote computer. The imported commands run implicitl
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Import the members of a module into the current session
Number Friendly Name OperationalStatus Total Size Partition Style
0 Virtual HD ATA Device Online 40 GB MBR ```
-## Parameters
+## PARAMETERS
### -Alias
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo, System.Reflection.Assembly You can pipe a module name, module object, or assembly object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSModuleInfo, or System.Management.Automation.PSCustomObject
By default, `Import-Module` does not generate any output. If you specify the **P
the cmdlet generates a **System.Management.Automation.PSModuleInfo** object that represents the module. If you specify the **AsCustomObject** parameter, it generates a **PSCustomObject** object.
-## Notes
+## NOTES
- Before you can import a module, the module must be installed on the local computer. That is, the module directory must be copied to a directory that is accessible to your local computer. For more
module. If you specify the **AsCustomObject** parameter, it generates a **PSCust
statement at the beginning of your script. This imports the module, including the class and enum definitions. For more information, see [about_Using](About/about_Using.md).
-## Related links
+## RELATED LINKS
[about_Modules](about/about_Modules.md)
Microsoft.PowerShell.Core Invoke Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Invoke-Command.md
Title: Invoke-Command
# Invoke-Command
-## Synopsis
+## SYNOPSIS
Runs commands on local and remote computers.
-## Syntax
+## SYNTAX
### InProcess (Default)
Invoke-Command [-AsJob] [-HideComputerName] -FilePath <String> -SSHConnection <H
[-RemoteDebug] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Command` cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single `Invoke-Command` command, you can run commands on
connection information. For more information about how to set up PowerShell SSH
Some code samples use splatting to reduce the line length. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Run a script on a server
$sshConnections =
$results = Invoke-Command -FilePath c:\Scripts\CollectEvents.ps1 -SSHConnection $sshConnections ```
-## Parameters
+## PARAMETERS
### -AllowRedirection
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
+## INPUTS
### System.Management.Automation.ScriptBlock You can pipe a command in a script block to `Invoke-Command`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob, System.Management.Automation.Runspaces.PSSession, or the output of the invoked command
This cmdlet returns a job object, if you use the **AsJob** parameter. If you spe
**InDisconnectedSession** parameter, `Invoke-Command` returns a **PSSession** object. Otherwise, it returns the output of the invoked command, which is the value of the **ScriptBlock** parameter.
-## Notes
+## NOTES
On Windows Vista, and later versions of the Windows operating system, to use the **ComputerName** parameter of `Invoke-Command` to run a command on the local computer, you must run PowerShell using
disconnect/reconnect features are currently not supported. For more information
PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Invoke History (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Invoke-History.md
Title: Invoke-History
--- # Invoke-History
-## Synopsis
+## SYNOPSIS
Runs commands from the session history.
-## Syntax
+## SYNTAX
``` Invoke-History [[-Id] <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-History` cmdlet runs commands from the session history. You can pass objects representing the commands from Get-History to `Invoke-History`, or you can identify commands in the
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Run the most recent command in the history
the command uses the `ForEach-Object` cmdlet to run the `Invoke-History` command
Get-History -Id 255 -Count 7 | ForEach {Invoke-History -Id $_.Id} ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a history **Id** to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output, but output might be generated by the commands that `Invoke-History` runs.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the order of execution, the status, and the start and end times of the command. As you
about the session history, see [about_History](About/about_History.md).
You can also refer to `Invoke-History` by its built-in aliases, `r` and `ihy`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core New Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-Module.md
Title: New-Module
--- # New-Module
-## Synopsis
+## SYNOPSIS
Creates a new dynamic module that exists only in memory.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
New-Module [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Function <String[]>]
[-ReturnResult] [-AsCustomObject] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Module` cmdlet creates a dynamic module from a script block. The members of the dynamic module, such as functions and variables, are immediately available in the session and remain
To make a dynamic module available to `Get-Module`, pipe a `New-Module` command
pipe the module object that `New-Module` returns to `Import-Module`. This action adds the dynamic module to the `Get-Module` list, but it does not save the module to disk or make it persistent.
-## Examples
+## EXAMPLES
### Example 1: Create a dynamic module
New-Module -ScriptBlock {function SayHello {"Hello, World!"}; SayHello} -ReturnR
Hello, World! ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a module name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo, System.Management.Automation.PSCustomObject, or None
This cmdlet generates a **PSModuleInfo** object, by default. If you use the **As
parameter, it generates a **PSCustomObject** object. If you use the **ReturnResult** parameter, it returns the result of evaluating the script block in the dynamic module.
-## Notes
+## NOTES
You can also refer to `New-Module` by its alias, `nmo`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Modulemanifest (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-ModuleManifest.md
Title: New-ModuleManifest
# New-ModuleManifest
-## Synopsis
+## SYNOPSIS
Creates a new module manifest.
-## Syntax
+## SYNTAX
### All
New-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>] [
[-DefaultCommandPrefix <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ModuleManifest` cmdlet creates a new module manifest (`.psd1`) file, populates its values, and saves the manifest file in the specified path.
values for certain properties. For more information, see
[Required metadata for items published to the PowerShell Gallery](/powershell/scripting/gallery/how-to/publishing-packages/publishing-a-package#required-metadata-for-items-published-to-the-powershell-gallery) in the Gallery documentation.
-## Examples
+## EXAMPLES
### Example 1 - Create a new module manifest
ExportedFormatFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\Event.
ExportedTypeFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml} ```
-## Parameters
+## PARAMETERS
### -AliasesToExport
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).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.String By default, `New-ModuleManifest` doesn't generate any output. However, if you use the **PassThru** parameter, it generates a **System.String** object representing the module manifest.
-## Notes
+## NOTES
`New-ModuleManifest` running on Windows and non-Windows platforms creates module manifest (`.psd1`) files encoded as **UTF8NoBOM**.
The caller's session state is the session state into which a module is imported.
refers to the global session state, but when a module imports nested modules, the caller is the module and the caller's session state is the module's session state.
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Psrolecapabilityfile (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md
Title: New-PSRoleCapabilityFile
--- # New-PSRoleCapabilityFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a set of capabilities to be exposed through a session configuration.
-## Syntax
+## SYNTAX
``` New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-Description <String>]
New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that can be exposed through session configuration files. This includes determining which cmdlets,
in the **RoleDefinitions** field in a PowerShell Session Configuration (.pssc) f
This cmdlet was introduced in Windows PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Create a blank role capability file
$roleParameters = @{
New-PSRoleCapabilityFile @roleParameters ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSSessionConfigurationFile](New-PSSessionConfigurationFile.md)
Microsoft.PowerShell.Core New Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-PSSession.md
Title: New-PSSession
--- # New-PSSession
-## Synopsis
+## SYNOPSIS
Creates a persistent connection to a local or remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-PSSession [-Name <String[]>] [-Port <Int32>] [-HostName] <String[]> [-UserNa
New-PSSession [-Name <String[]>] -SSHConnection <Hashtable[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSession` cmdlet creates a PowerShell session (**PSSession**) on a local or remote computer. When you create a **PSSession**, PowerShell establishes a persistent connection to the
connection information. For more information about how to set up PowerShell SSH
> this if you are in an environment where you can be certain of the server certificate and the > network connection to the target system.
-## Examples
+## EXAMPLES
### Example 1: Create a session on the local computer
This example shows how to create multiple sessions using Secure Shell (SSH) and
contain connection information for each session. Note that this example requires that the target remote computers have SSH configured to support key based user authentication.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.URI, System.Management.Automation.Runspaces.PSSession You can pipe a string, URI, or session object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet uses the PowerShell remoting infrastructure. To use this cmdlet, the local computer and any remote computers must be configured for PowerShell remoting. For more
You can pipe a string, URI, or session object to this cmdlet.
more information about how to set up PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core New Pssessionconfigurationfile (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-PSSessionConfigurationFile.md
Title: New-PSSessionConfigurationFile
--- # New-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a session configuration.
-## Syntax
+## SYNTAX
``` New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Guid <Guid>]
New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Gui
[-FormatsToProcess <String[]>] [-AssembliesToLoad <String[]>] [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about session configurations and session configuration file
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Creating and using a NoLanguage session
AssembliesToLoad = 'System.Web.Services', 'FSharp.Compiler.CodeDom.dll'
} ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
Before using an edited session configuration file, use the `Test-PSSessionConfigurationFile` cmdlet to verify that the configuration file entries are valid.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core New Pssessionoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-PSSessionOption.md
Title: New-PSSessionOption
--- # New-PSSessionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a PSSession.
-## Syntax
+## SYNTAX
``` New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachineProfile] [-Culture <CultureInfo>]
New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachinePr
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [-IncludePortInSPN] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionOption` cmdlet creates an object that contains advanced options for a user-managed session (**PSSession**). You can use the object as the value of the **SessionOption**
in the session configuration. However, they do not take precedence over maximum
limits set in the session configuration. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Create a default session option
commands in the remote session. The data appears in the **ApplicationArguments**
The final `Invoke-Command` shows how the data might be used.
-## Parameters
+## PARAMETERS
### -ApplicationArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Remoting.PSSessionOption
-## Notes
+## NOTES
If the **SessionOption** parameter is not used in a command to create a **PSSession**, the session options are determined by the property values of the `$PSSessionOption` preference variable, if it
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Enter-PSSession](Enter-PSSession.md)
Microsoft.PowerShell.Core New Pstransportoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/New-PSTransportOption.md
Title: New-PSTransportOption
# New-PSTransportOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a session configuration.
-## Syntax
+## SYNTAX
``` New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int32>] [-MaxSessions <Int32>]
New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int3
[-OutputBufferingMode <OutputBufferingMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSTransportOption` cmdlet creates an object that contains transport options for session configurations. You can use the object as the value of the **TransportOption** parameter of cmdlets
session configurations, see [about_Session_Configurations](About/about_Session_C
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Generate a default transport option
The fourth command uses the `Format-List` cmdlet to display all properties of th
`$s` variable in a list. The output shows that the session has an idle time-out of one hour (360,000 milliseconds).
-## Parameters
+## PARAMETERS
### -IdleTimeoutSec
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.WSManConfigurationOption
-## Notes
+## NOTES
- The properties of a session configuration object vary with the options set for the session configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[New-PSSession](New-PSSession.md)
Microsoft.PowerShell.Core Out Default (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Out-Default.md
Title: Out-Default
--- # Out-Default
-## Synopsis
+## SYNOPSIS
Sends the output to the default formatter and to the default output cmdlet.
-## Syntax
+## SYNTAX
``` Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
This cmdlet isn't intended to be used by the end user. Other cmdlets are recomme
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md) file to control formatting.
-## Examples
+## EXAMPLES
### Example 1
Get-Process | Select-Object -First 5 | Out-Default
No error is thrown when using `Out-Default` but the output isn't changed if it's not explicitly called.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Custom](../Microsoft.PowerShell.Utility/Format-Custom.md)
Microsoft.PowerShell.Core Out Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Out-Host.md
Title: Out-Host
# Out-Host
-## Synopsis
+## SYNOPSIS
Sends output to the command line.
-## Syntax
+## SYNTAX
### All
Sends output to the command line.
Out-Host [-Paging] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
pipeline to the host executing the command. `Out-Host` ignores ANSI escape seque
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without trying to interpret or change them.
-## Examples
+## EXAMPLES
### Example 1: Display output one page at a time
Out-Host -InputObject $io
`Out-Host` uses the **InputObject** parameter to specify the `$io` variable and displays the history.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-Host`.
-## Outputs
+## OUTPUTS
### None `Out-Host` doesn't generate any output. It sends objects to the host for display.
-## Notes
+## NOTES
The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the **Paging** parameter in the PowerShell ISE, the following error is displayed:
variable and use the **InputObject** parameter to pass the data to the cmdlet.
`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Clear-Host](Clear-Host.md)
Microsoft.PowerShell.Core Out Null (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Out-Null.md
Title: Out-Null
--- # Out-Null
-## Synopsis
+## SYNOPSIS
Hides the output instead of sending it down the pipeline or displaying it.
-## Syntax
+## SYNTAX
``` Out-Null [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Null` cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen.
-## Examples
+## EXAMPLES
### Example 1: Delete output
Get-ChildItem | Out-Null
This command gets items in the current location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The cmdlets that contain the **Out** verb (the **Out** cmdlets) do not have parameters for names or file paths. To send data to an **Out** cmdlet, use a pipeline operator (`|`) to send the output
This cmdlet does not generate any output.
- `Out-Null` does not return any output objects. If you pipe the output of `Out-Null` to the Get-Member cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-Default](Out-Default.md)
Microsoft.PowerShell.Core Receive Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Receive-Job.md
Title: Receive-Job
--- # Receive-Job
-## Synopsis
+## SYNOPSIS
Gets the results of the PowerShell background jobs in the current session.
-## Syntax
+## SYNTAX
### Location (Default)
Receive-Job [-Keep] [-NoRecurse] [-Force] [-Wait] [-AutoRemoveJob] [-WriteEvents
[-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-Job` cmdlet gets the results of PowerShell background jobs, such as those started by using the `Start-Job` cmdlet or the **AsJob** parameter of any cmdlet.
custom job type into the session before it runs a `Receive-Job` command, either
For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get results for a particular job
Cannot find drive. A drive with the name 'Z' does not exist.
+ PSComputerName : localhost ```
-## Parameters
+## PARAMETERS
### -AutoRemoveJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe job objects to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the results of the commands in the job.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Receive Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Receive-PSSession.md
Title: Receive-PSSession
# Receive-PSSession
-## Synopsis
+## SYNOPSIS
Gets results of commands in disconnected sessions
-## Syntax
+## SYNTAX
### Session (Default)
Receive-PSSession -Name <String> [-OutTarget <OutTarget>] [-JobName <String>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
Some examples use splatting to reduce the line length and improve readability. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Connect to a PSSession
the command is run in the same session, `Receive-PSSession` returns the results
and reuses the same job object. The command saves the job in the `$j2` variable. The `Receive-Job` cmdlet gets the results of the job in the `$j` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession
You can pipe the instance Ids of sessions this cmdlet.
You can pipe session names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job or PSObject
This cmdlet returns the results of commands that ran in the disconnected session
value or default value of the **OutTarget** parameter is Job, `Receive-PSSession` returns a job object. Otherwise, it returns objects that represent that command results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
When you disconnect a **PSSession**, the session state is Disconnected and the a
- For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Register Argumentcompleter (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md
Title: Register-ArgumentCompleter
# Register-ArgumentCompleter
-## Synopsis
+## SYNOPSIS
Registers a custom argument completer.
-## Syntax
+## SYNTAX
### NativeSet
Register-ArgumentCompleter [-CommandName <String[]>] -ParameterName <String>
-ScriptBlock <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ArgumentCompleter` cmdlet registers a custom argument completer. An argument completer allows you to provide dynamic tab completion, at run time for any command that you specify.
-## Examples
+## EXAMPLES
### Example 1: Register a custom argument completer
The results are piped to the `ForEach-Object` cmdlet which use the **new** stati
[System.Management.Automation.CompletionResult](/dotnet/api/system.management.automation.completionresult) class to create a new **CompletionResult** object for each value.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet returns no output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Core Register Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md
Title: Register-PSSessionConfiguration
--- # Register-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Creates and registers a new session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSSessionConfiguration [-ProcessorArchitecture <String>] [-Name] <Strin
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration class and by using a script that runs in the session. Beginning in
For information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md). For information about session configuration files, see [about_Session_Configuration_Files](About/about_Session_Configuration_Files.md).
-## Examples
+## EXAMPLES
### Example 1: Register a NewShell session configuration
The script contains a single command that uses dot sourcing to run the user's
For more information about profiles, see [about_Profiles](./About/about_Profiles.md). For more information about dot sourcing, see [about_Scopes](./About/about_Scopes.md).
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigContainerElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Remove Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Remove-Job.md
Title: Remove-Job
# Remove-Job
-## Synopsis
+## SYNOPSIS
Deletes a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Remove-Job [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Job [-Command <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by the `Start-Job` cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
job. Or, use `Remove-Job` with the **Force** parameter to delete a running job.
Jobs remain in the global job cache until you delete the background job or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Delete a job by using its name
asterisk (`*`) to specify that all the object's properties are displayed in a li
`Remove-Job` uses the **InstanceId** parameter to specify the job to delete.
-## Parameters
+## PARAMETERS
### -Command
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
+## INPUTS
### System.Management.Automation.Job You can send a job object down the pipeline to `Remove-Job`.
-## Outputs
+## OUTPUTS
### None `Remove-Job` doesn't generate any output.
-## Notes
+## NOTES
A PowerShell job creates a new process. When the job completes, the process exits. When `Remove-Job` is run, the job's state is removed. If a job stops before completion and its process hasn't exited, the process is forcibly terminated.
-## Related links
+## RELATED LINKS
[about_Jobs](./About/about_Jobs.md)
Microsoft.PowerShell.Core Remove Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Remove-Module.md
Title: Remove-Module
--- # Remove-Module
-## Synopsis
+## SYNOPSIS
Removes modules from the current session.
-## Syntax
+## SYNTAX
### name
Remove-Module [-FullyQualifiedName] <ModuleSpecification[]> [-Force] [-WhatIf] [
Remove-Module [-ModuleInfo] <PSModuleInfo[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Module` cmdlet removes the members of a module, such as cmdlets and functions, from the current session.
removed, but the assembly is not unloaded.
This cmdlet does not uninstall the module or delete it from the computer. It affects only the current PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove a module
Remove-Module -ModuleInfo $a
This command uses the **ModuleInfo** parameter to remove the BitsTransfer module.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo You can pipe module names and module objects to `Remove-Module`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
When removing a module, there is an event on the module that will execute. This event allows a module to react to being removed and perform some cleanup such as freeing up resources. Example:
For full consistency, it might be also useful to react to the closing of the Pow
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Action $OnRemoveScript
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Remove Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Remove-PSSession.md
Title: Remove-PSSession
--- # Remove-PSSession
-## Synopsis
+## SYNOPSIS
Closes one or more PowerShell sessions (PSSessions).
-## Syntax
+## SYNTAX
### Id (Default)
Remove-PSSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PSSession [-ComputerName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSession` cmdlet closes PowerShell sessions (**PSSessions**) in the current session. It stops any commands that are running in the **PSSessions**, ends the **PSSession**, and releases the
session.
If you have saved the **PSSession** in a variable, the session object remains in the variable, but the state of the **PSSession** is Closed.
-## Examples
+## EXAMPLES
### Example 1: Remove sessions by using IDs
Function EndPSS { Get-PSSession | Remove-PSSession }
This function deletes all of the **PSSessions** in the current session. After you add this function to your PowerShell profile, to delete all sessions, type `EndPSS`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
- The **Id** parameter is mandatory. To delete all the **PSSessions** in the current session, type `Get-PSSession | Remove-PSSession`.
This cmdlet does not return any objects.
- **PSSessions** are specific to the current session. When you end a session, the **PSSessions** that you created in that session are forcibly closed.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Save Help (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Save-Help.md
Title: Save-Help
--- # Save-Help
-## Synopsis
+## SYNOPSIS
Downloads and saves the newest help files to a file system directory.
-## Syntax
+## SYNTAX
### Path (Default)
Save-Help -LiteralPath <String[]> [[-Module] <PSModuleInfo[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Help` cmdlet downloads the newest help files for PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not
group on the computer to download the help files for these modules.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Save the help for the DhcpServer module
The command uses the `Save-Help` cmdlet to download and save the help files to t
The **Force** parameter is required when you have to run a `Save-Help` command more than one time each day.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSModuleInfo You can pipe a module object from the `Get-Module` cmdlet to the **Module** parameter of `Save-Help`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To save help for modules in the $pshome\Modules folder, start PowerShell by using the Run as administrator option. Only members of the Administrators group on the computer can download help
This cmdlet does not generate any output.
- The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Help](Get-Help.md)
Microsoft.PowerShell.Core Set Psdebug (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Set-PSDebug.md
Title: Set-PSDebug
# Set-PSDebug
-## Synopsis
+## SYNOPSIS
Turns script debugging features on and off, sets the trace level, and toggles strict mode.
-## Syntax
+## SYNTAX
### on
Set-PSDebug [-Trace <Int32>] [-Step] [-Strict] [<CommonParameters>]
Set-PSDebug [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSDebug` cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. By default, the PowerShell debug features are off.
When the **Trace** parameter has a value of `1`, each line of script is traced a
parameter has a value of `2`, variable assignments, function calls, and script calls are also traced. If the **Step** parameter is specified, you're prompted before each line of the script runs.
-## Examples
+## EXAMPLES
### Example 1: Set the trace level
Set-PSDebug -Off; foreach ($i in 1..3) {$i}
3 ```
-## Parameters
+## PARAMETERS
### -Off
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
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Debuggers](./About/about_Debuggers.md)
Microsoft.PowerShell.Core Set Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md
Title: Set-PSSessionConfiguration
--- # Set-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Changes the properties of a registered session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Set-PSSessionConfiguration [-Name] <String> [-RunAsCredential <PSCredential>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
to the local computer. For more information about session configurations, see [a
To see the properties of a session configuration, use the `Get-PSSessionConfiguration` cmdlet or the WSMan Provider. For more information about the WSMan Provider, type `Get-Help WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Create and change a session configuration
PSVersion 2.0
startupscript c:\ps-test\Maintenance.ps1 ```
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigLeafElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
properties that are introduced in PowerShell 3.0, such as **OutputBufferingMode*
PowerShell 2.0 commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Set Strictmode (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Set-StrictMode.md
Title: Set-StrictMode
--- # Set-StrictMode
-## Synopsis
+## SYNOPSIS
Establishes and enforces coding rules in expressions, scripts, and script blocks.
-## Syntax
+## SYNTAX
### Version (Default)
Set-StrictMode -Version <Version> [<CommonParameters>]
Set-StrictMode [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-StrictMode` cmdlet configures strict mode for the current scope and all child scopes, and turns it on and off. When strict mode is on, PowerShell generates a terminating error when the
When `Set-StrictMode` is off, PowerShell has the following behaviors:
- Results of improper function syntax vary with the error conditions - Attempting to retrieve a value using an invalid index in an array returns `$Null`
-## Examples
+## EXAMPLES
### Example 1: Turn on strict mode as version 1.0
InvalidArgument: Cannot convert value "abc" to type "System.Int32". Error: "Inpu
With strict mode set to version 3 or higher, invalid or out of bounds indexes result in errors.
-## Parameters
+## PARAMETERS
### -Off
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
While `Set-StrictMode` **Version** parameter will accept values greater than `3.0`, currently there are no additional rules defined for anything higher than `3.0`.
are no additional rules defined for anything higher than `3.0`.
`Set-StrictMode` is effective only in the scope in which it is set and in its child scopes. For more information about scopes in PowerShell, see [about_Scopes](about/about_Scopes.md).
-## Related links
+## RELATED LINKS
[Set-PSDebug](Set-PSDebug.md)
Microsoft.PowerShell.Core Start Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Start-Job.md
Title: Start-Job
# Start-Job
-## Synopsis
+## SYNOPSIS
Starts a PowerShell background job.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Start-Job [-Name <String>] [-Credential <PSCredential>] -LiteralPath <String>
[-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Job` cmdlet starts a PowerShell background job on the local computer.
directory of the caller that started the job.
> > The substitute in that scenario is `Start-ThreadJob` from the module **[ThreadJob](https://www.powershellgallery.com/packages/ThreadJob)**.
-## Examples
+## EXAMPLES
### Example 1: Start a background job
Major Minor Build Revision
5 1 14393 3383 ```
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### System.String You can use the pipeline to send an object with the **Name** property to the **Name** parameter. For example, you can pipeline a **FileInfo** object from `Get-ChildItem` to `Start-Job`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob `Start-Job` returns a **PSRemotingJob** object that represents the job that it started.
-## Notes
+## NOTES
To run in the background, `Start-Job` runs in its own session in the current session. When you use the `Invoke-Command` cmdlet to run a `Start-Job` command in a session on a remote computer, `Start-Job` runs in a session in the remote session.
-## Related links
+## RELATED LINKS
[about_Arrays](./about/about_arrays.md)
Microsoft.PowerShell.Core Stop Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Stop-Job.md
Title: Stop-Job
--- # Stop-Job
-## Synopsis
+## SYNOPSIS
Stops a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Stop-Job [-PassThru] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters
Stop-Job [-PassThru] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Job` cmdlet stops PowerShell background jobs that are in progress. You can use this cmdlet to stop all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing
either by using the `Import-Module` cmdlet or by using or getting a cmdlet in th
information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Stop a job on a remote computer by using Invoke-Command
display confirms that the state of the job is Stopped.
For more information about remote background jobs, see [about_Remote_Jobs](About/about_Remote_Jobs.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSRemotingJob This cmdlet returns a job object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Test Modulemanifest (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Test-ModuleManifest.md
Title: Test-ModuleManifest
--- # Test-ModuleManifest
-## Synopsis
+## SYNOPSIS
Verifies that a module manifest file accurately describes the contents of a module.
-## Syntax
+## SYNTAX
``` Test-ModuleManifest [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ModuleManifest` cmdlet verifies that the files that are listed in the module manifest (`.psd1`) file are actually in the specified paths.
module.
that `Get-Module` returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
-## Examples
+## EXAMPLES
### Example 1: Test a manifest
previous command generates no error, the command displays `$True`, and `$False`
You can use this function in conditional statements, such as those that might precede an `Import-Module` command or a command that uses the module.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe the path to a module manifest to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo This cmdlet returns a **PSModuleInfo** object that represents the module. It returns this object even if the manifest has errors.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core Test Pssessionconfigurationfile (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md
Title: Test-PSSessionConfigurationFile
--- # Test-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Verifies the keys and values in a session configuration file.
-## Syntax
+## SYNTAX
``` Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration files, see [about_Session_Configuration_Files](About/about_Session
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Test a session configuration file
the **ConfigFilePath** property value. Then it uses the `Test-PSSessionConfigura
test the file in the **ConfigFilePath** value. The **Verbose** parameter returns the file error when the file fails the test.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe a session configuration file path to `Test-PSSessionConfigurationFile`.
-## Outputs
+## OUTPUTS
### System.Boolean
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Unregister Pssessionconfiguration (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Unregister-PSSessionConfiguration.md
Title: Unregister-PSSessionConfiguration
--- # Unregister-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Deletes registered session configurations from the computer.
-## Syntax
+## SYNTAX
``` Unregister-PSSessionConfiguration [-Name] <String> [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If you accidentally delete the default **Microsoft.PowerShell** or **Microsoft.P
session configurations, use the `Enable-PSRemoting` cmdlet to restore them. For more information, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Delete a session configuration
Finally, the `New-PSSession` cmdlet tries to create a session that uses the **Ma
configuration. This time, the session fails because the **MaintenanceShell** configuration was deleted when the WinRM service restarted.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration You can pipe a session configuration object from `Get-PSSessionConfiguration` to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Update Help (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Update-Help.md
Title: Update-Help
# Update-Help
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest help files on your computer.
-## Syntax
+## SYNTAX
### Path (Default)
Update-Help [[-Module] <String[]>] [-FullyQualifiedModule <ModuleSpecification[]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Help` cmdlet downloads the newest help files for PowerShell modules and installs them on your computer. You need not restart PowerShell to make the change effective. You can use the
The `Update-Help` cmdlet was introduced in Windows PowerShell 3.0.
> Core modules, start PowerShell by using the **Run as administrator** option. > For example: `Start-Process pwsh.exe -Verb RunAs`.
-## Examples
+## EXAMPLES
### Example 1: Update help files for all modules
ADDSDeployment en-US
ADFS en-US 3.0.0.0 ```
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.IO.DirectoryInfo
You can pipe a directory path to `Update-Help`.
You can pipe a module object from the `Get-Module` cmdlet to `Update-Help`.
-## Outputs
+## OUTPUTS
### None `Update-Help` doesn't generate any output.
-## Notes
+## NOTES
To update help for the core PowerShell modules, that contain the commands that are installed with PowerShell, or any module in the `$PSHOME\Modules` directory, start PowerShell with the option to
that you author, see [Supporting Updatable Help](/powershell/scripting/developer
The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
Microsoft.PowerShell.Core Wait Job (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Wait-Job.md
Title: Wait-Job
--- # Wait-Job
-## Synopsis
+## SYNOPSIS
Waits until one or all of the PowerShell jobs running in the session are in a terminating state.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-State] <JobState> [<CommonParamete
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Job` cmdlet waits for a job to be in a terminating state before continuing execution. The terminating states are:
type, import the module that supports the custom job type into the session befor
module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Wait for all jobs
Wait-Job -Id 1
This command waits for the job with an ID value of 1.
-## Parameters
+## PARAMETERS
### -Any
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob This cmdlet returns job objects that represent the jobs in a terminating state. If the wait ends because the value of the **Timeout** parameter is exceeded, `Wait-Job` does not return any objects.
-## Notes
+## NOTES
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the following states:
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the fo
- Disconnected To direct `Wait-Job` to continue to wait for Suspended and Disconnected jobs, use the **Force** parameter.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Where Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/Where-Object.md
Title: Where-Object
--- # Where-Object
-## Synopsis
+## SYNOPSIS
Selects objects from a collection based on their property values.
-## Syntax
+## SYNTAX
### EqualSet (Default)
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>]
Where-Object [-InputObject <PSObject>] [-Property] <String> -Not [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Where-Object` cmdlet selects objects that have particular property values from the collection of objects that are passed to it. For example, you can use the `Where-Object` cmdlet to select files
The previous example is functionally equivalent to:
For more information about how booleans are evaluated, see [about_Booleans](about/about_Booleans.md).
-## Examples
+## EXAMPLES
### Example 1: Get stopped services
valid only in script blocks. You cannot use them in the comparison statement for
- For more information about the Updatable Help feature, see [about_Updatable_Help](./About/about_Updatable_Help.md).
-## Parameters
+## PARAMETERS
### -CContains
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns selected items from the input object set.
-## Notes
+## NOTES
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Diagnostics Get Counter (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Diagnostics/Get-Counter.md
Title: Get-Counter
# Get-Counter
-## Synopsis
+## SYNOPSIS
Gets performance counter data from local and remote computers.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Get-Counter [[-Counter] <String[]>] [-SampleInterval <Int32>] [-MaxSamples <Int6
Get-Counter [-ListSet] <String[]> [-ComputerName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
> performance objects, counters, and instances. The names will be different on a system that uses > another language. Use the `Get-Counter -ListSet` command to see the localized names.
-## Examples
+## EXAMPLES
### Example 1: Get the counter set list
objects down the pipeline. `Sort-Object` uses the **Property** parameter to sort
the columns for the output. The **AutoSize** parameter adjusts the column widths to minimize truncation.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String[] `Get-Counter` accepts pipeline input for counter paths and counter set names.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample
that are output are as follows:
**CounterSamples** property: **Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample**
-## Notes
+## NOTES
If no parameters are specified, `Get-Counter` gets one sample for each specified performance counter. Use the **MaxSamples** and **Continuous** parameters to get more samples.
command. To set different values for different counters, enter separate `Get-Cou
In PowerShell 7, when using the **ListSet** parameter, `Get-Counter` can't retrieve the **Description** property of the counter set. The **Description** is set to `$null`.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Diagnostics Get Winevent (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md
Title: Get-WinEvent
# Get-WinEvent
-## Synopsis
+## SYNOPSIS
Gets events from event logs and event tracing log files on local and remote computers.
-## Syntax
+## SYNTAX
### GetLogSet (Default)
Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede
[-FilterXml] <XmlDocument> [-Oldest] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
table queries.
If you're not running PowerShell as an Administrator, you might see error messages that you cannot retrieve information about a log.
-## Examples
+## EXAMPLES
### Example 1: Get all the logs from a local computer
Get-WinEvent -FilterHashtable $filter
In this example, `Get-WinEvent` gets all events from the **Application** log for the last two days except those that have a **Level** of 4 (Information).
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String, System.Xml.XmlDocument, System.Collections.Hashtable You can pipeline a **LogName** (string), a **FilterXML** query, or a **FilterHashtable** query to `Get-WinEvent`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Eventing.Reader.EventLogConfiguration, System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics.Eventing.Reader.ProviderMetadata
With the **ListProvider** parameter, `Get-WinEvent` returns
With all other parameters, `Get-WinEvent` returns **System.Diagnostics.Eventing.Reader.EventLogRecord** objects.
-## Notes
+## NOTES
`Get-WinEvent` is designed to replace the `Get-EventLog` cmdlet on computers running Windows Vista and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
is retained for backward compatibility.
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md)
Microsoft.PowerShell.Diagnostics New Winevent (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Diagnostics/New-WinEvent.md
Title: New-WinEvent
--- # New-WinEvent
-## Synopsis
+## SYNOPSIS
Creates a new Windows event for the specified event provider.
-## Syntax
+## SYNTAX
``` New-WinEvent [-ProviderName] <String> [-Id] <Int32> [-Version <Byte>] [[-Payload] <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `New-WinEvent` cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from PowerShell.
-## Examples
+## EXAMPLES
### Example 1
New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Wo
This command uses the `New-WinEvent` cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does to generate any output.
-## Notes
+## NOTES
- After the provider writes the event to an eventlog, you can use the `Get-WinEvent` cmdlet to get the event from the event log.
-## Related links
+## RELATED LINKS
[Get-WinEvent](Get-WinEvent.md)
Microsoft.PowerShell.Host Start Transcript (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Host/Start-Transcript.md
Title: Start-Transcript
--- # Start-Transcript
-## Synopsis
+## SYNOPSIS
Creates a record of all or part of a PowerShell session to a text file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Start-Transcript [[-OutputDirectory] <String>] [-Append] [-Force] [-NoClobber]
[-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transcript` cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the
When using the **Append** parameter, if the target file doesn't have a Byte Orde
`Start-Transcript` defaults to `ASCII` encoding in the target file. This behavior can result in improper encoding of mulitbyte characters in the transcript.
-## Examples
+## EXAMPLES
### Example 1: Start a transcript file with default settings
This command starts a transcript in the `Transcript0.txt` file in `C:\transcript
**NoClobber** parameter is used, the command prevents any existing files from being overwritten. If the `Transcript0.txt` file already exists, the command fails.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a confirmation message and the path to the output file.
-## Notes
+## NOTES
To stop a transcript, use the `Stop-Transcript` cmdlet. To record an entire session, add the `Start-Transcript` command to your profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Stop-Transcript](Stop-Transcript.md)
Microsoft.PowerShell.Host Stop Transcript (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Host/Stop-Transcript.md
Title: Stop-Transcript
--- # Stop-Transcript
-## Synopsis
+## SYNOPSIS
Stops a transcript.
-## Syntax
+## SYNTAX
``` Stop-Transcript [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Transcript` cmdlet stops a transcript that was started by the `Start-Transcript` cmdlet. Alternatively, you can end a session to stop a transcript.
-## Examples
+## EXAMPLES
### Example 1: Stop all transcripts
Stop-Transcript
This command stops all transcripts.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a status message and the path to the output file.
-## Notes
+## NOTES
* If a transcript has not been started, the command fails. *
-## Related links
+## RELATED LINKS
[Start-Transcript](Start-Transcript.md)
Microsoft.PowerShell.Management Add Content (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Add-Content.md
Title: Add-Content
--- # Add-Content
-## Synopsis
+## SYNOPSIS
Adds content to the specified items, such as adding words to a file.
-## Syntax
+## SYNTAX
### Path (Default)
Add-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Content` cmdlet appends content to a specified item or file. You can specify the content by typing the content in the command or by specifying an object that contains the content. If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Add a string to all text files with an exception
directory.
Add-Content -Path C:\Temp\* -Filter *.txt -Value "Done" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object, System.Management.Automation.PSCredential You can pipe values, paths, or credentials to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Add-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- When you pipe an object to `Add-Content`, the object is converted to a string before it is added to the item. The object type determines the string format, but the format might be different than
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Clear Content (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Clear-Content.md
Title: Clear-Content
--- # Clear-Content
-## Synopsis
+## SYNOPSIS
Deletes the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Content -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Content` cmdlet deletes the contents of an item, such as deleting the text from a file, but it does not delete the item. As a result, the item exists, but it is empty. The `Clear-Content` is similar to `Clear-Item`, but it works on items with contents, instead of items with values.
-## Examples
+## EXAMPLES
### Example 1: Delete all content from a directory
PS C:\>Get-Content C:\Test\Copy-Script.ps1 -Stream Zone.Identifier
PS C:\> ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-Content`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
You can use `Clear-Content` with the PowerShell FileSystem provider and with other providers that manipulate content. To clear items that are not considered to be content, such as items managed by
The `Clear-Content` cmdlet is designed to work with the data exposed by any prov
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Add-Content](Add-Content.md)
Microsoft.PowerShell.Management Clear Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Clear-Item.md
Title: Clear-Item
--- # Clear-Item
-## Synopsis
+## SYNOPSIS
Clears the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of a variable
You can use the **Include** and **Exclude** parameters to identify particular re
Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the **Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you can use
This cmdlet does not generate any output.
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem provider does not support this cmdlet. To clear files, use the `Clear-Content`.
-## Related links
+## RELATED LINKS
[Copy-Item](Copy-Item.md)
Microsoft.PowerShell.Management Clear Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Clear-ItemProperty.md
Title: Clear-ItemProperty
--- # Clear-ItemProperty
-## Synopsis
+## SYNOPSIS
Clears the value of a property but does not delete the property.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-ItemProperty` cmdlet clears the value of a property, but it does not delete the property. You can use this cmdlet to delete the data from a registry value.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of registry key
This command clears the data in the "Options" registry value in the "MyApp" subk
Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, `Clear-ItemProperty` generates a **PSCustomObject** object that represents the cleared item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero.
that represents the cleared item property. Otherwise, this cmdlet does not gener
the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Copy-ItemProperty](Copy-ItemProperty.md)
Microsoft.PowerShell.Management Clear Recyclebin (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Title: Clear-RecycleBin
# Clear-RecycleBin
-## Synopsis
+## SYNOPSIS
Clears the contents of a recycle bin.
-## Syntax
+## SYNTAX
### All
Clears the contents of a recycle bin.
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
using Windows **Empty Recycle Bin**.
This cmdlet was readded in PowerShell 7.
-## Examples
+## EXAMPLES
### 1: Clear all recycle bins
clear all recycle bins on the local computer.
An alternative is to replace `-Force` with `-Confirm:$false`.
-## Parameters
+## PARAMETERS
### -DriveLetter
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
+## INPUTS
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Convert Path (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Convert-Path.md
Title: Convert-Path
--- # Convert-Path
-## Synopsis
+## SYNOPSIS
Converts a path from a PowerShell path to a PowerShell provider path.
-## Syntax
+## SYNTAX
### Path (Default)
Convert-Path [-Path] <String[]> [<CommonParameters>]
Convert-Path -LiteralPath <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Convert-Path` cmdlet converts a path from a PowerShell path to a PowerShell provider path.
-## Examples
+## EXAMPLES
### Example 1: Convert the working directory to a standard file system path
PS C:\> Convert-Path ~
C:\Users\User01 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the converted path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use in programs and
available in your session, type `Get-PSProvider`. For more information, see
`Convert-Path` only converts existing paths. It cannot be used to convert a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Join-Path](Join-Path.md)
Microsoft.PowerShell.Management Copy Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Copy-Item.md
Title: Copy-Item
# Copy-Item
-## Synopsis
+## SYNOPSIS
Copies an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-Item -LiteralPath <String[]> [[-Destination] <String>] [-Container] [-Force
[-WhatIf] [-Confirm] [-FromSession <PSSession>] [-ToSession <PSSession>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-Item` cmdlet copies an item from one location to another location in the same namespace. For instance, it can copy a file to a folder, but it can't copy a file to a certificate drive.
This cmdlet can copy and rename items in the same command. To rename an item, en
the value of the **Destination** parameter. To rename an item and not copy it, use the `Rename-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Copy a file to the specified directory
The `Copy-Item` cmdlet has the **Container** parameter set to `$false`. This cau
the source folder to be copied but does not preserve the folder structure. Notice that files with the same name are overwritten in the destination folder.
-## Parameters
+## PARAMETERS
### -Container
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the copied item When you use the **PassThru** parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management Copy Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Copy-ItemProperty.md
Title: Copy-ItemProperty
--- # Copy-ItemProperty
-## Synopsis
+## SYNOPSIS
Copies a property and value from a specified location to another location.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key.
-## Examples
+## EXAMPLES
### Example 1: Copy a property from a registry key to another registry key
This command copies the property named "MyProperty" from the "MyApplication" reg
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **Passthru** parameter, this cmdlet generates a **PsCustomObject** representing the copied item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Debug Process (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Debug-Process.md
Title: Debug-Process
--- # Debug-Process
-## Synopsis
+## SYNOPSIS
Debugs one or more processes running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Debug-Process [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Process -InputObject <Process[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Process` cmdlet attaches a debugger to one or more running processes on a local computer. You can specify the processes by their process name or process ID (PID), or you can pipe process
objects to this cmdlet.
This cmdlet attaches the debugger that is currently registered for the process. Before using this cmdlet, verify that a debugger is downloaded and correctly configured.
-## Examples
+## EXAMPLES
### Example 1: Attach a debugger to a process on the computer
computer. It saves the resulting process object in the variable named `$P`.
The second command uses the **InputObject** parameter of the `Debug-Process` cmdlet to submit the process object in the `$P` variable.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32, System.Diagnostics.Process, System.String You can pipe a process ID (Int32), a process object (System.Diagnostics.Process), or a process name (String) to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see [AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Childitem (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-ChildItem.md
Title: Get-ChildItem
--- # Get-ChildItem
-## Synopsis
+## SYNOPSIS
Gets the items and child items in one or more specified locations.
-## Syntax
+## SYNTAX
### Items (Default)
Get-ChildItem [[-Filter] <string>] -LiteralPath <string[]> [-Include <string[]>]
[-ReadOnly] [-System] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the **Recurse**
of levels to recurse.
Locations are exposed to `Get-ChildItem` by PowerShell providers. A location can be a file system directory, registry hive, or a certificate store. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Get child items from a file system directory
Mode LastWriteTime Length Name
l---- 12/16/2021 9:29 AM tmp -> C:\Users\user1\AppData\Local\Temp ```
-## Parameters
+## PARAMETERS
### -Attributes
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
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ChildItem`.
-## Outputs
+## OUTPUTS
### System.Object
path.
If you use the **Name** parameter, `Get-ChildItem` returns the object names as strings.
-## Notes
+## NOTES
- `Get-ChildItem` can be run using any of the built-in aliases, `ls`, `dir`, and `gci`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
If you use the **Name** parameter, `Get-ChildItem` returns the object names as s
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md)
Microsoft.PowerShell.Management Get Clipboard (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Clipboard.md
Title: Get-Clipboard
--- # Get-Clipboard
-## Synopsis
+## SYNOPSIS
Gets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Get-Clipboard [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is not supported on macOS.**
returned as an array of strings similar to `Get-Content`.
> [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Get the content of the clipboard and display it to the command-line
Get-Clipboard
hello ```
-## Parameters
+## PARAMETERS
### -Raw
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-Clipboard](Set-Clipboard.md)
Microsoft.PowerShell.Management Get Computerinfo (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-ComputerInfo.md
Title: Get-ComputerInfo
--- # Get-ComputerInfo
-## Synopsis
+## SYNOPSIS
Gets a consolidated object of system and operating system properties.
-## Syntax
+## SYNTAX
``` Get-ComputerInfo [[-Property] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-ComputerInfo` cmdlet gets a consolidated object of system and operating system properties. This cmdlet was introduced in Windows PowerShell 5.1.
-## Examples
+## EXAMPLES
### Example 1: Get all computer properties
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0 ```
-## Parameters
+## PARAMETERS
### -Property
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Management.ComputerInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Content (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Content.md
Title: Get-Content
--- # Get-Content
-## Synopsis
+## SYNOPSIS
Gets the content of the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Content [-ReadCount <Int64>] [-TotalCount <Int64>] [-Tail <Int32>] -LiteralP
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Content` cmdlet gets the content of the item at the location specified by the path, such as the text in a file or the content of a function. For files, the content is read one line at a time
and returns a collection of objects, each of which represents a line of content.
Beginning in PowerShell 3.0, `Get-Content` can also get a specified number of lines from the beginning or end of an item.
-## Examples
+## EXAMPLES
### Example 1: Get the content of a text file
The **Raw** parameter ensures that the bytes are returned as a `[System.Byte[]]`
parameter was absent, the return value is a stream of bytes, which is interpreted by PowerShell as `[System.Object[]]`.
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64, System.String[], System.Management.Automation.PSCredential You can pipe the read count, total count, paths, or credentials to `Get-Content`.
-## Outputs
+## OUTPUTS
### System.Byte, System.String `Get-Content` returns strings or bytes. The output type depends upon the type of content that you specify as input.
-## Notes
+## NOTES
The `Get-Content` cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Management Get Hotfix (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-HotFix.md
Title: Get-HotFix
# Get-HotFix
-## Synopsis
+## SYNOPSIS
Gets the hotfixes that are installed on local or remote computers.
-## Syntax
+## SYNTAX
### Default (Default)
Get-HotFix [[-Id] <String[]>] [-ComputerName <String[]>] [-Credential <PSCredent
[<CommonParameters>] ```
-### Description
+### DESCRIPTION
``` Get-HotFix [-Description <String[]>] [-ComputerName <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-Hotfix` cmdlet gets hotfixes, or updates, that are installed on the loc
specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.
-## Examples
+## EXAMPLES
### Example 1: Get all hotfixes on the local computer
This example gets the most recent hotfix installed on a computer.
objects by ascending order and uses the **Property** parameter to evaluate each **InstalledOn** date. The array notation `[-1]` selects the most recent installed hotfix.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### String You can pipe one or more computer names to Get-HotFix.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\CIMV2\Win32_QuickFixEngineering `Get-HotFix` returns objects that represent the hotfixes on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Installer (MSI) or the [Windows Update](https://update.microsoft.com) site are n
The `Get-HotFix` output might vary on different operating systems.
-## Related links
+## RELATED LINKS
[about_Arrays](../Microsoft.PowerShell.Core/About/about_Arrays.md)
Microsoft.PowerShell.Management Get Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Item.md
Title: Get-Item
--- # Get-Item
-## Synopsis
+## SYNOPSIS
Gets the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Excl
[-Force] [-Credential <PSCredential>] [-Stream <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Item` cmdlet gets the item at the specified location. It doesn't get the contents of the item at the location unless you use a wildcard character (`*`) to request all the contents of the
item.
This cmdlet is used by PowerShell providers to navigate through different types of data stores.
-## Examples
+## EXAMPLES
### Example 1: Get the current directory
The new properties that are now part of the output are:
> [!NOTE] > This feature was moved from experimental to mainstream in PowerShell 7.1.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the objects that it gets. The type is determined by the type of objects in the path.
-## Notes
+## NOTES
This cmdlet does not have a **Recurse** parameter, because it gets only an item, not its contents. To get the contents of an item recursively, use `Get-ChildItem`.
This cmdlet is designed to work with the data exposed by any provider. To list t
available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Get Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-ItemProperty.md
Title: Get-ItemProperty
--- # Get-ItemProperty
-## Synopsis
+## SYNOPSIS
Gets the properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemProperty -LiteralPath <String[]> [[-Name] <String[]>] [-Filter <String>]
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemProperty` cmdlet gets the properties of the specified items. For example, you can use this cmdlet to get the value of the LastAccessTime property of a file object. You can also use this cmdlet to view registry entries and their values.
-## Examples
+## EXAMPLES
### Example 1: Get information about a specific directory
CTPVersion : 5
PSCompatibleVersion : 1.0,2.0 ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ItemProperty`.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime `Get-ItemProperty` returns an object for each item property that it gets. The object type depends on the object that is retrieved. For example, in a file system drive, it might return a file or folder.
-## Notes
+## NOTES
The `Get-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Get Itempropertyvalue (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md
Title: Get-ItemPropertyValue
--- # Get-ItemPropertyValue
-## Synopsis
+## SYNOPSIS
Gets the value for one or more properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <Strin
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemPropertyValue` gets the current value for a property that you specify when you use the **Name** parameter, located in a path that you specify with either the **Path** or **LiteralPath** parameters.
-## Examples
+## EXAMPLES
### Example 1: Get the value of the ProductID property
Target :
LinkType : ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime
This cmdlet returns an object for each item property value that it gets.
The object type depends on the property value that is retrieved. For example, in a file system drive, the cmdlet might return a file or folder.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, run the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-ItemProperty](Get-ItemProperty.md)
Microsoft.PowerShell.Management Get Location (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Location.md
Title: Get-Location
--- # Get-Location
-## Synopsis
+## SYNOPSIS
Gets information about the current working location or a location stack.
-## Syntax
+## SYNTAX
### Location (Default)
Get-Location [-PSProvider <String[]>] [-PSDrive <String[]>] [<CommonParameters>]
Get-Location [-Stack] [-StackName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Location` cmdlet gets an object that represents the current directory, much like the print working directory (pwd) command.
scripts, such as in a function that displays the current directory in the PowerS
You can also use this cmdlet to display the locations in a location stack. For more information, see the Notes and the descriptions of the **Stack** and **StackName** parameters.
-## Examples
+## EXAMPLES
### Example 1: Display your current drive location
change the prompt in your console by creating a new function named `prompt`.
To see the current prompt function, type the following command: `Get-Content Function:\prompt`
-## Parameters
+## PARAMETERS
### -PSDrive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo or System.Management.Automation.PathInfoStack If you use the **Stack** or **StackName** parameters, this cmdlet returns a **PathInfoStack** object. Otherwise, it returns a **PathInfo** object.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
cmdlet to display the locations in the unnamed stack. To make the unnamed stack
use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Pop-Location](Pop-Location.md)
Microsoft.PowerShell.Management Get Psdrive (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-PSDrive.md
Title: Get-PSDrive
--- # Get-PSDrive
-## Synopsis
+## SYNOPSIS
Gets drives in the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSDrive [[-Name] <String[]>] [-Scope <String>] [-PSProvider <String[]>] [<Co
Get-PSDrive [-LiteralName] <String[]> [-Scope <String>] [-PSProvider <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSDrive` cmdlet gets the drives in the current session. You can get a particular drive or all drives in the session.
You do not need to restart Windows PowerShell. Similarly, when an external drive
from the computer, Windows PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Get drives in the current session
The last command uses the `Get-CimInstance` cmdlet to display the instances of t
**Win32_NetworkConnection** class. Like **net use**, it returns only the persistent G: drive created by `New-PSDrive`.
-## Parameters
+## PARAMETERS
### -LiteralName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo This cmdlet returns objects that represent the drives in the session.
-## Notes
+## NOTES
* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the `Get-PSProvider` cmdlet. For more information, see
This cmdlet returns objects that represent the drives in the session.
sessions that are started without explicit credentials or with the credentials of the current user.
-## Related links
+## RELATED LINKS
[New-PSDrive](New-PSDrive.md)
Microsoft.PowerShell.Management Get Psprovider (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-PSProvider.md
Title: Get-PSProvider
--- # Get-PSProvider
-## Synopsis
+## SYNOPSIS
Gets information about the specified PowerShell provider.
-## Syntax
+## SYNTAX
``` Get-PSProvider [[-PSProvider] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSProvider` cmdlet gets the PowerShell providers in the current session. You can get a particular drive or all drives in the session.
PowerShell providers let you access a variety of data stores as though they were
For information about PowerShell providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Display a list of all available providers
This example shows that the tilde symbol (~) represents the value of the **Home*
FileSystem provider. The **Home** property value is optional, but for the **FileSystem** provider, it is defined as `$env:homedrive\$env:homepath` or `$home`.
-## Parameters
+## PARAMETERS
### -PSProvider
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### String[] You can pipe one or more provider name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ProviderInfo This cmdlet returns objects that represent the PowerShell providers in the session.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Process (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Process.md
Title: Get-Process
--- # Get-Process
-## Synopsis
+## SYNOPSIS
Gets the processes that are running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Get-Process -InputObject <Process[]> [-Module] [-FileVersionInfo] [<CommonParame
Get-Process -InputObject <Process[]> -IncludeUserName [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Process` cmdlet gets the processes on a local or remote computer.
supports methods that let you start and stop the process. You can also use the p
`Get-Process` cmdlet to get file version information for the program that runs in the process and to get the modules that the process loaded.
-## Examples
+## EXAMPLES
### Example 1: Get a list of all active processes on the local computer
The **mainWindowTitle** property is just one of many useful properties of the **
that `Get-Process` returns. To view all of the properties, pipe the results of a `Get-Process` command to the `Get-Member` cmdlet `Get-Process | Get-Member`.
-## Parameters
+## PARAMETERS
### -FileVersionInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Diagnostics.ProcessModule
By default, this cmdlet returns a **System.Diagnostics.Process** object. If you
use the **Module** parameter, without the **FileVersionInfo** parameter, it returns a **System.Diagnostics.ProcessModule** object.
-## Notes
+## NOTES
- You can also refer to this cmdlet by its built-in aliases, ps and gps. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
use the **Module** parameter, without the **FileVersionInfo** parameter, it retu
- You can also use the built-in alternate views of the processes available with `Format-Table`, such as **StartTime** and **Priority**, and you can design your own views.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-Service.md
Title: Get-Service
# Get-Service
-## Synopsis
+## SYNOPSIS
Gets the services on the computer.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Service [-DependentServices] [-RequiredServices] [-Include <String[]>] [-Exc
[-InputObject <ServiceController[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
computer's services are returned.
You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get all services on the computer
quotation marks, is sent down the pipeline to `Get-Service`.
"WinRM" | Get-Service ```
-## Parameters
+## PARAMETERS
### -DependentServices
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns objects that represent the services on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
appears before because Running because Stopped has a value of 1, and Running has
more information, see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Get Timezone (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Get-TimeZone.md
Title: Get-TimeZone
--- # Get-TimeZone
-## Synopsis
+## SYNOPSIS
Gets the current time zone or a list of available time zones.
-## Syntax
+## SYNTAX
### Name (Default)
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-TimeZone` cmdlet gets the current time zone or a list of available time zones.
-## Examples
+## EXAMPLES
### Example 1: Get the current time zone
Get-TimeZone -ListAvailable
This command gets all available time zones.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.TimeZoneInfo[]
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Set-TimeZone](Set-TimeZone.md)
Microsoft.PowerShell.Management Invoke Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Invoke-Item.md
Title: Invoke-Item
--- # Invoke-Item
-## Synopsis
+## SYNOPSIS
Performs the default action on the specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Invoke-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Item` cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with
the document file type.
The default action depends on the type of item and is determined by the PowerShell provider that provides access to the data.
-## Examples
+## EXAMPLES
### Example 1: Open a file
In this case, opening in Excel is the default action for `.xls` files.
Invoke-Item "C:\Documents and Settings\Lister\My Documents\*.xls" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None The command does not generate any output. However, output might be generated by the item that it invokes.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Join Path (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Join-Path.md
Title: Join-Path
--- # Join-Path
-## Synopsis
+## SYNOPSIS
Combines a path and a child path into a single path.
-## Syntax
+## SYNTAX
``` Join-Path [-Path] <String[]> [-ChildPath] <String> [[-AdditionalChildPath] <String[]>] [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-Path` cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.
-## Examples
+## EXAMPLES
### Example 1: Combine a path with a child path
The `AdditionalChildPath` parameter allows the joining of an unlimited number of
In this example, no parameter names are used, thus "a" binds to `Path`, "b" to `ChildPath` and "c-g" to `AdditionalChildPath`
-## Parameters
+## PARAMETERS
### -AdditionalChildPath
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the resulting path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun (the Path cmdlets) manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Move Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Move-Item.md
Title: Move-Item
--- # Move-Item
-## Synopsis
+## SYNOPSIS
Moves an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-Item -LiteralPath <String[]> [[-Destination] <String>] [-Force] [-Filter <S
[-Exclude <String[]>] [-PassThru] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-Item` cmdlet moves an item, including its properties, contents, and child items, from one location to another location. The locations must be supported by the same provider.
For example, it can move a file or subdirectory from one directory to another or
subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a file to another directory and rename it
misinterpreted.
The **Destination** parameter does not require a literal path, because the Destination variable also must be enclosed in single quotation marks, because it includes brackets that can be misinterpreted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the moved item When you use the *PassThru* parameter, this cmdlet generates an object representing the moved item. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet will move files between drives that are supported by the same provider, but it will move directories only within the same drive.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Move Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Move-ItemProperty.md
Title: Move-ItemProperty
--- # Move-ItemProperty
-## Synopsis
+## SYNOPSIS
Moves a property from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Destination] <Str
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-ItemProperty` cmdlet moves a property of an item from one item to another item. For instance, it can move a registry entry from one registry key to another registry key. When you move an item property, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a registry value and its data to another key
subkey of the `HKLM\Software\MyCompany` registry key.
Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, this cmdlet generates a **PSCustomObject** representing the moved item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/New-Item.md
Title: New-Item
--- # New-Item
-## Synopsis
+## SYNOPSIS
Creates a new item.
-## Syntax
+## SYNTAX
### pathSet (Default)
New-Item [[-Path] <String[]>] -Name <String> [-ItemType <String>] [-Value <Objec
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Item` cmdlet creates a new item and sets its value. The types of items that can be created depend on the location of the item. For example, in the file system, `New-Item` creates files and
folders. In the registry, `New-Item` creates registry keys and entries.
`New-Item` can also set the value of the items that it creates. For example, when it creates a new file, `New-Item` can add initial content to the file.
-## Examples
+## EXAMPLES
### Example 1: Create a file in the current directory
Mode LastWriteTime Length Name
> the same as when overwriting a file. If the registry key already exists, the key and all > properties and values will be overwritten with an empty registry key.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe a value for the new item to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the item that it creates.
-## Notes
+## NOTES
`New-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management New Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/New-ItemProperty.md
Title: New-ItemProperty
--- # New-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates a new property for an item and sets its value.
-## Syntax
+## SYNTAX
### Path (Default)
New-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PropertyType <String
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ItemProperty` cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet is used to create new registry values, because registry values are properties
This cmdlet does not add properties to an object.
- To add a property to an instance of an object, use the `Add-Member` cmdlet. - To add a property to all objects of a particular type, modify the Types.ps1xml file.
-## Examples
+## EXAMPLES
### Example 1: Add a registry entry
$newValue.multistring[0]
a ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject `New-ItemProperty` returns a custom object that contains the new property.
-## Notes
+## NOTES
`New-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Psdrive (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/New-PSDrive.md
Title: New-PSDrive
# New-PSDrive
-## Synopsis
+## SYNOPSIS
Creates temporary and persistent drives that are associated with a location in an item data store.
-## Syntax
+## SYNTAX
### All
New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Descripti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSDrive` cmdlet creates temporary and persistent drives that are mapped to or associated with a location in a data store, such as a network drive, a directory on the local computer, or a
information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Spla
> Unless you use the **Scope** parameter, PSDrives are created in the scope in which the > `New-PSDrive` command is run.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary drive mapped to a network share
New-PSDrive -Persist -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public
To ensure that the drive is available outside of the script to must use the **Scope** parameter to create the drive in the **Global** scope.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo
-## Notes
+## NOTES
`New-PSDrive` is designed to work with the data exposed by any provider. To list the providers available in your session, use `Get-PSProvider`. For more information about providers, see
Mapped network drives are specific to a user account. Mapped drives created in e
sessions using the credential of another user aren't visible in sessions started using different credentials.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management New Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/New-Service.md
Title: New-Service
--- # New-Service
-## Synopsis
+## SYNOPSIS
Creates a new Windows service.
-## Syntax
+## SYNTAX
``` New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>] [-Description <String>]
New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>]
[-DependsOn <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
service database. A new service requires an executable file that runs during the
The parameters of this cmdlet let you set the display name, description, startup type, and dependencies of the service.
-## Examples
+## EXAMPLES
### Example 1: Create a service
New-Service @params
The **SecurityDescriptor** is stored in the `$SDDLToSet` variable. The **SecurityDescriptorSddl** parameter uses `$SDDL` to set the **SecurityDescriptor** of the new service.
-## Parameters
+## PARAMETERS
### -BinaryPathName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns an object that represents the new service.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Pop Location (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Pop-Location.md
Title: Pop-Location
--- # Pop-Location
-## Synopsis
+## SYNOPSIS
Changes the current location to the location most recently pushed onto the stack.
-## Syntax
+## SYNTAX
``` Pop-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Pop-Location` cmdlet changes the current location to the location most recently pushed onto the stack by using the `Push-Location` cmdlet. You can pop a location from the default stack or from a stack that you create by using a `Push-Location` command.
-## Examples
+## EXAMPLES
### Example 1: Change to most recent location
the PowerShell certificate provider.
The last two commands pop those locations off the stack. The first `popd` command returns to the Registry drive, and the second command returns to the file system drive.
-## Parameters
+## PARAMETERS
### -PassThru
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo
This cmdlet generates a **System.Management.Automation.PathInfo** object that re
location, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
You can also refer to `Pop-Location` by its built-in alias, `popd`. For more inf
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Push Location (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Push-Location.md
Title: Push-Location
--- # Push-Location
-## Synopsis
+## SYNOPSIS
Adds the current location to the top of a location stack.
-## Syntax
+## SYNTAX
### Path (Default)
Push-Location [[-Path] <String>] [-PassThru] [-StackName <String>] [<CommonParam
Push-Location [-LiteralPath <String>] [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Push-Location` cmdlet adds ("pushes") the current location onto a location stack. If you specify a path, `Push-Location` pushes the current location onto a location stack and then changes
does not exist, `Push-Location` creates it.
For more information about location stacks, see the [Notes](#notes).
-## Examples
+## EXAMPLES
### Example 1
the `Pop-Location` cmdlet to pop the original location (`C:\`) from the Stack2 s
For more information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path (but not a literal path) to `Push-Location`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PathInfo
When you use the **PassThru** parameter, `Push-Location` generates a
**System.Management.Automation.PathInfo** object that represents the location. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
The `Push-Location` cmdlet is designed to work with the data exposed by any prov
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Remove Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Remove-Item.md
Title: Remove-Item
--- # Remove-Item
-## Synopsis
+## SYNOPSIS
Deletes the specified items.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Item` cmdlet deletes one or more items. Because it is supported by many providers, it can delete many different types of items, including files, folders, registry keys, variables, aliases, and functions.
-## Examples
+## EXAMPLES
### Example 1: Delete files that have any file name extension
The **Stream** parameter `Get-Item` gets the `Zone.Identifier` stream of the `Co
file. `Remove-Item` uses the **Stream** parameter to remove the `Zone.Identifier` stream of the file. Finally, the `Get-Item` cmdlet shows that the `Zone.Identifier` stream was deleted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
The `Remove-Item` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see
When you try to delete a folder that contains items without using the **Recurse*
cmdlet prompts for confirmation. Using `-Confirm:$false` does not suppress the prompt. This is by design.
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Remove Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Remove-ItemProperty.md
Title: Remove-ItemProperty
--- # Remove-ItemProperty
-## Synopsis
+## SYNOPSIS
Deletes the property and its value from an item.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Force] [-Filter
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.
-## Examples
+## EXAMPLES
### Example 1: Delete a registry value
It uses a pipeline operator (`|`) to send the object to `Remove-ItemProperty`.
Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the name of the registry value.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values.
This cmdlet does not return any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Item](Get-Item.md)
Microsoft.PowerShell.Management Remove Psdrive (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Remove-PSDrive.md
Title: Remove-PSDrive
--- # Remove-PSDrive
-## Synopsis
+## SYNOPSIS
Deletes temporary PowerShell drives and disconnects mapped network drives.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-PSDrive [-LiteralName] <String[]> [-PSProvider <String[]>] [-Scope <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSDrive` cmdlet deletes temporary PowerShell drives that were created by using the `New-PSDrive` cmdlet.
Beginning in Windows PowerShell 3.0, when an external drive is connected to the
You do not need to restart PowerShell. Similarly, when an external drive is disconnected from the computer, PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Remove a file system drive
This command uses `Remove-PSDrive` to disconnect the X: and S: mapped network dr
Get-PSDrive X, S | Remove-PSDrive ```
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.Management.Automation.PSDriveInfo You can pipe a drive object, such as one from the `Get-PSDrive` cmdlet, to the `Remove-PSDrive` cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- The `Remove-PSDrive` cmdlet is designed to work with the data exposed by any PowerShell provider. To list the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-PSDrive](Get-PSDrive.md)
Microsoft.PowerShell.Management Remove Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Remove-Service.md
Title: Remove-Service
--- # Remove-Service
-## Synopsis
+## SYNOPSIS
Removes a Windows service.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-Service [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Service [-InputObject <ServiceController>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Service` cmdlet removes a Windows service in the registry and in the service database. The `Remove-Service` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1: Remove a service
the object to `Remove-Service`, which removes the service.
Get-Service -DisplayName "Test Service" | Remove-Service ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Rename Computer (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Rename-Computer.md
Title: Rename-Computer
--- # Rename-Computer
-## Synopsis
+## SYNOPSIS
Renames a computer.
-## Syntax
+## SYNTAX
``` Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCredential>]
Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCrede
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
It renames one computer in each command.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Rename the local computer
The **Force** parameter suppresses the confirmation prompt.
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not have parameters that take input by value. However, you can pipe the values of the **ComputerName** and **NewName** properties of objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo This cmdlet returns a **ComputerChangeInfo** object, if you specify the **PassThru** parameter. Otherwise, it does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Rename Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Rename-Item.md
Title: Rename-Item
--- # Rename-Item
-## Synopsis
+## SYNOPSIS
Renames an item in a PowerShell provider namespace.
-## Syntax
+## SYNTAX
### ByPath (Default)
Rename-Item -LiteralPath <String> [-NewName] <String> [-Force] [-PassThru]
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Item` cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
content of the item being renamed.
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Rename a file
command through the pipeline. The script block uses the `-replace` operator to r
extension of each file with `.log`. Notice that matching using the `-replace` operator is not case sensitive.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object that represents the renamed item. This cmdlet generates an object that represents the renamed item, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Rename-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Rename Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Title: Rename-ItemProperty
--- # Rename-ItemProperty
-## Synopsis
+## SYNOPSIS
Renames a property of an item.
-## Syntax
+## SYNTAX
### Path (Default)
Rename-ItemProperty -LiteralPath <String> [-Name] <String> [-NewName] <String> [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-ItemProperty` cmdlet changes the name of a specified item property. The value of the property is not changed. For example, you can use `Rename-ItemProperty` to change the name of a registry entry.
-## Examples
+## EXAMPLES
### Example 1: Rename a registry entry
This command renames the config registry entry that is contained in the
Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject This cmdlet generates a **PSCustomObject** that represents the renamed item property, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Resolve Path (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Resolve-Path.md
Title: Resolve-Path
--- # Resolve-Path
-## Synopsis
+## SYNOPSIS
Resolves the wildcard characters in a path, and displays the path contents.
-## Syntax
+## SYNTAX
### Path (Default)
Resolve-Path [-Path] <String[]> [-Relative] [-Credential <PSCredential>] [<Commo
Resolve-Path -LiteralPath <String[]> [-Relative] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resolve-Path` cmdlet displays the items and containers that match the wildcard pattern at the location specified. The match can include files, folders, registry keys, or any other object accessible from a PSDrive provider.
-## Examples
+## EXAMPLES
### Example 1: Resolve the home folder path
expression.
PS C:\> Resolve-Path -LiteralPath 'test[xml]' ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo, System.String Returns a **PathInfo** object. Returns a string value for the resolved path if you specify the **Relative** parameter.
-## Notes
+## NOTES
The `*-Path` cmdlets work with the FileSystem, Registry, and Certificate providers.
session, type `Get-PSProvider`. For more information, see
`Resolve-Path` only resolves existing paths. It cannot be used to resolve a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Restart Computer (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Restart-Computer.md
Title: Restart-Computer
# Restart-Computer
-## Synopsis
+## SYNOPSIS
Restarts the operating system on local and remote computers.
-## Syntax
+## SYNTAX
### DefaultSet (Default)
Restart-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[-Delay <Int16>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
command. Specify a waiting time-out and query interval, and wait for particular
available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions.
-## Examples
+## EXAMPLES
### Example 1: Restart the local computer
Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos
`Restart-Computer` uses the **ComputerName** parameter to specify the remote computer, **Server01**. The **WsmanAuthentication** parameter specifies the authentication method as **Kerberos**.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String `Restart-Computer` accepts computer names from the pipeline or variables.
-## Outputs
+## OUTPUTS
### None `Restart-Computer` doesn't generate any output.
-## Notes
+## NOTES
- In Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
used to restart the machine. - On Linux and Mac OS, `Restart-Computer` uses the `/sbin/shutdown` bash tool.
-## Related links
+## RELATED LINKS
[About Windows Remote Management](/windows/desktop/WinRM/about-windows-remote-management)
Microsoft.PowerShell.Management Restart Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Restart-Service.md
Title: Restart-Service
--- # Restart-Service
-## Synopsis
+## SYNOPSIS
Stops and then starts one or more services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
notifying you of an error. You can specify the services by their service names o
you can use the **InputObject** parameter to pass an object that represents each service that you want to restart.
-## Examples
+## EXAMPLES
### Example 1: Restart a service on the local computer
sends the selected services to `Restart-Service`.
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
restarted service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Resume Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Resume-Service.md
Title: Resume-Service
--- # Resume-Service
-## Synopsis
+## SYNOPSIS
Resumes one or more suspended (paused) services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclu
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is ignored. You can specify the services by their service names or display names
**InputObject** parameter to pass a service object that represents the services that you want to resume.
-## Examples
+## EXAMPLES
### Example 1: Resume a service on the local computer
next pipeline operator sends the results to `Resume-Service`, which resumes the
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
resumed service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Clipboard (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-Clipboard.md
Title: Set-Clipboard
--- # Set-Clipboard
-## Synopsis
+## SYNOPSIS
Sets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Set-Clipboard -Value <String[]> [-Append] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Clipboard` cmdlet sets the contents of the clipboard. > [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Copy text to the clipboard
ssh key so that it can be pasted into another application, like GitHub.
Get-Content C:\Users\user1\.ssh\id_ed25519.pub | Set-Clipboard ```
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
In rare cases when using `Set-Clipboard` with a high number of values in rapid succession, like in a loop, you might sporadically get a blank value from the clipboard. This can be fixed by using `Start-Sleep -Milliseconds 1` in the loop.
-## Related links
+## RELATED LINKS
[Get-Clipboard](Get-Clipboard.md)
Microsoft.PowerShell.Management Set Content (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-Content.md
Title: Set-Content
--- # Set-Content
-## Synopsis
+## SYNOPSIS
Writes new content or replaces existing content in a file.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Set-Content` is a string-processing cmdlet that writes new content or replaces the content in a file. `Set-Content` replaces the existing content and differs from the `Add-Content` cmdlet that
the command line or send content through the pipeline.
If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Replace the contents of multiple files in a directory
directory to the **Value** empty.
Set-Content -Path C:\Temp\* -Filter *.txt -Value "Empty" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that contains the new value for the item to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Set-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Set-Content` by its built-in alias, `sc`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Set Item (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-Item.md
Title: Set-Item
--- # Set-Item
-## Synopsis
+## SYNOPSIS
Changes the value of an item to the value specified in the command.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Item -LiteralPath <String[]> [[-Value] <Object>] [-Force] [-PassThru] [-Filt
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Item` cmdlet changes the value of an item, such as a variable or registry key, to the value specified in the command.
-## Examples
+## EXAMPLES
### Example 1: Create an alias
The **Options** parameter is available in `Set-Item` only when you use it with t
Set-Item -Path function:prompt -Options "AllScope,ReadOnly" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the new value of the item to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the new or changed item. This cmdlet generates an object that represent the item, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in the file system, use the `Set-Content` cmdlet.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Set Itemproperty (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-ItemProperty.md
Title: Set-ItemProperty
--- # Set-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates or changes the value of a property of an item.
-## Syntax
+## SYNTAX
### propertyValuePathSet (Default)
Set-ItemProperty -LiteralPath <String[]> -InputObject <PSObject> [-PassThru] [-F
[-WhatIf] [-Confirm] [-Type <RegistryValueKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item. You can use the cmdlet to establish or change the properties of items.
file object to `$True`.
You also use `Set-ItemProperty` to create and change registry values and data. For example, you can add a new registry entry to a key and establish or change its value.
-## Examples
+## EXAMPLES
### Example 1: Set a property of a file
specify the property and its new value.
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject
This cmdlet generates a **PSCustomObject** object that represents the item that
new property value, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Set-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Set Location (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-Location.md
Title: Set-Location
--- # Set-Location
-## Synopsis
+## SYNOPSIS
Sets the current working location to a specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Location -LiteralPath <String> [-PassThru] [<CommonParameters>]
Set-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Location` cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.
PowerShell 6.2 added support for `-` and `+` as a values for the **Path** parame
maintains a history of the last 20 locations that can be accessed with `-` and `+`. This list is independent from the location stack that is accessed using the **StackName** parameter.
-## Examples
+## EXAMPLES
### Example 1: Set the current location
PS Cert:\>
Using the alias, `cd -` or `cd +` is an easy way to navigate through your location history while in your terminal. For more information on navigating with `-`/`+`, see the **Path** parameter.
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo, System.Management.Automation.PathInfoStack
This cmdlet does not generate any output unless you specify the **PassThru** par
new location. Using **PassThru** with **StackName** generates a **PathInfoStack** object representing the new stack context.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
If you make a named location stack the current location stack, you can no longer
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Set Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-Service.md
Title: Set-Service
# Set-Service
-## Synopsis
+## SYNOPSIS
Starts, stops, and suspends a service, and changes its properties.
-## Syntax
+## SYNTAX
### Name (Default)
Set-Service [-InputObject] <ServiceController> [-DisplayName <String>] [-Credent
[-Status <String>] [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Set-Service` cmdlet changes the properties of a service such as the **Statu
pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to `Set-Service`.
-## Examples
+## EXAMPLES
### Example 1: Change a display name
The **SecurityDescriptor** is stored in the `$SDDL` variable. `Set-Service` uses
parameter to specify the **BITS** service. The **SecurityDescriptorSddl** parameter uses `$SDDL` to change the **SecurityDescriptor** for the **BITS** service.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can use the pipeline to send a service object or a string that contains a service name to `Set-Service`.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController By default, `Set-Service` doesn't return any objects. Use the **PassThru** parameter to output a **ServiceController** object.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the **Name** column and the display names are in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Timezone (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Set-TimeZone.md
Title: Set-TimeZone
--- # Set-TimeZone
-## Synopsis
+## SYNOPSIS
Sets the system time zone to a specified time zone.
-## Syntax
+## SYNTAX
### Name (Default)
Set-TimeZone -Id <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-TimeZone [-InputObject] <TimeZoneInfo> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone.
-## Examples
+## EXAMPLES
### Example 1: Set the time zone by Id
As we saw in the previous example, the **Id** and the **Name** of the Time Zone
The **Name** parameter must match the **StandardName** or **DaylightName** properties of the **TimeZoneInfo** object.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.TimeZoneInfo, System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-TimeZone](Get-TimeZone.md)
Microsoft.PowerShell.Management Split Path (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Split-Path.md
Title: Split-Path
--- # Split-Path
-## Synopsis
+## SYNOPSIS
Returns the specified part of a path.
-## Syntax
+## SYNTAX
### ParentSet (Default)
Split-Path [-Path] <String[]> [-Resolve] -IsAbsolute [-Credential <PSCredential>
Split-Path -LiteralPath <String[]> [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell whether the path is
relative or absolute.
You can use this cmdlet to get or submit only a selected part of a path.
-## Examples
+## EXAMPLES
### Example 1: Get the qualifier of a path
C:\Documents and Settings\User01\My Documents
This command uses a pipeline operator (`|`) to send a path to `Split-Path`. The path is enclosed in quotation marks to indicate that it is a single token.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String, System.Boolean
items, such as a **FileInfo** or **RegistryKey** object.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean** value.
-## Notes
+## NOTES
- The split location parameters (**Qualifier**, **Parent**, **Extension**, **Leaf**, **LeafBase**, and **NoQualifier**) are exclusive. You can use only one in each command.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean*
- `Split-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Start Process (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Start-Process.md
Title: Start-Process
--- # Start-Process
-## Synopsis
+## SYNOPSIS
Starts one or more processes on the local computer.
-## Syntax
+## SYNTAX
### Default (Default)
Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-WorkingDirecto
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Process` cmdlet starts one or more processes on the local computer. By default, `Start-Process` creates a new process that inherits all the environment variables that are defined
cmdlet.
You can use the parameters of `Start-Process` to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.
-## Examples
+## EXAMPLES
### Example 1: Start a process that uses default values
In this example, `Start-Process` is running the Linux `nohup` command, which lau
detached process. For more information, see the man page for [nohup](https://linux.die.net/man/1/nohup).
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet generates a **System.Diagnostics.Process** object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not return any output.
-## Notes
+## NOTES
By default, `Start-Process` launches a process _asynchronously_. Control is instantly returned to PowerShell even if the new process is still running.
This cmdlet is implemented by using the **Start** method of the **System.Diagnos
class. For more information about this method, see [Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Management Start Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Start-Service.md
Title: Start-Service
--- # Start-Service
-## Synopsis
+## SYNOPSIS
Starts one or more stopped services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclud
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. If a service is already running, the message is ignored with
specify the services by their service names or display names, or you can use the **InputObject** parameter to supply a service object that represents the services that you want to start.
-## Examples
+## EXAMPLES
### Example 1: Start a service by using its name
that the **StartMode** property of the Tlntsvr service is **Disabled**. The `Set
changes the start type to **Manual**. Now, we can resubmit the `Start-Service` command. This time, the command succeeds. To verify that the command succeeded, run `Get-Service`.
-## Parameters
+## PARAMETERS
### -DisplayName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you specify **PassThru**. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \<display-name\> start failed.`
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Stop Computer (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Stop-Computer.md
Title: Stop-Computer
# Stop-Computer
-## Synopsis
+## SYNOPSIS
Stops (shuts down) local and remote computers.
-## Syntax
+## SYNTAX
### All
Stop-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[[-Credential] <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Computer` cmdlet shuts down the local computer and remote computers.
credentials, and to force an immediate shut down.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on these platforms. The cmdlet is just calling the native command `/sbin/shutdown`.
-## Examples
+## EXAMPLES
### Example 1: Shut down the local computer
administrator. The credentials are stored in the `$c` variable.
computers in the `$s` variable. The **Force** parameter forces an immediate shutdown. The **Credential** parameter submits the credentials saved in the `$c` variable.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the **Win32Shutdown** method of the **Win32_OperatingSystem** WMI class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to
restart the machine.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. For these platorms, the cmdlet calls the native command `/sbin/shutdown`.
-## Related links
+## RELATED LINKS
[Rename-Computer](Rename-Computer.md)
Microsoft.PowerShell.Management Stop Process (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Stop-Process.md
Title: Stop-Process
--- # Stop-Process
-## Synopsis
+## SYNOPSIS
Stops one or more running processes.
-## Syntax
+## SYNTAX
### Id (Default)
Stop-Process -Name <String[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<Common
Stop-Process [-InputObject] <Process[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Process` cmdlet stops one or more running processes. You can specify a process by process name or process ID (PID), or pass a process object to `Stop-Process`. `Stop-Process` works only on
On Windows Vista and later versions of the Windows operating system, to stop a p
owned by the current user, you must start PowerShell by using the Run as administrator option. Also, you are not prompted for confirmation unless you specify the **Confirm** parameter.
-## Examples
+## EXAMPLES
### Example 1: Stop all instances of a process
PowerShell prompts you for confirmation.
The second command specifies **Force** to suppress the prompt. As a result, the process is stopped without confirmation.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet returns a **System.Diagnostics.Process** object that represents the stopped process, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Stop-Process` by its built-in aliases, `kill` and `spps` For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate
- When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Stop Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Stop-Service.md
Title: Stop-Service
--- # Stop-Service
-## Synopsis
+## SYNOPSIS
Stops one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName <String[]> [-Include <S
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. You can specify the services by their service names or displ
use the **InputObject** parameter to pass a service object that represents the service that you want to stop.
-## Examples
+## EXAMPLES
### Example 1: Stop a service on the local computer
The second command stops the IISAdmin service. The **Force** parameter is requir
that has dependent services. The command uses the **Confirm** parameter to request confirmation from the user before it stops each service.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Suspend Service (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Suspend-Service.md
Title: Suspend-Service
--- # Suspend-Service
-## Synopsis
+## SYNOPSIS
Suspends (pauses) one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Excl
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
until resumed, such as by usingthe `Resume-Service` cmdlet. You can specify the
service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the services that you want to suspend.
-## Examples
+## EXAMPLES
### Example 1: Suspend a service
of `$True` for the **CanPauseAndContinue** property. Another pipeline operator p
`Suspend-Service`. The **Confirm** parameter prompts you for confirmation before suspending each of the services.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Test Connection (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Test-Connection.md
Title: Test-Connection
# Test-Connection
-## Synopsis
+## SYNOPSIS
Sends ICMP echo request packets, or pings, to one or more computers.
-## Syntax
+## SYNTAX
### DefaultPing (Default)
Test-Connection [-TargetName] <string[]> -TcpPort <int> [-IPv4] [-IPv6] [-Resolv
[-Source <string>] [-TimeoutSeconds <int>] [-Quiet] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Connection` cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this
Unlike the familiar **ping** command, `Test-Connection` returns a
parameter returns a **Boolean** value in a **System.Boolean** object for each tested connection. If multiple connections are tested, an array of **Boolean** values is returned.
-## Examples
+## EXAMPLES
### Example 1: Send echo requests to a remote computer
The `Test-Connection` command is called with the **Traceroute** parameter. The r
`[Microsoft.PowerShell.Commands.TestConnectionCommand+TraceStatus]` objects, are output to the **Success** output stream.
-## Parameters
+## PARAMETERS
### -BufferSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### TestConnectionCommand+PingStatus, TestConnectionCommand+TraceStatus, Boolean, TestConnectionCommand+PingMtuStatus
If you specify the **Traceroute** parameter, the cmdlet will return a
If you specify the **Quiet** or **TcpPort** parameters, it returns a **Boolean** value. If multiple connections are tested, an array of **Boolean** values is returned.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Test Path (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Test-Path.md
Title: Test-Path
--- # Test-Path
-## Synopsis
+## SYNOPSIS
Determines whether all elements of a path exist.
-## Syntax
+## SYNTAX
### Path (Default)
Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
[-OlderThan <DateTime>] [-NewerThan <DateTime>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the
whitespace or empty string, then `$False` is returned. If the **Path** is `$null`, array of `$null` or empty array, a non-terminating error is returned.
-## Examples
+## EXAMPLES
### Example 1: Test a path
False
False ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean The cmdlet returns a **Boolean** value.
-## Notes
+## NOTES
The cmdlets that contain the **Path** noun (the **Path** cmdlets) work with path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use
manipulators.
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Wait Process (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Management/Wait-Process.md
Title: Wait-Process
--- # Wait-Process
-## Synopsis
+## SYNOPSIS
Waits for the processes to be stopped before accepting more input.
-## Syntax
+## SYNTAX
### Name (Default)
Wait-Process [-Id] <Int32[]> [[-Timeout] <Int32>] [<CommonParameters>]
Wait-Process [[-Timeout] <Int32>] -InputObject <Process[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet does not work on Linux or macOS.**
stopped. You can specify a process by process name or process ID (PID), or pipe
`Wait-Process` works only on processes running on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Stop a process and wait
prompt.
Wait-Process -Name outlook, winword -Timeout 30 ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **WaitForExit** method of the **System.Diagnostics.Process** class.
This cmdlet does not generate any output.
`Start-Process -Wait` waits for the process tree (the process and all its descendants) to exit before returning control.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Security Convertfrom Securestring (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md
Title: ConvertFrom-SecureString
--- # ConvertFrom-SecureString
-## Synopsis
+## SYNOPSIS
Converts a secure string to an encrypted standard string.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertFrom-SecureString [-SecureString] <SecureString> [-AsPlainText] [<CommonP
ConvertFrom-SecureString [-SecureString] <SecureString> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SecureString` cmdlet converts a secure string (**System.Security.SecureString**) into an encrypted standard string (**System.String**). Unlike a secure string, an encrypted standard
representation.
> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Create a secure string
$secureString # 'System.Security.SecureString'
ConvertFrom-SecureString -SecureString $secureString -AsPlainText # 'Example' ```
-## Parameters
+## PARAMETERS
### -AsPlainText
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
+## INPUTS
### System.Security.SecureString You can pipe a **SecureString** object to ConvertFrom-SecureString.
-## Outputs
+## OUTPUTS
### System.String ConvertFrom-SecureString returns a standard string object.
-## Notes
+## NOTES
- To create a secure string from characters that are typed at the command prompt, use the **AsSecureString** parameter of the `Read-Host` cmdlet.
ConvertFrom-SecureString returns a standard string object.
them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertTo-SecureString](ConvertTo-SecureString.md)
Microsoft.PowerShell.Security Convertto Securestring (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/ConvertTo-SecureString.md
Title: ConvertTo-SecureString
--- # ConvertTo-SecureString
-## Synopsis
+## SYNOPSIS
Converts plain text or encrypted strings to secure strings.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParame
ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-SecureString` cmdlet converts encrypted standard strings into secure strings. It can also convert plain text to secure strings. It is used with `ConvertFrom-SecureString` and
of the `ConvertTo-SecureString` cmdlet.
> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Convert a secure string to an encrypted string
$Secure_String_Pwd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
> You should avoid using plain text strings in script or from the command line. The plain text can > show up in event logs and command history logs.
-## Parameters
+## PARAMETERS
### -AsPlainText
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a standard encrypted string to `ConvertTo-SecureString`.
-## Outputs
+## OUTPUTS
### System.Security.SecureString `ConvertTo-SecureString` returns a **SecureString** object.
-## Notes
+## NOTES
Some characters, such as emoticons, correspond to several code points in the string that contains them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertFrom-SecureString](ConvertFrom-SecureString.md)
Microsoft.PowerShell.Security Get Acl (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-Acl.md
Title: Get-Acl
--- # Get-Acl
-## Synopsis
+## SYNOPSIS
Gets the security descriptor for a resource, such as a file or registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-Acl [-LiteralPath <String[]>] [-Audit] [-Filter <String>] [-Include <String[
[-Exclude <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
permissions that users and user groups have to access the resource.
Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of `Get-Acl` to get the security descriptor of objects that do not have a path.
-## Examples
+## EXAMPLES
### Example 1- Get an ACL for a folder
storage subsystem object.
Get-Acl -InputObject (Get-StorageSubSystem -Name S087) ```
-## Parameters
+## PARAMETERS
### -Audit
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity, System.Security.AccessControl.DirectorySecurity, System.Security.AccessControl.RegistrySecurity `Get-Acl` returns an object that represents the ACLs that it gets. The object type depends upon the ACL type.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Because `Get-Acl` is supported by the file system and registry providers, you ca
view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.
-## Related links
+## RELATED LINKS
[Set-Acl](Set-Acl.md)
Microsoft.PowerShell.Security Get Authenticodesignature (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md
Title: Get-AuthenticodeSignature
--- # Get-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Gets information about the Authenticode signature for a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Windows catalog signature is used.
If the file is not signed, the information is retrieved, but the fields are blank.
-## Examples
+## EXAMPLES
### Example 1: Get the Authenticode signature for a file
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePa
This command gets information about the Authenticode signature for the content of a file. In this example, the file extension is specified along with the content of the file.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature `Get-AuthenticodeSignature` returns a signature object for each signature that it gets.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. For information about Authenticode signatures in PowerShell, see [about_Signing](../Microsoft.PowerShell.Core/About/about_Signing.md).
-## Related links
+## RELATED LINKS
[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Microsoft.PowerShell.Security Get Cmsmessage (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-CmsMessage.md
Title: Get-CmsMessage
--- # Get-CmsMessage
-## Synopsis
+## SYNOPSIS
Gets content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent
Get-CmsMessage [-Path] <String> [<CommonParameters>]
Get-CmsMessage [-LiteralPath] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CmsMessage` cmdlet gets content that has been encrypted using the Cryptographic Message Syntax (CMS) format.
encryption certificate that was used to encrypt the content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Get encrypted content
This command pipes the results of the `Get-CmsMessage` cmdlet from Example 1 to
the **To** parameter is the value of the encrypting certificate's Subject line. The decrypted message, "Try the new Break All command," is the result.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Get Credential (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-Credential.md
Title: Get-Credential
--- # Get-Credential
-## Synopsis
+## SYNOPSIS
Gets a credential object based on a user name and password.
-## Syntax
+## SYNTAX
### CredentialSet (Default)
Get-Credential [[-Credential] <PSCredential>] [<CommonParameters>]
Get-Credential [-Message <String>] [[-UserName] <String>] [-Title <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Credential` cmdlet creates a credential object for a specified user name and password. You can use the credential object in security operations.
can use the credential object in security operations.
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use the **Message** parameter to specify a customized message in the command line prompt.
-## Examples
+## EXAMPLES
### Example 1
This command gets a credential from the Server01 remote computer. The command us
`Invoke-Command` cmdlet to run a `Get-Credential` command on the remote computer. The output shows the remote security message that `Get-Credential` includes in the authentication prompt.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCredential `Get-Credential` returns a credential object.
-## Notes
+## NOTES
You can use the **PSCredential** object that `Get-Credential` creates in cmdlets that request user authentication, such as those with a **Credential** parameter.
The **Credential** parameter is not supported by all providers that are installe
Beginning in PowerShell 3.0, it is supported on select cmdlets, such as the `Get-Content` and `New-PSDrive` cmdlets.
-## Related links
+## RELATED LINKS
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
Microsoft.PowerShell.Security Get Executionpolicy (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md
Title: Get-ExecutionPolicy
# Get-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Gets the execution policies for the current session.
-## Syntax
+## SYNTAX
### All
Gets the execution policies for the current session.
Get-ExecutionPolicy [[-Scope] <ExecutionPolicyScope>] [-List] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
To display the execution policies for each scope in the order of precedence, use `Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use
The effective execution policy is determined by execution policies that are set
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
-## Examples
+## EXAMPLES
### Example 1: Get all execution policies
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -List
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
+## INPUTS
### None `Get-ExecutionPolicy` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ExecutionPolicy The cmdlet always returns **Unrestricted** on Linux and macOS platforms.
-## Notes
+## NOTES
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, whether scripts must be digitally signed before they are run.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
Microsoft.PowerShell.Security Get Pfxcertificate (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Get-PfxCertificate.md
Title: Get-PfxCertificate
--- # Get-PfxCertificate
-## Synopsis
+## SYNOPSIS
Gets information about PFX certificate files on the computer.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-PfxCertificate -LiteralPath <String[]> [-Password <SecureString>] [-NoPrompt
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PfxCertificate` cmdlet gets an object representing each specified PFX certificate file. A PFX file includes both the certificate and a private key.
-## Examples
+## EXAMPLES
### Example 1: Get a PFX certificate
to run a `Get-PfxCertificate` command remotely.
When the PFX certificate file is not password-protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Parameters
+## PARAMETERS
### -FilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-PfxCertificate`.
-## Outputs
+## OUTPUTS
### System.Security.Cryptography.X509Certificates.X509Certificate2 `Get-PfxCertificate` returns an object for each certificate that it gets.
-## Notes
+## NOTES
When using the `Invoke-Command` cmdlet to run a `Get-PfxCertificate` command remotely, and the PFX certificate file is not password protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security New Filecatalog (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/New-FileCatalog.md
Title: New-FileCatalog
--- # New-FileCatalog
-## Synopsis
+## SYNOPSIS
`New-FileCatalog` creates a catalog file of file hashes that can be used to validate the authenticity of a file.
-## Syntax
+## SYNTAX
``` New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
create file hashes, and version 2 uses SHA256. Catalog version 2 is not supporte
2008 R2 or Windows 7. You should use catalog version 2 on Windows 8, Windows Server 2012, and later operating systems.
-## Examples
+## EXAMPLES
### Example 1: Create a file catalog for `Microsoft.PowerShell.Utility`
Mode LastWriteTime Length Name
-a---- 11/2/2018 11:58 AM 950 Microsoft.PowerShell.Utility.cat ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String The pipeline takes a string that is used as the catalog filename.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Test-FileCatalog](Test-FileCatalog.md)
Microsoft.PowerShell.Security Protect Cmsmessage (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Protect-CmsMessage.md
Title: Protect-CmsMessage
--- # Protect-CmsMessage
-## Synopsis
+## SYNOPSIS
Encrypts content by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent (Default)
Protect-CmsMessage [-To] <CmsMessageRecipient[]> [-LiteralPath] <String> [[-OutF
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Protect-CmsMessage` cmdlet encrypts content by using the Cryptographic Message Syntax (CMS) format.
document encryption, see Example 1 in this topic.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Create a certificate for encrypting content
To view document encryption certificates in the certificate provider, you can ad
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md), available only when the certificate provider is loaded.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Set Acl (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Set-Acl.md
Title: Set-Acl
--- # Set-Acl
-## Synopsis
+## SYNOPSIS
Changes the security descriptor of a specified item, such as a file or a registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-Acl -LiteralPath <String[]> [-AclObject] <Object> [-ClearCentralAccessPolicy
[-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
supply a security descriptor that has the values you want to apply. `Set-Acl` ap
descriptor that is supplied. It uses the value of the **AclObject** parameter as a model and changes the values in the item's security descriptor to match the values in the **AclObject** parameter.
-## Examples
+## EXAMPLES
### Example 1: Copy a security descriptor from one file to another
is an argument list is to be passed when making the new **FileSystemAccessRule**
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
+## PARAMETERS
### -AclObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.CommonSecurityDescriptor You can pipe an ACL object or a security descriptor to `Set-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity By default, `Set-Acl` does not generate any output. However, if you use the **Passthru** parameter, it generates a security object. The type of the security object depends on the type of the item.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. The `Set-Acl` cmdlet is supported by the PowerShell file system and registry providers. As such, you can use it to change the security descriptors of files, directories, and registry keys.
-## Related links
+## RELATED LINKS
[Get-Acl](Get-Acl.md)
Microsoft.PowerShell.Security Set Authenticodesignature (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md
Title: Set-AuthenticodeSignature
--- # Set-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Adds an [Authenticode](/windows-hardware/drivers/install/authenticode) signature to a PowerShell script or other file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-AuthenticodeSignature [-Certificate] <X509Certificate2> [-IncludeChain <Stri
-Content <Byte[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
In a PowerShell script file, the signature takes the form of a block of text tha
of the instructions that are executed in the script. If there is a signature in the file when this cmdlet runs, that signature is removed.
-## Examples
+## EXAMPLES
### Example 1 - Sign a script using a certificate from the local certificate store
the **IncludeChain** parameter to include all of the signatures in the trust cha
root authority. It also uses the **TimeStampServer** parameter to add a timestamp to the signature. This prevents the script from failing when the certificate expires.
-## Parameters
+## PARAMETERS
### -Certificate
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the file path to `Set-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security Set Executionpolicy (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md
Title: Set-ExecutionPolicy
# Set-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Sets the PowerShell execution policies for Windows computers.
-## Syntax
+## SYNTAX
### All
Set-ExecutionPolicy [-ExecutionPolicy] <ExecutionPolicy> [[-Scope] <ExecutionPol
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## 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).
To display the execution policies for each scope in the order of precedence, use
`Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use `Get-ExecutionPolicy` with no parameters.
-## Examples
+## EXAMPLES
### Example 1: Set an execution policy
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -ExecutionPolicy
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
+## INPUTS
### Microsoft.PowerShell.ExecutionPolicy, System.String You can pipe an execution policy object or a string that contains the name of an execution policy to `Set-ExecutionPolicy`.
-## Outputs
+## OUTPUTS
### None `Set-ExecutionPolicy` doesn't return any output.
-## Notes
+## NOTES
`Set-ExecutionPolicy` doesn't change the **MachinePolicy** and **UserPolicy** scopes because they are set by Group Policies.
If the Group Policy **Turn on Script Execution** is enabled for the computer or
preference is saved, but it is not effective. PowerShell displays a message that explains the conflict.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Security Test Filecatalog (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Test-FileCatalog.md
Title: Test-FileCatalog
--- # Test-FileCatalog
-## Synopsis
+## SYNOPSIS
`Test-FileCatalog` validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity. This cmdlet is only supported on Windows.
-## Syntax
+## SYNTAX
``` Test-FileCatalog [-Detailed] [-FilesToSkip <String[]>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
validation by using the -FilesToSkip parameter.
This cmdlet is only supported on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create and validate a file catalog
PathItems : {[Microsoft.PowerShell.Utility.psd1,
Signature : System.Management.Automation.Signature ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.IO.DirectoryInfo[], System.String[] The pipeline accepts an array of strings or `DirectoryInfo` objects that represent paths to the files that need to be validated.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CatalogValidationStatus
A more detailed object returned when using `-Detailed` which can be used to anal
that may or may not have passed validation, which hashes were expected vs. found, and the algorithm used in the catalog.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[New-FileCatalog](New-FileCatalog.md)
Microsoft.PowerShell.Security Unprotect Cmsmessage (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md
Title: Unprotect-CmsMessage
--- # Unprotect-CmsMessage
-## Synopsis
+## SYNOPSIS
Decrypts content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByWinEvent (Default)
Unprotect-CmsMessage [-LiteralPath] <String> [-IncludeContext] [[-To] <CmsMessag
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unprotect-CmsMessage` cmdlet decrypts content that has been encrypted by using the Cryptographic Message Syntax (CMS) format.
content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Decrypt a message
Unprotect-CmsMessage -LiteralPath @parameters
Try the new Break All command ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Eventing.Reader.EventLogRecord or System.String You can pipe an object containing encrypted content to `Unprotect-CmsMessage`.
-## Outputs
+## OUTPUTS
### System.String The unencrypted message.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Add Member (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Add-Member.md
Title: Add-Member
--- # Add-Member
-## Synopsis
+## SYNOPSIS
Adds custom properties and methods to an instance of a PowerShell object.
-## Syntax
+## SYNTAX
### TypeNameSet (Default)
Add-Member -InputObject <PSObject> [-MemberType] <PSMemberTypes> [-Name] <String
[[-SecondValue] <Object>] [-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Member` cmdlet lets you add members (properties and methods) to an instance of a PowerShell object. For instance, you can add a NoteProperty member that contains a description of the object or
Also, beginning in Windows PowerShell 3.0, the **PassThru** parameter, which gen
object, is needed less frequently. `Add-Member` now adds the new members directly to the input object of more types. For more information, see the **PassThru** parameter description.
-## Examples
+## EXAMPLES
### Example 1: Add a note property to a PSObject
PSVersion NoteProperty System.String PSVersion=4.0
System NoteProperty System.String System=Server Core ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object type to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Object When you use the **PassThru** parameter, this cmdlet returns the newly-extended object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can add members only to **PSObject** objects. To determine whether an object is a **PSObject** object, use the `-is` operator.
and methods.
The `$this` variable refers to the instance of the object to which the properties and methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Add Type (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Add-Type.md
Title: Add-Type
# Add-Type
-## Synopsis
+## SYNOPSIS
Adds a Microsoft .NET class to a PowerShell session.
-## Syntax
+## SYNTAX
### FromSource (Default)
Add-Type -LiteralPath <String[]> [-ReferencedAssemblies <String[]>] [-OutputAsse
Add-Type -AssemblyName <String[]> [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Type` cmdlet lets you define a Microsoft .NET Core class in your PowerShell session. You can then instantiate objects, by using the `New-Object` cmdlet, and use the objects just as you
Beginning in PowerShell 7, `Add-Type` does not compile a type if a type with the
exists. Also, `Add-Type` looks for assemblies in a `ref` folder under the folder that contains `pwsh.dll`.
-## Examples
+## EXAMPLES
### Example 1: Add a .NET type to a session
represents the `SW_RESTORE` value.
To maximize the window, use the value of `3` that represents `SW_MAXIMIZE`.
-## Parameters
+## PARAMETERS
### -AssemblyName
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
+## INPUTS
### None You can't send objects down the pipeline to `Add-Type`.
-## Outputs
+## OUTPUTS
### None or System.Type When you use the **PassThru** parameter, `Add-Type` returns a **System.Type** object that represents the new type. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
The types that you add exist only in the current session. To use the types in all sessions, add them to your PowerShell profile. For more information about the profile, see
any version of PowerShell.
Assemblies in the GAC can be loaded by type name, rather than by path. Loading assemblies from an arbitrary path requires `Add-Type`, since those assemblies cannot not be loaded automatically.
-## Related links
+## RELATED LINKS
[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md)
Microsoft.PowerShell.Utility Clear Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Clear-Variable.md
Title: Clear-Variable
--- # Clear-Variable
-## Synopsis
+## SYNOPSIS
Deletes the value of a variable.
-## Syntax
+## SYNTAX
``` Clear-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Variable` cmdlet deletes the data stored in a variable, but it does not delete the variable. As a result, the value of the variable is NULL (empty). If the variable has a specified data or object type, this cmdlet preserves the type of the object stored in the variable.
-## Examples
+## EXAMPLES
### Example 1: Remove the value of global variables that begin with a search string
Clear-Variable -Name "Processes"
This command deletes the value of the variable named Processes. After the cmdlet completes the operation, the variable named Processes still exists, but the value is null.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, this cmdlet generates a
**System.Management.Automation.PSVariable** object representing the cleared variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To delete a variable, along with its value, use `Remove-Variable` or `Remove-Item`.
this cmdlet does not generate any output.
You can also refer to `Clear-Variable` by its built-in alias, `clv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Get-Variable](Get-Variable.md)
Microsoft.PowerShell.Utility Compare Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Compare-Object.md
Title: Compare-Object
--- # Compare-Object
-## Synopsis
+## SYNOPSIS
Compares two sets of objects.
-## Syntax
+## SYNTAX
``` Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compare-Object` cmdlet compares two sets of objects. One set of objects is the **reference**, and the other set of objects is the **difference**.
terminating error.
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1 - Compare the content of two text files
InputObject SideIndicator
In the second case, the **TimeSpan** is converted to a string so the object are different.
-## Parameters
+## PARAMETERS
### -CaseSensitive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send an object down the pipeline to the **DifferenceObject** parameter.
-## Outputs
+## OUTPUTS
### None
When you use the **PassThru** parameter, the **Type** of the object is not chang
of the object returned has an added **NoteProperty** named **SideIndicator**. **SideIndicator** shows which input object the output belongs to.
-## Notes
+## NOTES
When using the **PassThru** parameter, the output displayed in the console may not include the **SideIndicator** property. The default format view for the object type output by `Compare-Object` does not include the **SideIndicator** property. For more information see [Example 3](#ex3) in this article.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertfrom Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Title: ConvertFrom-Csv
--- # ConvertFrom-Csv
-## Synopsis
+## SYNOPSIS
Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertFrom-Csv [[-Delimiter] <Char>] [-InputObject] <PSObject[]> [-Header <Stri
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Csv` cmdlet creates objects from CSV variable-length strings that are generated by the `ConvertTo-Csv` cmdlet.
You can also use the `Export-Csv` and `Import-Csv` cmdlets to convert objects to
file (and back). These cmdlets are the same as the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets, except that they save the CSV strings in a file.
-## Examples
+## EXAMPLES
### Example 1: Convert processes on the local computer to CSV format
When the **UseCulture** parameter is used, be sure that the current culture's de
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` cannot generate objects from the CSV strings.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe CSV strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns the objects described by the properties in the CSV strings.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings (by using the **ToString()*
object), so they are represented by the name of the property value. This cmdlet does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Convertfrom Json (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertFrom-Json.md
Title: ConvertFrom-Json
# ConvertFrom-Json
-## Synopsis
+## SYNOPSIS
Converts a JSON-formatted string to a custom object or a hash table.
-## Syntax
+## SYNTAX
``` ConvertFrom-Json [-InputObject] <String> [-AsHashtable] [-Depth <Int32>] [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Json` cmdlet converts a JavaScript Object Notation (JSON) formatted string to a custom **PSCustomObject** object that has a property for each field in the JSON string. JSON is
This cmdlet was introduced in PowerShell 3.0.
> be written in the file without corrupting the data or throwing an error as it did in PowerShell > 5.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a DateTime object to a JSON object
The JSON string contains an array with a single element. Without the switch, con
a PSObject and then converting it back with the `ConvertTo-Json` command results in a single integer.
-## Parameters
+## PARAMETERS
### -AsHashtable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `ConvertFrom-Json`.
-## Outputs
+## OUTPUTS
### PSCustomObject ### System.Collections.Hashtable
-## Notes
+## NOTES
This cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
follows:
offset is properly converted to the caller's configured time zone. The default output formatting does not indicate the original time zone offset.
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertfrom Markdown (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md
Title: ConvertFrom-Markdown
# ConvertFrom-Markdown
-## Synopsis
+## SYNOPSIS
Convert the contents of a string or a file to a **MarkdownInfo** object.
-## Syntax
+## SYNTAX
### PathParamSet (Default)
ConvertFrom-Markdown -LiteralPath <String[]> [-AsVT100EncodedString] [<CommonPar
ConvertFrom-Markdown -InputObject <PSObject> [-AsVT100EncodedString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet converts the specified content into a **MarkdownInfo**. When a file path is specified for the **Path** parameter, the contents on the file are converted. The output object has three
properties:
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a file containing Markdown content to HTML
of the `README.md` file.
The **MarkdownInfo** object is returned. The specified string `**Bold text**` is converted to a VT100-encoded string and available in **VT100EncodedString** property.
-## Parameters
+## PARAMETERS
### -AsVT100EncodedString
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
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.MarkdownInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Markdown Parser](https://github.com/lunet-io/markdig)
Microsoft.PowerShell.Utility Convertfrom Sddlstring (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md
Title: ConvertFrom-SddlString
--- # ConvertFrom-SddlString
-## Synopsis
+## SYNOPSIS
Converts a SDDL string to a custom object.
-## Syntax
+## SYNTAX
### All
Converts a SDDL string to a custom object.
ConvertFrom-SddlString [-Sddl] <String> [-Type <AccessRightTypeNames>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the access rights specified in a SDDL string.
This cmdlet was introduced in PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Convert file system access rights SDDL to a PSCustomObject
It doesn't use the `-Type` parameter, so the access rights shown are for file sy
The third command uses the `ConvertFrom-SddlString` cmdlet with the `-Type` parameter, so the access rights returned are for registry.
-## Parameters
+## PARAMETERS
### -Sddl
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a SDDL string to `ConvertFrom-SddlString`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Security Descriptor Definition Language](/windows/win32/secauthz/security-descriptor-definition-language)
Microsoft.PowerShell.Utility Convertfrom Stringdata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md
Title: ConvertFrom-StringData
--- # ConvertFrom-StringData
-## Synopsis
+## SYNOPSIS
Converts a string containing one or more key and value pairs to a hash table.
-## Syntax
+## SYNTAX
### All
Converts a string containing one or more key and value pairs to a hash table.
ConvertFrom-StringData [-StringData] <String> [[-Delimiter] <Char>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-StringData` cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often
sequences in your results.
PowerShell 7 adds the **Delimiter** parameter.
-## Examples
+## EXAMPLES
### Example 1: Convert a single-quoted here-string to a hash table
Name Value
Message Look in c:\Windows\System32 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string containing a key-value pair to `ConvertFrom-StringData`.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable This cmdlet returns a hash table that it creates from the key-value pairs.
-## Notes
+## NOTES
A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally.
This cmdlet can be useful in scripts that display user messages in multiple spok
can use the dictionary-style hash tables to isolate text strings from code, such as in resource files, and to format the text strings for use in translation tools.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Convertto Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## Synopsis
+## SYNOPSIS
Converts .NET objects into a series of character-separated value (CSV) strings.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## Examples
+## EXAMPLES
### Example 1: Convert an object to CSV
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV output is returned as a collection of strings.
-## Notes
+## NOTES
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Convertto Html (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Title: ConvertTo-Html
--- # ConvertTo-Html
-## Synopsis
+## SYNOPSIS
Converts .NET objects into HTML that can be displayed in a Web browser.
-## Syntax
+## SYNTAX
### Page (Default)
ConvertTo-Html [-InputObject <PSObject>] [[-Property] <Object[]>] [-As <String>]
[-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
on the properties of the first object that you submit. If the remaining objects
the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.
-## Examples
+## EXAMPLES
### Example 1: Create a web page to display the date
Get-Service | ConvertTo-HTML -Transitional
This command sets the DOCTYPE of the returned HTML to XHTML Transitional DTD
-## Parameters
+## PARAMETERS
### -As
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any .NET object to `ConvertTo-Html`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument `ConvertTo-Html` returns series of strings that comprise valid HTML.
-## Notes
+## NOTES
To use this cmdlet, pipe one or more objects to the cmdlet or use the **InputObject** parameter to specify the object. When the input consists of multiple objects, the output of these two methods is
quite different.
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>`
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertto Json (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Title: ConvertTo-Json
--- # ConvertTo-Json
-## Synopsis
+## SYNOPSIS
Converts an object to a JSON-formatted string.
-## Syntax
+## SYNTAX
``` ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript Object Notation (JSON) format. The properties are converted to field names, the field values are converted to
the depth specified for the command. This prevents unwanted data loss when conve
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1
Year : 2018
This example shows how to use the `ConvertTo-Json` and `ConvertFrom-Json` cmdlets to convert an object to a JSON string and a JSON object.
-## Parameters
+## PARAMETERS
### -AsArray
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to `ConvertTo-Json`.
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
The `ConvertTo-Json` cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertto Xml (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Xml.md
Title: ConvertTo-Xml
--- # ConvertTo-Xml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object.
-## Syntax
+## SYNTAX
``` ConvertTo-Xml [-Depth <Int32>] [-InputObject] <PSObject> [-NoTypeInformation] [-As <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Xml` cmdlet creates an [XML-based](/dotnet/api/system.xml.xmldocument) representation of one or more .NET objects. To use this cmdlet, pipe one or more objects to the cmdlet, or use the
file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md).
returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` does not have an option to convert objects to CLI XML.
-## Examples
+## EXAMPLES
### Example 1: Convert a date to XML
ConvertTo-Xml -As "Document" -InputObject (Get-Process) -Depth 3
This command converts the process objects that represent all of the processes on the computer into an XML document. The objects are expanded to a depth of three levels.
-## Parameters
+## PARAMETERS
### -As
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `ConvertTo-XML`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument The value of the **As** parameter determines the type of object that `ConvertTo-XML` returns.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Debug Runspace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Debug-Runspace.md
Title: Debug-Runspace
--- # Debug-Runspace
-## Synopsis
+## SYNOPSIS
Starts an interactive debugging session with a runspace.
-## Syntax
+## SYNTAX
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Debug a remote runspace
In the last command, you start debugging an opened runspace that is running a sc
`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## Related links
+## RELATED LINKS
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
Title: Disable-PSBreakpoint
--- # Disable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Disables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confir
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets des
PowerShell scripts. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint and disable it
This command disables all breakpoints in the current console.
`Get-PSBreakpoint` | Disable-PSBreakpoint ```
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Disable Runspacedebug (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md
Title: Disable-RunspaceDebug
--- # Disable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Disable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Disable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-RunspaceDebug` cmdlet disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Examples
+## EXAMPLES
### 1: Disable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-RunspaceDebug](Enable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Enables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Enable-PSBreakpoint [-PassThru] [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm
Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't gene
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Runspacedebug (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md
Title: Enable-RunspaceDebug
--- # Enable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Enable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-RunspaceDebug` cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Examples
+## EXAMPLES
### 1: Enable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 True False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Export Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-Alias.md
Title: Export-Alias
--- # Export-Alias
-## Synopsis
+## SYNOPSIS
Exports information about currently defined aliases to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file does not exist, the cmdlet will create it. `Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
-## Examples
+## EXAMPLES
### Example 1: Export an alias
The third and fourth commands add the aliases in the Alias.ps1 file to a remote
The third command uses the `New-PSSession` cmdlet to create the session. The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
-## Parameters
+## PARAMETERS
### -Append
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).
-## Inputs
+## INPUTS
### None. You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Export-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
* You can only Export-Aliases to a file.
-## Related links
+## RELATED LINKS
[Get-Alias](Get-Alias.md)
Microsoft.PowerShell.Utility Export Clixml (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-Clixml.md
Title: Export-Clixml
# Export-Clixml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-F
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Clixml` cmdlet creates a Common Language Infrastructure (CLI) XML-based representation of an object or objects and stores it in a file. You can then use the `Import-Clixml` cmdlet to
file. `ConvertTo-XML` returns the XML, so you can continue to process it in Powe
A valuable use of `Export-Clixml` on Windows computers is to export credentials and secure strings securely as XML. For an example, see Example 3.
-## Examples
+## EXAMPLES
### Example 1: Export a string to an XML file
The output of `Get-Content` in this example has been truncate to focus on the cr
in the XML file. Note that the plain text value of the password is stored in the XML file as a Unicode character array as proven by `Format-Hex`. So the value is encoded but not encrypted.
-## Parameters
+## PARAMETERS
### -Depth
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
+## INPUTS
### System.Management.Automation.PSObject You can pipeline any object to `Export-Clixml`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-Clixml` creates a file that contains the XML.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Html](ConvertTo-Html.md)
Microsoft.PowerShell.Utility Export Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## Synopsis
+## SYNOPSIS
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Export process properties to a CSV file
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## Parameters
+## PARAMETERS
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV list is sent to the file designated in the Path parameter.
-## Notes
+## NOTES
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Formatdata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-FormatData.md
Title: Export-FormatData
--- # Export-FormatData
-## Synopsis
+## SYNOPSIS
Saves formatting data from the current session in a formatting file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
[-IncludeScriptBlock] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
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).
-## Examples
+## EXAMPLES
### Example 1: Export session format data
The third command shows the effects of this change. The command uses the `Get-Pr
get processes that have names that begin with P. The output shows that property values that are calculated by using script blocks are missing from the display.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Management.Automation.ExtendedTypeDefinition You can pipe **ExtendedTypeDefinition** objects from `Get-FormatData` to `Export-FormatData`.
-## Outputs
+## OUTPUTS
### None `Export-FormatData` does not return any objects. It generates a file and saves it in the specified path.
-## Notes
+## NOTES
- To use any formatting file, including an exported formatting file, the execution policy for the session must allow scripts and configuration files to run. For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Export Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-PSSession.md
Title: Export-PSSession
# Export-PSSession
-## Synopsis
+## SYNOPSIS
Exports commands from another session and saves them in a PowerShell module.
-## Syntax
+## SYNTAX
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## Examples
+## EXAMPLES
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Export-PSSession`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-PSSession` returns a list of files that comprise the module that it created.
-## Notes
+## NOTES
`Export-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for remoting. For more information, see
The module that `Export-PSSession` creates might include a formatting file, even
does not import formatting data. If the command does not import formatting data, any formatting files that are created will not contain formatting data.
-## Related links
+## RELATED LINKS
[about_Command_Precedence](../Microsoft.PowerShell.Core/About/about_Command_Precedence.md)
Microsoft.PowerShell.Utility Format Custom (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Format-Custom.md
Title: Format-Custom
--- # Format-Custom
-## Synopsis
+## SYNOPSIS
Uses a customized view to format the output.
-## Syntax
+## SYNTAX
``` Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-View <String>]
Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-Vi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Custom` cmdlet formats the output of a command as defined in an alternate view. `Format-Custom` is designed to display views that are not just tables or just lists. You can use the views defined in PowerShell, or you can create your own views in a new `format.ps1xml` file and use the `Update-FormatData` cmdlet to add them to PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Format output with a custom view
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -Depth
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Custom`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Custom` returns the format objects that represent the display.
-## Notes
+## NOTES
`Format-Custom` is designed to display views that are not just tables or just lists. To display an alternate table view, use `Format-Table`. To display an alternate list view, use `Format-List`.
You can also refer to `Format-Custom` by its built-in alias, `fc`. For more info
The **GroupBy** parameter assumes that the objects are sorted. Before using `Format-Custom` to group the objects, use `Sort-Object` to sort them.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Hex (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Format-Hex.md
Title: Format-Hex
# Format-Hex
-## Synopsis
+## SYNOPSIS
Displays a file or other input as hexadecimal.
-## Syntax
+## SYNTAX
### Path
Format-Hex -InputObject <PSObject> [-Encoding <Encoding>] [-Count <Int64>] [-Off
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Hex` cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at
to get file information.
When using `Format-Hex` on a file, the cmdlet ignores newline characters and returns the entire contents of a file in one string with the newline characters preserved.
-## Examples
+## EXAMPLES
### Example 1: Get the hexadecimal representation of a string
data, and the adjacent object is also numeric, it will group them into a single
0000000000000000 01 00 00 00 00 00 00 00 � ```
-## Parameters
+## PARAMETERS
### -Count
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ByteCollection
by `Format-Hex`. The output also states they type of bytes being processed. If y
**Path** or **LiteralPath** parameter, the object contains the path of the file that contains each byte. If you pass a string, boolean, integer, etc, it will be labeled appropriately.
-## Notes
+## NOTES
The right-most column of output tries to render the bytes as ASCII characters:
Generally, each byte is interpreted as a Unicode code point, which means that:
- Multi-byte UTF-8 characters never render correctly - UTF-16 characters render correctly only if their high-order byte happens be `NUL`.
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Utility Format List (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Format-List.md
Title: Format-List
--- # Format-List
-## Synopsis
+## SYNOPSIS
Formats the output as a list of properties in which each property appears on a new line.
-## Syntax
+## SYNTAX
``` Format-List [[-Property] <Object[]>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-List` cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use `Format-List` to format and display all or
selected properties of an object as a list (format-list *).
Because more space is available for each item in a list than in a table, PowerShell displays more properties of the object in the list, and the property values are less likely to be truncated.
-## Examples
+## EXAMPLES
### Example 1: Format computer services
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -DisplayError
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-List`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-List` returns the format objects that represent the list.
-## Notes
+## NOTES
You can also refer to Format-List by its built-in alias, FL. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use the list format, otherwis
fails. If the alternate view is a table, use `Format-Table`. If the alternate view is not a list or a table, use `Format-Custom`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Table (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Format-Table.md
Title: Format-Table
# Format-Table
-## Synopsis
+## SYNOPSIS
Formats the output as a table.
-## Syntax
+## SYNTAX
### All
Format-Table [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [[-Property
[-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Table` cmdlet formats the output of a command as a table with the selected properties of the object in each column. The object type determines the default layout and properties that are
specify the column headings in the table. To add a calculated property, use the
**GroupBy** parameter. For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
-## Examples
+## EXAMPLES
### Example 1: Format PowerShell host
Wednesday
InvalidArgument: Failed to evaluate expression " $_ / $null ". ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object down the pipeline to `Format-Table`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Table` returns format objects that represent the table.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Wide (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Format-Wide.md
Title: Format-Wide
--- # Format-Wide
-## Synopsis
+## SYNOPSIS
Formats objects as a wide table that displays only one property of each object.
-## Syntax
+## SYNTAX
``` Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>]
Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Wide` cmdlet formats objects as a wide table that displays only one property of each object. You can use the **Property** parameter to determine which property is displayed.
-## Examples
+## EXAMPLES
### Example 1: Format names of files in the current directory
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Wide`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Wide` returns format objects that represent the table.
-## Notes
+## NOTES
You can also refer to `Format-Wide` by its built-in alias, `fw`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use table format; if it does
fails. If the alternate view is a list, use `Format-List`. If the alternate view is neither a list nor a table, use Format-Custom.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Get Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Alias.md
Title: Get-Alias
--- # Get-Alias
-## Synopsis
+## SYNOPSIS
Gets the aliases for the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Alias [[-Name] <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonP
Get-Alias [-Exclude <String[]>] [-Scope <String>] [-Definition <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Alias` cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your PowerShell profile.
parameter, `Get-Alias` takes a command name and returns its aliases.
Beginning in Windows PowerShell 3.0, `Get-Alias` displays non-hyphenated alias names in an `<alias> -> <definition>` format to make it even easier to find the information that you need.
-## Examples
+## EXAMPLES
### Example 1: Get all aliases in the current session
that begin with "e".
The command uses the **Scope** parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.
-## Parameters
+## PARAMETERS
### -Definition
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
+## INPUTS
### System.String You can pipe alias names to `Get-Alias`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
You can pipe alias names to `Get-Alias`.
every alias, but PowerShell uses an arrow-based format to display the names of non-hyphenated aliases.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To delete an alias, use `Remove-Item`. - The arrow-based alias name format is not used for aliases that include a hyphen. These are likely to be preferred substitute names for cmdlets and functions, instead of typical abbreviations or nicknames.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Get Culture (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Culture.md
Title: Get-Culture
# Get-Culture
-## Synopsis
+## SYNOPSIS
Gets the current culture set in the operating system.
-## Syntax
+## SYNTAX
### CurrentCulture (Default)
Get-Culture [-Name <String[]>] [-NoUserOverrides] [<CommonParameters>]
Get-Culture [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Culture` cmdlet gets information about the current culture settings. This includes information about the current language settings on the system, such as the keyboard layout, and the
system, and the [Set-Culture](/powershell/module/international/set-culture) cmdl
International module. The user-interface (UI) culture determines which text strings are used for user interface elements, such as menus and messages.
-## Examples
+## EXAMPLES
### Example 1: Get culture settings
LCID Name DisplayName
1036 fr-FR French (France) ```
-## Parameters
+## PARAMETERS
### -ListAvailable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo `Get-Culture` returns an object that represents the current culture.
-## Notes
+## NOTES
You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the name of the current culture and the `$PsUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
[Set-Culture](/powershell/module/international/set-culture)
Microsoft.PowerShell.Utility Get Date (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Date.md
Title: Get-Date
# Get-Date
-## Synopsis
+## SYNOPSIS
Gets the current date and time.
-## Syntax
+## SYNTAX
### Date (Default)
Get-Date -UnixTimeSeconds <Int64> [-Year <Int32>] [-Month <Int32>] [-Day <Int32>
-UFormat <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Date` cmdlet gets a **DateTime** object that represents the current date or a date that you specify. `Get-Date` can format the date and time in several .NET and UNIX formats. You can use
programs.
`Get-Date` uses the computer's culture settings to determine how the output is formatted. To view your computer's settings, use `(Get-Culture).DateTimeFormat`.
-## Examples
+## EXAMPLES
### Example 1: Get the current date and time
PS> Get-Date -Date "2020-01-01T00:00:00" -AsUTC
Wednesday, January 1, 2020 8:00:00 AM ```
-## Parameters
+## PARAMETERS
### -AsUTC
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Pipeline input `Get-Date` accepts pipeline input. For example, `Get-ChildItem | Get-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime or System.String
The method `(Get-Date).ToString()` converts a **DateTime** object a **String** o
To display an object's properties and methods, send the object down the pipeline to `Get-Member`. For example, `Get-Date | Get-Member`.
-## Notes
+## NOTES
**DateTime** objects are in long-date and long-time formats for the system locale.
The valid **UFormat specifiers** are displayed in the following table:
| `%y` | Year in 2-digit format | 19 | | `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |
-## Related links
+## RELATED LINKS
[ForEach-Object](../Microsoft.PowerShell.Core/ForEach-Object.md)
Microsoft.PowerShell.Utility Get Error (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Error.md
Title: Get-Error
# Get-Error
-## Synopsis
+## SYNOPSIS
Gets and displays the most recent error messages from the current session.
-## Syntax
+## SYNTAX
### Newest (Default)
Get-Error [[-Newest] <Int32>] [<CommonParameters>]
Get-Error [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Error` cmdlet gets a **PSExtendedError** object that represents the current error details from the last error that occurred in the session.
session using the **Newest** parameter.
The `Get-Error` cmdlet also receives error objects from a collection, such as `$Error`, to display multiple errors from the current session.
-## Examples
+## EXAMPLES
### Example 1: Get the most recent error details
messages, similar to the result of Example 1.
$Error | Get-Error ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### PSObject Supports input from any **PSObject**, but results vary unless either an **ErrorRecord** or **Exception** object are supplied.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ErrorRecord#PSExtendedError Output in a **PSExtendedError** object.
-## Notes
+## NOTES
`Get-Error` accepts pipeline input. For example, `$Error | Get-Error`.
-## Related links
+## RELATED LINKS
[about_Try_Catch_Finally](../Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md)
Microsoft.PowerShell.Utility Get Event (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Event.md
Title: Get-Event
--- # Get-Event
-## Synopsis
+## SYNOPSIS
Gets the events in the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-Event [[-SourceIdentifier] <String>] [<CommonParameters>]
Get-Event [-EventIdentifier] <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Event` cmdlet gets events in the PowerShell event queue for the current session. You can get all events or use the **EventIdentifier** or **SourceIdentifier** parameter to specify the
PowerShell exits. You can use `Get-Event` or `Wait-Event` to get the events.
This cmdlet does not get events from the Event Viewer logs. To get those events, use `Get-WinEvent` or `Get-EventLog`.
-## Examples
+## EXAMPLES
### Example 1: Get all events
PS C:\> Get-Event -EventIdentifier 2
This command gets the event with an event identifier of 2.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs `Get-Event` returns a **PSEventArgs** object for each event. To see a description of this object, type `Get-Help Get-Event -Full` and see the Notes section of the help topic.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The `Get-Event` cmdlet returns a **PSEventArgs** object
register an event. In the value of the **Action** parameter, the **MessageData** property of the `$Event` automatic variable contains this value.
-## Related links
+## RELATED LINKS
[New-Event](New-Event.md)
Microsoft.PowerShell.Utility Get Eventsubscriber (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-EventSubscriber.md
Title: Get-EventSubscriber
--- # Get-EventSubscriber
-## Synopsis
+## SYNOPSIS
Gets the event subscribers in the current session.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-EventSubscriber [[-SourceIdentifier] <String>] [-Force] [<CommonParameters>]
Get-EventSubscriber [-SubscriptionId] <Int32> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventSubscriber` cmdlet gets the event subscribers in the current session.
your Windows PowerShell session, and the events to which you subscribed are adde
queue whenever they are raised. To cancel an event subscription, delete the event subscriber by using the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get the event subscriber for a timer event
being generated when the Elapsed event occurs.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventSubscriber `Get-EventSubscriber` returns an object that represents each event subscriber.
-## Notes
+## NOTES
The `New-Event` cmdlet, which creates a custom event, does not generate a subscriber. Therefore, the `Get-EventSubscriber` cmdlet will not find a subscriber object for these events. However, if you use
generates.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Get Filehash (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-FileHash.md
Title: Get-FileHash
--- # Get-FileHash
-## Synopsis
+## SYNOPSIS
Computes the hash value for a file by using a specified hash algorithm.
-## Syntax
+## SYNTAX
### Path (Default)
Get-FileHash [-LiteralPath] <String[]> [[-Algorithm] <String>] [<CommonParameter
Get-FileHash [-InputStream] <Stream> [[-Algorithm] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FileHash` cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying
are also identical.
By default, the `Get-FileHash` cmdlet uses the SHA256 algorithm, although any hash algorithm that is supported by the target operating system can be used.
-## Examples
+## EXAMPLES
### Example 1: Compute the hash value for a file
Hash
64EC88CA00B268E5BA1A35678A1B5316D212F4F366B2477232534A8AECA37F3C ```
-## Parameters
+## PARAMETERS
### -Algorithm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string to the `Get-FileHash` cmdlet that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### Microsoft.Powershell.Utility.FileHash `Get-FileHash` returns an object that represents the path to the specified file, the value of the computed hash, and the algorithm used to compute the hash.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Get Formatdata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-FormatData.md
Title: Get-FormatData
--- # Get-FormatData
-## Synopsis
+## SYNOPSIS
Gets the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FormatData` cmdlet gets the formatting data in the current session.
cmdlet to serialize the objects, convert them to XML, and save them in `Format.p
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Get all formatting data
TypeNames FormatViewDefinition
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash} ```
-## Parameters
+## PARAMETERS
### -PowerShellVersion
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExtendedTypeDefinition
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-FormatData](Export-FormatData.md)
Microsoft.PowerShell.Utility Get Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Host.md
Title: Get-Host
--- # Get-Host
-## Synopsis
+## SYNOPSIS
Gets an object that represents the current host program.
-## Syntax
+## SYNTAX
``` Get-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Host` cmdlet gets an object that represents the program that is hosting Windows PowerShell.
including detailed information about the version of Windows PowerShell that is c
the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
-## Examples
+## EXAMPLES
### Example 1: Get information about the PowerShell console host
This command uses the **PrivateData** property of `$Host` as its ErrorBackground
see all of the properties of the object in the `$Host`.PrivateData property, type `$host.PrivateData | format-list *`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Internal.Host.InternalHost `Get-Host` returns a **System.Management.Automation.Internal.Host.InternalHost** object.
-## Notes
+## NOTES
The `$Host` automatic variable contains the same object that `Get-Host` returns, and you can use it in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variables contain the same
use these features interchangeably.
For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Get Markdownoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-MarkdownOption.md
Title: Get-MarkdownOption
# Get-MarkdownOption
-## Synopsis
+## SYNOPSIS
Returns the current colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
``` Get-MarkdownOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Returns the current colors and styles used for rendering Markdown content in the console. The strings displayed in the output of this cmdlet contain the ANSI escape codes used to change the
color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org/) website.
-## Examples
+## EXAMPLES
### Example 1 - Get the current colors and style
EmphasisItalics : [36m
> (`[char]0x1B`) for the ANSI escape sequence. For more information about ANSI escape codes work, > see [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-MarkdownOption](Set-MarkdownOption.md)
Microsoft.PowerShell.Utility Get Member (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Member.md
Title: Get-Member
--- # Get-Member
-## Synopsis
+## SYNOPSIS
Gets the properties and methods of objects.
-## Syntax
+## SYNTAX
``` Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Member` cmdlet gets the members, the properties and methods, of objects.
information about static members, the members of the class, not of the instance,
parameter. To get only certain types of members, such as **NoteProperties**, use the **MemberType** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get the members of process objects
LastWriteTimeUtc
Attributes ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Get-Member`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MemberDefinition `Get-Member` returns an object for each property or method that its gets.
-## Notes
+## NOTES
You can get information about a collection object either by using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`.
return information about the `[System.RuntimeType]` type. However, when you use
parameter, `Get-Member` returns the static members of the specific type represented by the `System.RuntimeType` instance.
-## Related links
+## RELATED LINKS
[Add-Member](Add-Member.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Title: Get-PSBreakpoint
--- # Get-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Gets the breakpoints that are set in the current session.
-## Syntax
+## SYNTAX
### Line (Default)
Get-PSBreakpoint [-Type] <BreakpointType[]> [-Script <string[]>] [<CommonParamet
Get-PSBreakpoint [-Id] <int[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints.
examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed
PowerShell scripts and commands. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Get all breakpoints for all scripts and functions
This command gets all line and variable breakpoints in the `Sample.ps1` script.
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1" ```
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## Notes
+## NOTES
You can use `Get-PSBreakpoint` or its alias, "gbp".
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Pscallstack (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-PSCallStack.md
Title: Get-PSCallStack
--- # Get-PSCallStack
-## Synopsis
+## SYNOPSIS
Displays the current call stack.
-## Syntax
+## SYNTAX
``` Get-PSCallStack [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSCallStack` cmdlet displays the current call stack.
display the call stack in a script or function outside of the debugger.
To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCallStack`.
-## Examples
+## EXAMPLES
### Example 1: Get the call stack for a function
stack.
The final command is a `Step-Out` command (`o`) that exits the debugger and continues executing the script to completion.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CallStackFrame `Get-PSCallStack` returns an object that represents the items in the call stack.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Random (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Random.md
Title: Get-Random
--- # Get-Random
-## Synopsis
+## SYNOPSIS
Gets a random number, or selects objects randomly from a collection.
-## Syntax
+## SYNTAX
### RandomNumberParameterSet (Default)
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<Commo
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Shuffle] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Random` cmdlet gets a randomly selected number. If you submit a collection of objects to `Get-Random`, it gets one or more randomly selected objects from the collection.
objects returned from a collection, or a seed number.
> the current session until you use **SetSeed** again or close the session. You can't reset the seed > to its default value.
-## Examples
+## EXAMPLES
### Example 1: Get a random integer
Get-Random -InputObject @('a','',$null)
`Get-Random` will return either `a`, empty string, or `$null`. The empty sting displays as a blank line and `$null` returns to a PowerShell prompt.
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe one or more objects. `Get-Random` selects values randomly from the piped objects.
-## Outputs
+## OUTPUTS
### System.Int32, System.Int64, System.Double `Get-Random` returns an integer or floating-point number, or an object selected randomly from a submitted collection.
-## Notes
+## NOTES
By default, `Get-Random` generates cryptographically secure randomness using the [RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class.
parameter set accepts arrays that contain an empty string or `$null`. In earlier
versions, only the **Maximum** parameter in the **RandomNumberParameterSet** parameter set accepted an empty string or `$null`.
-## Related links
+## RELATED LINKS
[System.Security.Cryptography.RandomNumberGenerator()](/dotnet/api/system.security.cryptography.randomnumbergenerator)
Microsoft.PowerShell.Utility Get Runspace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Runspace.md
Title: Get-Runspace
--- # Get-Runspace
-## Synopsis
+## SYNOPSIS
Gets active runspaces within a PowerShell host process.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Get-Runspace [-Id] <Int32[]> [<CommonParameters>]
Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Runspace` cmdlet gets active runspaces in a PowerShell host process.
-## Examples
+## EXAMPLES
### Example 1: Get runspaces
Id Name ComputerName Type State Availability
1 Runspace1 localhost Local Opened Busy ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to `Debug-Runspace`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Debug-Runspace](Debug-Runspace.md)
Microsoft.PowerShell.Utility Get Runspacedebug (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md
Title: Get-RunspaceDebug
--- # Get-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Shows runspace debugging options.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Get-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Get-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-RunspaceDebug` cmdlet shows runspace debugging options.
-## Examples
+## EXAMPLES
### 1: Show the state of the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Get Tracesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-TraceSource.md
Title: Get-TraceSource
--- # Get-TraceSource
-## Synopsis
+## SYNOPSIS
Gets PowerShell components that are instrumented for tracing.
-## Syntax
+## SYNTAX
``` Get-TraceSource [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TraceSource` cmdlet gets the trace sources for PowerShell components that are currently in use. You can use the data to determine which PowerShell components you can trace. When tracing, the
trace data to monitor data flow, program execution, and errors.
The tracing cmdlets were designed for PowerShell developers, but they are available to all users.
-## Examples
+## EXAMPLES
### Example 1: Get trace sources by name
Get-TraceSource
This command gets all of the PowerShell components that can be traced.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String You can pipe a string that contains the name of a trace source to `Get-TraceSource`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTraceSource `Get-TraceSource` returns objects that represent the trace sources.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TraceSource](Set-TraceSource.md)
Microsoft.PowerShell.Utility Get Typedata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-TypeData.md
Title: Get-TypeData
--- # Get-TypeData
-## Synopsis
+## SYNOPSIS
Gets the extended type data in the current session.
-## Syntax
+## SYNTAX
``` Get-TypeData [[-TypeName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TypeData` cmdlet gets the extended type data in the current session. This includes type data that was added to the session by `Types.ps1xml` file and dynamic type data that was added by
about dynamic type data that the `Update-TypeData` cmdlet adds, see `Update-Type
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all extended type data
The command gets the **DateTime** key in **Members** and its **GetScriptBlock**
The output shows the script block that creates the value of the **DateTime** property of every **System.DateTime** object in PowerShell.
-## Parameters
+## PARAMETERS
### -TypeName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe type names to `Get-TypeData`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.TypeData
-## Notes
+## NOTES
`Get-TypeData` gets only the extended type data in the current session. It does not get extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Get Uiculture (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-UICulture.md
Title: Get-UICulture
--- # Get-UICulture
-## Synopsis
+## SYNOPSIS
Gets the current UI culture settings in the operating system.
-## Syntax
+## SYNTAX
``` Get-UICulture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-UICulture` cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such
as menus and messages.
You can also use the `Get-Culture` cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.
-## Examples
+## EXAMPLES
### Example 1: Get the UI culture
This command displays the short date pattern for the current UI culture. To see
subproperties of the **DateTimeFormat** property of the UI culture, type `(Get-UICulture).DateTimeFormat | Get-Member`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo, Microsoft.PowerShell.VistaCultureInfo
You cannot pipe input to this cmdlet.
it returns a **CultureInfo** object. In Windows PowerShell 2.0, it returns a **VistaCultureInfo** object.
-## Notes
+## NOTES
You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the name of the current culture, and the `$PSUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Get Unique (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Unique.md
Title: Get-Unique
--- # Get-Unique
-## Synopsis
+## SYNOPSIS
Returns unique items from a sorted list.
-## Syntax
+## SYNTAX
### AsString (Default)
Get-Unique [-InputObject <PSObject>] [-AsString] [<CommonParameters>]
Get-Unique [-InputObject <PSObject>] [-OnType] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Unique` cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. The list must be sorted for the cmdlet to work properly.
and returns only one instance of each item. The list must be sorted for the cmdl
`Get-Unique` is case-sensitive. As a result, strings that differ only in character casing are considered to be unique.
-## Examples
+## EXAMPLES
### Example 1: Get unique words in a text file
The **AsString** parameter tells `Get-Unique` to treat the **ProcessName** value
Without this parameter, `Get-Unique` treats the **ProcessName** values as objects and returns only one instance of the object, that is, the first process name in the list.
-## Parameters
+## PARAMETERS
### -AsString
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any type of object to `Get-Unique`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject The type of object that `Get-Unique` returns is determined by the input.
-## Notes
+## NOTES
You can also refer to `Get-Unique` by its built-in alias, `gu`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md). To sort a list, use Sort-Object. You can also use the **Unique** parameter of `Sort-Object` to find the unique items in a list.
-## Related links
+## RELATED LINKS
[Select-Object](Select-Object.md)
Microsoft.PowerShell.Utility Get Uptime (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Uptime.md
Title: Get-Uptime
# Get-Uptime
-## Synopsis
+## SYNOPSIS
Get the **TimeSpan** since last boot.
-## Syntax
+## SYNTAX
### Timespan (Default)
Get-Uptime [<CommonParameters>]
Get-Uptime [-Since] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet returns the time elapsed since the last boot of the operating system. The `Get-Uptime` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Show time since last boot
Get-Uptime -Since
Tuesday, June 18, 2019 2:34:56 PM ```
-## Parameters
+## PARAMETERS
### -Since
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
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.TimeSpan
This type is returned when using the **Since** parameter.
> For more information about Windows fast startup, see > [Distinguishing Fast Startup from Wake-from-Hibernation](/windows-hardware/drivers/kernel/distinguishing-fast-startup-from-wake-from-hibernation).
-## Notes
+## NOTES
On Windows, the value returned is the same as the **LastBootUpTime** property of the **Win32_OperatingSystem** class in WMI.
-## Related links
+## RELATED LINKS
[Win32_OperatingSystem](/windows/win32/cimwin32prov/win32-operatingsystem#properties)
Microsoft.PowerShell.Utility Get Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Variable.md
Title: Get-Variable
--- # Get-Variable
-## Synopsis
+## SYNOPSIS
Gets the variables in the current console.
-## Syntax
+## SYNTAX
``` Get-Variable [[-Name] <String[]>] [-ValueOnly] [-Include <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Variable` cmdlet gets the PowerShell variables in the current console. You can retrieve just the values of the variables by specifying the **ValueOnly** parameter, and you can filter the variables returned by name.
-## Examples
+## EXAMPLES
### Example 1: Get variables by letter
Get-Variable -Scope 0
Compare-Object (Get-Variable -Scope 0) (Get-Variable -Scope 1) ```
-## Parameters
+## PARAMETERS
### -Exclude
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the variable name to `Get-Variable`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSVariable
When you specify the **ValueOnly** parameter, if the specified variable's value
processing the variable's values one at a time. A workaround to force collection enumeration is to enclose the `Get-Variable` command in parenthesis.
-## Notes
+## NOTES
- This cmdlet does not manage environment variables. To manage environment variables, you can use the environment variable provider.
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Get Verb (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Get-Verb.md
Title: Get-Verb
--- # Get-Verb
-## Synopsis
+## SYNOPSIS
Gets approved PowerShell verbs.
-## Syntax
+## SYNTAX
``` Get-Verb [[-Verb] <String[]>] [[-Group] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Verb` function gets verbs that are approved for use in PowerShell commands.
warning message.
> [Approved Verbs](../../docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md) in > the Microsoft Docs.
-## Examples
+## EXAMPLES
### Example 1 - Get a list of all verbs
Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility ```
-## Parameters
+## PARAMETERS
### -Group
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Management.Automation.VerbInfo
-## Notes
+## NOTES
PowerShell verbs are assigned to a group based on their most common use. The groups are designed to make the verbs easy to find and compare, not to restrict their use. You can use any approved verb
Some of the cmdlets that are installed with PowerShell, such as `Tee-Object` and
unapproved verbs. These cmdlets are historic exceptions and their verbs are classified as **reserved**.
-## Related links
+## RELATED LINKS
[Import-Module](../microsoft.powershell.core/import-module.md)
Microsoft.PowerShell.Utility Group Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Group-Object.md
Title: Group-Object
# Group-Object
-## Synopsis
+## SYNOPSIS
Groups objects that contain the same value for specified properties.
-## Syntax
+## SYNTAX
### HashTable
Group-Object [-NoElement] [-AsHashTable] [-AsString] [-InputObject <PSObject>]
[[-Property] <Object[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Group-Object` cmdlet displays objects in groups based on the value of a specified property. `Group-Object` returns a table with one row for each property value and a column that displays the
Beginning in PowerShell 7, `Group-Object` can combine the **CaseSensitive** and
parameters to create a case-sensitive hash table. The hash table keys use case-sensitive comparisons and output a **System.Collections.Hashtable** object.
-## Examples
+## EXAMPLES
### Example 1: Group files by extension
pipeline. `Group-Object` groups the objects using the **Property** value **Exten
**CaseSensitive** and **AsHashTable** parameters create the hash table and the keys are grouped using the case-sensitive keys `.txt` and `.TXT`.
-## Parameters
+## PARAMETERS
### -AsHashTable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Group-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GroupInfo or System.Collections.Hashtable When you use the **AsHashTable** parameter, `Group-Object` returns a **Hashtable** object. Otherwise, it returns a **GroupInfo** object.
-## Notes
+## NOTES
You can use the **GroupBy** parameter of the formatting cmdlets, such as `Format-Table` and `Format-List`, to group objects. Unlike `Group-Object`, which creates a single table with a row for
type. When grouping objects of different .NET Core types, `Group-Object` uses th
Objects that don't have a specified property can't be grouped. Objects that aren't grouped appear in the final **GroupInfo** object output in a group named `AutomationNull.Value`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Import Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-Alias.md
Title: Import-Alias
--- # Import-Alias
-## Synopsis
+## SYNOPSIS
Imports an alias list from a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-What
[<CommonParameters>] ```
-## Description
+## 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.
-## Examples
+## EXAMPLES
### Example 1: Import aliases from a file
Import-Alias test.txt
This command imports alias information from a file named test.txt.
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Alias`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Import-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Import Clixml (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-Clixml.md
Title: Import-Clixml
# Import-Clixml
-## Synopsis
+## SYNOPSIS
Imports a CLIXML file and creates corresponding objects in PowerShell.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Clixml -LiteralPath <String[]> [-IncludeTotalCount] [-Skip <UInt64>] [-Fi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Clixml` cmdlet imports a Common Language Infrastructure (CLI) XML file with data that represents Microsoft .NET Framework objects and creates the PowerShell objects. For more information
that were exported as secure XML using `Export-Clixml`. For an example, see Exam
`Import-Clixml` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import a serialized file and recreate an object
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -First
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
+## INPUTS
### System.String You can pipeline a string that contains a path to `Import-Clixml`.
-## Outputs
+## OUTPUTS
### PSObject `Import-Clixml` returns objects that were deserialized from the stored XML files.
-## Notes
+## NOTES
When specifying multiple values for a parameter, use commas to separate the values. For example, `<parameter-name> <value1>, <value2>`.
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Import Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-Csv.md
Title: Import-Csv
--- # Import-Csv
-## Synopsis
+## SYNOPSIS
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## Syntax
+## SYNTAX
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## Examples
+## EXAMPLES
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns the objects described by the content in the CSV file.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Localizeddata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-LocalizedData.md
Title: Import-LocalizedData
--- # Import-LocalizedData
-## Synopsis
+## SYNOPSIS
Imports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
-## Syntax
+## SYNTAX
``` Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-LocalizedData` cmdlet dynamically retrieves strings from a subdirectory whose name matches the UI language set for the current user of the operating system. It is designed to enable
it easy for scripts to display user messages in the UI language of the current u
information about this and about the format of the `.psd1` files, see [about_Script_Internationalization](../Microsoft.PowerShell.Core/About/about_Script_Internationalization.md).
-## Examples
+## EXAMPLES
### Example 1: Import text strings
The sample output shows the results of running both scripts when the UI culture
and there are no matching files or directories for that UI culture. `Day1.ps1` displays an error message and English output. `Day2.ps1` just displays the English output.
-## Parameters
+## PARAMETERS
### -BaseDirectory
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable `Import-LocalizedData` saves the hash table in the variable that is specified by the value of the **BindingVariable** parameter.
-## Notes
+## NOTES
- Before using `Import-LocalizedData`, localize your user messages. Format the messages for each locale (UI culture) in a hash table of key-value pairs, and save the hash table in a file with the
You cannot pipe input to this cmdlet.
For more information, see [about_Script_Internationalization](../Microsoft.Powershell.Core/About/about_Script_Internationalization.md).
-## Related links
+## RELATED LINKS
[Write-Host](Write-Host.md)
Microsoft.PowerShell.Utility Import Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-PSSession.md
Title: Import-PSSession
--- # Import-PSSession
-## Synopsis
+## SYNOPSIS
Imports commands from another session into the current session.
-## Syntax
+## SYNTAX
``` Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <Stri
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PSSession` cmdlet imports commands , such as cmdlets, functions, and aliases, from a PSSession on a local or remote computer into the current session. You can import any command that
Beginning in Windows PowerShell 3.0, you can use the `Import-Module` cmdlet to i
remote session into the current session. This feature uses implicit remoting. It is equivalent to using `Import-PSSession` to import selected modules from a remote session into the current session.
-## Examples
+## EXAMPLES
### Example 1: Import all commands from a PSSession
which returns the module name.
The `Get-Command` command is the equivalent of `Get-Command $M.Name`".
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
You cannot pipe objects to this cmdlet.
However, the imported module is temporary and exists only in the current session. To create a permanent module on disk, use the `Export-PSSession` cmdlet.
-## Notes
+## NOTES
- `Import-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for WS-Management remoting. For more information, see
permanent module on disk, use the `Export-PSSession` cmdlet.
include the prefix that you assign by using the **Prefix** parameter. To get help for an imported command in Windows PowerShell 2.0, use the original (non-prefixed) command name.
-## Related links
+## RELATED LINKS
[Export-PSSession](Export-PSSession.md)
Microsoft.PowerShell.Utility Import Powershelldatafile (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md
Title: Import-PowerShellDataFile
--- # Import-PowerShellDataFile
-## Synopsis
+## SYNOPSIS
Imports values from a `.PSD1` file without invoking its contents.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-PowerShellDataFile [-Path] <String[]> [<CommonParameters>]
Import-PowerShellDataFile [-LiteralPath] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a `.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
However, `Invoke-Expression` runs any code contained in the file. This could pro
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the code.
-## Examples
+## EXAMPLES
### Example 1: Retrieve values from PSD1
NodeName DSC-01
NodeName DSC-02 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Expression](Invoke-Expression.md)
Microsoft.PowerShell.Utility Invoke Expression (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Invoke-Expression.md
Title: Invoke-Expression
--- # Invoke-Expression
-## Synopsis
+## SYNOPSIS
Runs commands or expressions on the local computer.
-## Syntax
+## SYNTAX
``` Invoke-Expression [-Command] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Expression` cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without `Invoke-Expression`, a string submitted at the command
Expressions are evaluated and run in the current scope. For more information, se
> before running it. In general, it is best to design your script with predefined input options, > rather than allowing freeform input.
-## Examples
+## EXAMPLES
### Example 1: Evaluate an expression
command fails if the example number is not valid.
> If the example code from the help file has output in the example, PowerShell attempts to run the > output along with the code and an error will be thrown.
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String or PSObject You can pipe an object that represents the command to `Invoke-Expression`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### PSObject Returns the output that is generated by the invoked command (the value of the **Command** parameter).
-## Notes
+## NOTES
In most cases, you invoke expressions using PowerShell's call operator and achieve the same results. The call operator is a safer method. For more information, see [about_Operators](../microsoft.powershell.core/about/about_operators.md#call-operator-).
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Invoke Restmethod (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
Title: Invoke-RestMethod
# Invoke-RestMethod
-## Synopsis
+## SYNOPSIS
Sends an HTTP or HTTPS request to a RESTful web service.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-RestMethod -CustomMethod <String> [-FollowRelLink] [-MaximumFollowRelLink
[-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that return richly structured data.
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## Examples
+## EXAMPLES
### Example 1: Get the PowerShell RSS feed
$x
30 ```
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## Outputs
+## OUTPUTS
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## Notes
+## NOTES
Some features may not be available on all platforms.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Invoke Webrequest (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
Title: Invoke-WebRequest
# Invoke-WebRequest
-## Synopsis
+## SYNOPSIS
Gets content from a web page on the internet.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSessio
[-PreserveAuthorizationOnRedirect] [-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WebRequest` cmdlet sends HTTP and HTTPS requests to a web page or web service. It parses the response and returns collections of links, images, and other significant HTML elements.
variables. See the [Notes](#notes) section of this article.
> However, since the `contoso.com` sites do not exist, the examples do not work. Adapt the examples > to hosts in your environment.
-## Examples
+## EXAMPLES
### Example 1: Send a web request
$StatusCode
The terminating error is caught by the `catch` block, which retrieves the **StatusCode** from the **Exception** object.
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-WebRequest`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject
-## Notes
+## NOTES
Beginning with PowerShell 6.0.0 `Invoke-WebRequest` supports basic parsing only.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[Invoke-RestMethod](Invoke-RestMethod.md)
Microsoft.PowerShell.Utility Join String (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Join-String.md
Title: Join-String
# Join-String
-## Synopsis
+## SYNOPSIS
Combines objects from the pipeline into a single string.
-## Syntax
+## SYNTAX
### Default (Default)
Join-String [[-Property] <PSPropertyExpression>] [[-Separator] <String>] [-Outpu
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-String` cmdlet joins, or combines, text from pipeline objects into a single string.
or the result of the object that was converted to a string.
This cmdlet was introduced in PowerShell 6.2.
-## Examples
+## EXAMPLES
### Example 1: Join directory names
class {
} ```
-## Parameters
+## PARAMETERS
### -DoubleQuote
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Measure Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Measure-Command.md
Title: Measure-Command
--- # Measure-Command
-## Synopsis
+## SYNOPSIS
Measures the time it takes to run script blocks and cmdlets.
-## Syntax
+## SYNTAX
``` Measure-Command [-InputObject <PSObject>] [-Expression] <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Command` cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.
operation, and returns the execution time.
> [!NOTE] > Script blocks run by `Measure-Command` run in the current scope, not a child scope.
-## Examples
+## EXAMPLES
### Example 1: Measure a command
Value 2
For more information about the invocation operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#call-operator-).
-## Parameters
+## PARAMETERS
### -Expression
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe an object to `Measure-Command`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `Measure-Command` returns a time span object that represents the result.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Measure Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Measure-Object.md
Title: Measure-Object
--- # Measure-Object
-## Synopsis
+## SYNOPSIS
Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
-## Syntax
+## SYNTAX
### GenericMeasure (Default)
Measure-Object [[-Property] <PSPropertyExpression[]>] [-InputObject <PSObject>]
[-Character] [-IgnoreWhiteSpace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Object` cmdlet calculates the property values of certain types of object. `Measure-Object` performs three types of measurements, depending on the parameters in the command.
The `Measure-Object` cmdlet performs calculations on the property values of obje
**Average** of numeric values. For **String** objects, you can also use `Measure-Object` to count the number of lines, words, and characters.
-## Examples
+## EXAMPLES
### Example 1: Count the files and folders in a directory
StandardDeviation :
Property : PeakPagedMemorySize ```
-## Parameters
+## PARAMETERS
### -AllStats
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Measure-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GenericMeasureInfo
You can pipe objects to `Measure-Object`.
If you use the **Word** parameter, `Measure-Object` returns a **TextMeasureInfo** object. Otherwise, it returns a **GenericMeasureInfo** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility New Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-Alias.md
Title: New-Alias
# New-Alias
-## Synopsis
+## SYNOPSIS
Creates a new alias.
-## Syntax
+## SYNTAX
``` New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Alias` cmdlet creates a new alias in the current PowerShell session. Aliases created by using `New-Alias` are not saved after you exit the session or close PowerShell. You can use the `Export-Alias` cmdlet to save your alias information to a file. You can later use `Import-Alias` to retrieve that saved alias information.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
description, quick wmi alias, for the alias and makes it read-only. The last lin
uses `Get-Alias` to get the new alias and pipes it to Format-List to display all of the information about it.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **Passthru** parameter, `New-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the new alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To change an alias, use `Set-Alias`. To delete an alias, use `Remove-Item`.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility New Event (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-Event.md
Title: New-Event
--- # New-Event
-## Synopsis
+## SYNOPSIS
Creates a new event.
-## Syntax
+## SYNTAX
``` New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Event` cmdlet creates a new custom event.
the event subscription by using the `Unregister-Event` cmdlet, the event subscri
are deleted from the session. If you do not subscribe to the custom event, to delete the event, you must change the program conditions or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Create a new event in the event queue
Instrumentation (WMI) event that is raised when a new process is created. The co
Because the events that `New-Event` raises are automatically added to the PowerShell event queue, you do not need to register for that event.
-## Parameters
+## PARAMETERS
### -EventArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The new custom event, the event subscription, and the event queue exist only in
If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility New Guid (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-Guid.md
Title: New-Guid
--- # New-Guid
-## Synopsis
+## SYNOPSIS
Creates a GUID.
-## Syntax
+## SYNTAX
``` New-Guid [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Guid` cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
-## Examples
+## EXAMPLES
### Example 1: Create a GUID
New-Guid
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Guid This cmdlet returns a GUID.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-Object.md
Title: New-Object
--- # New-Object
-## Synopsis
+## SYNOPSIS
Creates an instance of a Microsoft .NET Framework or COM object.
-## Syntax
+## SYNTAX
### Net (Default)
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictio
New-Object [-ComObject] <String> [-Strict] [-Property <IDictionary>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Object` cmdlet creates an instance of a .NET Framework or COM object.
you type the fully qualified name of a .NET Framework class and the cmdlet retur
instance of that class. To create an instance of a COM object, use the **ComObject** parameter and specify the ProgID of the object as its value.
-## Examples
+## EXAMPLES
### Example 1: Create a System.Version object
members of `$array` to parameters of the constructor but the constructor does no
parameter. Wrapping `$array` in another array prevents PowerShell from attempting to bind the three members of `$array` to parameters of the constructor.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Object `New-Object` returns the object that is created.
-## Notes
+## NOTES
- `New-Object` provides the most commonly-used functionality of the VBScript CreateObject function. A statement like `Set objShell = CreateObject("Shell.Application")` in VBScript can be
You cannot pipe input to this cmdlet.
- `New-Object` expands upon the functionality available in the Windows Script Host environment by making it easy to work with .NET Framework objects from the command line and within scripts.
-## Related links
+## RELATED LINKS
[about_Object_Creation](../Microsoft.PowerShell.Core/About/about_Object_Creation.md)
Microsoft.PowerShell.Utility New Temporaryfile (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-TemporaryFile.md
Title: New-TemporaryFile
--- # New-TemporaryFile
-## Synopsis
+## SYNOPSIS
Creates a temporary file.
-## Syntax
+## SYNTAX
``` New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates temporary files that you can use in scripts.
order and uses the first path found:
- On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary file
$TempFile = New-TemporaryFile
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file in the `$TempFile` variable. You can use this file later in your script.
-## Parameters
+## PARAMETERS
### -Confirm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a **FileInfo** object that represents the temporary file.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Timespan (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-TimeSpan.md
Title: New-TimeSpan
--- # New-TimeSpan
-## Synopsis
+## SYNOPSIS
Creates a TimeSpan object.
-## Syntax
+## SYNTAX
### Date (Default)
New-TimeSpan [[-Start] <DateTime>] [[-End] <DateTime>] [<CommonParameters>]
New-TimeSpan [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Seconds <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-TimeSpan` cmdlet creates a **TimeSpan** object that represents a time interval. You can use a **TimeSpan** object to add or subtract time from **DateTime** objects.
You can use a **TimeSpan** object to add or subtract time from **DateTime** obje
Without parameters, a `New-TimeSpan` command returns a **TimeSpan** object that represents a time interval of zero.
-## Examples
+## EXAMPLES
### Example 1: Create a TimeSpan object for a specified duration
TotalSeconds : 27813562.3127728
TotalMilliseconds : 27813562312.7728 ```
-## Parameters
+## PARAMETERS
### -Days
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a **DateTime** object that represents that start time to `New-TimeSpan`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `New-TimeSpan` returns an object that represents the time span.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility New Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/New-Variable.md
Title: New-Variable
# New-Variable
-## Synopsis
+## SYNOPSIS
Creates a new variable.
-## Syntax
+## SYNTAX
``` New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Opti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Variable` cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
a variable, and determine whether variables are public or private.
Typically, you create a new variable by typing the variable name and its value, such as `$Var = 3`, but you can use the `New-Variable` cmdlet to use its parameters.
-## Examples
+## EXAMPLES
### Example 1: Create a variable
abc123xyz
This command demonstrates that variables with spaces can be created. The variables can be accessed using the `Get-Variable` cmdlet or directly by delimiting a variable with braces.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### System.Object You can pipe a value to `New-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `New-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Out File (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Out-File.md
Title: Out-File
--- # Out-File
-## Synopsis
+## SYNOPSIS
Sends output to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Out-File [[-Encoding] <Encoding>] -LiteralPath <string> [-Append] [-Force] [-NoC
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means
that the output may not be ideal for programmatic processing unless all input ob
When you need to specify parameters for the output, use `Out-File` rather than the redirection operator (`>`). For more information about redirection, see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md).
-## Examples
+## EXAMPLES
### Example 1: Send output and create a file
DemoDefaultOutFileWidth
For more information about `$PSDefaultParameterValues`, see [about_Preference_Variables](../Microsoft.Powershell.Core/About/about_preference_variables.md#psdefaultparametervalues).
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-File`.
-## Outputs
+## OUTPUTS
### None `Out-File` does not generate any output.
-## Notes
+## NOTES
Input objects are automatically formatted as they would be in the terminal, but you can use a `Format-*` cmdlet to explicitly control the formatting of the output to the file. For example,
cmdlet.
`Out-File` saves data to a file but it does not produce any output objects to the pipeline.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.Powershell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Out Gridview (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Out-GridView.md
Title: Out-GridView
--- # Out-GridView
-## Synopsis
+## SYNOPSIS
Sends output to an interactive table in a separate window.
-## Syntax
+## SYNTAX
### PassThru (Default)
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputMod
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For full instructions, see the [Notes](#notes) section of this article.
> [GraphicalTools](https://www.powershellgallery.com/packages/Microsoft.PowerShell.GraphicalTools) > module in the PowerShell Gallery.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a grid view
This command line can be used in a Windows shortcut. Without the **Wait** parame
would exit as soon as the `Out-GridView` window opened, which would close the `Out-GridView` window almost immediately.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None Normally, `Out-GridView` does not return any objects. When using the **PassThru** parameter, the objects representing the selected rows are returned to the pipeline.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The criteria only affects the display. It does not delete items from the table.
- To delete selected criteria, click the red X beside each criterion. - To delete all criteria, click the **Clear All** button.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out Printer (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Out-Printer.md
Title: Out-Printer
# Out-Printer
-## Synopsis
+## SYNOPSIS
Sends output to a printer.
-## Syntax
+## SYNTAX
``` Out-Printer [[-Name] <String>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified.
> This cmdlet was reintroduced in PowerShell 7. This cmdlet is only available on Windows systems > that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1 - Send a file to be printed on the default printer
Out-Printer -InputObject $H
`Get-Help` gets the full version of the Help topic for `Get-CimInstance` and stores it in the `$H` variable. The **InputObject** parameter passes the value of `$H` to `Out-Printer`.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-Printer`.
-## Outputs
+## OUTPUTS
### None `Out-Printer` does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
cmdlet sends it to a formatting cmdlet before rendering it.
you pipe the output of `Out-Printer` to `Get-Member`, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out String (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Out-String.md
Title: Out-String
# Out-String
-## Synopsis
+## SYNOPSIS
Outputs input objects as a string.
-## Syntax
+## SYNTAX
### NoNewLineFormatting (Default)
Out-String [-Width <Int32>] [-NoNewline] [-InputObject <PSObject>] [<CommonParam
Out-String [-Stream] [-Width <Int32>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-String` cmdlet converts input objects into strings. By default, `Out-String` accumulates the strings and returns them as a single string, but you can use the **Stream**
parameter to direct `Out-String` to return one line at a time or create an array
cmdlet lets you search and manipulate string output as you would in traditional shells when object manipulation is less convenient.
-## Examples
+## EXAMPLES
### Example 1: Get the current culture and convert the data to strings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-String`.
-## Outputs
+## OUTPUTS
### System.String `Out-String` returns the string that it creates from the input object.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb don't format objects. The `Out` cmdlets send objects to the formatter for the specified display destination.
-## Related links
+## RELATED LINKS
[about_Formatting](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md)
Microsoft.PowerShell.Utility Read Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Read-Host.md
Title: Read-Host
--- # Read-Host
-## Synopsis
+## SYNOPSIS
Reads a line of input from the console.
-## Syntax
+## SYNTAX
### AsString (Default)
Read-Host [[-Prompt] <Object>] [-MaskInput] [<CommonParameters>]
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
-## Examples
+## EXAMPLES
### Example 1: Save console input to a variable
value is stored as a plaintext **String** object in the `$pwd_string` variable.
$pwd_string = Read-Host "Enter a Password" -MaskInput ```
-## Parameters
+## PARAMETERS
### -AsSecureString
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept input from the PowerShell pipeline.
-## Outputs
+## OUTPUTS
### System.String or System.Security.SecureString If the **AsSecureString** parameter is used, `Read-Host` returns a **SecureString**. Otherwise, it returns a string.
-## Notes
+## NOTES
This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is connected to the keyboard of the host console.
-## Related links
+## RELATED LINKS
[Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Utility Register Engineevent (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Register-EngineEvent.md
Title: Register-EngineEvent
# Register-EngineEvent
-## Synopsis
+## SYNOPSIS
Subscribes to events that are generated by the PowerShell engine and by the `New-Event` cmdlet.
-## Syntax
+## SYNTAX
``` Register-EngineEvent [-SourceIdentifier] <String> [[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-EngineEvent` cmdlet subscribes to events that are generated by the PowerShell engine and the `New-Event` cmdlet. Use the **SourceIdentifier** parameter to specify the event.
the `Unregister-Event` cmdlet, which deletes the event subscriber from the sessi
When the subscribed event is raised, it is added to the event queue in your session. To get events in the event queue, use the `Get-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Register a PowerShell engine event on remote computers
The `Unregister-Event` cmdlet stops the job associated with the event subscripti
Id 19 is still running and creating new events. We use the **Job** cmdlets stop the job and remove the unneeded job objects. `Get-Content` displays the contents of the log file.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Register-EngineEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob If you use the **Action** parameter, `Register-EngineEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
when PowerShell has been idle for 300 milliseconds (ms).
> 2.2.0-beta4, **OnIdle** behavior changed to signal the event only if there is a `ReadKey()` > timeout and the current editing buffer is empty.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Register Objectevent (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Register-ObjectEvent.md
Title: Register-ObjectEvent
--- # Register-ObjectEvent
-## Synopsis
+## SYNOPSIS
Subscribes to the events that are generated by a Microsoft .NET Framework object.
-## Syntax
+## SYNTAX
``` Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceId
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ObjectEvent` cmdlet subscribes to events that are generated by .NET objects on the local computer or on a remote computer.
When you subscribe to an event, an event subscriber is added to your session. To
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events when a new process starts
value of the `$Random` variable.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None You cannot pipe objects to `Register-ObjectEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob When you use the **Action** parameter, `Register-ObjectEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-Alias.md
Title: Remove-Alias
# Remove-Alias
-## Synopsis
+## SYNOPSIS
Remove an alias from the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Remove an alias from the current session.
Remove-Alias [-Name] <String[]> [-Scope <String>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Alias` cmdlet removes an alias from the current PowerShell session. To remove an alias with the **Option** property set to **ReadOnly**, use the **Force** parameter. The `Remove-Alias` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Remove an alias
represent the current pipeline object. The parameter **NE** (not equal), selects
have an **Options** value set to **Constant**. `Remove-Alias` uses the **Force** parameter to remove aliases, including read-only aliases, from the PowerShell session.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String[] You can pipe an alias object to `Remove-Alias`.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
Changes only affect the current scope. To remove an alias from all sessions, add a `Remove-Alias` command to your PowerShell profile. For more information, see [about_Aliases](../microsoft.powershell.core/about/about_aliases.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Remove Event (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-Event.md
Title: Remove-Event
# Remove-Event
-## Synopsis
+## SYNOPSIS
Deletes events from the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Remove-Event [-SourceIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameter
Remove-Event [-EventIdentifier] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Event` cmdlet deletes events from the event queue in the current session. This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Remove an event by source identifier
PS C:\> Get-Event | Remove-Event
This command deletes all events from the event queue.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventArgs You can pipe events from `Get-Event` to `Remove-Event`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms. Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Deletes breakpoints from the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
not function.
information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Remove all breakpoints
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator (`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint[]
You can pipe breakpoint objects to `Remove-PSBreakpoint`.
### System.Management.Automation.Runspaces.Runspace
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Typedata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-TypeData.md
Title: Remove-TypeData
# Remove-TypeData
-## Synopsis
+## SYNOPSIS
Deletes extended types from the current session.
-## Syntax
+## SYNTAX
### RemoveTypeDataSet (Default)
Remove-TypeData [-TypeName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-TypeData -Path <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-TypeData` cmdlet deletes extended type data from the current session. This cmdlet affects only the current session and sessions that are created in the current session.
files, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/about/about_Types.p
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Remove type data for a specified type
cmdlet to remove extended type data for all CIM types in the sessions in the `$S
Invoke-Command -Session $S {Get-TypeData -TypeName *CIM* | Remove-TypeData} ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.TypeData
You can pipe **TypeData** object, such as the ones that the `Get-TypeData` cmdle
You can pipe the type names to `Remove-TypeData`. When you pipe an object to `Remove-TypeData`, `Remove-TypeData` gets the type name of the object and removes all type data for the object type.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-TypeData` can remove only the extended type data in the current session. It cannot remove extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[Get-TypeData](Get-TypeData.md)
Microsoft.PowerShell.Utility Remove Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Remove-Variable.md
Title: Remove-Variable
--- # Remove-Variable
-## Synopsis
+## SYNOPSIS
Deletes a variable and its value.
-## Syntax
+## SYNTAX
``` Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Variable` cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
-## Examples
+## EXAMPLES
### Example 1: Remove a variable
Remove-Variable Smp
This command deletes the `$Smp` variable.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### System.Management.Automation.PSVariable You can pipe a variable object to `Remove-Variable`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- Changes affect only the current scope, such as a session. To delete a variable from all sessions, add a `Remove-Variable` command to your PowerShell profile.
This cmdlet does not return any output.
- You can also refer to `Remove-Variable` by its built-in alias, `rv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Select Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Select-Object.md
Title: Select-Object
--- # Select-Object
-## Synopsis
+## SYNOPSIS
Selects objects or object properties.
-## Syntax
+## SYNTAX
### DefaultParameter (Default)
Select-Object [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<C
Select-Object [-InputObject <PSObject>] [-Unique] [-SkipIndex <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Object` cmdlet selects specified properties of an object or set of objects. It can also select unique objects, a specified number of objects, or objects in a specified position in an
objects is generated, even when the command that generates the objects appears b
`Select-Object` command in the pipeline. To turn off this optimizing behavior, use the **Wait** parameter.
-## Examples
+## EXAMPLES
### Example 1: Select objects by property
Diagnostics.Format.ps1xml 4.955078125 223
DotNetTypes.format.ps1xml 134.9833984375 223 ```
-## Parameters
+## PARAMETERS
### -ExcludeProperty
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Select-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject
-## Notes
+## NOTES
- You can also refer to the `Select-Object` cmdlet by its built-in alias, `select`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
You can pipe any object to `Select-Object`.
information, see _Write Single Records to the Pipeline_ in [Strongly Encouraged Development Guidelines](/powershell/scripting/developer/windows-powershell).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Select String (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Select-String.md
Title: Select-String
# Select-String
-## Synopsis
+## SYNOPSIS
Finds text in strings and files.
-## Syntax
+## SYNTAX
### File (Default)
Select-String [-Culture <String>] [-Pattern] <String[]> -LiteralPath <String[]>
[-NotMatch] [-AllMatches] [-Encoding <Encoding>] [-Context <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
You can also specify that `Select-String` should expect a particular character e
when you're searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Find a case-sensitive match
Name foo
Piping to `Out-String -Stream` converts the formatted output into a multiple single-line string objects. This means that when `Select-String` finds a match it outputs only the matching line.
-## Parameters
+## PARAMETERS
### -AllMatches
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has a `ToString()` method to `Select-String`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MatchInfo, System.Boolean, System.String
By default, the output is a set of **MatchInfo** objects with one for each match
the **Quiet** parameter, the output is a **Boolean** value indicating whether the pattern was found. If you use the **Raw** parameter, the output is a set of **String** objects that match the pattern.
-## Notes
+## NOTES
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
To find the properties of a **MatchInfo** object, type the following command:
`Select-String -Path test.txt -Pattern 'test' | Get-Member | Format-List -Property *`
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Select Xml (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Select-Xml.md
Title: Select-Xml
--- # Select-Xml
-## Synopsis
+## SYNOPSIS
Finds text in an XML string or document.
-## Syntax
+## SYNTAX
### Xml (Default)
Select-Xml [-XPath] <string> -LiteralPath <string[]> [-Namespace <hashtable>] [<
Select-Xml [-XPath] <string> -Content <string[]> [-Namespace <hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Xml` cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the **Content**, **Path**, or **Xml** parameter to specify the XML to be searched.
-## Examples
+## EXAMPLES
### Example 1: Select AliasProperty nodes
Select-Xml -Path $Home\Documents\WindowsPowerShell\Snippets -Namespace $SnippetN
ForEach-Object {$_.Node.Innerxml} ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String or System.Xml.XmlNode You can pipe a path or XML node to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.SelectXmlInfo
-## Notes
+## NOTES
XPath is a standard language that is designed to identify parts of an XML document. For more information about the XPath language, see [XPath Reference](/dotnet/standard/data/xml/select-nodes-using-xpath-navigation) and the Selection Filters section of [Event Selection](/previous-versions//aa385231(v=vs.85)).
-## Related links
+## RELATED LINKS
[ConvertTo-Xml](ConvertTo-Xml.md)
Microsoft.PowerShell.Utility Send Mailmessage (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Send-MailMessage.md
Title: Send-MailMessage
--- # Send-MailMessage
-## Synopsis
+## SYNOPSIS
Sends an email message.
-## Syntax
+## SYNTAX
### All
Send-MailMessage [-Attachments <String[]>] [-Bcc <String[]>] [[-Body] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Send-MailMessage` cmdlet sends an email message from within PowerShell.
information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About
> not use `Send-MailMessage`. For more information, see > [Platform Compatibility note DE0005](https://aka.ms/SendMailMessage).
-## Examples
+## EXAMPLES
### Example 1: Send an email from one person to another person
The **Credential** parameter specifies a domain administrator's credentials are
message. The **UseSsl** parameter specifies that Secure Socket Layer (SSL) creates a secure connection.
-## Parameters
+## PARAMETERS
### -Attachments
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
+## INPUTS
### System.String You can pipe the path and file names of attachments to `Send-MailMessage`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
Microsoft.PowerShell.Utility Set Alias (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-Alias.md
Title: Set-Alias
# Set-Alias
-## Synopsis
+## SYNOPSIS
Creates or changes an alias for a cmdlet or other command in the current PowerShell session.
-## Syntax
+## SYNTAX
### Default (Default)
Set-Alias [-Name] <string> [-Value] <string> [-Description <string>] [-Option <S
[-PassThru] [-Scope <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Alias` cmdlet creates or changes an alias for a cmdlet or a command, such as a function, script, file, or other executable. An alias is an alternate name that refers to a cmdlet or command.
as the description.
An alias that is created or changed by `Set-Alias` is not permanent and is only available during the current PowerShell session. When the PowerShell session is closed, the alias is removed.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
Set-Alias -Name Go -Option ReadOnly, Private
The alias `Go` should already exist. After running the command above, the alias is not be able to be changed without using the **Force** parameter and is only available in the current scope.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### None `Set-Alias` does not accept input from the pipeline.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **PassThru** parameter, `Set-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the alias. Otherwise, `Set-Alias` does not generate any output.
-## Notes
+## NOTES
PowerShell includes built-in aliases that are available in each PowerShell session. The `Get-Alias` cmdlet displays the aliases available in a PowerShell session.
An alias can be saved and reused in another PowerShell session by doing an expor
save an alias to a file, use `Export-Alias`. To add a saved alias to a new PowerShell session, use `Import-Alias`.
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Utility Set Date (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-Date.md
Title: Set-Date
--- # Set-Date
-## Synopsis
+## SYNOPSIS
Changes the system time on the computer to a time that you specify.
-## Syntax
+## SYNTAX
### Date (Default)
Set-Date [-Date] <DateTime> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm
Set-Date [-Adjust] <TimeSpan> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Date` cmdlet changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a **Date
**TimeSpan** object to `Set-Date`. To specify a new date or time, use the **Date** parameter. To specify a change interval, use the **Adjust** parameter.
-## Examples
+## EXAMPLES
### Example 1: Add three days to the system date
$90mins = New-TimeSpan -Minutes 90
Set-Date -Adjust $90mins ```
-## Parameters
+## PARAMETERS
### -Adjust
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a date to `Set-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime `Set-Date` returns an object that represents the date that it set.
-## Notes
+## NOTES
- Use this cmdlet cautiously when changing the date and time on the computer. The change might prevent the computer from receiving system-wide events and updates that are triggered by a date or
You can pipe a date to `Set-Date`.
[TimeSpan Methods](/dotnet/api/system.timespan) in the .NET SDK.
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility Set Markdownoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-MarkdownOption.md
Title: Set-MarkdownOption
--- # Set-MarkdownOption
-## Synopsis
+## SYNOPSIS
Sets the colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
### IndividualSetting (Default)
Set-MarkdownOption [-PassThru] -Theme <String> [<CommonParameters>]
Set-MarkdownOption [-PassThru] [-InputObject] <PSObject> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Sets the colors and styles used for rendering Markdown content in the console. These styles are defined using ANSI escape codes that change the color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org
> string. For more information about ANSI escape codes work, see > [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Examples
+## EXAMPLES
### Example 1 - Switch to the Light Theme
EmphasisBold : [1m
EmphasisItalics : [36m ```
-## Parameters
+## PARAMETERS
### -BoldForegroundColor
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
The string values used to define the color and style must match the regular expression `^\[*[0-9;]*?m{1}`.
-## Related links
+## RELATED LINKS
[Get-MarkdownOption](Get-MarkdownOption.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
Title: Set-PSBreakpoint
--- # Set-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Sets a breakpoint on a line, command, or variable.
-## Syntax
+## SYNTAX
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging P
For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint on a line
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Set-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You cannot pipe input to `Set-PSBreakpoint`.
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## Notes
+## NOTES
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Tracesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-TraceSource.md
Title: Set-TraceSource
--- # Set-TraceSource
-## Synopsis
+## SYNOPSIS
Configures, starts, and stops a trace of PowerShell components.
-## Syntax
+## SYNTAX
### optionsSet (Default)
Set-TraceSource [-Name] <String[]> [-RemoveListener <String[]>] [<CommonParamete
Set-TraceSource [-Name] <String[]> [-RemoveFileListener <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TraceSource` cmdlet configures, starts, and stops a trace of a PowerShell component. You can use it to specify which components will be traced and where the tracing output is sent.
-## Examples
+## EXAMPLES
### Example 1: Trace the ParameterBinding component
This command stops the trace of the **ParameterBinding** component of PowerShell
**Name** parameter to identify the component that was being traced and the **RemoveListener** parameter to identify the trace listener.
-## Parameters
+## PARAMETERS
### -Debugger
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a name to `Set-TraceSource`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSTraceSource
When you use the **PassThru** parameter, `Set-TraceSource` generates a
**System.Management.Automation.PSTraceSource** object representing the trace session. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
this cmdlet does not generate any output.
module are loaded automatically when the component is in use, and they appear in the output of `Get-TraceSource`.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Set Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-Variable.md
Title: Set-Variable
--- # Set-Variable
-## Synopsis
+## SYNOPSIS
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## Syntax
+## SYNTAX
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## Examples
+## EXAMPLES
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## Parameters
+## PARAMETERS
### -Description
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Show Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Show-Command.md
Title: Show-Command
# Show-Command
-## Synopsis
+## SYNOPSIS
Displays PowerShell command information in a graphical window.
-## Syntax
+## SYNTAX
``` Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1: Open the Commands window
command, instead of creating a new command. When you run this command, the `Show
opens. You can use the window features to set parameter values. To run the command, click the **Run** button in the `Show-Command` window.
-## Parameters
+## PARAMETERS
### -ErrorPopup
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
+## INPUTS
### None You cannot pipe input to `Show-Command`.
-## Outputs
+## OUTPUTS
### None, System.String, System.Object
When you use the **PassThru** parameter, `Show-Command` returns a command string
**ErrorPopup** parameter, `Show-Command` returns the command output (any object). Otherwise, `Show-Command` does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. `Show-Command` does not work in remote sessions.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Show Markdown (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Show-Markdown.md
Title: Show-Markdown
# Show-Markdown
-## Synopsis
+## SYNOPSIS
Shows a Markdown file or string in the console in a friendly way using VT100 escape sequences or in a browser using HTML.
-## Syntax
+## SYNTAX
### Path (Default)
Show-Markdown -InputObject <PSObject> [-UseBrowser] [<CommonParameters>]
Show-Markdown -LiteralPath <String[]> [-UseBrowser] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-Markdown` cmdlet is used to render Markdown in a human readable format either in a terminal or in a browser.
You can change how `Show-Markdown` renders Markdown in a terminal by using `Set-
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Simple example specifying a path
__underlines__
Show-Markdown -Path ./README.md -UseBrowser ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject ### System.String[]
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-Markdown](ConvertFrom-Markdown.md)
Microsoft.PowerShell.Utility Sort Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Sort-Object.md
Title: Sort-Object
# Sort-Object
-## Synopsis
+## SYNOPSIS
Sorts objects by property values.
-## Syntax
+## SYNTAX
### Default (Default)
Sort-Object [-Descending] [-Unique] -Bottom <Int32> [-InputObject <PSObject>] [[
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Sort-Object` cmdlet sorts objects in ascending or descending order based on object property values. If sort properties are not included in a command, PowerShell uses default sort properties
tables to sort in ascending order, descending order, or a combination of sort or
sorted as case-sensitive or case-insensitive. Use the **Unique** parameter to eliminate duplicates from the output.
-## Examples
+## EXAMPLES
### Example 1: Sort the current directory by name
The `Get-ChildItem` cmdlet gets the files from the directory specified by the **
down the pipeline to the `Sort-Object` cmdlet. `Sort-Object` uses the **Length** and **Name** parameter to sort the files by length in ascending order. Since `File01.txt` and `File03.txt` have the same length, they are further sorted by their property **Name**.
-## Parameters
+## PARAMETERS
### -Bottom
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be sorted to `Sort-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Sort-Object` returns the sorted objects.
-## Notes
+## NOTES
The `Sort-Object` cmdlet sorts objects based on properties specified in the command or the default sort properties for the object type. Default sort properties are defined using the `PropertySet`
see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrolle
The performance of the sorting algorithm is slower when doing a stable sort.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Start Sleep (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Start-Sleep.md
Title: Start-Sleep
--- # Start-Sleep
-## Synopsis
+## SYNOPSIS
Suspends the activity in a script or session for the specified period of time.
-## Syntax
+## SYNTAX
### Seconds (Default)
Start-Sleep [-Seconds] <Double> [<CommonParameters>]
Start-Sleep -Milliseconds <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Sleep` cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.
-## Examples
+## EXAMPLES
### Example 1: Sleep all commands for 15 seconds
This example makes all the commands in the session sleep for one and one-half of
Start-Sleep -Seconds 1.5 ```
-## Parameters
+## PARAMETERS
### -Milliseconds
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int32 You can pipe the number of seconds to `Start-Sleep`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You can also refer to `Start-Sleep` by its built-in alias, `sleep`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
This cmdlet does not return any output.
- `Ctrl+C` does not break out of `[Threading.Thread]::Sleep`. For more information, see [Thread.Sleep Method](/dotnet/api/system.threading.thread.sleep).
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Tee Object (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Tee-Object.md
Title: Tee-Object
--- # Tee-Object
-## Synopsis
+## SYNOPSIS
Saves command output in a file or variable and also sends it down the pipeline.
-## Syntax
+## SYNTAX
### File (Default)
Tee-Object [-InputObject <PSObject>] -LiteralPath <String> [<CommonParameters>]
Tee-Object [-InputObject <PSObject>] -Variable <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Tee-Object` cmdlet redirects output, that is, it sends the output of a command in two directions (like the letter T). It stores the output in a file or variable and also sends it down the pipeline. If `Tee-Object` is the last command in the pipeline, the command output is displayed at the prompt.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a file and to the console
drive. A pipeline operator (`|`) sends the list to `Tee-Object`, which appends t
AllSystemFiles.txt file and passes the list down the pipeline to the `Out-File` cmdlet, which saves the list in the `NewSystemFiles.txt file`.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Tee-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Tee-Object` returns the object that it redirects.
-## Notes
+## NOTES
You can also use the `Out-File` cmdlet or the redirection operator, both of which save the output in a file but do not send it down the pipeline.
a file but do not send it down the pipeline.
Beginning in PowerShell 6, `Tee-Object` uses BOM-less UTF-8 encoding when it writes to files. If you need a different encoding, use the `Out-File` cmdlet with the **Encoding** parameter.
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility Test Json (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Test-Json.md
Title: Test-Json
# Test-Json
-## Synopsis
+## SYNOPSIS
Tests whether a string is a valid JSON document
-## Syntax
+## SYNTAX
### __AllParameterSets (Default) ```
Test-Json [-Json] <String> [[-Schema] <String>] [<CommonParameters>]
Test-Json [-Json] <String> [-SchemaFile <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Json` cmdlet tests whether a string is a valid JavaScript Object Notation (JSON) document and can optionally verify that JSON document against a provided schema.
web-based apps.
This cmdlet was introduced in PowerShell 6.1
-## Examples
+## EXAMPLES
### Example 1: Test if an object is valid JSON
True
For more information, see [Structuring a complex schema](https://json-schema.org/understanding-json-schema/structuring.html).
-## Parameters
+## PARAMETERS
### -Json
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `Test-Json`.
-## Outputs
+## OUTPUTS
### Boolean
-## Notes
+## NOTES
The `Test-Json` cmdlet is implemented by using the [NJsonSchema Class](https://github.com/RSuter/NJsonSchema).
Newtonsoft's implementation includes several extensions to the JSON standard, su
comments and use of single quotes. For a full list of features, see the Newtonsoft documentation at [https://www.newtonsoft.com/json](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Trace Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Trace-Command.md
Title: Trace-Command
# Trace-Command
-## Synopsis
+## SYNOPSIS
Configures and starts a trace of the specified expression or command.
-## Syntax
+## SYNTAX
### expressionSet (Default)
Trace-Command [-InputObject <PSObject>] [-Name] <String[]> [[-Option] <PSTraceSo
[-Debugger] [-PSHost] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Trace-Command` cmdlet configures and starts a trace of the specified expression or command. It works like Set-TraceSource, except that it applies only to the specified command.
-## Examples
+## EXAMPLES
### Example 1: Trace metadata processing, parameter binding, and an expression
the **InputObject** parameter. The **InputObject** parameter passes the variable
expression. In effect, the command being processed during the trace is `Get-Alias -InputObject $A" or "$A | Get-Alias`.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects that represent input to the expression to `Trace-Command`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject Returns the command trace in the debug stream.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
Returns the command trace in the debug stream.
**Expression**, **Option** or **Name**, **Command**, **Option**. If you include the parameter names, the parameters can appear in any order.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Unblock File (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Unblock-File.md
Title: Unblock-File
--- # Unblock-File
-## Synopsis
+## SYNOPSIS
Unblocks files that were downloaded from the Internet.
-## Syntax
+## SYNTAX
### ByPath (Default)
Unblock-File [-Path] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Unblock-File -LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet only works on the Windows and macOS platforms.**
For more information about PowerShell execution policies, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Unblock a file
At line:1 char:1
PS C:\> Get-Item C:\ps-test\Start-ActivityTracker.ps1 | Unblock-File ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a file path to `Unblock-File`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Support for macOS was added in PowerShell 7. - The `Unblock-File` cmdlet works only in file system drives.
This cmdlet does not generate any output.
- If you use the `Unblock-File` cmdlet on a file that is not blocked, the command has no effect on the unblocked file and the cmdlet does not generate errors.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Utility Unregister Event (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Unregister-Event.md
Title: Unregister-Event
# Unregister-Event
-## Synopsis
+## SYNOPSIS
Cancels an event subscription.
-## Syntax
+## SYNTAX
### BySource (Default)
Unregister-Event [-SourceIdentifier] <String> [-Force] [-WhatIf] [-Confirm] [<Co
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-Event` cmdlet cancels an event subscription that was created by using the `Register-EngineEvent`, `Register-ObjectEvent`, or `Register-WmiEvent` cmdlet.
created by using the `New-Event` cmdlet, the new event is also deleted from the
`Unregister-Event` does not delete events from the event queue. To delete events, use the `Remove-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Cancel an event subscription by source identifier
It uses a pipeline operator (`|`) to send the subscriber objects to `Unregister-
deletes them from the session. To complete the task, the **Force** parameter is also required on `Unregister-Event`.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventSubscriber You can pipe the output from `Get-EventSubscriber` to `Unregister-Event`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
current session, the event queue is discarded and the event subscription is canc
subscribed to the event by using the `Register-EngineEvent` cmdlet. To delete a custom event from the session, you must remove it programmatically or close the session.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Update Formatdata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Update-FormatData.md
Title: Update-FormatData
# Update-FormatData
-## Synopsis
+## SYNOPSIS
Updates the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-FormatData` cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell.
interrupt the session.
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Reload previously loaded formatting files
The second command uses the `Update-FormatData` cmdlet to reload the formatting
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it without using parameters.
-## Parameters
+## PARAMETERS
### -AppendPath
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
+## INPUTS
### System.String You can pipe a string that contains the append path to `Update-FormatData`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
- `Update-FormatData` also updates the formatting data for commands in the session that were imported from modules. If the formatting file for a module changes, you can run an `Update-FormatData` command to update the formatting data for imported commands. You do not need to import the module again.
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Update List (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Update-List.md
Title: Update-List
# Update-List
-## Synopsis
+## SYNOPSIS
Adds items to and removes items from a property value that contains a collection of objects.
-## Syntax
+## SYNTAX
### AddRemoveSet (Default)
Update-List [-Add <Object[]>] [-Remove <Object[]>] [-InputObject <PSObject>] [[-
Update-List -Replace <Object[]> [-InputObject <PSObject>] [[-Property] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-List` cmdlet adds, removes, or replaces items in a property value of an object and returns the updated object. This cmdlet is designed for properties that contain collections of
determine whether a cmdlet supports `Update-List`, see the cmdlet Help topic.
This cmdlet was reintroduced in PowerShell 7.
-## Examples
+## EXAMPLES
### Example 1: Add items to a property value
Deck : 2ΓÖú KΓÖÑ 4ΓÖá 10ΓÖÑ 8ΓÖá 10ΓÖª 9ΓÖá 6ΓÖá KΓÖª 7ΓÖú 3ΓÖú QΓÖú AΓÖÑ
8ΓÖÑ ```
-## Parameters
+## PARAMETERS
### -Add
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be updated to `Update-List`.
-## Outputs
+## OUTPUTS
### Objects or System.Management.Automation.PSListModifier `Update-List` returns the updated object, or it returns an object that represents the update action.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Update Typedata (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Update-TypeData.md
Title: Update-TypeData
# Update-TypeData
-## Synopsis
+## SYNOPSIS
Updates the extended type data in the session.
-## Syntax
+## SYNTAX
### FileSet (Default)
Update-TypeData [-MemberType <PSMemberTypes>] [-MemberName <String>] [-Value <Ob
Update-TypeData [-Force] [-TypeData] <TypeData[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-TypeData` cmdlet updates the extended type data in the session by reloading the `Types.ps1xml` files into memory and adding new extended type data.
the `Update-TypeData` cmdlet cannot use method syntax.
For more information about the `Types.ps1xml` files in PowerShell, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Update extended types
modules. The value of the **Value** parameter is a script that returns `$True` i
The second command pipes the module objects from `Get-Module` to the `Format-Table` cmdlet, which displays the **Name** and **SupportsUpdatableHelp** properties of all modules in a list.
-## Parameters
+## PARAMETERS
### -AppendPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the values of the **AppendPath**, **TypeName**, or **TypeData** parameters to `Update-TypeData`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Wait Debugger (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Wait-Debugger.md
Title: Wait-Debugger
--- # Wait-Debugger
-## Synopsis
+## SYNOPSIS
Stops a script in the debugger before running the next statement in the script.
-## Syntax
+## SYNTAX
``` Wait-Debugger [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Stops the PowerShell script execution engine at the point immediately after the `Wait-Debugger` cmdlet and waits for a debugger to be attached. This is similar to using
cmdlet and waits for a debugger to be attached. This is similar to using
> Make sure you remove the `Wait-Debugger` lines after you are done. A running script appears to be > hung when it is stopped at a `Wait-Debugger`.
-## Examples
+## EXAMPLES
### Example 1: Insert breakpoint for debugging
class FileResource
} ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-DscDebug](/powershell/module/PSDesiredStateConfiguration/Enable-DscDebug)
Microsoft.PowerShell.Utility Wait Event (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Wait-Event.md
Title: Wait-Event
# Wait-Event
-## Synopsis
+## SYNOPSIS
Waits until a particular event is raised before continuing to run.
-## Syntax
+## SYNTAX
``` Wait-Event [[-SourceIdentifier] <String>] [-Timeout <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Event` cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes when the event is detected. To cancel the wait, press
response to an event in two different ways:
- using the **Action** parameter of the event subscription - waiting for an event to return and then respond with an action
-## Examples
+## EXAMPLES
### Example 1: Wait for the next event
identifier of **ProcessStarted**. If the specified time expires, the wait ends.
Wait-Event -SourceIdentifier "ProcessStarted" -Timeout 90 ```
-## Parameters
+## PARAMETERS
### -SourceIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Write Debug (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Debug.md
Title: Write-Debug
--- # Write-Debug
-## Synopsis
+## SYNOPSIS
Writes a debug message to the console.
-## Syntax
+## SYNTAX
``` Write-Debug [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Debug` cmdlet writes debug messages to the host from a script or command. By default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the `$DebugPreference` variable.
-## Examples
+## EXAMPLES
### Example 1: Understand $DebugPreference
change only affects the scope of the function. The value is not affected outside
For more information about the **Debug** common parameter, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a debug message to `Write-Debug`.
-## Outputs
+## OUTPUTS
### None `Write-Debug` only writes to the debug stream. It does not write any objects to the pipeline.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Error (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Error.md
Title: Write-Error
# Write-Error
-## Synopsis
+## SYNOPSIS
Writes an object to the error stream.
-## Syntax
+## SYNTAX
### NoException (Default)
Write-Error -ErrorRecord <ErrorRecord> [-RecommendedAction <String>] [-CategoryA
[-CategoryReason <String>] [-CategoryTargetName <String>] [-CategoryTargetType <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Error` cmdlet declares a non-terminating error. By default, errors are sent in the error stream to the host program to be displayed, along with output.
continues to process the other items in the collection.
To declare a terminating error, use the `Throw` keyword. For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
-## Examples
+## EXAMPLES
### Example 1: Write an error for RegistryKey object
has a null constructor.
The second command uses the `Write-Error` cmdlet to declare a non-terminating error. The value of the **Exception** parameter is the **Exception** object in the `$E` variable.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains an error message to `Write-Error`.
-## Outputs
+## OUTPUTS
### Error object `Write-Error` writes only to the error stream. It does not return any objects.
-## Notes
+## NOTES
`Write-Error` does not change the value of the `$?` automatic variable, therefore it does not signal a terminating error condition. To signal a terminating error, use the [$PSCmdlet.WriteError()](/dotnet/api/system.management.automation.cmdlet.writeerror) method.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Write Host (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Host.md
Title: Write-Host
# Write-Host
-## Synopsis
+## SYNOPSIS
Writes customized output to a host.
-## Syntax
+## SYNTAX
``` Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
hosting PowerShell.
> affect `Write-Host` messages. The exception to this rule is `-InformationAction Ignore`, which > effectively suppresses `Write-Host` output. (see "Example 5")
-## Examples
+## EXAMPLES
### Example 1: Write to the console without adding a new line
These commands effectively suppress output of the `Write-Host` cmdlet. The first
The second example redirects the information stream of the command to the `$null` variable and thereby suppresses it.
-## Parameters
+## PARAMETERS
### -BackgroundColor
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).
-## Inputs
+## INPUTS
### System.Object You can pipe objects to be written to the host.
-## Outputs
+## OUTPUTS
### None `Write-Host` sends the objects to the host. It does not return any objects. However, the host displays the objects that `Write-Host` sends to it.
-## Notes
+## NOTES
- When writing a collection to the host, elements of the collection are printed on the same line separated by a single space. This can be overridden with the **Separator** parameter.
displays the objects that `Write-Host` sends to it.
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Write Information (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Information.md
Title: Write-Information
# Write-Information
-## Synopsis
+## SYNOPSIS
Specifies how PowerShell handles information stream data for a command.
-## Syntax
+## SYNTAX
``` Write-Information [-MessageData] <Object> [[-Tags] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Information` cmdlet specifies how PowerShell handles information stream data for a command.
the `InformationAction` common parameter to your command. For more information,
`Write-Information` is also a supported workflow activity in PowerShell 5.x.
-## Examples
+## EXAMPLES
### Example 1: Write information for Get- results
Get-Process | Sort-Object CPU -Descending |
@{Id=9044; ProcessName=explorer; CPU=2358.765625} ```
-## Parameters
+## PARAMETERS
### -MessageData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object `Write-Information` accepts piped objects to pass to the information stream.
-## Outputs
+## OUTPUTS
### System.Management.Automation.InformationRecord
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Output (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Output.md
Title: Write-Output
--- # Write-Output
-## Synopsis
+## SYNOPSIS
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
-## Syntax
+## SYNTAX
``` Write-Output [-InputObject] <PSObject[]> [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
be written, `"Home directory: $HOME"`.
By default, `Write-Output` enumerates through collection objects. However, `Write-Output` can also be used to pass collections down the pipeline as a single object with the **NoEnumerate** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get objects and write them to the console
Count : 1
... ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Write-Output`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Write-Output` returns the objects that are submitted as input.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Progress (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Progress.md
Title: Write-Progress
--- # Write-Progress
-## Synopsis
+## SYNOPSIS
Displays a progress bar within a PowerShell command window.
-## Syntax
+## SYNTAX
``` Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-PercentComplete <Int32>]
Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-Perce
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script. You can select the indicators that the bar reflects and the text that appears above and below the progress bar.
-## Examples
+## EXAMPLES
### Example 1: Display the progress of a For loop
Step 1
In this example you can use the **ParentId** parameter to have indented output to show parent/child relationships in the progress of each step.
-## Parameters
+## PARAMETERS
### -Activity
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None `Write-Progress` does not generate any output.
-## Notes
+## NOTES
If the progress bar does not appear, check the value of the `$ProgressPreference` variable. If the value is set to SilentlyContinue, the progress bar is not displayed. For more information about
The parameters of the cmdlet correspond to the properties of the
**System.Management.Automation.ProgressRecord** class. For more information, see [ProgressRecord Class](/dotnet/api/system.management.automation.progressrecord).
-## Related links
+## RELATED LINKS
[Write-Debug](Write-Debug.md)
Microsoft.PowerShell.Utility Write Verbose (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Verbose.md
Title: Write-Verbose
--- # Write-Verbose
-## Synopsis
+## SYNOPSIS
Writes text to the verbose message stream.
-## Syntax
+## SYNTAX
``` Write-Verbose [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Verbose` cmdlet writes text to the verbose message stream in PowerShell. Typically, the verbose message stream is used to deliver more in depth information about command processing.
By default, the verbose message stream is not displayed, but you can display it
value of the `$VerbosePreference` variable or using the **Verbose** common parameter in any command.
-## Examples
+## EXAMPLES
### Example 1: Write a status message
The first command assigns a value of Continue to the `$VerbosePreference` prefer
default value, `SilentlyContinue`, suppresses verbose messages. The second command writes a verbose message.
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the message to `Write-Verbose`.
-## Outputs
+## OUTPUTS
### None `Write-Verbose` writes only to the verbose message stream.
-## Notes
+## NOTES
- Verbose messages are returned only when the command uses the **Verbose** common parameter. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
You can pipe a string that contains the message to `Write-Verbose`.
For more information about the `$VerbosePreference` variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Warning (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Write-Warning.md
Title: Write-Warning
# Write-Warning
-## Synopsis
+## SYNOPSIS
Writes a warning message.
-## Syntax
+## SYNTAX
``` Write-Warning [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Warning` cmdlet writes a warning message to the PowerShell host. The response to the warning depends on the value of the user's `$WarningPreference` variable and the use of the **WarningAction** common parameter.
-## Examples
+## EXAMPLES
### Example 1: Write a warning message
warning.
For more information about the **WarningAction** common parameter, see [about_CommonParameters](../Microsoft.Powershell.Core/About/about_CommonParameters.md).
-## Parameters
+## PARAMETERS
### -Message Specifies the warning message.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the warning to `Write-Warning`.
-## Outputs
+## OUTPUTS
### None `Write-Warning` writes only to the warning stream. It does not generate any other output.
-## Notes
+## NOTES
The default value for the `$WarningPreference` variable is `Continue`, which displays the warning and then continues executing the command. To determine valid values for a preference variable such as `$WarningPreference`, set it to a string of random characters, such as "abc". The resulting error message lists the valid values.
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.WSMan.Management Connect Wsman (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Connect-WSMan.md
Title: Connect-WSMan
# Connect-WSMan
-## Synopsis
+## SYNOPSIS
Connects to the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Connect-WSMan [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-Port <Int32>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
workgroups.
For information about how to disconnect from the WinRM service on a remote computer, see the `Disconnect-WSMan` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Connect to a remote computer
The second command uses the **SessionOption** parameter to pass the credentials
the `$a` variable to `Connect-WSMan`. Then, `Connect-WSMan` connects to the remote server01 computer by using the specified session options.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
You can run management commands or query management data on a remote computer without creating a WS-Management session. You can do this by using the **ComputerName** parameters of
WS-Management session. You can do this by using the **ComputerName** parameters
PowerShell creates a temporary connection that is used for the single command. After the command runs, the connection is closed.
-## Related links
+## RELATED LINKS
[Disable-WSManCredSSP](Disable-WSManCredSSP.md)
Microsoft.WSMan.Management Disable Wsmancredssp (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Disable-WSManCredSSP.md
Title: Disable-WSManCredSSP
# Disable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Disables CredSSP authentication on a computer.
-## Syntax
+## SYNTAX
``` Disable-WSManCredSSP [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
performs the following action:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Disable CredSSP on a client
Disable-WSManCredSSP -Role Server
This command disables CredSSP on the server, which prevents delegation from clients.
-## Parameters
+## PARAMETERS
### -Role
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To enable CredSSP authentication, use the Enable-WSManCredSSP cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Disconnect Wsman (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Disconnect-WSMan.md
Title: Disconnect-WSMan
# Disconnect-WSMan
-## Synopsis
+## SYNOPSIS
Disconnects the client from the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
``` Disconnect-WSMan [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
change to the WSMan provider.
For more information about how to connect to the WinRM service on a remote computer, see `Connect-WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Delete a connection to a remote computer
computer, in this case the server01 computer. However, you can also use `Disconn
connections to remote computers before you change to the WSMan provider. Those connections do not appear in the ComputerName list.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Enable Wsmancredssp (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Enable-WSManCredSSP.md
Title: Enable-WSManCredSSP
# Enable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Enables Credential Security Support Provider (CredSSP) authentication on a computer.
-## Syntax
+## SYNTAX
### All
Enables Credential Security Support Provider (CredSSP) authentication on a compu
Enable-WSManCredSSP [[-DelegateComputer] <String[]>] [-Force] [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Parameters section.
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Delegate client credentials
Set-Item -Path "WSMan:\server02\service\auth\credSSP" -Value $True
parameter to specify the **WSMan** provider's location. The **Value** parameter sets the **Service** setting to true.
-## Parameters
+## PARAMETERS
### -DelegateComputer
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement If CredSSP authentication is successfully enabled, this cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmancredssp (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Get-WSManCredSSP.md
Title: Get-WSManCredSSP
--- # Get-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Gets the Credential Security Support Provider-related configuration for the client.
-## Syntax
+## SYNTAX
``` Get-WSManCredSSP [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The cmdlet performs the following actions:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Display CredSSP configuration
If the computer is not configured for CredSSP, this is the output:
`The machine is not configured to allow delegating fresh credentials.`
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet. To enable CredSSP authentication, use the `Enable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmaninstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Get-WSManInstance.md
Title: Get-WSManInstance
# Get-WSManInstance
-## Synopsis
+## SYNOPSIS
Displays management information for a resource instance specified by a Resource URI.
-## Syntax
+## SYNTAX
### GetInstance (Default)
Get-WSManInstance [-ApplicationName <String>] [-BasePropertiesOnly] [-ComputerNa
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WSManInstance` cmdlet retrieves an instance of a management resource that is specified by a resource Uniform Resource Identifier (URI). The information that is retrieved can be a complex XML
standard Web Services for Management (WS-Management) **Get** command.
This cmdlet uses the WS-Management connection/transport layer to retrieve information.
-## Examples
+## EXAMPLES
### Example 1: Get all information from WMI
returns association instances, not associated instances.
You must enclose the filter in quotation marks, as shown in the example.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This command does not accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement This cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Invoke Wsmanaction (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Invoke-WSManAction.md
Title: Invoke-WSManAction
--- # Invoke-WSManAction
-## Synopsis
+## SYNOPSIS
Invokes an action on the object that is specified by the Resource URI and by the selectors.
-## Syntax
+## SYNTAX
### URI (Default)
Invoke-WSManAction [-Action] <String> [-ApplicationName <String>] [-ComputerName
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
parameters are specified by key value pairs.
This cmdlet uses the WSMan connection/transport layer to run the action.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
the remote server01 computer.
The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started.
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmaninstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/New-WSManInstance.md
Title: New-WSManInstance
--- # New-WSManInstance
-## Synopsis
+## SYNOPSIS
Creates a new instance of a management resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-WSManInstance [-ConnectionURI <Uri>] [-FilePath <String>] [-OptionSet <Hasht
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
URI and a value set or input file to create the new instance of the management r
This cmdlet uses the WinRM connection/transport layer to create the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Create a HTTPS listener
This command creates an instance of a WS-Management HTTPS listener on all IP add
New-WSManInstance winrm/config/Listener -SelectorSet @{Transport='HTTPS'; Address='*'} -ValueSet @{Hostname="HOST";CertificateThumbprint="XXXXXXXXXX"} ```
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The `Set-WmiInstance` cmdlet, a Windows Management Instrumentation (WMI) cmdlet, is similar. `Set-WmiInstance` uses the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmansessionoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/New-WSManSessionOption.md
Title: New-WSManSessionOption
# New-WSManSessionOption
-## Synopsis
+## SYNOPSIS
Creates session option hash table to use as input parameters for WS-Management cmdlets.
-## Syntax
+## SYNTAX
``` New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentication <ProxyAuthentication>]
New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthenticatio
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
WSMan cmdlets:
- `Invoke-WSManAction` - `Connect-WSMan`
-## Examples
+## EXAMPLES
### Example 1: Create a connection that uses connection options
computer, in this case the server01 computer. However, you can use the cmdlet to
connections to remote computers before you change to the WSMan provider. Those connections appear in the **ComputerName** list.
-## Parameters
+## PARAMETERS
### -NoEncryption
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SessionOption
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Remove Wsmaninstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Remove-WSManInstance.md
Title: Remove-WSManInstance
--- # Remove-WSManInstance
-## Synopsis
+## SYNOPSIS
Deletes a management resource instance.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Remove-WSManInstance [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-ResourceU
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the **ResourceURI** and **SelectorSet** parameters.
This cmdlet uses the WinRM connection/transport layer to delete the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Delete a listener
Remove-WSManInstance -ResourceUri winrm/config/Listener -SelectorSet Address=tes
This command deletes the WS-Management HTTP listener on a computer.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The cmdlets in the CimCmdlets module are similar. They use the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmaninstance (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Set-WSManInstance.md
Title: Set-WSManInstance
--- # Set-WSManInstance
-## Synopsis
+## SYNOPSIS
Modifies the management information that is related to a resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Set-WSManInstance [-ConnectionURI <Uri>] [-Dialect <Uri>] [-FilePath <String>] [
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The Set-WSManInstance cmdlet modifies the management information that is related
This cmdlet uses the WinRM connection/transport layer to modify the information.
-## Examples
+## EXAMPLES
### Example 1: Disable a listener on the local computer
This fails: -ValueSet @{enabled="False"}
This succeeds: -ValueSet @{Enabled="False"}
-## Parameters
+## PARAMETERS
### -ApplicationName
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).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmanquickconfig (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Set-WSManQuickConfig.md
Title: Set-WSManQuickConfig
# Set-WSManQuickConfig
-## Synopsis
+## SYNOPSIS
Configures the local computer for remote management.
-## Syntax
+## SYNTAX
### All
Configures the local computer for remote management.
Set-WSManQuickConfig [-UseSSL] [-Force] [-SkipNetworkProfileCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
are sent by using the Web Services for Management (WS-Management) technology.
To run `Set-WSManQuickConfig`, start PowerShell with the **Run as Administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Enable remote management of the local computer over HTTP
Set-WSManQuickConfig -UseSSL
> **HTTPS** requires manual configuration. For more information, see the **UseSSL** parameter's > description.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Test Wsman (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.WSMan.Management/Test-WSMan.md
Title: Test-WSMan
--- # Test-WSMan
-## Synopsis
+## SYNOPSIS
Tests whether the WinRM service is running on a local or remote computer.
-## Syntax
+## SYNTAX
``` Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>] [-Port <Int32>] [-UseSSL]
Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is running on a local or remote computer. If the tested computer is running the
displays the WS-Management identity schema, the protocol version, the product vendor, and the product version of the tested service.
-## Examples
+## EXAMPLES
### Example 1: Determine the status of the WinRM service
server01 using the authentication parameter.
Using the authentication parameter enables `Test-WSMan` to return the operating system version.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output object.
-## Notes
+## NOTES
By default, the `Test-WSMan` cmdlet queries the WinRM service without using authentication, and it returns no information that is specific to the operating-system version. Instead, it displays null values for the operating system version and service pack level (OS: 0.0.0 SP: 0.0).
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
PSDiagnostics Disable Pstrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Disable-PSTrace.md
Title: Disable-PSTrace
--- # Disable-PSTrace
-## Synopsis
+## SYNOPSIS
Disables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Disable-PSTrace [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the Analytic event log for PowerShell
provider.
Disable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Disable Pswsmancombinedtrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Disable-PSWSManCombinedTrace.md
Title: Disable-PSWSManCombinedTrace
--- # Disable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Stop the logging session started by Enable-PSWSManCombinedTrace.
-## Syntax
+## SYNTAX
``` Disable-PSWSManCombinedTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the combined logging session
You must run this cmdlet from an elevated PowerShell session.
Disable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Disable Wsmantrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Disable-WSManTrace.md
Title: Disable-WSManTrace
--- # Disable-WSManTrace
-## Synopsis
+## SYNOPSIS
Stop the WSMan logging session started by Enable-WSManTrace.
-## Syntax
+## SYNTAX
``` Disable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan trace
You must run this cmdlet from an elevated PowerShell session.
Disable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Pstrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Enable-PSTrace.md
Title: Enable-PSTrace
--- # Enable-PSTrace
-## Synopsis
+## SYNOPSIS
Enables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Enable-PSTrace [-Force] [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Enable the Analytic event log for PowerShell
provider.
Enable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Enable Pswsmancombinedtrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Enable-PSWSManCombinedTrace.md
Title: Enable-PSWSManCombinedTrace
--- # Enable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan and PowerShell providers enabled.
-## Syntax
+## SYNTAX
``` Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a combined logging session
You must run this cmdlet from an elevated PowerShell session.
Enable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### -DoNotOverwriteExistingTrace
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Wsmantrace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Enable-WSManTrace.md
Title: Enable-WSManTrace
--- # Enable-WSManTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan providers enabled.
-## Syntax
+## SYNTAX
``` Enable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan logging session.
You must run this cmdlet from an elevated PowerShell session.
Enable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Get Logproperties (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Get-LogProperties.md
Title: Get-LogProperties
--- # Get-LogProperties
-## Synopsis
+## SYNOPSIS
Retrieves the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Get-LogProperties [-Name] <Object> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** This cmdlet gets the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Get the configuration settings of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails The **PSDiagnostics** module adds the **LogDetails** class to the `Microsoft.PowerShell.Diagnostics` namespace.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-LogProperties](Set-LogProperties.md)
PSDiagnostics Set Logproperties (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Set-LogProperties.md
Title: Set-LogProperties
--- # Set-LogProperties
-## Synopsis
+## SYNOPSIS
Changes the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet changes the configuration settings of a Windows event log. This cmdl
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Change the retention setting of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails
You must pass a fully configured **LogDetails** object to the `Set-LogProperties
Therefore, to change one setting, you should use `Get-LogProperties` to retrieve the current configuration.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Start Trace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Start-Trace.md
Title: Start-Trace
# Start-Trace
-## Synopsis
+## SYNOPSIS
Start an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFilePath] <String>]
Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFile
[-BufferSizeInKB <Int32>] [-MaxLogFileSizeInMB <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Start-Trace -SessionName 'wsmlog' -ETS -OutputFilePath "$env:windir\system32\wsmtraces.log" -Format 'bincirc' -MinBuffers 16 -MaxBuffers 256 -BufferSizeInKb 64 -MaxLogFileSizeInMB 256 -ProviderFilePath "$env:windir\system32\wsmtraceproviders.txt" ```
-## Parameters
+## PARAMETERS
### -BufferSizeInKB Event Trace Session buffer size in kilobytes (KB).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Stop Trace (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSDiagnostics/Stop-Trace.md
Title: Stop-Trace
--- # Stop-Trace
-## Synopsis
+## SYNOPSIS
Stop an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Stop-Trace [-SessionName] <Object> [-ETS] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Stop-Trace -SessionName 'wsmlog' ```
-## Parameters
+## PARAMETERS
### -ETS Send commands to Event Trace Sessions directly without saving or scheduling.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSReadLine Get Psreadlinekeyhandler (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Get-PSReadLineKeyHandler.md
Title: Get-PSReadLineKeyHandler
# Get-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Gets the key bindings for the PSReadLine module.
-## Syntax
+## SYNTAX
### FullListing (default)
Get-PSReadLineKeyHandler [-Bound] [-Unbound] [<CommonParameters>]
Get-PSReadLineKeyHandler [-Chord] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
If no parameter is specified, returns the currently bound key functions for the PSReadLine module. If **Chord** parameter is specified, the cmdlet returns the specific bound keys.
-## Examples
+## EXAMPLES
### Example 1: Get all key mappings
Shift+Enter AddLine Move the cursor to the next line without attempting to ex
... ```
-## Parameters
+## PARAMETERS
### -Bound
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.KeyHandler
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Get Psreadlineoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Get-PSReadLineOption.md
Title: Get-PSReadLineOption
--- # Get-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Gets values for the options that can be configured.
-## Syntax
+## SYNTAX
``` Get-PSReadLineOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineOption` cmdlet returns the current state of the settings that can be configured by using the `Set-PSReadLineOption` cmdlet. You can use the returned object to change **PSReadLine** options. This provides a slightly simpler way to set syntax coloring options for multiple kinds of tokens.
-## Examples
+## EXAMPLES
### Example 1: Get options and their values
VariableColor : "`e[92m"
This command returns the list of available PSReadLine options and their current values.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.PSConsoleReadLineOptions An instance of the current options. Changing the property values of this object updates the settings in PSReadLine directly without invoking `Set-PSReadLineOption`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Remove Psreadlinekeyhandler (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Remove-PSReadLineKeyHandler.md
Title: Remove-PSReadLineKeyHandler
# Remove-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Removes a key binding.
-## Syntax
+## SYNTAX
``` Remove-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSReadLineKeyHandler` cmdlet removes a specified key binding.
-## Examples
+## EXAMPLES
### Example 1: Remove a binding
Remove-PSReadLineKeyHandler -Chord Ctrl+B
This command removes the binding from the key combination, or chord, `Ctrl+B`. The `Ctrl+B` chord is created in the `Set-PSReadLineKeyHandler` article.
-## Parameters
+## PARAMETERS
### -Chord
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlinekeyhandler (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Set-PSReadLineKeyHandler.md
Title: Set-PSReadLineKeyHandler
--- # Set-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Binds keys to user-defined or PSReadLine key handler functions.
-## Syntax
+## SYNTAX
### ScriptBlock
Set-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [-Function] <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineKeyHandler` cmdlet customizes the result when a key or sequence of keys is pressed. With user-defined key bindings, you can do almost anything that is possible from within a PowerShell script.
-## Examples
+## EXAMPLES
### Example 1: Bind the arrow key to a function
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
} ```
-## Parameters
+## PARAMETERS
### -BriefDescription
This cmdlet supports the common parameters: -Debug, -ErrorAction,
For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlineoption (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PSReadLine/Set-PSReadLineOption.md
Title: Set-PSReadLineOption
--- # Set-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Customizes the behavior of command line editing in **PSReadLine**.
-## Syntax
+## SYNTAX
``` Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-HistoryNoDuplicates]
Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-His
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineOption` cmdlet customizes the behavior of the **PSReadLine** module when you're editing the command line. To view the **PSReadLine** settings, use `Get-PSReadLineOption`.
-## Examples
+## EXAMPLES
### Example 1: Set foreground and background colors
block object.
For more information, see [about_Providers](/powershell/module/microsoft.powershell.core/about/about_providers).
-## Parameters
+## PARAMETERS
### -AddToHistoryHandler
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Set-PSReadLineOption.`
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_PSReadLine](./About/about_PSReadLine.md)
PackageManagement Find Package (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Find-Package.md
Title: Find-Package
--- # Find-Package
-## Synopsis
+## SYNOPSIS
Finds software packages in available package sources.
-## Syntax
+## SYNTAX
### NuGet
Find-Package [-IncludeDependencies] [-AllVersions] [-Source <String[]>] [-Creden
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` and `Get-PackageSource` display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Find all available packages from a package provider
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transfor
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... ```
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### None `Find-Package` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentify[] `Find-Package` outputs a **SoftwareIdentity** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Find Packageprovider (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Find-PackageProvider.md
Title: Find-PackageProvider
--- # Find-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of Package Management package providers available for installation.
-## Syntax
+## SYNTAX
``` Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-IncludeDependencies]
Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-
[-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in package sources registered with PowerShellGet. These are package providers available for
the PowerShell Gallery with the **PackageManagement** and **Provider** tags.
`Find-PackageProvider` also finds matching Package Management providers that are available in the Package Management Azure Blob store. Use the bootstrapper provider to find and install them.
-## Examples
+## EXAMPLES
### Example 1: Find all available package providers
Find-PackageProvider -Name "Gistprovider" -Source "PSGallery"
This command finds a package provider available by using a specified package source.
-## Parameters
+## PARAMETERS
### -AllVersions
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
+## INPUTS
-## Outputs
+## OUTPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into `Install-PackageProvider` to install the results of `Find-PackageProvider`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Package (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Get-Package.md
Title: Get-Package
# Get-Package
-## Synopsis
+## SYNOPSIS
Returns a list of all software packages that were installed with **PackageManagement**.
-## Syntax
+## SYNTAX
### NuGet
Get-Package [[-Name] <String[]>] [-RequiredVersion <String>] [-MinimumVersion <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Package` cmdlet returns a list of all software packages on the local computer that were installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as part of an `Invoke-Command` or `Enter-PSSession` command or script.
-## Examples
+## EXAMPLES
### Example 1: Get all installed packages
Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package
**RequiredVersion** parameter is a specific version of the package. The object is sent down the pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package.
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packageprovider (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Get-PackageProvider.md
Title: Get-PackageProvider
--- # Get-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of package providers that are connected to Package Management.
-## Syntax
+## SYNTAX
``` Get-PackageProvider [[-Name] <String[]>] [-ListAvailable] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or part of one or more provider names.
-## Examples
+## EXAMPLES
### Example 1: Get all currently loaded package providers
Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider installed.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageProvider[]
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packagesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Get-PackageSource.md
Title: Get-PackageSource
--- # Get-PackageSource
-## Synopsis
+## SYNOPSIS
Gets a list of package sources that are registered for a package provider.
-## Syntax
+## SYNTAX
### NuGet
Get-PackageSource [[-Name] <String>] [-Location <String>] [-Force] [-ForceBootst
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageSource` cmdlet gets a list of package sources that are registered with **PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` gets only those sources that are associated with the specified provider. Otherwise, the command returns all package sources that are registered with **PackageManagement**.
-## Examples
+## EXAMPLES
### Example 1: Get all package sources
MyNuget NuGet False https://www.nuget.org/api/v2
`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object is sent down the pipeline to `Get-PackageSource`.
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageSource[] Specifies one or more package sources.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
Specifies one or more package sources.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Import Packageprovider (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Import-PackageProvider.md
Title: Import-PackageProvider
--- # Import-PackageProvider
-## Synopsis
+## SYNOPSIS
Adds Package Management package providers to the current session.
-## Syntax
+## SYNTAX
``` Import-PackageProvider [-Name] <String[]> [-RequiredVersion <String>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. The provider that you import must be installed on the local computer.
Due to security reasons, **PackageManagement** requires C#-based providers to co
injected, see the `.csproj` project files on [https://github.com/oneget/oneget](https://github.com/oneget/oneget).
-## Examples
+## EXAMPLES
### Example 1: Import a package provider from the local computer
Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose
This command finds, installs, and imports a specific version of the Nuget package provider.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Implementation.PackageProvider You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into `Import-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Package (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Install-Package.md
Title: Install-Package
# Install-Package
-## Synopsis
+## SYNOPSIS
Installs one or more software packages.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-Package [-Credential <PSCredential>] [-Proxy <Uri>] [-ProxyCredential <P
[-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Package` cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Install a package by package name
PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -Maxi
**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The highest version in the range is installed.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Install-Package` accepts input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Packageprovider (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Install-PackageProvider.md
Title: Install-PackageProvider
--- # Install-PackageProvider
-## Synopsis
+## SYNOPSIS
Installs one or more Package Management package providers.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-PackageProvider [-Scope <String>] [-InputObject] <SoftwareIdentity[]> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-PackageProvider` cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules
them to your target computer. Use the following steps to do this:
Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider to the current Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Install a package provider from the PowerShell Gallery
so that only the current user can use it.
Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser ```
-## Parameters
+## PARAMETERS
### -AllVersions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a **SoftwareIdentity** object that can be piped into `Install-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProv
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-PackageProvider](Find-PackageProvider.md)
PackageManagement Register Packagesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Register-PackageSource.md
Title: Register-PackageSource
--- # Register-PackageSource
-## Synopsis
+## SYNOPSIS
Adds a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch
Register-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [[-Name]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package sources are always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.
-## Examples
+## EXAMPLES
### Example 1: Register a package source for the NuGet provider
Name ProviderName IsTrusted Location
MyNuGet NuGet False https://www.nuget.org/api/v2 ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Save Package (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Save-Package.md
Title: Save-Package
--- # Save-Package
-## Synopsis
+## SYNOPSIS
Saves packages to the local computer without installing them.
-## Syntax
+## SYNTAX
### PackageBySearch
Save-Package [-Path <String>] [-LiteralPath <String>] [-Credential <PSCredential
[-RoleCapability <String[]>] [-Command <String[]>] [-AcceptLicense] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The **Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same command.
-## Examples
+## EXAMPLES
### Example 1: Save a package to the local computer
PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg
`Save-Package` downloads the package file and its dependencies to the local computer. `Install-Package` installs the package and dependencies from the specified directory.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Save-Package` accepts objects from the pipeline.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Set Packagesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Set-PackageSource.md
Title: Set-PackageSource
--- # Set-PackageSource
-## Synopsis
+## SYNOPSIS
Replaces a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch (Default)
Set-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PackageSource` replaces a package source for a specified package provider. Package sources are always managed by a package provider.
-## Examples
+## EXAMPLES
### Example 1: Change a package source
eliminates prompts to verify the source when packages are installed.
PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Set-PackageSource` doesn't accept pipeline input.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Uninstall Package (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Uninstall-Package.md
Title: Uninstall-Package
# Uninstall-Package
-## Synopsis
+## SYNOPSIS
Uninstalls one or more software packages.
-## Syntax
+## SYNTAX
### PackageByInputObject
Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm]
[-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To find installed packages, use the `Get-Package` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a package
parameter:
`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )`
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
### SoftwareIdentity `Uninstall-Package` accepts **SoftwareIdentity** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### SoftwareIdentity `Uninstall-Package` returns a **SoftwareIdentity** object for each package uninstalled.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
and includes the provider's parameter set. For example, `Uninstall-Package` has
**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Unregister Packagesource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PackageManagement/Unregister-PackageSource.md
Title: Unregister-PackageSource
# Unregister-PackageSource
-## Synopsis
+## SYNOPSIS
Removes a registered package source.
-## Syntax
+## SYNTAX
### SourceBySearch
Unregister-PackageSource [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Unregister a package source for the Nuget provider
parameter:
`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )`
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Unregister-PackageSource` accepts **PackageSource** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### `Unregister-PackageSource` doesn't generate any output.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets and includes the provider's parameter set.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PowerShellGet Find Command (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Find-Command.md
Title: Find-Command
# Find-Command
-## Synopsis
+## SYNOPSIS
Finds PowerShell commands in modules.
-## Syntax
+## SYNTAX
### All
Find-Command [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <Strin
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and workflows. `Find-Command` searches modules in registered repositories.
For each command found by `Find-Command`, a **PSGetCommandInfo** object is retur
**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module that contains the command.
-## Examples
+## EXAMPLES
### Example 1: Find all commands in a specified repository
VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modul
optional parameter, but displays status output in the PowerShell console. The verbose output is beneficial for troubleshooting.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetCommandInfo `Find-Command` outputs a **PSGetCommandInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Dscresource (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Find-DscResource.md
Title: Find-DscResource
# Find-DscResource
-## Synopsis
+## SYNOPSIS
Finds Desired State Configuration (DSC) resources.
-## Syntax
+## SYNTAX
### All
Find-DscResource [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <S
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in modules. By default `Find-DscResource` searches all registered repositories.
For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object i
**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module.
-## Examples
+## EXAMPLES
### Example 1: Find all DSC resources
xDSCFirewall 1.6.21 xDSCFirewall PSGallery
dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetDscResourceInfo `Find-DscResource` returns a **PSGetDscResourceInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Find-Module.md
Title: Find-Module
--- # Find-Module
-## Synopsis
+## SYNOPSIS
Finds modules in a repository that match specified criteria.
-## Syntax
+## SYNTAX
### All
Find-Module [[-Name] <string[]>] [-MinimumVersion <string>] [-MaximumVersion <st
[-Credential <pscredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. `Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be
The following examples use the [PowerShell Gallery](https://www.powershellgaller
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find a module by name
Version Name Repository Description
The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo `Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets such as `Install-Module`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
such as `Install-Module`.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Find Rolecapability (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Find-RoleCapability.md
Title: Find-RoleCapability
# Find-RoleCapability
-## Synopsis
+## SYNOPSIS
Finds role capabilities in modules.
-## Syntax
+## SYNTAX
### All
Find-RoleCapability [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role capabilities and modules.
PowerShell role capabilities define which commands and applications are availabl
Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` extension.
-## Examples
+## EXAMPLES
### Example 1: Find role capabilities
The object is sent down the pipeline. `Install-Module` uses the **Verbose** para
status messages during the installation. After the install is finished, the `Get-InstalledModule` output confirms that the **JeaExamples** module was installed.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.Uri ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSGetRoleCapabilityInfo The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md)
PowerShellGet Find Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Find-Script.md
Title: Find-Script
--- # Find-Script
-## Synopsis
+## SYNOPSIS
Finds a script.
-## Syntax
+## SYNTAX
``` Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>]
Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <St
[-Repository <String[]>] [-Credential <PSCredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Script` cmdlet finds a specified script in registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Find all available scripts
Version Name Type Repository D
This command uses the wildcard character (`*`) to find scripts that begin with Required-Script.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Installedmodule (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Get-InstalledModule.md
Title: Get-InstalledModule
--- # Get-InstalledModule
-## Synopsis
+## SYNOPSIS
Gets a list of modules on the computer that were installed by PowerShellGet.
-## Syntax
+## SYNTAX
``` Get-InstalledModule [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllVersions] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` command.
-## Examples
+## EXAMPLES
### Example 1: Get all installed modules
Version Name Type Repository Descrip
This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
PowerShellGet Get Installedscript (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Get-InstalledScript.md
Title: Get-InstalledScript
--- # Get-InstalledScript
-## Synopsis
+## SYNOPSIS
Gets an installed script.
-## Syntax
+## SYNTAX
``` Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes.
-## Examples
+## EXAMPLES
### Example 1: Get all installed scripts
Version Name Type Repository D
This command gets scripts where the name begins with **Required-Scri**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Psrepository (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Get-PSRepository.md
Title: Get-PSRepository
--- # Get-PSRepository
-## Synopsis
+## SYNOPSIS
Gets PowerShell repositories.
-## Syntax
+## SYNTAX
``` Get-PSRepository [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the current user.
-## Examples
+## EXAMPLES
### Example 1: Get all module repositories
ProviderOptions : {}
This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Register-PSRepository](Register-PSRepository.md)
PowerShellGet Install Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Install-Module.md
Title: Install-Module
--- # Install-Module
-## Synopsis
+## SYNOPSIS
Downloads one or more modules from a repository, and installs them on the local computer.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Module [-InputObject] <PSObject[]> [-Credential <PSCredential>] [-Scope
[-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online repository. The cmdlet verifies that search results are valid modules and copies the module folders
These examples use the [PowerShell Gallery](https://www.powershellgallery.com/)
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find and install a module
The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet*
`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current user's directory, `$home\Documents\PowerShell\Modules`.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### PSRepositoryItemInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSRepositoryItemInfo When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object for the module. This is the same information that you get from the `Find-Module` cmdlet.
-## Notes
+## NOTES
`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later releases of Windows.
the **RequiredVersion** value.
A module installation will also install any dependent modules specified as required by the module publisher. The publisher will specify the required modules and their versions in the module manifest.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Install Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Install-Script.md
Title: Install-Script
--- # Install-Script
-## Synopsis
+## SYNOPSIS
Installs a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Script [-InputObject] <PSObject[]> [-Scope <String>] [-NoPathUpdate] [-P
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the payload is a valid PowerShell script, and copies the script file to a specified installation
cmdlets. When operating against multiple repositories, `Install-Script` installs
that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) from the first repository without any error.
-## Examples
+## EXAMPLES
### Example 1: Find a script and install it
repository.
The final command gets installed scripts and displays the results.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet New Scriptfileinfo (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/New-ScriptFileInfo.md
Title: New-ScriptFileInfo
# New-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Creates a script file with metadata.
-## Syntax
+## SYNTAX
### All
New-ScriptFileInfo [[-Path] <String>] [-Version <String>] [-Author <String>] -De
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the script.
script.
The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more information, see [about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Create a script file and specify its version, author, and description
Feature 5
Param() ```
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md)
PowerShellGet Publish Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Publish-Module.md
Title: Publish-Module
# Publish-Module
-## Synopsis
+## SYNOPSIS
Publishes a specified module from the local computer to an online gallery.
-## Syntax
+## SYNTAX
### ModuleNameParameterSet (Default)
Publish-Module -Path <String> [-NuGetApiKey <String>] [-Repository <String>]
[-SkipAutomaticTags] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, stored as part of a user's profile in the gallery. You can specify the module to publish either by
from the module manifest, some metadata must be specified in `Publish-Module` pa
**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters match fields in a NuGet-based gallery.
-## Examples
+## EXAMPLES
### Example 1: Publish a module
specifies a name, version, description, and author, an error occurs.
Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -LicenseUri "http://contoso.com/license" -Tag "Active Directory","DSC" -ReleaseNote "Updated the ActiveDirectory DSC Resources to support adding users." ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.
module manifest, but some metadata can be specified in `Publish-Module` paramete
**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. For more information, see [Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui).
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Publish Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Publish-Script.md
Title: Publish-Script
--- # Publish-Script
-## Synopsis
+## SYNOPSIS
Publishes a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Publish-Script -LiteralPath <String> [-NuGetApiKey <String>] [-Repository <Strin
[-Credential <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Script` cmdlet publishes the specified script to the online gallery.
-## Examples
+## EXAMPLES
### Example 1: Create a script file, add content to it, and publish it
The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Scrip
the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for `Demo-Script.ps1` in the **LocalRepo1** repository.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Register Psrepository (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Register-PSRepository.md
Title: Register-PSRepository
--- # Register-PSRepository
-## Synopsis
+## SYNOPSIS
Registers a PowerShell repository.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSRepository [-Default] [-InstallationPolicy <String>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and
specific type of repository. For example, the NuGet provider is designed to inte
NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet attempts to find a OneGet provider that can handle the specified source location.
-## Examples
+## EXAMPLES
### Example 1: Register a repository
PowerShellGet polls available package providers and associates it with the NuGet
The second command gets registered repositories and displays the results.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSCredential ### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Save Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Save-Module.md
Title: Save-Module
# Save-Module
-## Synopsis
+## SYNOPSIS
Saves a module and its dependencies on the local computer but doesn't install the module.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Module [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. `Save-Module` downloads and saves the most current version of a module. The files are saved to a
inspection by an administrator. The saved module can then be copied into the app
`Get-PSRepository` displays the local computer's registered repositories. You can use the `Find-Module` cmdlet to search registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Save a module
The object is sent down the pipeline to `Save-Module`. The **Path** parameter sp
store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents of **Path** where the files are stored.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Save Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Save-Script.md
Title: Save-Script
# Save-Script
-## Synopsis
+## SYNOPSIS
Saves a script.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Script [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Script` cmdlet saves the specified script.
-## Examples
+## EXAMPLES
### Example 1: Save a script and validate the script's metadata
Version Name Author Description
specifies where to find the script. The script is saved in the location specified by the **Path** parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Set Psrepository (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Set-PSRepository.md
Title: Set-PSRepository
--- # Set-PSRepository
-## Synopsis
+## SYNOPSIS
Sets values for a registered repository.
-## Syntax
+## SYNTAX
``` Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <Uri>]
Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <U
[-PackageManagementProvider <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are persistent for the current user and apply to all versions of PowerShell installed for that user.
-## Examples
+## EXAMPLES
### Example 1: Set the installation policy for a repository
Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.
This command sets the source location and publish location for **myInternalSource** to the specified URIs.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Test Scriptfileinfo (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Test-ScriptFileInfo.md
Title: Test-ScriptFileInfo
--- # Test-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Validates a comment block for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Test-ScriptFileInfo [-Path] <String> [<CommonParameters>]
Test-ScriptFileInfo -LiteralPath <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns information about where the error is located or how to correct it.
-## Examples
+## EXAMPLES
### Example 1: Test a script file
At line:1 char:1
This command tests the script file Hello-World.ps1, which has no metadata associated with it.
-## Parameters
+## PARAMETERS
### -LiteralPath
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
PowerShellGet Uninstall Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Uninstall-Module.md
Title: Uninstall-Module
# Uninstall-Module
-## Synopsis
+## SYNOPSIS
Uninstalls a module.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Module [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Module [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a module
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the pipeline to `Uninstall-Module` and is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Uninstall Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Uninstall-Script.md
Title: Uninstall-Script
# Uninstall-Script
-## Synopsis
+## SYNOPSIS
Uninstalls a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a script
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script
`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the pipeline to `Uninstall-Script` and the script is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Unregister Psrepository (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Unregister-PSRepository.md
Title: Unregister-PSRepository
--- # Unregister-PSRepository
-## Synopsis
+## SYNOPSIS
Unregisters a repository.
-## Syntax
+## SYNTAX
``` Unregister-PSRepository [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSRepository` cmdlet unregisters a repository for the current user.
-## Examples
+## EXAMPLES
### Example 1: Unregister a repository
This example uses `Get-PSRepository` to get all registered repositories, and use
Get-PSRepository | Unregister-PSRepository ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Update Module (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Update-Module.md
Title: Update-Module
# Update-Module
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest version of specified modules from an online gallery to the local computer.
-## Syntax
+## SYNTAX
### All
Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're prompted to confirm the update before it's installed. Updates are installed only for modules that
found in `$env:PSModulePath`, an error is displayed.
To display the installed modules, use `Get-InstalledModule`.
-## Examples
+## EXAMPLES
### Example 1: Update all modules
Update-Module -Name SpeculationControl -Force
`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The **Force** parameter updates the module without requesting user confirmation.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
For PowerShell version 6.0 and above, the default installation scope is always **CurrentUser**. Module updates for **CurrentUser**, `$home\Documents\PowerShell\Modules`, don't need elevated
If `Update-Module` attempts to update binaries that are in use, `Update-Module`
that identifies the problem processes. The user is informed to retry `Update-Module` after the processes are stopped.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Update Modulemanifest (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Update-ModuleManifest.md
Title: Update-ModuleManifest
# Update-ModuleManifest
-## Synopsis
+## SYNOPSIS
Updates a module manifest file.
-## Syntax
+## SYNTAX
### All
Update-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>
[-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file.
-## Examples
+## EXAMPLES
### Example 1: Update a module manifest
Update-ModuleManifest @Parms
**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Parms` and updates the module manifest, **TestManifest.psd1**.
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Update Script (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Update-Script.md
Title: Update-Script
# Update-Script
-## Synopsis
+## SYNOPSIS
Updates a script.
-## Syntax
+## SYNTAX
### All
Update-Script [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated script is downloaded from the same repository as the installed version.
-## Examples
+## EXAMPLES
### Example 1: Update the specified script
Version Name Repository Description
parameter specifies the script version. `Get-InstalledScript` displays the updated version of the script.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Update Scriptfileinfo (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/PowerShellGet/Update-ScriptFileInfo.md
Title: Update-ScriptFileInfo
# Update-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Updates information for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Update-ScriptFileInfo [-LiteralPath] <String> [-Version <String>] [-Author <Stri
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for version, author, or description.
-## Examples
+## EXAMPLES
### Example 1: Update the version of a script file
Param()
**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the script. The **PassThru** parameter displays the script's contents in the PowerShell console.
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values for version, GUID, description, and author.
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
ThreadJob Start Threadjob (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/ThreadJob/Start-ThreadJob.md
Title: Start-ThreadJob
--- # Start-ThreadJob
-## Synopsis
+## SYNOPSIS
Creates background jobs similar to the `Start-Job` cmdlet.
-## Syntax
+## SYNTAX
### ScriptBlock
Start-ThreadJob [-FilePath] <String> [-Name <String>] [-InitializationScript <Sc
[-StreamingHost <PSHost>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Start-ThreadJob` creates background jobs similar to the `Start-Job` cmdlet. The main difference is that the jobs which are created run in separate threads within the local process. By default, the
The cmdlet also supports a **ThrottleLimit** parameter to limit the number of jo
time. As more jobs are started, they are queued and wait until the current number of jobs drops below the throttle limit.
-## Examples
+## EXAMPLES
### Example 1 - Create background jobs with a thread limit of 2
Notice that the prompt from `Read-Host` is displayed and you are able to type in
message from `Write-Warning` is displayed. The `Receive-Job` cmdlet returns all the output from the job.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### ThreadJob.ThreadJob
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Start-Job](../Microsoft.PowerShell.Core/Start-Job.md)
CimCmdlets Get Cimassociatedinstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Get-CimAssociatedInstance.md
Title: Get-CimAssociatedInstance
# Get-CimAssociatedInstance
-## Synopsis
+## SYNOPSIS
Retrieves the CIM instances that are connected to a specific CIM instance by an association.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimAssociatedInstance [[-Association] <String>] [-ResultClassName <String>]
[-ResourceUri <Uri>] -CimSession <CimSession[]> [-KeyOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the InputObject parameter is not specified, the cmdlet works in one of the fo
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get all the associated instances of a specific instance
named `$s`. The association class name for the **Win32_DependentService** is ret
the `Get-CimAssociatedInstance` cmdlet to get all the associated instances of the retrieved association class.
-## Parameters
+## PARAMETERS
### -Association
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets Get Cimclass (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Get-CimClass.md
Title: Get-CimClass
# Get-CimClass
-## Synopsis
+## SYNOPSIS
Gets a list of CIM classes in a specific namespace.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutS
[-QualifierName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-CimClass` cmdlet retrieves a list of CIM classes in a specific namespac
class name supplied, then the cmdlet returns all the classes in the namespace. Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.
-## Examples
+## EXAMPLES
### Example 1: Get all the class definitions
Get-CimClass -ClassName *disk* -CimSession $s
This set of commands creates a session with multiple computers and stores it into a variable `$s` using the `New-CimSession` cmdlet, and then gets the classes using the `Get-CimClass` cmdlet.
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimClass This cmdlet returns a CIM class object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimSession](New-CimSession.md)
CimCmdlets Get Ciminstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Get-CimInstance.md
Title: Get-CimInstance
# Get-CimInstance
-## Synopsis
+## SYNOPSIS
Gets the CIM instances of a class from a CIM server.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-Namespace <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
- If the either the **ComputerName** parameter or the **CimSession** parameter is specified, then this cmdlet uses the either the CimSession parameter value or **ComputerName** parameter value.
-## Examples
+## EXAMPLES
### Example 1: Get the CIM instances of a specified class
$s = New-CimSession -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s ```
-## Parameters
+## PARAMETERS
### -CimSession
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
+## INPUTS
### CIM Instance This cmdlet accepts an input objects specified with the InputObject parameter.
-## Outputs
+## OUTPUTS
### CIM Instance This cmdlet returns one or more CIM instance objects representing a snapshot of the CIM instances on the CIM server.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Get Cimsession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Get-CimSession.md
Title: Get-CimSession
# Get-CimSession
-## Synopsis
+## SYNOPSIS
Gets the CIM session objects from the current session.
-## Syntax
+## SYNTAX
### ComputerNameSet (Default)
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
sessions that were created in other PowerShell sessions or that were created on
For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
-## Examples
+## EXAMPLES
### Example 1: Get CIM sessions from the current PowerShell session
ComputerName : Server02
Protocol : WSMAN ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Import Binarymilog (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Import-BinaryMiLog.md
Title: Import-BinaryMiLog
# Import-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Used to re-create the saved objects based on the contents of an export file.
-## Syntax
+## SYNTAX
``` Import-BinaryMiLog [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
Use this cmdlet to re-create saved objects based on the contents of an export fi
`Export-BinaryMILog`. This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Restore objects exported to a file
stores the resulting object in a binary encoded file.
Import-BinaryMiLog -Path "Processes.bmil" ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
CimCmdlets Invoke Cimmethod (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Invoke-CimMethod.md
Title: Invoke-CimMethod
# Invoke-CimMethod
-## Synopsis
+## SYNOPSIS
Invokes a method of a CIM class.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Invoke-CimMethod -Query <String> [-QueryDialect <String>] -CimSession <CimSessio
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not a common scenario.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' } ```
-## Parameters
+## PARAMETERS
### -Arguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### CIM class
This cmdlet accepts a CIM class as an input object.
This cmdlet accepts a CIM instance as an input object.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Ciminstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/New-CimInstance.md
Title: New-CimInstance
# New-CimInstance
-## Synopsis
+## SYNOPSIS
Creates a CIM instance.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
New-CimInstance [-CimClass] <CimClass> [[-Property] <IDictionary>] [-OperationTi
[-ComputerName <String[]>] [-ClientOnly] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `New-CimInstance` cmdlet creates an instance of a CIM class based on the cla
either the local computer or a remote computer. By default, the `New-CimInstance` cmdlet creates an instance on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Create an instance of a CIM class
that **Prop1** and **Prop2** actually exist and that the keys are marked correct
You cannot use the **ComputerName** or **CimSession** parameter with the **ClientOnly** parameter.
-## Parameters
+## PARAMETERS
### -CimClass
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains the CIM instance information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Cimsession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/New-CimSession.md
Title: New-CimSession
--- # New-CimSession
-## Synopsis
+## SYNOPSIS
Creates a CIM session.
-## Syntax
+## SYNTAX
### CredentialParameterSet (Default)
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-
[-SessionOption <CimSessionOptions>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
identifiers.
This cmdlet returns a CIM session object that can be used by all other CIM cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session with default options
$SessionOption = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server1 -SessionOption $SessionOption ```
-## Parameters
+## PARAMETERS
### -Authentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no inputs.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)
CimCmdlets New Cimsessionoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/New-CimSessionOption.md
Title: New-CimSessionOption
# New-CimSessionOption
-## Synopsis
+## SYNOPSIS
Specifies advanced options for the New-CimSession cmdlet.
-## Syntax
+## SYNTAX
### ProtocolTypeSet (Default)
New-CimSessionOption [-Impersonation <ImpersonationType>] [-PacketIntegrity] [-P
[-UICulture <CultureInfo>] [-Culture <CultureInfo>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet has two parameter sets, one for WsMan options and one for Distribute
Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session options object for DCOM
This example specifies the culture that is used for the CIM session. By default,
client is used when performing operations. However, the default culture can be overridden using the **Culture** parameter.
-## Parameters
+## PARAMETERS
### -Culture
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### CIMSessionOption This cmdlet returns an object that contains CIM session options information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
CimCmdlets Register Cimindicationevent (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Register-CimIndicationEvent.md
Title: Register-CimIndicationEvent
--- # Register-CimIndicationEvent
-## Synopsis
+## SYNOPSIS
Subscribes to indications using a filter expression or a query expression.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Register-CimIndicationEvent [-Namespace <String>] [-Query] <String> [-QueryDiale
[-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
a query expression. Use the **SourceIdentifier** parameter give a name to the su
This cmdlet returns an **EventSubscription** object. You can use this object to cancel the subscription.
-## Examples
+## EXAMPLES
### Example 1: Register the events generated by a class
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifi
Get-Event -SourceIdentifier "ProcessStarted" ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet outputs an **EventSubscription** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Event](../microsoft.powershell.utility/get-event.md)
CimCmdlets Remove Ciminstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Remove-CimInstance.md
Title: Remove-CimInstance
--- # Remove-CimInstance
-## Synopsis
+## SYNOPSIS
Removes a CIM instance from a computer.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Remove-CimInstance [-ComputerName <String[]>] [[-Namespace] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is not specified, the cmdlet works in one of th
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Remove the CIM instance
$var = Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "note
Remove-CimInstance -InputObject $var ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### None This cmdlet produces no outputs.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimInstance](New-CimInstance.md)
CimCmdlets Remove Cimsession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Remove-CimSession.md
Title: Remove-CimSession
# Remove-CimSession
-## Synopsis
+## SYNOPSIS
Removes one or more CIM sessions.
-## Syntax
+## SYNTAX
### CimSessionSet (Default)
Remove-CimSession -InstanceId <Guid[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CimSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Remove-CimSession` cmdlet removes one or more CIM session objects from the local PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove all the CIM sessions
but only output what would happen if it were done.
Remove-CimSession -Name a* -WhatIf ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains CIM session information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimSession](Get-CimSession.md)
CimCmdlets Set Ciminstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/CimCmdlets/Set-CimInstance.md
Title: Set-CimInstance
--- # Set-CimInstance
-## Synopsis
+## SYNOPSIS
Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Set-CimInstance [-ComputerName <String[]>] [-Namespace <String>] [-OperationTime
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not very common.
-## Examples
+## EXAMPLES
### Example 1: Set the CIM instance
$x = New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";Use
Set-CimInstance -CimInstance $x -Property @{VariableValue="somevalue"} -PassThru ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance When the **Passthru** parameter is specified, this cmdlet returns a modified CIM instance object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
Microsoft.PowerShell.Archive Compress Archive (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Archive/Compress-Archive.md
Title: Compress-Archive
# Compress-Archive
-## Synopsis
+## SYNOPSIS
Creates a compressed archive, or zipped file, from specified files and directories.
-## Syntax
+## SYNTAX
### Path (Default)
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-Compressi
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compress-Archive` cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, with optional compression, into
The maximum file size is 2 GB because there's a limitation of the underlying API
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Compress files to create an archive file
The command updates `Draft.Zip` with newer versions of existing files in the `C:
directory and its subdirectories. And, new files that were added to `C:\Reference` or its subdirectories are included in the updated `Draft.Zip` archive.
-## Parameters
+## PARAMETERS
### -CompressionLevel
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo The cmdlet only returns a **FileInfo** object when you use the **PassThru** parameter.
-## Notes
+## NOTES
Using recursion and sending objects down the pipeline can duplicate files in your archive. For example, if you use `Get-ChildItem` with the **Recurse** parameter, each **FileInfo** and
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Expand-Archive](Expand-Archive.md)
Microsoft.PowerShell.Archive Expand Archive (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Archive/Expand-Archive.md
Title: Expand-Archive
# Expand-Archive
-## Synopsis
+## SYNOPSIS
Extracts files from a specified archive (zipped) file.
-## Syntax
+## SYNTAX
### Path (Default)
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-Pa
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Expand-Archive` cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage.
-## Examples
+## EXAMPLES
### Example 1: Extract the contents of an archive
specified by the **DestinationPath** parameter.
Expand-Archive -Path Draftv2.Zip -DestinationPath C:\Reference ```
-## Parameters
+## PARAMETERS
### -DestinationPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to an existing archive file.
-## Outputs
+## OUTPUTS
### System.IO.FileSystemInfo When the `-PassThru` parameter is used, the cmdlet outputs a list of files that were expanded from the archive.
-## Notes
+## NOTES
The [ZIP file specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) does not specify a standard way of encoding filenames that contain non-ASCII characters. The
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Compress-Archive](compress-archive.md)
Microsoft.PowerShell.Core About Language Keywords (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Language_Keywords.md
--- description: Describes the keywords in the PowerShell scripting language. Locale: en-US Previously updated : 06/25/2021 Last updated : 03/07/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_keywords?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Language Keywords
about topic for the keyword and the information that follows the table.
| Keyword | Reference | | ------------ | ----------------------------------------------------------------------------------------------------------------- |
-| Begin | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Break | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
-| Catch | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Class | [about_Classes](about_Classes.md) |
-| Continue | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
-| Data | [about_Data_Sections](about_Data_Sections.md) |
-| Define | Reserved for future use |
-| Do | [about_Do](about_Do.md), [about_While](about_While.md) |
-| DynamicParam | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
-| Else | [about_If](about_If.md) |
-| Elseif | [about_If](about_If.md) |
-| End | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Enum | [about_Enum](about_Enum.md) |
-| Exit | [Described in this topic](#exit) |
-| Filter | [about_Functions](about_Functions.md) |
-| Finally | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| For | [about_For](about_For.md) |
-| ForEach | [about_ForEach](about_ForEach.md) |
-| From | Reserved for future use |
-| Function | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Hidden | [about_Hidden](about_Hidden.md) |
-| If | [about_If](about_If.md) |
-| In | [about_ForEach](about_ForEach.md) |
-| Param | [about_Functions](about_Functions.md) |
-| Process | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Return | [about_Return](about_Return.md) |
-| Static | [about_Classes](about_Classes.md) |
-| Switch | [about_Switch](about_Switch.md) |
-| Throw | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Trap | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Try | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Until | [about_Do](about_Do.md) |
-| Using | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
-| Var | Reserved for future use |
-| While | [about_While](about_While.md), [about_Do](about_Do.md) |
+| `begin` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `break` | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
+| `catch` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `class` | [about_Classes](about_Classes.md) |
+| `continue` | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
+| `data` | [about_Data_Sections](about_Data_Sections.md) |
+| `define` | Reserved for future use |
+| `do` | [about_Do](about_Do.md), [about_While](about_While.md) |
+| `dynamicparam` | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
+| `else` | [about_If](about_If.md) |
+| `elseif` | [about_If](about_If.md) |
+| `end` | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `enum` | [about_Enum](about_Enum.md) |
+| `exit` | [Described in this topic](#exit) |
+| `filter` | [about_Functions](about_Functions.md) |
+| `finally` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `for` | [about_For](about_For.md) |
+| `foreach` | [about_ForEach](about_ForEach.md) |
+| `from` | Reserved for future use |
+| `function` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `hidden` | [about_Hidden](about_Hidden.md) |
+| `if` | [about_If](about_If.md) |
+| `in` | [about_ForEach](about_ForEach.md) |
+| `param` | [about_Functions](about_Functions.md) |
+| `process` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `return` | [about_Return](about_Return.md) |
+| `static` | [about_Classes](about_Classes.md) |
+| `switch` | [about_Switch](about_Switch.md) |
+| `throw` | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `trap` | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `try` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `until` | [about_Do](about_Do.md) |
+| `using` | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
+| `var` | Reserved for future use |
+| `while` | [about_While](about_While.md), [about_Do](about_Do.md) |
The following keywords are used by PowerShell workflows: -- InlineScript-- Parallel-- Sequence-- Workflow
+- `inlinescript`
+- `parallel`
+- `sequence`
+- `workflow`
PowerShell workflows are only supported in PowerShell 5.1. For more information about workflows, see [Running PowerShell Commands in a Workflow](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574197(v=ws.11)).
-## Begin
+## `begin`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Process`, and `End` keywords. The `Begin` statement list runs one time before
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`process`, and `end` keywords. The `begin` statement list runs one time before
any objects are received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Break
+## `break`
Causes a script to exit a loop.
while (<condition>) {
} ```
-## Catch
+## `catch`
-Specifies a statement list to run if an error occurs in the accompanying `Try`
+Specifies a statement list to run if an error occurs in the accompanying `try`
statement list. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
try {<statement list>}
catch [[<error type>]] {<statement list>} ```
-## Class
+## `class`
Specifies a new class in PowerShell.
class <class-name> {
} ```
-## Continue
+## `continue`
Causes a script to stop running a loop and to go back to the condition. If the condition is met, the script begins the loop again.
while (<condition>) {
} ```
-## Data
+## `data`
In a script, defines a section that isolates data from the script logic. Can
-also include `If` statements and some limited commands.
+also include `if` statements and some limited commands.
Syntax:
Syntax:
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>} ```
-## Do
+## `do`
-Used with the `While` or `Until` keyword as a looping construct. PowerShell
-runs the statement list at least one time, unlike a loop that uses `While`.
+Used with the `while` or `until` keyword as a looping construct. PowerShell
+runs the statement list at least one time, unlike a loop that uses `while`.
-Syntax for `While`:
+Syntax for `while`:
```Syntax do {<statement list>} while (<condition>) ```
-Syntax for `Until`:
+Syntax for `until`:
```Syntax do {<statement list>} until (<condition>) ```
-## DynamicParam
+## `dynamicparam`
-Specifies one part of the body of a function, along with the `Begin`, `Process`,
-and `End` keywords. Dynamic parameters are added at run time.
+Specifies one part of the body of a function, along with the `begin`, `process`,
+and `end` keywords. Dynamic parameters are added at runtime.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Else
+## `else`
-Used with the `If` keyword to specify the default statement list.
+Used with the `if` keyword to specify the default statement list.
Syntax:
if (<condition>) {<statement list>}
else {<statement list>} ```
-## Elseif
+## `elseif`
-Used with the `If` and `Else` keywords to specify additional conditionals. The
-`Else` keyword is optional.
+Used with the `if` and `else` keywords to specify additional conditionals. The
+`else` keyword is optional.
Syntax:
elseif (<condition>) {<statement list>}
else {<statement list>} ```
-## End
+## `end`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. The `End` statement list runs one time after all
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. The `end` statement list runs one time after all
the objects have been received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Enum
+## `enum`
`enum` is used to declare an enumeration; a distinct type that consists of a set of named labels called the enumerator list.
enum <enum-name> {
} ```
-## Exit
+## `exit`
Causes PowerShell to exit a script or a PowerShell instance.
On Unix, only positive numbers between `[byte]::MinValue` and
example, `-2` is transformed to `254`. In PowerShell, the `exit` statement sets the value of the `$LASTEXITCODE`
-variable. In the Windows Command Shell (cmd.exe), the exit statement sets the
+variable. In the Windows Command Shell (`cmd.exe`), the exit statement sets the
value of the `%ERRORLEVEL%` environment variable. Any argument that is non-numeric or outside the platform-specific range is translated to the value of `0`.
-In the following example, the user sets the error level variable value to 4 by
-adding `exit 4` to the script file `test.ps1`.
+In the following example, the user sets the error level variable value to **4**
+by adding `exit 4` to the script file `test.ps1`.
```cmd C:\scripts\test>type test.ps1
the `exit` command. If the script has no `exit` statement, the exit code is
always `0` when the script completes without error or `1` when the script terminates from an unhandled exception.
-## Filter
+## `filter`
Specifies a function in which the statement list runs one time for each input
-object. It has the same effect as a function that contains only a Process
+object. It has the same effect as a function that contains only a `process`
block. Syntax:
Syntax:
filter <name> {<statement list>} ```
-## Finally
+## `finally`
Defines a statement list that runs after statements that are associated with
-`Try` and `Catch`. A `Finally` statement list runs even if you press
-<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the Exit keyword
+`try` and `catch`. A `finally` statement list runs even if you press
+<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the `exit` keyword
in the script. Syntax:
catch [<error type>] {<statement list>}
finally {<statement list>} ```
-## For
+## `for`
-Defines a loop by using a condition.
+Defines a loop with a condition.
Syntax:
Syntax:
for (<initialize>; <condition>; <iterate>) { <statement list> } ```
-## ForEach
+## `foreach`
-Defines a loop by using each member of a collection.
+Defines a loop using each member of a collection.
Syntax: ```Syntax
-ForEach (<item> in <collection>) { <statement list> }
+foreach (<item> in <collection>) { <statement list> }
```
-## From
+## `from`
Reserved for future use.
-## Function
+## `function`
Creates a named statement list of reusable code. You can name the scope a
-function belongs to. And, you can specify one or more named parameters by using
-the `Param` keyword. Within the function statement list, you can include
-`DynamicParam`, `Begin`, `Process`, and `End` statement lists.
+function belongs to. You can also specify one or more named parameters by using
+the `param` keyword. Within the function statement list, you can include
+`dynamicparam`, `begin`, `process`, and `end` statement lists.
Syntax: ```Syntax function [<scope:>]<name> { param ([type]<$pname1> [, [type]<$pname2>])
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>}
Syntax:
```Syntax function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## If
+## `if`
Defines a conditional.
Syntax:
if (<condition>) {<statement list>} ```
-## Hidden
+## `hidden`
-Hides class members from the default results of the `Get-Member` cmdlet, and
-from IntelliSense and tab completion results.
+Hides class members from the default results of the `Get-Member` cmdlet,
+IntelliSense, and tab completion results.
Syntax: ```Syntax
-Hidden [data type] $member_name
+hidden [data type] $member_name
```
-## In
+## `in`
-Used in a `ForEach` statement to create a loop that uses each member of a
+Used in a `foreach` statement to create a loop that uses each member of a
collection. Syntax: ```Syntax
-ForEach (<item> in <collection>){<statement list>}
+foreach (<item> in <collection>){<statement list>}
```
-## Param
+## `param`
Defines the parameters in a function.
function [<scope:>]<name> {
} ```
-## Process
+## `process`
-Specifies a part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. When a `Process` statement list receives input
-from the pipeline, the `Process` statement list runs one time for each element
-from the pipeline. If the pipeline provides no objects, the `Process` statement
+Specifies a part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. When a `process` statement list receives input
+from the pipeline, the `process` statement list runs one time for each element
+from the pipeline. If the pipeline provides no objects, the `process` statement
list does not run. If the command is the first command in the pipeline, the
-`Process` statement list runs one time.
+`process` statement list runs one time.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Return
+## `return`
Causes PowerShell to leave the current scope, such as a script or function, and writes the optional expression to the output.
Syntax:
return [<expression>] ```
-## Static
+## `static`
Specifies the property or method defined is common to all instances of the
-class in which is defined.
+class in which it is defined.
-See `Class` for usage examples.
+See `class` for usage examples.
-## Switch
+## `switch`
-To check multiple conditions, use a `Switch` statement. The `Switch` statement
-is equivalent to a series of `If` statements, but it is simpler.
+To check multiple conditions, use a `switch` statement. The `switch` statement
+is equivalent to a series of `if` statements, but it is simpler.
-The `Switch` statement lists each condition and an optional action. If a
+The `switch` statement lists each condition and an optional action. If a
condition obtains, the action is performed. Syntax 1:
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
} ```
-## Throw
+## `throw`
Throws an object as an error.
Syntax:
throw [<object>] ```
-## Trap
+## `trap`
Defines a statement list to be run if an error is encountered. An error type requires brackets. The second pair of brackets indicates that the error type
Syntax:
trap [[<error type>]] {<statement list>} ```
-## Try
+## `try`
Defines a statement list to be checked for errors while the statements run. If
-an error occurs, PowerShell continues running in a `Catch` or `Finally`
+an error occurs, PowerShell continues running in a `catch` or `finally`
statement. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
catch [[<error type>]] {<statement list>}
finally {<statement list>} ```
-## Until
+## `until`
-Used in a `Do` statement as a looping construct where the statement list is
+Used in a `do` statement as a looping construct where the statement list is
executed at least one time. Syntax:
Syntax:
do {<statement list>} until (<condition>) ```
-## Using
+## `using`
-Allows to indicate which namespaces are used in the session. Classes and
-members require less typing to mention them. You can also include classes from
-modules.
+Allows indicating which namespaces are used in the session. Classes and members
+require less typing to mention them. You can also include classes from modules.
Syntax #1:
Syntax #2:
using module <module-name> ```
-## While
+## `while`
The `while` statement is a looping construct where the condition is tested
-before the statements are executed. If the condition is FALSE, then the
+before the statements are executed. If the condition is false, then the
statements do not execute. Statement syntax:
while (<condition>) {
} ```
-When used in a `Do` statement, `while` is part of a looping construct where
+When used in a `do` statement, `while` is part of a looping construct where
the statement list is executed at least one time.
-Do loop Syntax:
+`do` loop Syntax:
```Syntax do {<statement list>} while (<condition>)
Microsoft.PowerShell.Core Add History (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Add-History.md
Title: Add-History
# Add-History
-## Synopsis
+## SYNOPSIS
Appends entries to the session history.
-## Syntax
+## SYNTAX
``` Add-History [[-InputObject] <PSObject[]>] [-Passthru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-History` cmdlet adds entries to the end of the session history, that is, the list of commands entered during the current session.
export the commands to a CSV or XML file, then import the commands, and pass the
`Add-History`. You can use this cmdlet to add specific commands to the history or to create a single history file that includes commands from more than one session.
-## Examples
+## EXAMPLES
### Example 1: Add commands to the history of a different session
The **InputObject** parameter passes the results of the command in parentheses t
cmdlet. The command in parentheses, which is executed first, imports the `history.xml` file into PowerShell. The `Add-History` cmdlet then adds the commands in the file to the session history.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.HistoryInfo You can pipe a **HistoryInfo** object to this cmdlet.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a **HistoryInfo** object if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the
the file.
To modify the session history, export the session to a CSV or XML file, modify the file, import the file, and use `Add-History` to append it to the current session history.
-## Related links
+## RELATED LINKS
[Clear-History](Clear-History.md)
Microsoft.PowerShell.Core Clear History (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Clear-History.md
Title: Clear-History
# Clear-History
-## Synopsis
+## SYNOPSIS
Deletes entries from the PowerShell session command history.
-## Syntax
+## SYNTAX
### IDParameter (Default)
Clear-History [[-Count] <int>] [-CommandLine <string[]>] [-Newest] [-WhatIf] [-C
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Clear-History` deletes the command history from a PowerShell session. Each PowerShell session has its own command history. To display the command history, use the `Get-History` cmdlet.
history. To display the `PSReadLine` configuration for command history, use `Get
`PSReadLine` shipped with PowerShell 5.0 and above. For more information, see [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Delete the command history from a PowerShell session
command history. The **Id** parameter specifies to begin with **Id 7**. The **Co
specifies to delete five commands, inclusive of the specified **Id**. `Get-History` displays the updated command history and confirms that five commands were deleted, **Id 3** - **Id 7**.
-## Parameters
+## PARAMETERS
### -CommandLine
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-History`.
-## Outputs
+## OUTPUTS
### None `Clear-History` does not generate any output.
-## Notes
+## NOTES
The PowerShell session history is a list of the commands entered during a PowerShell session. You can view the history, add and delete commands, and run commands from the history. For more
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Related links
+## RELATED LINKS
[about_History](About/about_History.md)
Microsoft.PowerShell.Core Clear Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Clear-Host.md
Title: Clear-Host
# Clear-Host
-## Synopsis
+## SYNOPSIS
Clears the display in the host program.
-## Syntax
+## SYNTAX
``` Clear-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Host` function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function
function.
Because the behavior of the `Clear-Host` function is determined by the host program, `Clear-Host` might work differently in different host programs.
-## Examples
+## EXAMPLES
### Example 1
PS C:>
This command uses the `cls` alias of `Clear-Host` to clear the current display.
-## Parameters
+## PARAMETERS
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Clear-Host`.
-## Outputs
+## OUTPUTS
### None `Clear-Host` does not generate any output
-## Notes
+## NOTES
`Clear-Host` is a simple function, not an advanced function. As such, you cannot use common parameters, such as **Debug**, in a `Clear-Host` command.
-## Related links
+## RELATED LINKS
[Get-Host](../Microsoft.PowerShell.Utility/Get-Host.md)
Microsoft.PowerShell.Core Connect Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Connect-PSSession.md
Title: Connect-PSSession
--- # Connect-PSSession
-## Synopsis
+## SYNOPSIS
Reconnects to disconnected sessions.
-## Syntax
+## SYNTAX
### Name (Default)
Connect-PSSession -InstanceId <Guid[]> [-ThrottleLimit <Int32>] [-WhatIf] [-Conf
Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Reconnect to a session
The ninth command disconnects from the session in the `$s` variable.The administ
PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session (**PSSession**) to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession This cmdlet returns an object that represents the session to which it reconnected.
-## Notes
+## NOTES
- This cmdlet is only available on Windows platforms.
This cmdlet returns an object that represents the session to which it reconnecte
sessions are considered to be idle from the moment that they are disconnected, even if commands are running in the disconnected session.
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](Disconnect-PSSession.md)
Microsoft.PowerShell.Core Debug Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Debug-Job.md
Title: Debug-Job
# Debug-Job
-## Synopsis
+## SYNOPSIS
Debugs a running background or remote job.
-## Syntax
+## SYNTAX
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
accepts a running job object, name, ID, or instance ID as input, and starts a de
the script it is running. The debugger `quit` command stops the job and running script. The `exit` command detaches the debugger, and allows the job to continue to run.
-## Examples
+## EXAMPLES
### Example 1: Debug a job by job ID
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Disable Experimentalfeature (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Disable-ExperimentalFeature.md
Title: Disable-ExperimentalFeature
--- # Disable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Disable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Disable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ExperimentalFeature` cmdlet disables experimental features by removing the named experimental features from the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Disable an experimental feature
PS C:\> Disable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to disable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Enable-ExperimentalFeature](Enable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Disable Psremoting (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Disable-PSRemoting.md
Title: Disable-PSRemoting
--- # Disable-PSRemoting
-## Synopsis
+## SYNOPSIS
Prevents PowerShell endpoints from receiving remote connections.
-## Syntax
+## SYNTAX
``` Disable-PSRemoting [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is only available on the Windows platform. It is not available on Li
versions of PowerShell. To run this cmdlet, start PowerShell with the **Run as administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Prevent remote access to all PowerShell session configurations
PowerShell.6 NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrat
PowerShell.6.2.0 NT AUTHORITY\NETWORK AccessDenied, NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Adm ... ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
configurations, you effectively prevent remote users from establishing sessions that connect to the computer.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disable Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Disable-PSSessionConfiguration.md
Title: Disable-PSSessionConfiguration
--- # Disable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Disables session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Disable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
connect to the computer.
To disable all session configurations on the computer, use `Disable-PSRemoting`.
-## Examples
+## EXAMPLES
### Example 1: Disable the default configuration
For more information, see the about_Remote_Troubleshooting Help topic.
> Disabling the configuration does not prevent you from changing the configuration using the > `Set-PSSessionConfiguration` cmdlet. It only prevents use of the configuration.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Enable-PSSessionConfiguration](Enable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disconnect Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Title: Disconnect-PSSession
# Disconnect-PSSession
-## Synopsis
+## SYNOPSIS
Disconnects from a session.
-## Syntax
+## SYNTAX
### Session (Default)
Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
[-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1 - Disconnect a session by name
timeout to the 12-hour maximum.
The seventh command gets the value of the **IdleTimeout** property of the disconnected session, which is measured in milliseconds. The output confirms that the command was successful.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session to `Disconnect-PSSession`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession `Disconnect-PSSession` returns an object that represents the session that it disconnected.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Enable Experimentalfeature (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Enable-ExperimentalFeature.md
Title: Enable-ExperimentalFeature
--- # Enable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Enable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Enable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ExperimentalFeature` cmdlet enables experimental features by adding the named experimental features to the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Enable an experimental feature
Enable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to enable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Enable Psremoting (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Title: Enable-PSRemoting
--- # Enable-PSRemoting
-## Synopsis
+## SYNOPSIS
Configures the computer to receive remote commands.
-## Syntax
+## SYNTAX
``` Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the > `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Configure a computer to receive remote commands
OS Microsoft Windows 10.0.18363
> The name of the firewall rule can be different depending on the version of Windows. Use the > `Get-NetFirewallRule` cmdlet to list the names of the rules on your system.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns strings that describe its results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
property of all session configurations to `$True`.
`Enable-PSRemoting` removes the **Deny_All** and **Network_Deny_All** settings. This provides remote access to session configurations that were reserved for local use.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enable Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Enable-PSSessionConfiguration.md
Title: Enable-PSSessionConfiguration
--- # Enable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Enables the session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Enable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-SecurityDescriptorSddl <String>] [-SkipNetworkProfileCheck] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
also sets the value of the **Enabled** property of the session configuration
(`AccessMode=Local`) security descriptor setting that allows only users of the local computer to use to the session configuration.
-## Examples
+## EXAMPLES
### Example 1: Re-enable the default session
$sddl = "O:NSG:BAD:P(A;;GXGWGR;;;BA)(A;;GAGR;;;S-1-5-21-123456789-188441444-3100
Enable-PSSessionConfiguration -Name MaintenanceShell -SecurityDescriptorSDDL $sddl ```
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To use this cmdlet, you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enter Pshostprocess (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Title: Enter-PSHostProcess
# Enter-PSHostProcess
-## Synopsis
+## SYNOPSIS
Connects to and enters into an interactive session with a local process.
-## Syntax
+## SYNTAX
### ProcessIdParameterSet (Default)
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
Enter-PSHostProcess -CustomPipeName <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSHostProcess` cmdlet connects to and enters into an interactive session with a local process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
To support attaching to processes on remote computers, the `Enter-PSHostProcess`
in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.
-## Examples
+## EXAMPLES
### Example Part 1: Start debugging a runspace within the PowerShell ISE process
cmdlet. This returns you to the `PS C:\>` prompt.
PS C:\> ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Enter-PSHostProcess` cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a PowerShell ISE
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSHostProcess](Exit-PSHostProcess.md)
Microsoft.PowerShell.Core Enter Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Enter-PSSession.md
Title: Enter-PSSession
--- # Enter-PSSession
-## Synopsis
+## SYNOPSIS
Starts an interactive session with a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Enter-PSSession [-ContainerId] <String> [-ConfigurationName <String>] [-RunAsAdm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSSession` cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as if you were
information about how to set up PowerShell SSH remoting, see
To end the interactive session and disconnect from the remote computer, use the `Exit-PSSession` cmdlet, or type `exit`.
-## Examples
+## EXAMPLES
### Example 1: Start an interactive session
This example shows how to start an interactive session using SSH. It uses the **
specify the port to use and the **KeyFilePath** parameter to specify an RSA key used to authenticate the user on the remote computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.Runspaces.PSSession You can pipe a computer name, as a string, or a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
To connect to a remote computer, you must be a member of the Administrators group on the remote computer. To start an interactive session on the local computer, you must start PowerShell with the
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSSession](Exit-PSSession.md)
Microsoft.PowerShell.Core Exit Pshostprocess (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Exit-PSHostProcess.md
Title: Exit-PSHostProcess
--- # Exit-PSHostProcess
-## Synopsis
+## SYNOPSIS
Closes an interactive session with a local process.
-## Syntax
+## SYNTAX
``` Exit-PSHostProcess [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSHostProcess` cmdlet closes an interactive session with a local process that you have opened by running the `Enter-PSHostProcess` cmdlet. You run the `Exit-PSHostProcess` cmdlet from within the process, when you are finished debugging or troubleshooting a script that is running within a process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### Example 1: Exit a process
in the process, as described in `Enter-PSHostProcess`. After you type the `exit`
debugger, run the `Exit-PSHostProcess` cmdlet to close your interactive session with the process. The cmdlet closes your session in the process, and returns you to the `PS C:\>` prompt.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enter-PSHostProcess](Enter-PSHostProcess.md)
Microsoft.PowerShell.Core Exit Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Exit-PSSession.md
Title: Exit-PSSession
# Exit-PSSession
-## Synopsis
+## SYNOPSIS
Ends an interactive session with a remote computer.
-## Syntax
+## SYNTAX
``` Exit-PSSession [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the `Enter-PSSession` cmdlet.
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using
You can also use the `exit` keyword to end an interactive session. The effect is the same as using `Exit-PSSession`.
-## Examples
+## EXAMPLES
### Example 1: Start and stop an interactive session
PS>
This example uses the `exit` keyword to stop an interactive session started by using `Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet takes only the common parameters.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Export Modulemember (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Export-ModuleMember.md
Title: Export-ModuleMember
--- # Export-ModuleMember
-## Synopsis
+## SYNOPSIS
Specifies the module members that are exported.
-## Syntax
+## SYNTAX
``` Export-ModuleMember [[-Function] <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [-Alias <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ModuleMember` cmdlet specifies the module members that are exported from a script module (`.psm1`) file, or from a dynamic module created by using the `New-Module` cmdlet. Module members
module imports from other modules.
An `Export-ModuleMember` command is optional, but it is a best practice. Even if the command confirms the default values, it demonstrates the intention of the module author.
-## Examples
+## EXAMPLES
### Example 1: Export functions and aliases in a script module
This command shows how to use `Export-ModuleMember` in a dynamic module that is
In this example, `Export-ModuleMember` is used to export both the `Hi` alias and the `SayHello` function in the dynamic module.
-## Parameters
+## PARAMETERS
### -Alias
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
+## INPUTS
### System.String You can pipe function name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To exclude a member from the list of exported members, add an `Export-ModuleMember` command that lists all other members but omits the member that you want to exclude.
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Foreach Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/ForEach-Object.md
Title: ForEach-Object
--- # ForEach-Object
-## Synopsis
+## SYNOPSIS
Performs an operation against each item in a collection of input objects.
-## Syntax
+## SYNTAX
### ScriptBlockSet (Default)
ForEach-Object -Parallel <scriptblock> [-InputObject <PSObject>] [-ThrottleLimit
[-UseNewRunspace] [-TimeoutSeconds <int>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ForEach-Object` cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified by using the **InputObject** parameter.
command.
Terminating errors can be converted to non-terminating errors using PowerShell try/catch or trap blocks.
-## Examples
+## EXAMPLES
### Example 1: Divide integers in an array
Output: 5
> [PipelineVariable](About/about_CommonParameters.md) common parameter variables are _not_ > supported in `Foreach-Object -Parallel` scenarios even with the `$using:` keyword.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns objects that are determined by the input.
-## Notes
+## NOTES
- The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe input to a **Foreach** statement. For more information about the **Foreach** statement, see
This cmdlet returns objects that are determined by the input.
> referenced objects that don't change. But if the object state is being modified then you must > used thread safe objects, such as .Net **System.Collection.Concurrent** types (See Example 11).
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Core Get Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-Command.md
Title: Get-Command
--- # Get-Command
-## Synopsis
+## SYNOPSIS
Gets all commands.
-## Syntax
+## SYNTAX
### CmdletSet (Default)
Get-Command [[-Name] <String[]>] [-Module <String[]>]
[-UseAbbreviationExpansion] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Command` cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. `Get-Command` gets the commands from
information from help topics.
Starting in Windows PowerShell 5.0, results of the `Get-Command` cmdlet display a **Version** column by default. A new **Version** property has been added to the **CommandInfo** class.
-## Examples
+## EXAMPLES
### Example 1: Get cmdlets, functions, and aliases
Application getconf 0.0.0.0 /u
Application command 0.0.0.0 /usr/bin/command ```
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe command names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandInfo
Represents cmdlets.
Represents functions and filters.
-## Notes
+## NOTES
- When more than one command that has the same name is available to the session, `Get-Command` returns the command that runs when you type the command name. To get commands that have the same
Represents functions and filters.
`$PSModuleAutoLoadingPreference` preference variable. For more information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Export-PSSession](../Microsoft.PowerShell.Utility/Export-PSSession.md)
Microsoft.PowerShell.Core Get Experimentalfeature (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-ExperimentalFeature.md
Title: Get-ExperimentalFeature
--- # Get-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Gets experimental features.
-## Syntax
+## SYNTAX
``` Get-ExperimentalFeature [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ExperimentalFeature` cmdlet returns all experimental features discovered by PowerShell. Experimental features can come from modules or the PowerShell engine. Experimental features allow users to safely test new features and provide feedback (typically via GitHub) before the design is considered complete and any changes can become a breaking change.
-## Examples
+## EXAMPLES
### Example 1
Name Enabled Source Description
PSImplicitRemotingBatching False PSEngine Batch implicit remoting proxy commands to improve performance ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[] Name or names of experimental features to return.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExperimentalFeature Returns instances that match the requested names or all experimental features if no name is specified.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Get Help (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-Help.md
Title: Get-Help
# Get-Help
-## Synopsis
+## SYNOPSIS
Displays information about PowerShell commands and concepts.
-## Syntax
+## SYNTAX
### AllUsersView (Default)
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Detailed
[-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Examples
+### EXAMPLES
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Examples [-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Parameters
+### PARAMETERS
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Parameter <String[]>
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] -ShowWindow [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Help` cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, workflows, providers, aliases, and
For information about parameter attributes, such as **Required** and **Position*
> in a module, import the module, either by using the `Import-Module` cmdlet or by running a cmdlet > that's included in the module.
-## Examples
+## EXAMPLES
### Example 1: Display basic help information about a cmdlet
your functions and scripts, see [about_Comment_Based_Help](./About/about_Comment
Get-Help -Name C:\PS-Test\MyScript.ps1 ```
-## Parameters
+## PARAMETERS
### -Category
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-Help`.
-## Outputs
+## OUTPUTS
### ExtendedCmdletHelpInfo
If you get a conceptual help article, `Get-Help` returns it as a string.
If you get a command that has a help file, `Get-Help` returns a **MamlCommandHelpInfo** object.
-## Notes
+## NOTES
PowerShell 3.0 doesn't include help files. To download and install the help files that `Get-Help` reads, use the `Update-Help` cmdlet. You can use the `Update-Help` cmdlet to download and install
following fields:
- **Accepts wildcard characters**. Indicates whether the value of a parameter can include wildcard characters, such as an asterisk (`*`) or question mark (`?`).
-## Related links
+## RELATED LINKS
[about_Command_Syntax](About/about_Command_Syntax.md)
Microsoft.PowerShell.Core Get History (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-History.md
Title: Get-History
--- # Get-History
-## Synopsis
+## SYNOPSIS
Gets a list of the commands entered during the current session.
-## Syntax
+## SYNTAX
``` Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-History` cmdlet gets the session history, that is, the list of commands entered during the current session.
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Get the session history
command.
Get-History | Format-List -Property * ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64 You can pipe a history ID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a history object for each history item that it gets.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the run order, the status, and the start and end times of the command. As you enter each
Starting in Windows PowerShell 3.0, the default value of the `$MaximumHistoryCou
variable is `4096`. In Windows PowerShell 2.0, the default value is `64`. For more information about the `$MaximumHistoryCount` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core Get Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-Job.md
Title: Get-Job
--- # Get-Job
-## Synopsis
+## SYNOPSIS
Gets PowerShell background jobs that are running in the current session.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Get-Job [-IncludeChildJob] [-ChildJobState <JobState>] [-HasMoreData <Boolean>]
Get-Job [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Job` cmdlet gets objects that represent the background jobs that were started in the current session. You can use `Get-Job` to get jobs that were started by using the `Start-Job`
into the session before you run a `Get-Job` command, either by using the `Import
by using or getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get all background jobs started in the current session
Access is denied.
For more information, see the [about_Remote_Troubleshooting](./about/about_Remote_Troubleshooting.md) Help topic.
-## Parameters
+## PARAMETERS
### -After
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.RemotingJob This cmdlet returns objects that represent the jobs in the session.
-## Notes
+## NOTES
The **PSJobTypeName** property of jobs indicates the job type of the job. The property value is determined by the job type author. The following list shows common job types.
determined by the job type author. The following list shows common job types.
`Invoke-Command` cmdlet. - **PSWorkflowJob**. Job started by using the **AsJob** common parameter of workflows.
-## Related links
+## RELATED LINKS
[Invoke-Command](Invoke-Command.md)
Microsoft.PowerShell.Core Get Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-Module.md
Title: Get-Module
--- # Get-Module
-## Synopsis
+## SYNOPSIS
List the modules imported in the current session or that can be imported from the PSModulePath.
-## Syntax
+## SYNTAX
### Loaded (Default)
Get-Module [[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Module` cmdlet lists the PowerShell modules that have been imported, or that can be imported, into a PowerShell session. Without parameters, `Get-Module` gets modules that have been
Management Instrumentation (WMI) on the remote computer. Then use the **CIMSessi
`Import-Module` cmdlet and then run the imported commands, the commands run implicitly on the remote computer. You can use this WMI and CIM strategy to manage the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Get modules imported into the current session
The fourth command runs the `Get-Disk` command. Although the command is typed in
it runs implicitly on the remote computer from which it was imported. The command gets objects from the remote computer and returns them to the local session.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe module names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
This cmdlet returns objects that represent modules.
When you specify the **ListAvailable** parameter, `Get-Module` returns a **ModuleInfoGrouping** object, which is a type of **PSModuleInfo** object that has the same properties and methods.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are included in PowerShell are packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a snap-in
object, which is a type of **PSModuleInfo** object that has the same properties
remoting enabled. This includes the local computer. When you create a CIM session on the local computer, PowerShell uses DCOM, instead of WMI, to create the session.
-## Related links
+## RELATED LINKS
[Get-CimSession](../CimCmdlets/Get-CimSession.md)
Microsoft.PowerShell.Core Get Pshostprocessinfo (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-PSHostProcessInfo.md
Title: Get-PSHostProcessInfo
--- # Get-PSHostProcessInfo
-## Synopsis
+## SYNOPSIS
Gets process information about the PowerShell host.
-## Syntax
+## SYNTAX
### ProcessNameParameterSet (Default)
Get-PSHostProcessInfo [-Process] <Process[]> [<CommonParameters>]
Get-PSHostProcessInfo [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSHostProcessInfo` cmdlet gets information about PowerShell host processes running on the local computer. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### 1: Get a list of PowerShell hosts running on the system
ProcessName ProcessId AppDomainName
pwsh 13912 DefaultAppDomain ```
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### System.Diagnostics.Process You can pipe a **Process** object from `Get-Process` to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSHostProcessInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Process](../Microsoft.PowerShell.Management/get-process.md)
Microsoft.PowerShell.Core Get Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-PSSession.md
Title: Get-PSSession
--- # Get-PSSession
-## Synopsis
+## SYNOPSIS
Gets the PowerShell sessions on local and remote computers.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSSession [-InstanceId <Guid[]>] [<CommonParameters>]
Get-PSSession [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSession` cmdlet gets the user-managed PowerShell sessions (**PSSessions**) on local and remote computers.
the current session and connect to the specified computer.
For more information about PowerShell sessions, see [about_PSSessions](about/about_PSSessions.md).
-## Examples
+## EXAMPLES
### Example 1: Get sessions created in the current session
Get-PSSession -Id 2
This command gets the **PSSession** with ID 2. Because the value of the **ID** property is unique only in the current session, the **Id** parameter is valid only for local commands.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet gets user-managed sessions **PSSession** objects" such as those that are created by using the New-PSSession, `Enter-PSSession`, and Invoke-Command cmdlets. It does not get the
For more information about the values of the **State** property of sessions, see
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Get Pssessioncapability (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-PSSessionCapability.md
Title: Get-PSSessionCapability
--- # Get-PSSessionCapability
-## Synopsis
+## SYNOPSIS
Gets the capabilities of a specific user on a constrained session configuration.
-## Syntax
+## SYNTAX
``` Get-PSSessionCapability [-ConfigurationName] <String> [-Username] <String> [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionCapability` cmdlet gets the capabilities of a specific user on a constrained session configuration. Use this cmdlet to audit customized session configurations for users.
object. This object contains details about the PowerShell runspace the specified
with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.
-## Examples
+## EXAMPLES
### Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -F
This example returns details about the runspace the user CONTOSO\User would interact with when connecting to the Endpoint1 constrained endpoint.
-## Parameters
+## PARAMETERS
### -ConfigurationName
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.Runspaces.InitialSessionState
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSRoleCapabilityFile](New-PSRoleCapabilityFile.md)
Microsoft.PowerShell.Core Get Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-PSSessionConfiguration.md
Title: Get-PSSessionConfiguration
--- # Get-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Gets the registered session configurations on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSessionConfiguration [[-Name] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionConfiguration` cmdlet gets the session configurations that have been registered on the local computer. This is an advanced cmdlet that is designed to be used by system administrators
session configuration authors to examine and compare session configurations.
To create and register a session configuration, use the `Register-PSSessionConfiguration` cmdlet. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1 - Get session configurations on the local computer
create a session. This variable is set on the local computer, but it specifies a
the remote computer. For more information about the `$PSSessionConfiguration` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration
-## Notes
+## NOTES
- To run this cmdlet, start PowerShell with the **Run as administrator** option.
You cannot pipe input to this cmdlet.
commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Get Pssubsystem (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Get-PSSubsystem.md
Title: Get-PSSubsystem
--- # Get-PSSubsystem
-## Synopsis
+## SYNOPSIS
Retrieves information about the subsystems registered in PowerShell.
-## Syntax
+## SYNTAX
### GetAllSet (Default)
Get-PSSubsystem -Kind <SubsystemKind> [<CommonParameters>]
Get-PSSubsystem -SubsystemType <Type> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Retrieves information about the subsystems registered in PowerShell.
the PSReadLine module to provide custom prediction plugins. In future, **Job**,
**CommandCompleter**, **Remoting** and other components could be separated into subsystem assemblies outside of `System.Management.Automation.dll`.
-## Examples
+## EXAMPLES
### Example 1 - Display all available subsystems
IsRegistered : False
Implementations : {} ```
-## Parameters
+## PARAMETERS
### -Kind
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Subsystem.SubsystemKind ### System.Type
-## Outputs
+## OUTPUTS
### System.Management.Automation.Subsystem.SubsystemInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_experimental_features](about/about_experimental_features.md)
Microsoft.PowerShell.Core Import Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Import-Module.md
Title: Import-Module
# Import-Module
-## Synopsis
+## SYNOPSIS
Adds modules to the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
[-NoClobber] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or
import CIM modules from the remote computer. The imported commands run implicitl
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Import the members of a module into the current session
Number Friendly Name OperationalStatus Total Size Partition Style
0 Virtual HD ATA Device Online 40 GB MBR ```
-## Parameters
+## PARAMETERS
### -Alias
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo, System.Reflection.Assembly You can pipe a module name, module object, or assembly object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSModuleInfo, or System.Management.Automation.PSCustomObject
By default, `Import-Module` does not generate any output. If you specify the **P
the cmdlet generates a **System.Management.Automation.PSModuleInfo** object that represents the module. If you specify the **AsCustomObject** parameter, it generates a **PSCustomObject** object.
-## Notes
+## NOTES
- Before you can import a module, the module must be installed on the local computer. That is, the module directory must be copied to a directory that is accessible to your local computer. For more
module. If you specify the **AsCustomObject** parameter, it generates a **PSCust
statement at the beginning of your script. This imports the module, including the class and enum definitions. For more information, see [about_Using](About/about_Using.md).
-## Related links
+## RELATED LINKS
[about_Modules](about/about_Modules.md)
Microsoft.PowerShell.Core Invoke Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Invoke-Command.md
Title: Invoke-Command
# Invoke-Command
-## Synopsis
+## SYNOPSIS
Runs commands on local and remote computers.
-## Syntax
+## SYNTAX
### InProcess (Default)
Invoke-Command [-AsJob] [-HideComputerName] -FilePath <String> -SSHConnection <H
[-RemoteDebug] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Command` cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single `Invoke-Command` command, you can run commands on
connection information. For more information about how to set up PowerShell SSH
Some code samples use splatting to reduce the line length. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Run a script on a server
$sshConnections =
$results = Invoke-Command -FilePath c:\Scripts\CollectEvents.ps1 -SSHConnection $sshConnections ```
-## Parameters
+## PARAMETERS
### -AllowRedirection
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
+## INPUTS
### System.Management.Automation.ScriptBlock You can pipe a command in a script block to `Invoke-Command`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob, System.Management.Automation.Runspaces.PSSession, or the output of the invoked command
This cmdlet returns a job object, if you use the **AsJob** parameter. If you spe
**InDisconnectedSession** parameter, `Invoke-Command` returns a **PSSession** object. Otherwise, it returns the output of the invoked command, which is the value of the **ScriptBlock** parameter.
-## Notes
+## NOTES
On Windows Vista, and later versions of the Windows operating system, to use the **ComputerName** parameter of `Invoke-Command` to run a command on the local computer, you must run PowerShell using
disconnect/reconnect features are currently not supported. For more information
PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Invoke History (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Invoke-History.md
Title: Invoke-History
--- # Invoke-History
-## Synopsis
+## SYNOPSIS
Runs commands from the session history.
-## Syntax
+## SYNTAX
``` Invoke-History [[-Id] <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-History` cmdlet runs commands from the session history. You can pass objects representing the commands from Get-History to `Invoke-History`, or you can identify commands in the
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Run the most recent command in the history
the command uses the `ForEach-Object` cmdlet to run the `Invoke-History` command
Get-History -Id 255 -Count 7 | ForEach {Invoke-History -Id $_.Id} ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a history **Id** to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output, but output might be generated by the commands that `Invoke-History` runs.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the order of execution, the status, and the start and end times of the command. As you
about the session history, see [about_History](About/about_History.md).
You can also refer to `Invoke-History` by its built-in aliases, `r` and `ihy`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core New Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-Module.md
Title: New-Module
--- # New-Module
-## Synopsis
+## SYNOPSIS
Creates a new dynamic module that exists only in memory.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
New-Module [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Function <String[]>]
[-ReturnResult] [-AsCustomObject] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Module` cmdlet creates a dynamic module from a script block. The members of the dynamic module, such as functions and variables, are immediately available in the session and remain
To make a dynamic module available to `Get-Module`, pipe a `New-Module` command
pipe the module object that `New-Module` returns to `Import-Module`. This action adds the dynamic module to the `Get-Module` list, but it does not save the module to disk or make it persistent.
-## Examples
+## EXAMPLES
### Example 1: Create a dynamic module
New-Module -ScriptBlock {function SayHello {"Hello, World!"}; SayHello} -ReturnR
Hello, World! ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a module name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo, System.Management.Automation.PSCustomObject, or None
This cmdlet generates a **PSModuleInfo** object, by default. If you use the **As
parameter, it generates a **PSCustomObject** object. If you use the **ReturnResult** parameter, it returns the result of evaluating the script block in the dynamic module.
-## Notes
+## NOTES
You can also refer to `New-Module` by its alias, `nmo`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Modulemanifest (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-ModuleManifest.md
Title: New-ModuleManifest
# New-ModuleManifest
-## Synopsis
+## SYNOPSIS
Creates a new module manifest.
-## Syntax
+## SYNTAX
### All
New-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>] [
[-DefaultCommandPrefix <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ModuleManifest` cmdlet creates a new module manifest (`.psd1`) file, populates its values, and saves the manifest file in the specified path.
values for certain properties. For more information, see
[Required metadata for items published to the PowerShell Gallery](/powershell/scripting/gallery/how-to/publishing-packages/publishing-a-package#required-metadata-for-items-published-to-the-powershell-gallery) in the Gallery documentation.
-## Examples
+## EXAMPLES
### Example 1 - Create a new module manifest
ExportedFormatFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\Event.
ExportedTypeFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml} ```
-## Parameters
+## PARAMETERS
### -AliasesToExport
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).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.String By default, `New-ModuleManifest` doesn't generate any output. However, if you use the **PassThru** parameter, it generates a **System.String** object representing the module manifest.
-## Notes
+## NOTES
`New-ModuleManifest` running on Windows and non-Windows platforms creates module manifest (`.psd1`) files encoded as **UTF8NoBOM**.
The caller's session state is the session state into which a module is imported.
refers to the global session state, but when a module imports nested modules, the caller is the module and the caller's session state is the module's session state.
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Psrolecapabilityfile (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md
Title: New-PSRoleCapabilityFile
--- # New-PSRoleCapabilityFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a set of capabilities to be exposed through a session configuration.
-## Syntax
+## SYNTAX
``` New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-Description <String>]
New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that can be exposed through session configuration files. This includes determining which cmdlets,
in the **RoleDefinitions** field in a PowerShell Session Configuration (.pssc) f
This cmdlet was introduced in Windows PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Create a blank role capability file
$roleParameters = @{
New-PSRoleCapabilityFile @roleParameters ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSSessionConfigurationFile](New-PSSessionConfigurationFile.md)
Microsoft.PowerShell.Core New Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-PSSession.md
Title: New-PSSession
--- # New-PSSession
-## Synopsis
+## SYNOPSIS
Creates a persistent connection to a local or remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-PSSession [-Name <String[]>] [-Port <Int32>] [-HostName] <String[]> [-UserNa
New-PSSession [-Name <String[]>] -SSHConnection <Hashtable[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSession` cmdlet creates a PowerShell session (**PSSession**) on a local or remote computer. When you create a **PSSession**, PowerShell establishes a persistent connection to the
connection information. For more information about how to set up PowerShell SSH
> this if you are in an environment where you can be certain of the server certificate and the > network connection to the target system.
-## Examples
+## EXAMPLES
### Example 1: Create a session on the local computer
This example shows how to create multiple sessions using Secure Shell (SSH) and
contain connection information for each session. Note that this example requires that the target remote computers have SSH configured to support key based user authentication.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.URI, System.Management.Automation.Runspaces.PSSession You can pipe a string, URI, or session object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet uses the PowerShell remoting infrastructure. To use this cmdlet, the local computer and any remote computers must be configured for PowerShell remoting. For more
You can pipe a string, URI, or session object to this cmdlet.
more information about how to set up PowerShell SSH remoting, see [PowerShell Remoting Over SSH](/powershell/scripting/learn/remoting/ssh-remoting-in-powershell-core).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core New Pssessionconfigurationfile (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-PSSessionConfigurationFile.md
Title: New-PSSessionConfigurationFile
--- # New-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a session configuration.
-## Syntax
+## SYNTAX
``` New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Guid <Guid>]
New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Gui
[-FormatsToProcess <String[]>] [-AssembliesToLoad <String[]>] [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about session configurations and session configuration file
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Creating and using a NoLanguage session
AssembliesToLoad = 'System.Web.Services', 'FSharp.Compiler.CodeDom.dll'
} ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
Before using an edited session configuration file, use the `Test-PSSessionConfigurationFile` cmdlet to verify that the configuration file entries are valid.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core New Pssessionoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-PSSessionOption.md
Title: New-PSSessionOption
--- # New-PSSessionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a PSSession.
-## Syntax
+## SYNTAX
``` New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachineProfile] [-Culture <CultureInfo>]
New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachinePr
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [-IncludePortInSPN] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionOption` cmdlet creates an object that contains advanced options for a user-managed session (**PSSession**). You can use the object as the value of the **SessionOption**
in the session configuration. However, they do not take precedence over maximum
limits set in the session configuration. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Create a default session option
commands in the remote session. The data appears in the **ApplicationArguments**
The final `Invoke-Command` shows how the data might be used.
-## Parameters
+## PARAMETERS
### -ApplicationArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Remoting.PSSessionOption
-## Notes
+## NOTES
If the **SessionOption** parameter is not used in a command to create a **PSSession**, the session options are determined by the property values of the `$PSSessionOption` preference variable, if it
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Enter-PSSession](Enter-PSSession.md)
Microsoft.PowerShell.Core New Pstransportoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/New-PSTransportOption.md
Title: New-PSTransportOption
# New-PSTransportOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a session configuration.
-## Syntax
+## SYNTAX
``` New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int32>] [-MaxSessions <Int32>]
New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int3
[-OutputBufferingMode <OutputBufferingMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSTransportOption` cmdlet creates an object that contains transport options for session configurations. You can use the object as the value of the **TransportOption** parameter of cmdlets
session configurations, see [about_Session_Configurations](About/about_Session_C
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Generate a default transport option
The fourth command uses the `Format-List` cmdlet to display all properties of th
`$s` variable in a list. The output shows that the session has an idle time-out of one hour (360,000 milliseconds).
-## Parameters
+## PARAMETERS
### -IdleTimeoutSec
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.WSManConfigurationOption
-## Notes
+## NOTES
- The properties of a session configuration object vary with the options set for the session configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[New-PSSession](New-PSSession.md)
Microsoft.PowerShell.Core Out Default (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Out-Default.md
Title: Out-Default
--- # Out-Default
-## Synopsis
+## SYNOPSIS
Sends the output to the default formatter and to the default output cmdlet.
-## Syntax
+## SYNTAX
``` Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
This cmdlet isn't intended to be used by the end user. Other cmdlets are recomme
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md) file to control formatting.
-## Examples
+## EXAMPLES
### Example 1
Get-Process | Select-Object -First 5 | Out-Default
No error is thrown when using `Out-Default` but the output isn't changed if it's not explicitly called.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Custom](../Microsoft.PowerShell.Utility/Format-Custom.md)
Microsoft.PowerShell.Core Out Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Out-Host.md
Title: Out-Host
# Out-Host
-## Synopsis
+## SYNOPSIS
Sends output to the command line.
-## Syntax
+## SYNTAX
### All
Sends output to the command line.
Out-Host [-Paging] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
pipeline to the host executing the command. `Out-Host` ignores ANSI escape seque
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without trying to interpret or change them.
-## Examples
+## EXAMPLES
### Example 1: Display output one page at a time
Out-Host -InputObject $io
`Out-Host` uses the **InputObject** parameter to specify the `$io` variable and displays the history.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-Host`.
-## Outputs
+## OUTPUTS
### None `Out-Host` doesn't generate any output. It sends objects to the host for display.
-## Notes
+## NOTES
The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the **Paging** parameter in the PowerShell ISE, the following error is displayed:
variable and use the **InputObject** parameter to pass the data to the cmdlet.
`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Clear-Host](Clear-Host.md)
Microsoft.PowerShell.Core Out Null (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Out-Null.md
Title: Out-Null
--- # Out-Null
-## Synopsis
+## SYNOPSIS
Hides the output instead of sending it down the pipeline or displaying it.
-## Syntax
+## SYNTAX
``` Out-Null [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Null` cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen.
-## Examples
+## EXAMPLES
### Example 1: Delete output
Get-ChildItem | Out-Null
This command gets items in the current location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The cmdlets that contain the **Out** verb (the **Out** cmdlets) do not have parameters for names or file paths. To send data to an **Out** cmdlet, use a pipeline operator (`|`) to send the output
This cmdlet does not generate any output.
- `Out-Null` does not return any output objects. If you pipe the output of `Out-Null` to the Get-Member cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-Default](Out-Default.md)
Microsoft.PowerShell.Core Receive Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Receive-Job.md
Title: Receive-Job
--- # Receive-Job
-## Synopsis
+## SYNOPSIS
Gets the results of the PowerShell background jobs in the current session.
-## Syntax
+## SYNTAX
### Location (Default)
Receive-Job [-Keep] [-NoRecurse] [-Force] [-Wait] [-AutoRemoveJob] [-WriteEvents
[-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-Job` cmdlet gets the results of PowerShell background jobs, such as those started by using the `Start-Job` cmdlet or the **AsJob** parameter of any cmdlet.
custom job type into the session before it runs a `Receive-Job` command, either
For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get results for a particular job
Cannot find drive. A drive with the name 'Z' does not exist.
+ PSComputerName : localhost ```
-## Parameters
+## PARAMETERS
### -AutoRemoveJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe job objects to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the results of the commands in the job.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Receive Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Receive-PSSession.md
Title: Receive-PSSession
# Receive-PSSession
-## Synopsis
+## SYNOPSIS
Gets results of commands in disconnected sessions
-## Syntax
+## SYNTAX
### Session (Default)
Receive-PSSession -Name <String> [-OutTarget <OutTarget>] [-JobName <String>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
Some examples use splatting to reduce the line length and improve readability. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Connect to a PSSession
the command is run in the same session, `Receive-PSSession` returns the results
and reuses the same job object. The command saves the job in the `$j2` variable. The `Receive-Job` cmdlet gets the results of the job in the `$j` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession
You can pipe the instance Ids of sessions this cmdlet.
You can pipe session names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job or PSObject
This cmdlet returns the results of commands that ran in the disconnected session
value or default value of the **OutTarget** parameter is Job, `Receive-PSSession` returns a job object. Otherwise, it returns objects that represent that command results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
When you disconnect a **PSSession**, the session state is Disconnected and the a
- For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Register Argumentcompleter (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md
Title: Register-ArgumentCompleter
# Register-ArgumentCompleter
-## Synopsis
+## SYNOPSIS
Registers a custom argument completer.
-## Syntax
+## SYNTAX
### NativeSet
Register-ArgumentCompleter [-CommandName <String[]>] -ParameterName <String>
-ScriptBlock <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ArgumentCompleter` cmdlet registers a custom argument completer. An argument completer allows you to provide dynamic tab completion, at run time for any command that you specify.
-## Examples
+## EXAMPLES
### Example 1: Register a custom argument completer
The results are piped to the `ForEach-Object` cmdlet which use the **new** stati
[System.Management.Automation.CompletionResult](/dotnet/api/system.management.automation.completionresult) class to create a new **CompletionResult** object for each value.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet returns no output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Core Register Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md
Title: Register-PSSessionConfiguration
--- # Register-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Creates and registers a new session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSSessionConfiguration [-ProcessorArchitecture <String>] [-Name] <Strin
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration class and by using a script that runs in the session. Beginning in
For information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md). For information about session configuration files, see [about_Session_Configuration_Files](About/about_Session_Configuration_Files.md).
-## Examples
+## EXAMPLES
### Example 1: Register a NewShell session configuration
The script contains a single command that uses dot sourcing to run the user's
For more information about profiles, see [about_Profiles](./About/about_Profiles.md). For more information about dot sourcing, see [about_Scopes](./About/about_Scopes.md).
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigContainerElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Remove Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Remove-Job.md
Title: Remove-Job
# Remove-Job
-## Synopsis
+## SYNOPSIS
Deletes a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Remove-Job [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Job [-Command <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by the `Start-Job` cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
job. Or, use `Remove-Job` with the **Force** parameter to delete a running job.
Jobs remain in the global job cache until you delete the background job or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Delete a job by using its name
asterisk (`*`) to specify that all the object's properties are displayed in a li
`Remove-Job` uses the **InstanceId** parameter to specify the job to delete.
-## Parameters
+## PARAMETERS
### -Command
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
+## INPUTS
### System.Management.Automation.Job You can send a job object down the pipeline to `Remove-Job`.
-## Outputs
+## OUTPUTS
### None `Remove-Job` doesn't generate any output.
-## Notes
+## NOTES
A PowerShell job creates a new process. When the job completes, the process exits. When `Remove-Job` is run, the job's state is removed. If a job stops before completion and its process hasn't exited, the process is forcibly terminated.
-## Related links
+## RELATED LINKS
[about_Jobs](./About/about_Jobs.md)
Microsoft.PowerShell.Core Remove Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Remove-Module.md
Title: Remove-Module
--- # Remove-Module
-## Synopsis
+## SYNOPSIS
Removes modules from the current session.
-## Syntax
+## SYNTAX
### name
Remove-Module [-FullyQualifiedName] <ModuleSpecification[]> [-Force] [-WhatIf] [
Remove-Module [-ModuleInfo] <PSModuleInfo[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Module` cmdlet removes the members of a module, such as cmdlets and functions, from the current session.
removed, but the assembly is not unloaded.
This cmdlet does not uninstall the module or delete it from the computer. It affects only the current PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove a module
Remove-Module -ModuleInfo $a
This command uses the **ModuleInfo** parameter to remove the BitsTransfer module.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo You can pipe module names and module objects to `Remove-Module`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
When removing a module, there is an event on the module that will execute. This event allows a module to react to being removed and perform some cleanup such as freeing up resources. Example:
For full consistency, it might be also useful to react to the closing of the Pow
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Action $OnRemoveScript
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Remove Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Remove-PSSession.md
Title: Remove-PSSession
--- # Remove-PSSession
-## Synopsis
+## SYNOPSIS
Closes one or more PowerShell sessions (PSSessions).
-## Syntax
+## SYNTAX
### Id (Default)
Remove-PSSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PSSession [-ComputerName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSession` cmdlet closes PowerShell sessions (**PSSessions**) in the current session. It stops any commands that are running in the **PSSessions**, ends the **PSSession**, and releases the
session.
If you have saved the **PSSession** in a variable, the session object remains in the variable, but the state of the **PSSession** is Closed.
-## Examples
+## EXAMPLES
### Example 1: Remove sessions by using IDs
Function EndPSS { Get-PSSession | Remove-PSSession }
This function deletes all of the **PSSessions** in the current session. After you add this function to your PowerShell profile, to delete all sessions, type `EndPSS`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
- The **Id** parameter is mandatory. To delete all the **PSSessions** in the current session, type `Get-PSSession | Remove-PSSession`.
This cmdlet does not return any objects.
- **PSSessions** are specific to the current session. When you end a session, the **PSSessions** that you created in that session are forcibly closed.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Save Help (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Save-Help.md
Title: Save-Help
--- # Save-Help
-## Synopsis
+## SYNOPSIS
Downloads and saves the newest help files to a file system directory.
-## Syntax
+## SYNTAX
### Path (Default)
Save-Help -LiteralPath <String[]> [[-Module] <PSModuleInfo[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Help` cmdlet downloads the newest help files for PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not
group on the computer to download the help files for these modules.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Save the help for the DhcpServer module
The command uses the `Save-Help` cmdlet to download and save the help files to t
The **Force** parameter is required when you have to run a `Save-Help` command more than one time each day.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSModuleInfo You can pipe a module object from the `Get-Module` cmdlet to the **Module** parameter of `Save-Help`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To save help for modules in the $pshome\Modules folder, start PowerShell by using the Run as administrator option. Only members of the Administrators group on the computer can download help
This cmdlet does not generate any output.
- The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Help](Get-Help.md)
Microsoft.PowerShell.Core Set Psdebug (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Set-PSDebug.md
Title: Set-PSDebug
# Set-PSDebug
-## Synopsis
+## SYNOPSIS
Turns script debugging features on and off, sets the trace level, and toggles strict mode.
-## Syntax
+## SYNTAX
### on
Set-PSDebug [-Trace <Int32>] [-Step] [-Strict] [<CommonParameters>]
Set-PSDebug [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSDebug` cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. By default, the PowerShell debug features are off.
When the **Trace** parameter has a value of `1`, each line of script is traced a
parameter has a value of `2`, variable assignments, function calls, and script calls are also traced. If the **Step** parameter is specified, you're prompted before each line of the script runs.
-## Examples
+## EXAMPLES
### Example 1: Set the trace level
Set-PSDebug -Off; foreach ($i in 1..3) {$i}
3 ```
-## Parameters
+## PARAMETERS
### -Off
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
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Debuggers](./About/about_Debuggers.md)
Microsoft.PowerShell.Core Set Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md
Title: Set-PSSessionConfiguration
--- # Set-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Changes the properties of a registered session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Set-PSSessionConfiguration [-Name] <String> [-RunAsCredential <PSCredential>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
to the local computer. For more information about session configurations, see [a
To see the properties of a session configuration, use the `Get-PSSessionConfiguration` cmdlet or the WSMan Provider. For more information about the WSMan Provider, type `Get-Help WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Create and change a session configuration
PSVersion 2.0
startupscript c:\ps-test\Maintenance.ps1 ```
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigLeafElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
properties that are introduced in PowerShell 3.0, such as **OutputBufferingMode*
PowerShell 2.0 commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Set Strictmode (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Set-StrictMode.md
Title: Set-StrictMode
--- # Set-StrictMode
-## Synopsis
+## SYNOPSIS
Establishes and enforces coding rules in expressions, scripts, and script blocks.
-## Syntax
+## SYNTAX
### Version (Default)
Set-StrictMode -Version <Version> [<CommonParameters>]
Set-StrictMode [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-StrictMode` cmdlet configures strict mode for the current scope and all child scopes, and turns it on and off. When strict mode is on, PowerShell generates a terminating error when the
When `Set-StrictMode` is off, PowerShell has the following behaviors:
- Results of improper function syntax vary with the error conditions - Attempting to retrieve a value using an invalid index in an array returns `$Null`
-## Examples
+## EXAMPLES
### Example 1: Turn on strict mode as version 1.0
InvalidArgument: Cannot convert value "abc" to type "System.Int32". Error: "Inpu
With strict mode set to version 3 or higher, invalid or out of bounds indexes result in errors.
-## Parameters
+## PARAMETERS
### -Off
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
While `Set-StrictMode` **Version** parameter will accept values greater than `3.0`, currently there are no additional rules defined for anything higher than `3.0`.
are no additional rules defined for anything higher than `3.0`.
`Set-StrictMode` is effective only in the scope in which it is set and in its child scopes. For more information about scopes in PowerShell, see [about_Scopes](about/about_Scopes.md).
-## Related links
+## RELATED LINKS
[Set-PSDebug](Set-PSDebug.md)
Microsoft.PowerShell.Core Start Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Start-Job.md
Title: Start-Job
# Start-Job
-## Synopsis
+## SYNOPSIS
Starts a PowerShell background job.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Start-Job [-Name <String>] [-Credential <PSCredential>] -LiteralPath <String>
[-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Job` cmdlet starts a PowerShell background job on the local computer.
directory of the caller that started the job.
> > The substitute in that scenario is `Start-ThreadJob` from the module **[ThreadJob](https://www.powershellgallery.com/packages/ThreadJob)**.
-## Examples
+## EXAMPLES
### Example 1: Start a background job
Major Minor Build Revision
5 1 14393 3383 ```
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### System.String You can use the pipeline to send an object with the **Name** property to the **Name** parameter. For example, you can pipeline a **FileInfo** object from `Get-ChildItem` to `Start-Job`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob `Start-Job` returns a **PSRemotingJob** object that represents the job that it started.
-## Notes
+## NOTES
To run in the background, `Start-Job` runs in its own session in the current session. When you use the `Invoke-Command` cmdlet to run a `Start-Job` command in a session on a remote computer, `Start-Job` runs in a session in the remote session.
-## Related links
+## RELATED LINKS
[about_Arrays](./about/about_arrays.md)
Microsoft.PowerShell.Core Stop Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Stop-Job.md
Title: Stop-Job
--- # Stop-Job
-## Synopsis
+## SYNOPSIS
Stops a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Stop-Job [-PassThru] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters
Stop-Job [-PassThru] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Job` cmdlet stops PowerShell background jobs that are in progress. You can use this cmdlet to stop all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing
either by using the `Import-Module` cmdlet or by using or getting a cmdlet in th
information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Stop a job on a remote computer by using Invoke-Command
display confirms that the state of the job is Stopped.
For more information about remote background jobs, see [about_Remote_Jobs](About/about_Remote_Jobs.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSRemotingJob This cmdlet returns a job object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Test Modulemanifest (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Test-ModuleManifest.md
Title: Test-ModuleManifest
--- # Test-ModuleManifest
-## Synopsis
+## SYNOPSIS
Verifies that a module manifest file accurately describes the contents of a module.
-## Syntax
+## SYNTAX
``` Test-ModuleManifest [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ModuleManifest` cmdlet verifies that the files that are listed in the module manifest (`.psd1`) file are actually in the specified paths.
module.
that `Get-Module` returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
-## Examples
+## EXAMPLES
### Example 1: Test a manifest
previous command generates no error, the command displays `$True`, and `$False`
You can use this function in conditional statements, such as those that might precede an `Import-Module` command or a command that uses the module.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe the path to a module manifest to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo This cmdlet returns a **PSModuleInfo** object that represents the module. It returns this object even if the manifest has errors.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core Test Pssessionconfigurationfile (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md
Title: Test-PSSessionConfigurationFile
--- # Test-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Verifies the keys and values in a session configuration file.
-## Syntax
+## SYNTAX
``` Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration files, see [about_Session_Configuration_Files](About/about_Session
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Test a session configuration file
the **ConfigFilePath** property value. Then it uses the `Test-PSSessionConfigura
test the file in the **ConfigFilePath** value. The **Verbose** parameter returns the file error when the file fails the test.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe a session configuration file path to `Test-PSSessionConfigurationFile`.
-## Outputs
+## OUTPUTS
### System.Boolean
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Unregister Pssessionconfiguration (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Unregister-PSSessionConfiguration.md
Title: Unregister-PSSessionConfiguration
--- # Unregister-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Deletes registered session configurations from the computer.
-## Syntax
+## SYNTAX
``` Unregister-PSSessionConfiguration [-Name] <String> [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If you accidentally delete the default **Microsoft.PowerShell** or **Microsoft.P
session configurations, use the `Enable-PSRemoting` cmdlet to restore them. For more information, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Delete a session configuration
Finally, the `New-PSSession` cmdlet tries to create a session that uses the **Ma
configuration. This time, the session fails because the **MaintenanceShell** configuration was deleted when the WinRM service restarted.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration You can pipe a session configuration object from `Get-PSSessionConfiguration` to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Update Help (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Update-Help.md
Title: Update-Help
# Update-Help
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest help files on your computer.
-## Syntax
+## SYNTAX
### Path (Default)
Update-Help [[-Module] <String[]>] [-FullyQualifiedModule <ModuleSpecification[]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Help` cmdlet downloads the newest help files for PowerShell modules and installs them on your computer. You need not restart PowerShell to make the change effective. You can use the
The `Update-Help` cmdlet was introduced in Windows PowerShell 3.0.
> Core modules, start PowerShell by using the **Run as administrator** option. > For example: `Start-Process pwsh.exe -Verb RunAs`.
-## Examples
+## EXAMPLES
### Example 1: Update help files for all modules
ADDSDeployment en-US
ADFS en-US 3.0.0.0 ```
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.IO.DirectoryInfo
You can pipe a directory path to `Update-Help`.
You can pipe a module object from the `Get-Module` cmdlet to `Update-Help`.
-## Outputs
+## OUTPUTS
### None `Update-Help` doesn't generate any output.
-## Notes
+## NOTES
To update help for the core PowerShell modules, that contain the commands that are installed with PowerShell, or any module in the `$PSHOME\Modules` directory, start PowerShell with the option to
that you author, see [Supporting Updatable Help](/powershell/scripting/developer
The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
Microsoft.PowerShell.Core Wait Job (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Wait-Job.md
Title: Wait-Job
--- # Wait-Job
-## Synopsis
+## SYNOPSIS
Waits until one or all of the PowerShell jobs running in the session are in a terminating state.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-State] <JobState> [<CommonParamete
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Job` cmdlet waits for a job to be in a terminating state before continuing execution. The terminating states are:
type, import the module that supports the custom job type into the session befor
module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Wait for all jobs
Wait-Job -Id 1
This command waits for the job with an ID value of 1.
-## Parameters
+## PARAMETERS
### -Any
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob This cmdlet returns job objects that represent the jobs in a terminating state. If the wait ends because the value of the **Timeout** parameter is exceeded, `Wait-Job` does not return any objects.
-## Notes
+## NOTES
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the following states:
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the fo
- Disconnected To direct `Wait-Job` to continue to wait for Suspended and Disconnected jobs, use the **Force** parameter.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Where Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/Where-Object.md
Title: Where-Object
--- # Where-Object
-## Synopsis
+## SYNOPSIS
Selects objects from a collection based on their property values.
-## Syntax
+## SYNTAX
### EqualSet (Default)
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>]
Where-Object [-InputObject <PSObject>] [-Property] <String> -Not [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Where-Object` cmdlet selects objects that have particular property values from the collection of objects that are passed to it. For example, you can use the `Where-Object` cmdlet to select files
The previous example is functionally equivalent to:
For more information about how booleans are evaluated, see [about_Booleans](about/about_Booleans.md).
-## Examples
+## EXAMPLES
### Example 1: Get stopped services
valid only in script blocks. You cannot use them in the comparison statement for
- For more information about the Updatable Help feature, see [about_Updatable_Help](./About/about_Updatable_Help.md).
-## Parameters
+## PARAMETERS
### -CContains
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns selected items from the input object set.
-## Notes
+## NOTES
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Diagnostics Get Counter (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Diagnostics/Get-Counter.md
Title: Get-Counter
# Get-Counter
-## Synopsis
+## SYNOPSIS
Gets performance counter data from local and remote computers.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Get-Counter [[-Counter] <String[]>] [-SampleInterval <Int32>] [-MaxSamples <Int6
Get-Counter [-ListSet] <String[]> [-ComputerName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
> performance objects, counters, and instances. The names will be different on a system that uses > another language. Use the `Get-Counter -ListSet` command to see the localized names.
-## Examples
+## EXAMPLES
### Example 1: Get the counter set list
objects down the pipeline. `Sort-Object` uses the **Property** parameter to sort
the columns for the output. The **AutoSize** parameter adjusts the column widths to minimize truncation.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String[] `Get-Counter` accepts pipeline input for counter paths and counter set names.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample
that are output are as follows:
**CounterSamples** property: **Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample**
-## Notes
+## NOTES
If no parameters are specified, `Get-Counter` gets one sample for each specified performance counter. Use the **MaxSamples** and **Continuous** parameters to get more samples.
command. To set different values for different counters, enter separate `Get-Cou
In PowerShell 7, when using the **ListSet** parameter, `Get-Counter` can't retrieve the **Description** property of the counter set. The **Description** is set to `$null`.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Diagnostics Get Winevent (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md
Title: Get-WinEvent
# Get-WinEvent
-## Synopsis
+## SYNOPSIS
Gets events from event logs and event tracing log files on local and remote computers.
-## Syntax
+## SYNTAX
### GetLogSet (Default)
Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede
[-FilterXml] <XmlDocument> [-Oldest] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
table queries.
If you're not running PowerShell as an Administrator, you might see error messages that you cannot retrieve information about a log.
-## Examples
+## EXAMPLES
### Example 1: Get all the logs from a local computer
Get-WinEvent -FilterHashtable $filter
In this example, `Get-WinEvent` gets all events from the **Application** log for the last two days except those that have a **Level** of 4 (Information).
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String, System.Xml.XmlDocument, System.Collections.Hashtable You can pipeline a **LogName** (string), a **FilterXML** query, or a **FilterHashtable** query to `Get-WinEvent`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Eventing.Reader.EventLogConfiguration, System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics.Eventing.Reader.ProviderMetadata
With the **ListProvider** parameter, `Get-WinEvent` returns
With all other parameters, `Get-WinEvent` returns **System.Diagnostics.Eventing.Reader.EventLogRecord** objects.
-## Notes
+## NOTES
`Get-WinEvent` is designed to replace the `Get-EventLog` cmdlet on computers running Windows Vista and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
is retained for backward compatibility.
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md)
Microsoft.PowerShell.Diagnostics New Winevent (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Diagnostics/New-WinEvent.md
Title: New-WinEvent
--- # New-WinEvent
-## Synopsis
+## SYNOPSIS
Creates a new Windows event for the specified event provider.
-## Syntax
+## SYNTAX
``` New-WinEvent [-ProviderName] <String> [-Id] <Int32> [-Version <Byte>] [[-Payload] <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `New-WinEvent` cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from PowerShell.
-## Examples
+## EXAMPLES
### Example 1
New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Wo
This command uses the `New-WinEvent` cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does to generate any output.
-## Notes
+## NOTES
- After the provider writes the event to an eventlog, you can use the `Get-WinEvent` cmdlet to get the event from the event log.
-## Related links
+## RELATED LINKS
[Get-WinEvent](Get-WinEvent.md)
Microsoft.PowerShell.Host Start Transcript (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Host/Start-Transcript.md
Title: Start-Transcript
--- # Start-Transcript
-## Synopsis
+## SYNOPSIS
Creates a record of all or part of a PowerShell session to a text file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Start-Transcript [[-OutputDirectory] <String>] [-Append] [-Force] [-NoClobber]
[-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transcript` cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the
share.
If the target file doesn't have a Byte Order Mark (BOM), `Start-Transcript` defaults to `Utf8NoBom` encoding in the target file.
-## Examples
+## EXAMPLES
### Example 1: Start a transcript file with default settings
This command starts a transcript in the `Transcript0.txt` file in `C:\transcript
**NoClobber** parameter is used, the command prevents any existing files from being overwritten. If the `Transcript0.txt` file already exists, the command fails.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a confirmation message and the path to the output file.
-## Notes
+## NOTES
To stop a transcript, use the `Stop-Transcript` cmdlet. To record an entire session, add the `Start-Transcript` command to your profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Stop-Transcript](Stop-Transcript.md)
Microsoft.PowerShell.Host Stop Transcript (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Host/Stop-Transcript.md
Title: Stop-Transcript
--- # Stop-Transcript
-## Synopsis
+## SYNOPSIS
Stops a transcript.
-## Syntax
+## SYNTAX
``` Stop-Transcript [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Transcript` cmdlet stops a transcript that was started by the `Start-Transcript` cmdlet. Alternatively, you can end a session to stop a transcript.
-## Examples
+## EXAMPLES
### Example 1: Stop all transcripts
Stop-Transcript
This command stops all transcripts.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a status message and the path to the output file.
-## Notes
+## NOTES
* If a transcript has not been started, the command fails. *
-## Related links
+## RELATED LINKS
[Start-Transcript](Start-Transcript.md)
Microsoft.PowerShell.Management Add Content (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Add-Content.md
Title: Add-Content
--- # Add-Content
-## Synopsis
+## SYNOPSIS
Adds content to the specified items, such as adding words to a file.
-## Syntax
+## SYNTAX
### Path (Default)
Add-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Content` cmdlet appends content to a specified item or file. You can specify the content by typing the content in the command or by specifying an object that contains the content. If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Add a string to all text files with an exception
directory.
Add-Content -Path C:\Temp\* -Filter *.txt -Value "Done" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object, System.Management.Automation.PSCredential You can pipe values, paths, or credentials to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Add-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- When you pipe an object to `Add-Content`, the object is converted to a string before it is added to the item. The object type determines the string format, but the format might be different than
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Clear Content (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Clear-Content.md
Title: Clear-Content
--- # Clear-Content
-## Synopsis
+## SYNOPSIS
Deletes the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Content -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Content` cmdlet deletes the contents of an item, such as deleting the text from a file, but it does not delete the item. As a result, the item exists, but it is empty. The `Clear-Content` is similar to `Clear-Item`, but it works on items with contents, instead of items with values.
-## Examples
+## EXAMPLES
### Example 1: Delete all content from a directory
PS C:\>Get-Content C:\Test\Copy-Script.ps1 -Stream Zone.Identifier
PS C:\> ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-Content`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
You can use `Clear-Content` with the PowerShell FileSystem provider and with other providers that manipulate content. To clear items that are not considered to be content, such as items managed by
The `Clear-Content` cmdlet is designed to work with the data exposed by any prov
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Add-Content](Add-Content.md)
Microsoft.PowerShell.Management Clear Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Clear-Item.md
Title: Clear-Item
--- # Clear-Item
-## Synopsis
+## SYNOPSIS
Clears the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of a variable
You can use the **Include** and **Exclude** parameters to identify particular re
Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the **Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you can use
This cmdlet does not generate any output.
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem provider does not support this cmdlet. To clear files, use the `Clear-Content`.
-## Related links
+## RELATED LINKS
[Copy-Item](Copy-Item.md)
Microsoft.PowerShell.Management Clear Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Clear-ItemProperty.md
Title: Clear-ItemProperty
--- # Clear-ItemProperty
-## Synopsis
+## SYNOPSIS
Clears the value of a property but does not delete the property.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-ItemProperty` cmdlet clears the value of a property, but it does not delete the property. You can use this cmdlet to delete the data from a registry value.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of registry key
This command clears the data in the "Options" registry value in the "MyApp" subk
Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, `Clear-ItemProperty` generates a **PSCustomObject** object that represents the cleared item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero.
that represents the cleared item property. Otherwise, this cmdlet does not gener
the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Copy-ItemProperty](Copy-ItemProperty.md)
Microsoft.PowerShell.Management Clear Recyclebin (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Title: Clear-RecycleBin
# Clear-RecycleBin
-## Synopsis
+## SYNOPSIS
Clears the contents of a recycle bin.
-## Syntax
+## SYNTAX
### All
Clears the contents of a recycle bin.
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
using Windows **Empty Recycle Bin**.
This cmdlet was readded in PowerShell 7.
-## Examples
+## EXAMPLES
### 1: Clear all recycle bins
clear all recycle bins on the local computer.
An alternative is to replace `-Force` with `-Confirm:$false`.
-## Parameters
+## PARAMETERS
### -DriveLetter
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
+## INPUTS
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Convert Path (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Convert-Path.md
Title: Convert-Path
--- # Convert-Path
-## Synopsis
+## SYNOPSIS
Converts a path from a PowerShell path to a PowerShell provider path.
-## Syntax
+## SYNTAX
### Path (Default)
Convert-Path [-Path] <String[]> [<CommonParameters>]
Convert-Path -LiteralPath <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Convert-Path` cmdlet converts a path from a PowerShell path to a PowerShell provider path.
-## Examples
+## EXAMPLES
### Example 1: Convert the working directory to a standard file system path
PS C:\> Convert-Path ~
C:\Users\User01 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the converted path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use in programs and
available in your session, type `Get-PSProvider`. For more information, see
`Convert-Path` only converts existing paths. It cannot be used to convert a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Join-Path](Join-Path.md)
Microsoft.PowerShell.Management Copy Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Copy-Item.md
Title: Copy-Item
# Copy-Item
-## Synopsis
+## SYNOPSIS
Copies an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-Item -LiteralPath <String[]> [[-Destination] <String>] [-Container] [-Force
[-WhatIf] [-Confirm] [-FromSession <PSSession>] [-ToSession <PSSession>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-Item` cmdlet copies an item from one location to another location in the same namespace. For instance, it can copy a file to a folder, but it can't copy a file to a certificate drive.
This cmdlet can copy and rename items in the same command. To rename an item, en
the value of the **Destination** parameter. To rename an item and not copy it, use the `Rename-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Copy a file to the specified directory
The `Copy-Item` cmdlet has the **Container** parameter set to `$false`. This cau
the source folder to be copied but does not preserve the folder structure. Notice that files with the same name are overwritten in the destination folder.
-## Parameters
+## PARAMETERS
### -Container
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the copied item When you use the **PassThru** parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management Copy Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Copy-ItemProperty.md
Title: Copy-ItemProperty
--- # Copy-ItemProperty
-## Synopsis
+## SYNOPSIS
Copies a property and value from a specified location to another location.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key.
-## Examples
+## EXAMPLES
### Example 1: Copy a property from a registry key to another registry key
This command copies the property named "MyProperty" from the "MyApplication" reg
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **Passthru** parameter, this cmdlet generates a **PsCustomObject** representing the copied item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Debug Process (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Debug-Process.md
Title: Debug-Process
--- # Debug-Process
-## Synopsis
+## SYNOPSIS
Debugs one or more processes running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Debug-Process [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Process -InputObject <Process[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Process` cmdlet attaches a debugger to one or more running processes on a local computer. You can specify the processes by their process name or process ID (PID), or you can pipe process
objects to this cmdlet.
This cmdlet attaches the debugger that is currently registered for the process. Before using this cmdlet, verify that a debugger is downloaded and correctly configured.
-## Examples
+## EXAMPLES
### Example 1: Attach a debugger to a process on the computer
computer. It saves the resulting process object in the variable named `$P`.
The second command uses the **InputObject** parameter of the `Debug-Process` cmdlet to submit the process object in the `$P` variable.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32, System.Diagnostics.Process, System.String You can pipe a process ID (Int32), a process object (System.Diagnostics.Process), or a process name (String) to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see [AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Childitem (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-ChildItem.md
Title: Get-ChildItem
--- # Get-ChildItem
-## Synopsis
+## SYNOPSIS
Gets the items and child items in one or more specified locations.
-## Syntax
+## SYNTAX
### Items (Default)
Get-ChildItem [[-Filter] <string>] -LiteralPath <string[]> [-Include <string[]>]
[-ReadOnly] [-System] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the **Recurse**
of levels to recurse.
Locations are exposed to `Get-ChildItem` by PowerShell providers. A location can be a file system directory, registry hive, or a certificate store. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Get child items from a file system directory
Mode LastWriteTime Length Name
l---- 12/16/2021 9:29 AM tmp -> C:\Users\user1\AppData\Local\Temp ```
-## Parameters
+## PARAMETERS
### -Attributes
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
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ChildItem`.
-## Outputs
+## OUTPUTS
### System.Object
path.
If you use the **Name** parameter, `Get-ChildItem` returns the object names as strings.
-## Notes
+## NOTES
- `Get-ChildItem` can be run using any of the built-in aliases, `ls`, `dir`, and `gci`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
If you use the **Name** parameter, `Get-ChildItem` returns the object names as s
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md)
Microsoft.PowerShell.Management Get Clipboard (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Clipboard.md
Title: Get-Clipboard
--- # Get-Clipboard
-## Synopsis
+## SYNOPSIS
Gets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Get-Clipboard [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is not supported on macOS.**
returned as an array of strings similar to `Get-Content`.
> [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Get the content of the clipboard and display it to the command-line
Get-Clipboard
hello ```
-## Parameters
+## PARAMETERS
### -Raw
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-Clipboard](Set-Clipboard.md)
Microsoft.PowerShell.Management Get Computerinfo (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-ComputerInfo.md
Title: Get-ComputerInfo
--- # Get-ComputerInfo
-## Synopsis
+## SYNOPSIS
Gets a consolidated object of system and operating system properties.
-## Syntax
+## SYNTAX
``` Get-ComputerInfo [[-Property] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-ComputerInfo` cmdlet gets a consolidated object of system and operating system properties. This cmdlet was introduced in Windows PowerShell 5.1.
-## Examples
+## EXAMPLES
### Example 1: Get all computer properties
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0 ```
-## Parameters
+## PARAMETERS
### -Property
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Management.ComputerInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Content (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Content.md
Title: Get-Content
--- # Get-Content
-## Synopsis
+## SYNOPSIS
Gets the content of the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Content [-ReadCount <Int64>] [-TotalCount <Int64>] [-Tail <Int32>] -LiteralP
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Content` cmdlet gets the content of the item at the location specified by the path, such as the text in a file or the content of a function. For files, the content is read one line at a time
and returns a collection of objects, each of which represents a line of content.
Beginning in PowerShell 3.0, `Get-Content` can also get a specified number of lines from the beginning or end of an item.
-## Examples
+## EXAMPLES
### Example 1: Get the content of a text file
The **Raw** parameter ensures that the bytes are returned as a `[System.Byte[]]`
parameter was absent, the return value is a stream of bytes, which is interpreted by PowerShell as `[System.Object[]]`.
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64, System.String[], System.Management.Automation.PSCredential You can pipe the read count, total count, paths, or credentials to `Get-Content`.
-## Outputs
+## OUTPUTS
### System.Byte, System.String `Get-Content` returns strings or bytes. The output type depends upon the type of content that you specify as input.
-## Notes
+## NOTES
The `Get-Content` cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Management Get Hotfix (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-HotFix.md
Title: Get-HotFix
# Get-HotFix
-## Synopsis
+## SYNOPSIS
Gets the hotfixes that are installed on local or remote computers.
-## Syntax
+## SYNTAX
### Default (Default)
Get-HotFix [[-Id] <String[]>] [-ComputerName <String[]>] [-Credential <PSCredent
[<CommonParameters>] ```
-### Description
+### DESCRIPTION
``` Get-HotFix [-Description <String[]>] [-ComputerName <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-Hotfix` cmdlet gets hotfixes, or updates, that are installed on the loc
specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.
-## Examples
+## EXAMPLES
### Example 1: Get all hotfixes on the local computer
This example gets the most recent hotfix installed on a computer.
objects by ascending order and uses the **Property** parameter to evaluate each **InstalledOn** date. The array notation `[-1]` selects the most recent installed hotfix.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### String You can pipe one or more computer names to Get-HotFix.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\CIMV2\Win32_QuickFixEngineering `Get-HotFix` returns objects that represent the hotfixes on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Installer (MSI) or the [Windows Update](https://update.microsoft.com) site are n
The `Get-HotFix` output might vary on different operating systems.
-## Related links
+## RELATED LINKS
[about_Arrays](../Microsoft.PowerShell.Core/About/about_Arrays.md)
Microsoft.PowerShell.Management Get Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Item.md
Title: Get-Item
--- # Get-Item
-## Synopsis
+## SYNOPSIS
Gets the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Excl
[-Force] [-Credential <PSCredential>] [-Stream <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Item` cmdlet gets the item at the specified location. It doesn't get the contents of the item at the location unless you use a wildcard character (`*`) to request all the contents of the
item.
This cmdlet is used by PowerShell providers to navigate through different types of data stores.
-## Examples
+## EXAMPLES
### Example 1: Get the current directory
The new properties that are now part of the output are:
> [!NOTE] > This feature was moved from experimental to mainstream in PowerShell 7.1.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the objects that it gets. The type is determined by the type of objects in the path.
-## Notes
+## NOTES
This cmdlet does not have a **Recurse** parameter, because it gets only an item, not its contents. To get the contents of an item recursively, use `Get-ChildItem`.
This cmdlet is designed to work with the data exposed by any provider. To list t
available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Get Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-ItemProperty.md
Title: Get-ItemProperty
--- # Get-ItemProperty
-## Synopsis
+## SYNOPSIS
Gets the properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemProperty -LiteralPath <String[]> [[-Name] <String[]>] [-Filter <String>]
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemProperty` cmdlet gets the properties of the specified items. For example, you can use this cmdlet to get the value of the LastAccessTime property of a file object. You can also use this cmdlet to view registry entries and their values.
-## Examples
+## EXAMPLES
### Example 1: Get information about a specific directory
CTPVersion : 5
PSCompatibleVersion : 1.0,2.0 ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ItemProperty`.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime `Get-ItemProperty` returns an object for each item property that it gets. The object type depends on the object that is retrieved. For example, in a file system drive, it might return a file or folder.
-## Notes
+## NOTES
The `Get-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Get Itempropertyvalue (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md
Title: Get-ItemPropertyValue
--- # Get-ItemPropertyValue
-## Synopsis
+## SYNOPSIS
Gets the value for one or more properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <Strin
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemPropertyValue` gets the current value for a property that you specify when you use the **Name** parameter, located in a path that you specify with either the **Path** or **LiteralPath** parameters.
-## Examples
+## EXAMPLES
### Example 1: Get the value of the ProductID property
Target :
LinkType : ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime
This cmdlet returns an object for each item property value that it gets.
The object type depends on the property value that is retrieved. For example, in a file system drive, the cmdlet might return a file or folder.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, run the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-ItemProperty](Get-ItemProperty.md)
Microsoft.PowerShell.Management Get Location (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Location.md
Title: Get-Location
--- # Get-Location
-## Synopsis
+## SYNOPSIS
Gets information about the current working location or a location stack.
-## Syntax
+## SYNTAX
### Location (Default)
Get-Location [-PSProvider <String[]>] [-PSDrive <String[]>] [<CommonParameters>]
Get-Location [-Stack] [-StackName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Location` cmdlet gets an object that represents the current directory, much like the print working directory (pwd) command.
scripts, such as in a function that displays the current directory in the PowerS
You can also use this cmdlet to display the locations in a location stack. For more information, see the Notes and the descriptions of the **Stack** and **StackName** parameters.
-## Examples
+## EXAMPLES
### Example 1: Display your current drive location
change the prompt in your console by creating a new function named `prompt`.
To see the current prompt function, type the following command: `Get-Content Function:\prompt`
-## Parameters
+## PARAMETERS
### -PSDrive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo or System.Management.Automation.PathInfoStack If you use the **Stack** or **StackName** parameters, this cmdlet returns a **PathInfoStack** object. Otherwise, it returns a **PathInfo** object.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
cmdlet to display the locations in the unnamed stack. To make the unnamed stack
use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Pop-Location](Pop-Location.md)
Microsoft.PowerShell.Management Get Psdrive (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-PSDrive.md
Title: Get-PSDrive
--- # Get-PSDrive
-## Synopsis
+## SYNOPSIS
Gets drives in the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSDrive [[-Name] <String[]>] [-Scope <String>] [-PSProvider <String[]>] [<Co
Get-PSDrive [-LiteralName] <String[]> [-Scope <String>] [-PSProvider <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSDrive` cmdlet gets the drives in the current session. You can get a particular drive or all drives in the session.
You do not need to restart Windows PowerShell. Similarly, when an external drive
from the computer, Windows PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Get drives in the current session
The last command uses the `Get-CimInstance` cmdlet to display the instances of t
**Win32_NetworkConnection** class. Like **net use**, it returns only the persistent G: drive created by `New-PSDrive`.
-## Parameters
+## PARAMETERS
### -LiteralName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo This cmdlet returns objects that represent the drives in the session.
-## Notes
+## NOTES
* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the `Get-PSProvider` cmdlet. For more information, see
This cmdlet returns objects that represent the drives in the session.
sessions that are started without explicit credentials or with the credentials of the current user.
-## Related links
+## RELATED LINKS
[New-PSDrive](New-PSDrive.md)
Microsoft.PowerShell.Management Get Psprovider (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-PSProvider.md
Title: Get-PSProvider
--- # Get-PSProvider
-## Synopsis
+## SYNOPSIS
Gets information about the specified PowerShell provider.
-## Syntax
+## SYNTAX
``` Get-PSProvider [[-PSProvider] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSProvider` cmdlet gets the PowerShell providers in the current session. You can get a particular drive or all drives in the session.
PowerShell providers let you access a variety of data stores as though they were
For information about PowerShell providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Display a list of all available providers
This example shows that the tilde symbol (~) represents the value of the **Home*
FileSystem provider. The **Home** property value is optional, but for the **FileSystem** provider, it is defined as `$env:homedrive\$env:homepath` or `$home`.
-## Parameters
+## PARAMETERS
### -PSProvider
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### String[] You can pipe one or more provider name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ProviderInfo This cmdlet returns objects that represent the PowerShell providers in the session.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Process (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Process.md
Title: Get-Process
--- # Get-Process
-## Synopsis
+## SYNOPSIS
Gets the processes that are running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Get-Process -InputObject <Process[]> [-Module] [-FileVersionInfo] [<CommonParame
Get-Process -InputObject <Process[]> -IncludeUserName [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Process` cmdlet gets the processes on a local or remote computer.
supports methods that let you start and stop the process. You can also use the p
`Get-Process` cmdlet to get file version information for the program that runs in the process and to get the modules that the process loaded.
-## Examples
+## EXAMPLES
### Example 1: Get a list of all active processes on the local computer
The **mainWindowTitle** property is just one of many useful properties of the **
that `Get-Process` returns. To view all of the properties, pipe the results of a `Get-Process` command to the `Get-Member` cmdlet `Get-Process | Get-Member`.
-## Parameters
+## PARAMETERS
### -FileVersionInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Diagnostics.ProcessModule
By default, this cmdlet returns a **System.Diagnostics.Process** object. If you
use the **Module** parameter, without the **FileVersionInfo** parameter, it returns a **System.Diagnostics.ProcessModule** object.
-## Notes
+## NOTES
- You can also refer to this cmdlet by its built-in aliases, ps and gps. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
use the **Module** parameter, without the **FileVersionInfo** parameter, it retu
- You can also use the built-in alternate views of the processes available with `Format-Table`, such as **StartTime** and **Priority**, and you can design your own views.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-Service.md
Title: Get-Service
# Get-Service
-## Synopsis
+## SYNOPSIS
Gets the services on the computer.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Service [-DependentServices] [-RequiredServices] [-Include <String[]>] [-Exc
[-InputObject <ServiceController[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
computer's services are returned.
You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get all services on the computer
quotation marks, is sent down the pipeline to `Get-Service`.
"WinRM" | Get-Service ```
-## Parameters
+## PARAMETERS
### -DependentServices
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns objects that represent the services on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
appears before because Running because Stopped has a value of 1, and Running has
more information, see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Get Timezone (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Get-TimeZone.md
Title: Get-TimeZone
--- # Get-TimeZone
-## Synopsis
+## SYNOPSIS
Gets the current time zone or a list of available time zones.
-## Syntax
+## SYNTAX
### Name (Default)
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-TimeZone` cmdlet gets the current time zone or a list of available time zones.
-## Examples
+## EXAMPLES
### Example 1: Get the current time zone
Get-TimeZone -ListAvailable
This command gets all available time zones.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.TimeZoneInfo[]
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Set-TimeZone](Set-TimeZone.md)
Microsoft.PowerShell.Management Invoke Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Invoke-Item.md
Title: Invoke-Item
--- # Invoke-Item
-## Synopsis
+## SYNOPSIS
Performs the default action on the specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Invoke-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Item` cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with
the document file type.
The default action depends on the type of item and is determined by the PowerShell provider that provides access to the data.
-## Examples
+## EXAMPLES
### Example 1: Open a file
In this case, opening in Excel is the default action for `.xls` files.
Invoke-Item "C:\Documents and Settings\Lister\My Documents\*.xls" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None The command does not generate any output. However, output might be generated by the item that it invokes.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Join Path (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Join-Path.md
Title: Join-Path
--- # Join-Path
-## Synopsis
+## SYNOPSIS
Combines a path and a child path into a single path.
-## Syntax
+## SYNTAX
``` Join-Path [-Path] <String[]> [-ChildPath] <String> [[-AdditionalChildPath] <String[]>] [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-Path` cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.
-## Examples
+## EXAMPLES
### Example 1: Combine a path with a child path
The `AdditionalChildPath` parameter allows the joining of an unlimited number of
In this example, no parameter names are used, thus "a" binds to `Path`, "b" to `ChildPath` and "c-g" to `AdditionalChildPath`
-## Parameters
+## PARAMETERS
### -AdditionalChildPath
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the resulting path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun (the Path cmdlets) manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Move Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Move-Item.md
Title: Move-Item
--- # Move-Item
-## Synopsis
+## SYNOPSIS
Moves an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-Item -LiteralPath <String[]> [[-Destination] <String>] [-Force] [-Filter <S
[-Exclude <String[]>] [-PassThru] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-Item` cmdlet moves an item, including its properties, contents, and child items, from one location to another location. The locations must be supported by the same provider.
For example, it can move a file or subdirectory from one directory to another or
subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a file to another directory and rename it
misinterpreted.
The **Destination** parameter does not require a literal path, because the Destination variable also must be enclosed in single quotation marks, because it includes brackets that can be misinterpreted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the moved item When you use the *PassThru* parameter, this cmdlet generates an object representing the moved item. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet will move files between drives that are supported by the same provider, but it will move directories only within the same drive.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Move Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Move-ItemProperty.md
Title: Move-ItemProperty
--- # Move-ItemProperty
-## Synopsis
+## SYNOPSIS
Moves a property from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Destination] <Str
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-ItemProperty` cmdlet moves a property of an item from one item to another item. For instance, it can move a registry entry from one registry key to another registry key. When you move an item property, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a registry value and its data to another key
subkey of the `HKLM\Software\MyCompany` registry key.
Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, this cmdlet generates a **PSCustomObject** representing the moved item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/New-Item.md
Title: New-Item
--- # New-Item
-## Synopsis
+## SYNOPSIS
Creates a new item.
-## Syntax
+## SYNTAX
### pathSet (Default)
New-Item [[-Path] <String[]>] -Name <String> [-ItemType <String>] [-Value <Objec
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Item` cmdlet creates a new item and sets its value. The types of items that can be created depend on the location of the item. For example, in the file system, `New-Item` creates files and
folders. In the registry, `New-Item` creates registry keys and entries.
`New-Item` can also set the value of the items that it creates. For example, when it creates a new file, `New-Item` can add initial content to the file.
-## Examples
+## EXAMPLES
### Example 1: Create a file in the current directory
Mode LastWriteTime Length Name
> the same as when overwriting a file. If the registry key already exists, the key and all > properties and values will be overwritten with an empty registry key.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe a value for the new item to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the item that it creates.
-## Notes
+## NOTES
`New-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management New Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/New-ItemProperty.md
Title: New-ItemProperty
--- # New-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates a new property for an item and sets its value.
-## Syntax
+## SYNTAX
### Path (Default)
New-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PropertyType <String
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ItemProperty` cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet is used to create new registry values, because registry values are properties
This cmdlet does not add properties to an object.
- To add a property to an instance of an object, use the `Add-Member` cmdlet. - To add a property to all objects of a particular type, modify the Types.ps1xml file.
-## Examples
+## EXAMPLES
### Example 1: Add a registry entry
$newValue.multistring[0]
a ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject `New-ItemProperty` returns a custom object that contains the new property.
-## Notes
+## NOTES
`New-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Psdrive (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/New-PSDrive.md
Title: New-PSDrive
# New-PSDrive
-## Synopsis
+## SYNOPSIS
Creates temporary and persistent drives that are associated with a location in an item data store.
-## Syntax
+## SYNTAX
### All
New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Descripti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSDrive` cmdlet creates temporary and persistent drives that are mapped to or associated with a location in a data store, such as a network drive, a directory on the local computer, or a
information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Spla
> Unless you use the **Scope** parameter, PSDrives are created in the scope in which the > `New-PSDrive` command is run.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary drive mapped to a network share
New-PSDrive -Persist -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public
To ensure that the drive is available outside of the script to must use the **Scope** parameter to create the drive in the **Global** scope.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo
-## Notes
+## NOTES
`New-PSDrive` is designed to work with the data exposed by any provider. To list the providers available in your session, use `Get-PSProvider`. For more information about providers, see
Mapped network drives are specific to a user account. Mapped drives created in e
sessions using the credential of another user aren't visible in sessions started using different credentials.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management New Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/New-Service.md
Title: New-Service
--- # New-Service
-## Synopsis
+## SYNOPSIS
Creates a new Windows service.
-## Syntax
+## SYNTAX
``` New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>] [-Description <String>]
New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>]
[-DependsOn <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
service database. A new service requires an executable file that runs during the
The parameters of this cmdlet let you set the display name, description, startup type, and dependencies of the service.
-## Examples
+## EXAMPLES
### Example 1: Create a service
New-Service @params
The **SecurityDescriptor** is stored in the `$SDDLToSet` variable. The **SecurityDescriptorSddl** parameter uses `$SDDL` to set the **SecurityDescriptor** of the new service.
-## Parameters
+## PARAMETERS
### -BinaryPathName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns an object that represents the new service.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Pop Location (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Pop-Location.md
Title: Pop-Location
--- # Pop-Location
-## Synopsis
+## SYNOPSIS
Changes the current location to the location most recently pushed onto the stack.
-## Syntax
+## SYNTAX
``` Pop-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Pop-Location` cmdlet changes the current location to the location most recently pushed onto the stack by using the `Push-Location` cmdlet. You can pop a location from the default stack or from a stack that you create by using a `Push-Location` command.
-## Examples
+## EXAMPLES
### Example 1: Change to most recent location
the PowerShell certificate provider.
The last two commands pop those locations off the stack. The first `popd` command returns to the Registry drive, and the second command returns to the file system drive.
-## Parameters
+## PARAMETERS
### -PassThru
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo
This cmdlet generates a **System.Management.Automation.PathInfo** object that re
location, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
You can also refer to `Pop-Location` by its built-in alias, `popd`. For more inf
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Push Location (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Push-Location.md
Title: Push-Location
--- # Push-Location
-## Synopsis
+## SYNOPSIS
Adds the current location to the top of a location stack.
-## Syntax
+## SYNTAX
### Path (Default)
Push-Location [[-Path] <String>] [-PassThru] [-StackName <String>] [<CommonParam
Push-Location [-LiteralPath <String>] [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Push-Location` cmdlet adds ("pushes") the current location onto a location stack. If you specify a path, `Push-Location` pushes the current location onto a location stack and then changes
does not exist, `Push-Location` creates it.
For more information about location stacks, see the [Notes](#notes).
-## Examples
+## EXAMPLES
### Example 1
the `Pop-Location` cmdlet to pop the original location (`C:\`) from the Stack2 s
For more information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path (but not a literal path) to `Push-Location`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PathInfo
When you use the **PassThru** parameter, `Push-Location` generates a
**System.Management.Automation.PathInfo** object that represents the location. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
The `Push-Location` cmdlet is designed to work with the data exposed by any prov
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Remove Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Remove-Item.md
Title: Remove-Item
--- # Remove-Item
-## Synopsis
+## SYNOPSIS
Deletes the specified items.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Item` cmdlet deletes one or more items. Because it is supported by many providers, it can delete many different types of items, including files, folders, registry keys, variables, aliases, and functions.
-## Examples
+## EXAMPLES
### Example 1: Delete files that have any file name extension
The **Stream** parameter `Get-Item` gets the `Zone.Identifier` stream of the `Co
file. `Remove-Item` uses the **Stream** parameter to remove the `Zone.Identifier` stream of the file. Finally, the `Get-Item` cmdlet shows that the `Zone.Identifier` stream was deleted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
The `Remove-Item` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see
When you try to delete a folder that contains items without using the **Recurse*
cmdlet prompts for confirmation. Using `-Confirm:$false` does not suppress the prompt. This is by design.
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Remove Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Remove-ItemProperty.md
Title: Remove-ItemProperty
--- # Remove-ItemProperty
-## Synopsis
+## SYNOPSIS
Deletes the property and its value from an item.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Force] [-Filter
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.
-## Examples
+## EXAMPLES
### Example 1: Delete a registry value
It uses a pipeline operator (`|`) to send the object to `Remove-ItemProperty`.
Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the name of the registry value.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values.
This cmdlet does not return any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Item](Get-Item.md)
Microsoft.PowerShell.Management Remove Psdrive (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Remove-PSDrive.md
Title: Remove-PSDrive
--- # Remove-PSDrive
-## Synopsis
+## SYNOPSIS
Deletes temporary PowerShell drives and disconnects mapped network drives.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-PSDrive [-LiteralName] <String[]> [-PSProvider <String[]>] [-Scope <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSDrive` cmdlet deletes temporary PowerShell drives that were created by using the `New-PSDrive` cmdlet.
Beginning in Windows PowerShell 3.0, when an external drive is connected to the
You do not need to restart PowerShell. Similarly, when an external drive is disconnected from the computer, PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Remove a file system drive
This command uses `Remove-PSDrive` to disconnect the X: and S: mapped network dr
Get-PSDrive X, S | Remove-PSDrive ```
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.Management.Automation.PSDriveInfo You can pipe a drive object, such as one from the `Get-PSDrive` cmdlet, to the `Remove-PSDrive` cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- The `Remove-PSDrive` cmdlet is designed to work with the data exposed by any PowerShell provider. To list the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-PSDrive](Get-PSDrive.md)
Microsoft.PowerShell.Management Remove Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Remove-Service.md
Title: Remove-Service
--- # Remove-Service
-## Synopsis
+## SYNOPSIS
Removes a Windows service.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-Service [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Service [-InputObject <ServiceController>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Service` cmdlet removes a Windows service in the registry and in the service database. The `Remove-Service` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1: Remove a service
the object to `Remove-Service`, which removes the service.
Get-Service -DisplayName "Test Service" | Remove-Service ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Rename Computer (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Rename-Computer.md
Title: Rename-Computer
--- # Rename-Computer
-## Synopsis
+## SYNOPSIS
Renames a computer.
-## Syntax
+## SYNTAX
``` Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCredential>]
Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCrede
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
It renames one computer in each command.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Rename the local computer
The **Force** parameter suppresses the confirmation prompt.
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not have parameters that take input by value. However, you can pipe the values of the **ComputerName** and **NewName** properties of objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo This cmdlet returns a **ComputerChangeInfo** object, if you specify the **PassThru** parameter. Otherwise, it does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Rename Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Rename-Item.md
Title: Rename-Item
--- # Rename-Item
-## Synopsis
+## SYNOPSIS
Renames an item in a PowerShell provider namespace.
-## Syntax
+## SYNTAX
### ByPath (Default)
Rename-Item -LiteralPath <String> [-NewName] <String> [-Force] [-PassThru]
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Item` cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
content of the item being renamed.
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Rename a file
command through the pipeline. The script block uses the `-replace` operator to r
extension of each file with `.log`. Notice that matching using the `-replace` operator is not case sensitive.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object that represents the renamed item. This cmdlet generates an object that represents the renamed item, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Rename-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Rename Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Title: Rename-ItemProperty
--- # Rename-ItemProperty
-## Synopsis
+## SYNOPSIS
Renames a property of an item.
-## Syntax
+## SYNTAX
### Path (Default)
Rename-ItemProperty -LiteralPath <String> [-Name] <String> [-NewName] <String> [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-ItemProperty` cmdlet changes the name of a specified item property. The value of the property is not changed. For example, you can use `Rename-ItemProperty` to change the name of a registry entry.
-## Examples
+## EXAMPLES
### Example 1: Rename a registry entry
This command renames the config registry entry that is contained in the
Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject This cmdlet generates a **PSCustomObject** that represents the renamed item property, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Resolve Path (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Resolve-Path.md
Title: Resolve-Path
--- # Resolve-Path
-## Synopsis
+## SYNOPSIS
Resolves the wildcard characters in a path, and displays the path contents.
-## Syntax
+## SYNTAX
### Path (Default)
Resolve-Path [-Path] <String[]> [-Relative] [-Credential <PSCredential>] [<Commo
Resolve-Path -LiteralPath <String[]> [-Relative] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resolve-Path` cmdlet displays the items and containers that match the wildcard pattern at the location specified. The match can include files, folders, registry keys, or any other object accessible from a PSDrive provider.
-## Examples
+## EXAMPLES
### Example 1: Resolve the home folder path
expression.
PS C:\> Resolve-Path -LiteralPath 'test[xml]' ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo, System.String Returns a **PathInfo** object. Returns a string value for the resolved path if you specify the **Relative** parameter.
-## Notes
+## NOTES
The `*-Path` cmdlets work with the FileSystem, Registry, and Certificate providers.
session, type `Get-PSProvider`. For more information, see
`Resolve-Path` only resolves existing paths. It cannot be used to resolve a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Restart Computer (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Restart-Computer.md
Title: Restart-Computer
# Restart-Computer
-## Synopsis
+## SYNOPSIS
Restarts the operating system on local and remote computers.
-## Syntax
+## SYNTAX
### DefaultSet (Default)
Restart-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[-Delay <Int16>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
command. Specify a waiting time-out and query interval, and wait for particular
available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions.
-## Examples
+## EXAMPLES
### Example 1: Restart the local computer
Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos
`Restart-Computer` uses the **ComputerName** parameter to specify the remote computer, **Server01**. The **WsmanAuthentication** parameter specifies the authentication method as **Kerberos**.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String `Restart-Computer` accepts computer names from the pipeline or variables.
-## Outputs
+## OUTPUTS
### None `Restart-Computer` doesn't generate any output.
-## Notes
+## NOTES
- In Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
used to restart the machine. - On Linux and Mac OS, `Restart-Computer` uses the `/sbin/shutdown` bash tool.
-## Related links
+## RELATED LINKS
[About Windows Remote Management](/windows/desktop/WinRM/about-windows-remote-management)
Microsoft.PowerShell.Management Restart Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Restart-Service.md
Title: Restart-Service
--- # Restart-Service
-## Synopsis
+## SYNOPSIS
Stops and then starts one or more services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
notifying you of an error. You can specify the services by their service names o
you can use the **InputObject** parameter to pass an object that represents each service that you want to restart.
-## Examples
+## EXAMPLES
### Example 1: Restart a service on the local computer
sends the selected services to `Restart-Service`.
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
restarted service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Resume Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Resume-Service.md
Title: Resume-Service
--- # Resume-Service
-## Synopsis
+## SYNOPSIS
Resumes one or more suspended (paused) services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclu
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is ignored. You can specify the services by their service names or display names
**InputObject** parameter to pass a service object that represents the services that you want to resume.
-## Examples
+## EXAMPLES
### Example 1: Resume a service on the local computer
next pipeline operator sends the results to `Resume-Service`, which resumes the
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
resumed service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Clipboard (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-Clipboard.md
Title: Set-Clipboard
--- # Set-Clipboard
-## Synopsis
+## SYNOPSIS
Sets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Set-Clipboard -Value <String[]> [-Append] [-WhatIf] [-Confirm] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Clipboard` cmdlet sets the contents of the clipboard. > [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Copy text to the clipboard
ssh key so that it can be pasted into another application, like GitHub.
Get-Content C:\Users\user1\.ssh\id_ed25519.pub | Set-Clipboard ```
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
In rare cases when using `Set-Clipboard` with a high number of values in rapid succession, like in a loop, you might sporadically get a blank value from the clipboard. This can be fixed by using `Start-Sleep -Milliseconds 1` in the loop.
-## Related links
+## RELATED LINKS
[Get-Clipboard](Get-Clipboard.md)
Microsoft.PowerShell.Management Set Content (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-Content.md
Title: Set-Content
--- # Set-Content
-## Synopsis
+## SYNOPSIS
Writes new content or replaces existing content in a file.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Set-Content` is a string-processing cmdlet that writes new content or replaces the content in a file. `Set-Content` replaces the existing content and differs from the `Add-Content` cmdlet that
the command line or send content through the pipeline.
If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Replace the contents of multiple files in a directory
directory to the **Value** empty.
Set-Content -Path C:\Temp\* -Filter *.txt -Value "Empty" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that contains the new value for the item to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Set-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Set-Content` by its built-in alias, `sc`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Set Item (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-Item.md
Title: Set-Item
--- # Set-Item
-## Synopsis
+## SYNOPSIS
Changes the value of an item to the value specified in the command.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Item -LiteralPath <String[]> [[-Value] <Object>] [-Force] [-PassThru] [-Filt
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Item` cmdlet changes the value of an item, such as a variable or registry key, to the value specified in the command.
-## Examples
+## EXAMPLES
### Example 1: Create an alias
The **Options** parameter is available in `Set-Item` only when you use it with t
Set-Item -Path function:prompt -Options "AllScope,ReadOnly" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the new value of the item to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the new or changed item. This cmdlet generates an object that represent the item, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in the file system, use the `Set-Content` cmdlet.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Set Itemproperty (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-ItemProperty.md
Title: Set-ItemProperty
--- # Set-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates or changes the value of a property of an item.
-## Syntax
+## SYNTAX
### propertyValuePathSet (Default)
Set-ItemProperty -LiteralPath <String[]> -InputObject <PSObject> [-PassThru] [-F
[-WhatIf] [-Confirm] [-Type <RegistryValueKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item. You can use the cmdlet to establish or change the properties of items.
file object to `$True`.
You also use `Set-ItemProperty` to create and change registry values and data. For example, you can add a new registry entry to a key and establish or change its value.
-## Examples
+## EXAMPLES
### Example 1: Set a property of a file
specify the property and its new value.
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject
This cmdlet generates a **PSCustomObject** object that represents the item that
new property value, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Set-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Set Location (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-Location.md
Title: Set-Location
--- # Set-Location
-## Synopsis
+## SYNOPSIS
Sets the current working location to a specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Location -LiteralPath <String> [-PassThru] [<CommonParameters>]
Set-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Location` cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.
PowerShell 6.2 added support for `-` and `+` as a values for the **Path** parame
maintains a history of the last 20 locations that can be accessed with `-` and `+`. This list is independent from the location stack that is accessed using the **StackName** parameter.
-## Examples
+## EXAMPLES
### Example 1: Set the current location
PS Cert:\>
Using the alias, `cd -` or `cd +` is an easy way to navigate through your location history while in your terminal. For more information on navigating with `-`/`+`, see the **Path** parameter.
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo, System.Management.Automation.PathInfoStack
This cmdlet does not generate any output unless you specify the **PassThru** par
new location. Using **PassThru** with **StackName** generates a **PathInfoStack** object representing the new stack context.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
If you make a named location stack the current location stack, you can no longer
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Set Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-Service.md
Title: Set-Service
# Set-Service
-## Synopsis
+## SYNOPSIS
Starts, stops, and suspends a service, and changes its properties.
-## Syntax
+## SYNTAX
### Name (Default)
Set-Service [-InputObject] <ServiceController> [-DisplayName <String>] [-Credent
[-Status <String>] [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Set-Service` cmdlet changes the properties of a service such as the **Statu
pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to `Set-Service`.
-## Examples
+## EXAMPLES
### Example 1: Change a display name
The **SecurityDescriptor** is stored in the `$SDDL` variable. `Set-Service` uses
parameter to specify the **BITS** service. The **SecurityDescriptorSddl** parameter uses `$SDDL` to change the **SecurityDescriptor** for the **BITS** service.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can use the pipeline to send a service object or a string that contains a service name to `Set-Service`.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController By default, `Set-Service` doesn't return any objects. Use the **PassThru** parameter to output a **ServiceController** object.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the **Name** column and the display names are in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Timezone (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Set-TimeZone.md
Title: Set-TimeZone
--- # Set-TimeZone
-## Synopsis
+## SYNOPSIS
Sets the system time zone to a specified time zone.
-## Syntax
+## SYNTAX
### Name (Default)
Set-TimeZone -Id <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-TimeZone [-InputObject] <TimeZoneInfo> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone.
-## Examples
+## EXAMPLES
### Example 1: Set the time zone by Id
As we saw in the previous example, the **Id** and the **Name** of the Time Zone
The **Name** parameter must match the **StandardName** or **DaylightName** properties of the **TimeZoneInfo** object.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.TimeZoneInfo, System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-TimeZone](Get-TimeZone.md)
Microsoft.PowerShell.Management Split Path (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Split-Path.md
Title: Split-Path
--- # Split-Path
-## Synopsis
+## SYNOPSIS
Returns the specified part of a path.
-## Syntax
+## SYNTAX
### ParentSet (Default)
Split-Path [-Path] <String[]> [-Resolve] -IsAbsolute [-Credential <PSCredential>
Split-Path -LiteralPath <String[]> [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Split-Path` cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell
whether the path is relative or absolute.
You can use this cmdlet to get or submit only a selected part of a path.
-## Examples
+## EXAMPLES
### Example 1: Get the qualifier of a path
C:\Documents and Settings\User01\My Documents
This command uses a pipeline operator (`|`) to send a path to `Split-Path`. The path is enclosed in quotation marks to indicate that it is a single token.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String, System.Boolean
items, such as a **FileInfo** or **RegistryKey** object.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean** value.
-## Notes
+## NOTES
- The split location parameters (**Qualifier**, **Parent**, **Extension**, **Leaf**, **LeafBase**, and **NoQualifier**) are exclusive. You can use only one in each command.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean*
- `Split-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Start Process (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Start-Process.md
Title: Start-Process
--- # Start-Process
-## Synopsis
+## SYNOPSIS
Starts one or more processes on the local computer.
-## Syntax
+## SYNTAX
### Default (Default)
Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-WorkingDirecto
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Process` cmdlet starts one or more processes on the local computer. By default, `Start-Process` creates a new process that inherits all the environment variables that are defined
cmdlet.
You can use the parameters of `Start-Process` to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.
-## Examples
+## EXAMPLES
### Example 1: Start a process that uses default values
In this example, `Start-Process` is running the Linux `nohup` command, which lau
detached process. For more information, see the man page for [nohup](https://linux.die.net/man/1/nohup).
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet generates a **System.Diagnostics.Process** object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not return any output.
-## Notes
+## NOTES
By default, `Start-Process` launches a process _asynchronously_. Control is instantly returned to PowerShell even if the new process is still running.
This cmdlet is implemented by using the **Start** method of the **System.Diagnos
class. For more information about this method, see [Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Management Start Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Start-Service.md
Title: Start-Service
--- # Start-Service
-## Synopsis
+## SYNOPSIS
Starts one or more stopped services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclud
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. If a service is already running, the message is ignored with
specify the services by their service names or display names, or you can use the **InputObject** parameter to supply a service object that represents the services that you want to start.
-## Examples
+## EXAMPLES
### Example 1: Start a service by using its name
that the **StartMode** property of the Tlntsvr service is **Disabled**. The `Set
changes the start type to **Manual**. Now, we can resubmit the `Start-Service` command. This time, the command succeeds. To verify that the command succeeded, run `Get-Service`.
-## Parameters
+## PARAMETERS
### -DisplayName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you specify **PassThru**. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \<display-name\> start failed.`
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Stop Computer (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Stop-Computer.md
Title: Stop-Computer
# Stop-Computer
-## Synopsis
+## SYNOPSIS
Stops (shuts down) local and remote computers.
-## Syntax
+## SYNTAX
### All
Stop-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[[-Credential] <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Computer` cmdlet shuts down the local computer and remote computers.
credentials, and to force an immediate shut down.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on these platforms. The cmdlet is just calling the native command `/sbin/shutdown`.
-## Examples
+## EXAMPLES
### Example 1: Shut down the local computer
administrator. The credentials are stored in the `$c` variable.
computers in the `$s` variable. The **Force** parameter forces an immediate shutdown. The **Credential** parameter submits the credentials saved in the `$c` variable.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the **Win32Shutdown** method of the **Win32_OperatingSystem** WMI class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to
restart the machine.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. For these platorms, the cmdlet calls the native command `/sbin/shutdown`.
-## Related links
+## RELATED LINKS
[Rename-Computer](Rename-Computer.md)
Microsoft.PowerShell.Management Stop Process (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Stop-Process.md
Title: Stop-Process
--- # Stop-Process
-## Synopsis
+## SYNOPSIS
Stops one or more running processes.
-## Syntax
+## SYNTAX
### Id (Default)
Stop-Process -Name <String[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<Common
Stop-Process [-InputObject] <Process[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Process` cmdlet stops one or more running processes. You can specify a process by process name or process ID (PID), or pass a process object to `Stop-Process`. `Stop-Process` works only on
On Windows Vista and later versions of the Windows operating system, to stop a p
owned by the current user, you must start PowerShell by using the Run as administrator option. Also, you are not prompted for confirmation unless you specify the **Confirm** parameter.
-## Examples
+## EXAMPLES
### Example 1: Stop all instances of a process
PowerShell prompts you for confirmation.
The second command specifies **Force** to suppress the prompt. As a result, the process is stopped without confirmation.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet returns a **System.Diagnostics.Process** object that represents the stopped process, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Stop-Process` by its built-in aliases, `kill` and `spps` For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate
- When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Stop Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Stop-Service.md
Title: Stop-Service
--- # Stop-Service
-## Synopsis
+## SYNOPSIS
Stops one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName <String[]> [-Include <S
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. You can specify the services by their service names or displ
use the **InputObject** parameter to pass a service object that represents the service that you want to stop.
-## Examples
+## EXAMPLES
### Example 1: Stop a service on the local computer
The second command stops the IISAdmin service. The **Force** parameter is requir
that has dependent services. The command uses the **Confirm** parameter to request confirmation from the user before it stops each service.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Suspend Service (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Suspend-Service.md
Title: Suspend-Service
--- # Suspend-Service
-## Synopsis
+## SYNOPSIS
Suspends (pauses) one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Excl
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
until resumed, such as by usingthe `Resume-Service` cmdlet. You can specify the
service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the services that you want to suspend.
-## Examples
+## EXAMPLES
### Example 1: Suspend a service
of `$True` for the **CanPauseAndContinue** property. Another pipeline operator p
`Suspend-Service`. The **Confirm** parameter prompts you for confirmation before suspending each of the services.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Test Connection (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Test-Connection.md
Title: Test-Connection
# Test-Connection
-## Synopsis
+## SYNOPSIS
Sends ICMP echo request packets, or pings, to one or more computers.
-## Syntax
+## SYNTAX
### DefaultPing (Default)
Test-Connection [-TargetName] <string[]> -TcpPort <int> [-IPv4] [-IPv6] [-Resolv
[-Source <string>] [-TimeoutSeconds <int>] [-Quiet] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Connection` cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this
Unlike the familiar **ping** command, `Test-Connection` returns a
parameter returns a **Boolean** value in a **System.Boolean** object for each tested connection. If multiple connections are tested, an array of **Boolean** values is returned.
-## Examples
+## EXAMPLES
### Example 1: Send echo requests to a remote computer
The `Test-Connection` command is called with the **Traceroute** parameter. The r
`[Microsoft.PowerShell.Commands.TestConnectionCommand+TraceStatus]` objects, are output to the **Success** output stream.
-## Parameters
+## PARAMETERS
### -BufferSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### TestConnectionCommand+PingStatus, TestConnectionCommand+TraceStatus, Boolean, TestConnectionCommand+PingMtuStatus
If you specify the **Traceroute** parameter, the cmdlet will return a
If you specify the **Quiet** or **TcpPort** parameters, it returns a **Boolean** value. If multiple connections are tested, an array of **Boolean** values is returned.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Test Path (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Test-Path.md
Title: Test-Path
--- # Test-Path
-## Synopsis
+## SYNOPSIS
Determines whether all elements of a path exist.
-## Syntax
+## SYNTAX
### Path (Default)
Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
[-OlderThan <DateTime>] [-NewerThan <DateTime>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the
whitespace or empty string, then `$False` is returned. If the **Path** is `$null`, array of `$null` or empty array, a non-terminating error is returned.
-## Examples
+## EXAMPLES
### Example 1: Test a path
False
False ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean The cmdlet returns a **Boolean** value.
-## Notes
+## NOTES
The cmdlets that contain the **Path** noun (the **Path** cmdlets) work with path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use
manipulators.
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Wait Process (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Management/Wait-Process.md
Title: Wait-Process
--- # Wait-Process
-## Synopsis
+## SYNOPSIS
Waits for the processes to be stopped before accepting more input.
-## Syntax
+## SYNTAX
### Name (Default)
Wait-Process [-Id] <Int32[]> [[-Timeout] <Int32>] [<CommonParameters>]
Wait-Process [[-Timeout] <Int32>] -InputObject <Process[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet does not work on Linux or macOS.**
stopped. You can specify a process by process name or process ID (PID), or pipe
`Wait-Process` works only on processes running on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Stop a process and wait
prompt.
Wait-Process -Name outlook, winword -Timeout 30 ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **WaitForExit** method of the **System.Diagnostics.Process** class.
This cmdlet does not generate any output.
`Start-Process -Wait` waits for the process tree (the process and all its descendants) to exit before returning control.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Security Convertfrom Securestring (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md
Title: ConvertFrom-SecureString
--- # ConvertFrom-SecureString
-## Synopsis
+## SYNOPSIS
Converts a secure string to an encrypted standard string.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertFrom-SecureString [-SecureString] <SecureString> [-AsPlainText] [<CommonP
ConvertFrom-SecureString [-SecureString] <SecureString> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SecureString` cmdlet converts a secure string (**System.Security.SecureString**) into an encrypted standard string (**System.String**). Unlike a secure string, an encrypted standard
representation.
> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Create a secure string
$secureString # 'System.Security.SecureString'
ConvertFrom-SecureString -SecureString $secureString -AsPlainText # 'Example' ```
-## Parameters
+## PARAMETERS
### -AsPlainText
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
+## INPUTS
### System.Security.SecureString You can pipe a **SecureString** object to ConvertFrom-SecureString.
-## Outputs
+## OUTPUTS
### System.String ConvertFrom-SecureString returns a standard string object.
-## Notes
+## NOTES
- To create a secure string from characters that are typed at the command prompt, use the **AsSecureString** parameter of the `Read-Host` cmdlet.
ConvertFrom-SecureString returns a standard string object.
them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertTo-SecureString](ConvertTo-SecureString.md)
Microsoft.PowerShell.Security Convertto Securestring (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/ConvertTo-SecureString.md
Title: ConvertTo-SecureString
--- # ConvertTo-SecureString
-## Synopsis
+## SYNOPSIS
Converts plain text or encrypted strings to secure strings.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParame
ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-SecureString` cmdlet converts encrypted standard strings into secure strings. It can also convert plain text to secure strings. It is used with `ConvertFrom-SecureString` and
of the `ConvertTo-SecureString` cmdlet.
> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Convert a secure string to an encrypted string
$Secure_String_Pwd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
> You should avoid using plain text strings in script or from the command line. The plain text can > show up in event logs and command history logs.
-## Parameters
+## PARAMETERS
### -AsPlainText
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a standard encrypted string to `ConvertTo-SecureString`.
-## Outputs
+## OUTPUTS
### System.Security.SecureString `ConvertTo-SecureString` returns a **SecureString** object.
-## Notes
+## NOTES
Some characters, such as emoticons, correspond to several code points in the string that contains them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertFrom-SecureString](ConvertFrom-SecureString.md)
Microsoft.PowerShell.Security Get Acl (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-Acl.md
Title: Get-Acl
--- # Get-Acl
-## Synopsis
+## SYNOPSIS
Gets the security descriptor for a resource, such as a file or registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-Acl [-LiteralPath <String[]>] [-Audit] [-Filter <String>] [-Include <String[
[-Exclude <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
permissions that users and user groups have to access the resource.
Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of `Get-Acl` to get the security descriptor of objects that do not have a path.
-## Examples
+## EXAMPLES
### Example 1- Get an ACL for a folder
storage subsystem object.
Get-Acl -InputObject (Get-StorageSubSystem -Name S087) ```
-## Parameters
+## PARAMETERS
### -Audit
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity, System.Security.AccessControl.DirectorySecurity, System.Security.AccessControl.RegistrySecurity `Get-Acl` returns an object that represents the ACLs that it gets. The object type depends upon the ACL type.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Because `Get-Acl` is supported by the file system and registry providers, you ca
view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.
-## Related links
+## RELATED LINKS
[Set-Acl](Set-Acl.md)
Microsoft.PowerShell.Security Get Authenticodesignature (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md
Title: Get-AuthenticodeSignature
--- # Get-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Gets information about the Authenticode signature for a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Windows catalog signature is used.
If the file is not signed, the information is retrieved, but the fields are blank.
-## Examples
+## EXAMPLES
### Example 1: Get the Authenticode signature for a file
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePa
This command gets information about the Authenticode signature for the content of a file. In this example, the file extension is specified along with the content of the file.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature `Get-AuthenticodeSignature` returns a signature object for each signature that it gets.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. For information about Authenticode signatures in PowerShell, see [about_Signing](../Microsoft.PowerShell.Core/About/about_Signing.md).
-## Related links
+## RELATED LINKS
[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Microsoft.PowerShell.Security Get Cmsmessage (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-CmsMessage.md
Title: Get-CmsMessage
--- # Get-CmsMessage
-## Synopsis
+## SYNOPSIS
Gets content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent
Get-CmsMessage [-Path] <String> [<CommonParameters>]
Get-CmsMessage [-LiteralPath] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CmsMessage` cmdlet gets content that has been encrypted using the Cryptographic Message Syntax (CMS) format.
encryption certificate that was used to encrypt the content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Get encrypted content
This command pipes the results of the `Get-CmsMessage` cmdlet from Example 1 to
the **To** parameter is the value of the encrypting certificate's Subject line. The decrypted message, "Try the new Break All command," is the result.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Get Credential (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-Credential.md
Title: Get-Credential
--- # Get-Credential
-## Synopsis
+## SYNOPSIS
Gets a credential object based on a user name and password.
-## Syntax
+## SYNTAX
### CredentialSet (Default)
Get-Credential [[-Credential] <PSCredential>] [<CommonParameters>]
Get-Credential [-Message <String>] [[-UserName] <String>] [-Title <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Credential` cmdlet creates a credential object for a specified user name and password. You can use the credential object in security operations.
can use the credential object in security operations.
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use the **Message** parameter to specify a customized message in the command line prompt.
-## Examples
+## EXAMPLES
### Example 1
This command gets a credential from the Server01 remote computer. The command us
`Invoke-Command` cmdlet to run a `Get-Credential` command on the remote computer. The output shows the remote security message that `Get-Credential` includes in the authentication prompt.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCredential `Get-Credential` returns a credential object.
-## Notes
+## NOTES
You can use the **PSCredential** object that `Get-Credential` creates in cmdlets that request user authentication, such as those with a **Credential** parameter.
The **Credential** parameter is not supported by all providers that are installe
Beginning in PowerShell 3.0, it is supported on select cmdlets, such as the `Get-Content` and `New-PSDrive` cmdlets.
-## Related links
+## RELATED LINKS
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
Microsoft.PowerShell.Security Get Executionpolicy (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md
Title: Get-ExecutionPolicy
# Get-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Gets the execution policies for the current session.
-## Syntax
+## SYNTAX
### All
Gets the execution policies for the current session.
Get-ExecutionPolicy [[-Scope] <ExecutionPolicyScope>] [-List] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
To display the execution policies for each scope in the order of precedence, use `Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use
The effective execution policy is determined by execution policies that are set
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
-## Examples
+## EXAMPLES
### Example 1: Get all execution policies
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -List
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
+## INPUTS
### None `Get-ExecutionPolicy` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ExecutionPolicy The cmdlet always returns **Unrestricted** on Linux and macOS platforms.
-## Notes
+## NOTES
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, whether scripts must be digitally signed before they are run.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
Microsoft.PowerShell.Security Get Pfxcertificate (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Get-PfxCertificate.md
Title: Get-PfxCertificate
--- # Get-PfxCertificate
-## Synopsis
+## SYNOPSIS
Gets information about PFX certificate files on the computer.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-PfxCertificate -LiteralPath <String[]> [-Password <SecureString>] [-NoPrompt
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PfxCertificate` cmdlet gets an object representing each specified PFX certificate file. A PFX file includes both the certificate and a private key.
-## Examples
+## EXAMPLES
### Example 1: Get a PFX certificate
to run a `Get-PfxCertificate` command remotely.
When the PFX certificate file is not password-protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Parameters
+## PARAMETERS
### -FilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-PfxCertificate`.
-## Outputs
+## OUTPUTS
### System.Security.Cryptography.X509Certificates.X509Certificate2 `Get-PfxCertificate` returns an object for each certificate that it gets.
-## Notes
+## NOTES
When using the `Invoke-Command` cmdlet to run a `Get-PfxCertificate` command remotely, and the PFX certificate file is not password protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security New Filecatalog (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/New-FileCatalog.md
Title: New-FileCatalog
--- # New-FileCatalog
-## Synopsis
+## SYNOPSIS
`New-FileCatalog` creates a catalog file of file hashes that can be used to validate the authenticity of a file.
-## Syntax
+## SYNTAX
``` New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
create file hashes, and version 2 uses SHA256. Catalog version 2 is not supporte
2008 R2 or Windows 7. You should use catalog version 2 on Windows 8, Windows Server 2012, and later operating systems.
-## Examples
+## EXAMPLES
### Example 1: Create a file catalog for `Microsoft.PowerShell.Utility`
Mode LastWriteTime Length Name
-a---- 11/2/2018 11:58 AM 950 Microsoft.PowerShell.Utility.cat ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String The pipeline takes a string that is used as the catalog filename.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Test-FileCatalog](Test-FileCatalog.md)
Microsoft.PowerShell.Security Protect Cmsmessage (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Protect-CmsMessage.md
Title: Protect-CmsMessage
--- # Protect-CmsMessage
-## Synopsis
+## SYNOPSIS
Encrypts content by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent (Default)
Protect-CmsMessage [-To] <CmsMessageRecipient[]> [-LiteralPath] <String> [[-OutF
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Protect-CmsMessage` cmdlet encrypts content by using the Cryptographic Message Syntax (CMS) format.
document encryption, see Example 1 in this topic.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Create a certificate for encrypting content
To view document encryption certificates in the certificate provider, you can ad
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md), available only when the certificate provider is loaded.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Set Acl (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Set-Acl.md
Title: Set-Acl
--- # Set-Acl
-## Synopsis
+## SYNOPSIS
Changes the security descriptor of a specified item, such as a file or a registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-Acl -LiteralPath <String[]> [-AclObject] <Object> [-ClearCentralAccessPolicy
[-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
supply a security descriptor that has the values you want to apply. `Set-Acl` ap
descriptor that is supplied. It uses the value of the **AclObject** parameter as a model and changes the values in the item's security descriptor to match the values in the **AclObject** parameter.
-## Examples
+## EXAMPLES
### Example 1: Copy a security descriptor from one file to another
is an argument list is to be passed when making the new **FileSystemAccessRule**
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
+## PARAMETERS
### -AclObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.CommonSecurityDescriptor You can pipe an ACL object or a security descriptor to `Set-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity By default, `Set-Acl` does not generate any output. However, if you use the **Passthru** parameter, it generates a security object. The type of the security object depends on the type of the item.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. The `Set-Acl` cmdlet is supported by the PowerShell file system and registry providers. As such, you can use it to change the security descriptors of files, directories, and registry keys.
-## Related links
+## RELATED LINKS
[Get-Acl](Get-Acl.md)
Microsoft.PowerShell.Security Set Authenticodesignature (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md
Title: Set-AuthenticodeSignature
--- # Set-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Adds an [Authenticode](/windows-hardware/drivers/install/authenticode) signature to a PowerShell script or other file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-AuthenticodeSignature [-Certificate] <X509Certificate2> [-IncludeChain <Stri
-Content <Byte[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
In a PowerShell script file, the signature takes the form of a block of text tha
of the instructions that are executed in the script. If there is a signature in the file when this cmdlet runs, that signature is removed.
-## Examples
+## EXAMPLES
### Example 1 - Sign a script using a certificate from the local certificate store
the **IncludeChain** parameter to include all of the signatures in the trust cha
root authority. It also uses the **TimeStampServer** parameter to add a timestamp to the signature. This prevents the script from failing when the certificate expires.
-## Parameters
+## PARAMETERS
### -Certificate
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the file path to `Set-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security Set Executionpolicy (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md
Title: Set-ExecutionPolicy
# Set-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Sets the PowerShell execution policies for Windows computers.
-## Syntax
+## SYNTAX
### All
Set-ExecutionPolicy [-ExecutionPolicy] <ExecutionPolicy> [[-Scope] <ExecutionPol
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## 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).
To display the execution policies for each scope in the order of precedence, use
`Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use `Get-ExecutionPolicy` with no parameters.
-## Examples
+## EXAMPLES
### Example 1: Set an execution policy
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -ExecutionPolicy
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
+## INPUTS
### Microsoft.PowerShell.ExecutionPolicy, System.String You can pipe an execution policy object or a string that contains the name of an execution policy to `Set-ExecutionPolicy`.
-## Outputs
+## OUTPUTS
### None `Set-ExecutionPolicy` doesn't return any output.
-## Notes
+## NOTES
`Set-ExecutionPolicy` doesn't change the **MachinePolicy** and **UserPolicy** scopes because they are set by Group Policies.
If the Group Policy **Turn on Script Execution** is enabled for the computer or
preference is saved, but it is not effective. PowerShell displays a message that explains the conflict.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Security Test Filecatalog (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Test-FileCatalog.md
Title: Test-FileCatalog
--- # Test-FileCatalog
-## Synopsis
+## SYNOPSIS
`Test-FileCatalog` validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity. This cmdlet is only supported on Windows.
-## Syntax
+## SYNTAX
``` Test-FileCatalog [-Detailed] [-FilesToSkip <String[]>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
validation by using the -FilesToSkip parameter.
This cmdlet is only supported on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create and validate a file catalog
PathItems : {[Microsoft.PowerShell.Utility.psd1,
Signature : System.Management.Automation.Signature ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.IO.DirectoryInfo[], System.String[] The pipeline accepts an array of strings or `DirectoryInfo` objects that represent paths to the files that need to be validated.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CatalogValidationStatus
A more detailed object returned when using `-Detailed` which can be used to anal
that may or may not have passed validation, which hashes were expected vs. found, and the algorithm used in the catalog.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[New-FileCatalog](New-FileCatalog.md)
Microsoft.PowerShell.Security Unprotect Cmsmessage (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md
Title: Unprotect-CmsMessage
--- # Unprotect-CmsMessage
-## Synopsis
+## SYNOPSIS
Decrypts content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByWinEvent (Default)
Unprotect-CmsMessage [-LiteralPath] <String> [-IncludeContext] [[-To] <CmsMessag
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unprotect-CmsMessage` cmdlet decrypts content that has been encrypted by using the Cryptographic Message Syntax (CMS) format.
content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Decrypt a message
Unprotect-CmsMessage -LiteralPath @parameters
Try the new Break All command ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Eventing.Reader.EventLogRecord or System.String You can pipe an object containing encrypted content to `Unprotect-CmsMessage`.
-## Outputs
+## OUTPUTS
### System.String The unencrypted message.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Add Member (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Add-Member.md
Title: Add-Member
--- # Add-Member
-## Synopsis
+## SYNOPSIS
Adds custom properties and methods to an instance of a PowerShell object.
-## Syntax
+## SYNTAX
### TypeNameSet (Default)
Add-Member -InputObject <PSObject> [-MemberType] <PSMemberTypes> [-Name] <String
[[-SecondValue] <Object>] [-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Member` cmdlet lets you add members (properties and methods) to an instance of a PowerShell object. For instance, you can add a NoteProperty member that contains a description of the object or
Also, beginning in Windows PowerShell 3.0, the **PassThru** parameter, which gen
object, is needed less frequently. `Add-Member` now adds the new members directly to the input object of more types. For more information, see the **PassThru** parameter description.
-## Examples
+## EXAMPLES
### Example 1: Add a note property to a PSObject
PSVersion NoteProperty System.String PSVersion=4.0
System NoteProperty System.String System=Server Core ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object type to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Object When you use the **PassThru** parameter, this cmdlet returns the newly-extended object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can add members only to **PSObject** objects. To determine whether an object is a **PSObject** object, use the `-is` operator.
and methods.
The `$this` variable refers to the instance of the object to which the properties and methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Add Type (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Add-Type.md
Title: Add-Type
# Add-Type
-## Synopsis
+## SYNOPSIS
Adds a Microsoft .NET class to a PowerShell session.
-## Syntax
+## SYNTAX
### FromSource (Default)
Add-Type -LiteralPath <String[]> [-ReferencedAssemblies <String[]>] [-OutputAsse
Add-Type -AssemblyName <String[]> [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Type` cmdlet lets you define a Microsoft .NET Core class in your PowerShell session. You can then instantiate objects, by using the `New-Object` cmdlet, and use the objects just as you
Beginning in PowerShell 7, `Add-Type` does not compile a type if a type with the
exists. Also, `Add-Type` looks for assemblies in a `ref` folder under the folder that contains `pwsh.dll`.
-## Examples
+## EXAMPLES
### Example 1: Add a .NET type to a session
represents the `SW_RESTORE` value.
To maximize the window, use the value of `3` that represents `SW_MAXIMIZE`.
-## Parameters
+## PARAMETERS
### -AssemblyName
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
+## INPUTS
### None You can't send objects down the pipeline to `Add-Type`.
-## Outputs
+## OUTPUTS
### None or System.Type When you use the **PassThru** parameter, `Add-Type` returns a **System.Type** object that represents the new type. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
The types that you add exist only in the current session. To use the types in all sessions, add them to your PowerShell profile. For more information about the profile, see
any version of PowerShell.
Assemblies in the GAC can be loaded by type name, rather than by path. Loading assemblies from an arbitrary path requires `Add-Type`, since those assemblies cannot not be loaded automatically.
-## Related links
+## RELATED LINKS
[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md)
Microsoft.PowerShell.Utility Clear Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Clear-Variable.md
Title: Clear-Variable
--- # Clear-Variable
-## Synopsis
+## SYNOPSIS
Deletes the value of a variable.
-## Syntax
+## SYNTAX
``` Clear-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Variable` cmdlet deletes the data stored in a variable, but it does not delete the variable. As a result, the value of the variable is NULL (empty). If the variable has a specified data or object type, this cmdlet preserves the type of the object stored in the variable.
-## Examples
+## EXAMPLES
### Example 1: Remove the value of global variables that begin with a search string
Clear-Variable -Name "Processes"
This command deletes the value of the variable named Processes. After the cmdlet completes the operation, the variable named Processes still exists, but the value is null.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, this cmdlet generates a
**System.Management.Automation.PSVariable** object representing the cleared variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To delete a variable, along with its value, use `Remove-Variable` or `Remove-Item`.
this cmdlet does not generate any output.
You can also refer to `Clear-Variable` by its built-in alias, `clv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Get-Variable](Get-Variable.md)
Microsoft.PowerShell.Utility Compare Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Compare-Object.md
Title: Compare-Object
--- # Compare-Object
-## Synopsis
+## SYNOPSIS
Compares two sets of objects.
-## Syntax
+## SYNTAX
``` Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compare-Object` cmdlet compares two sets of objects. One set of objects is the **reference**, and the other set of objects is the **difference**.
terminating error.
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1 - Compare the content of two text files
InputObject SideIndicator
In the second case, the **TimeSpan** is converted to a string so the object are different.
-## Parameters
+## PARAMETERS
### -CaseSensitive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send an object down the pipeline to the **DifferenceObject** parameter.
-## Outputs
+## OUTPUTS
### None
When you use the **PassThru** parameter, the **Type** of the object is not chang
of the object returned has an added **NoteProperty** named **SideIndicator**. **SideIndicator** shows which input object the output belongs to.
-## Notes
+## NOTES
When using the **PassThru** parameter, the output displayed in the console may not include the **SideIndicator** property. The default format view for the object type output by `Compare-Object` does not include the **SideIndicator** property. For more information see [Example 3](#ex3) in this article.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertfrom Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Title: ConvertFrom-Csv
--- # ConvertFrom-Csv
-## Synopsis
+## SYNOPSIS
Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertFrom-Csv [[-Delimiter] <Char>] [-InputObject] <PSObject[]> [-Header <Stri
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Csv` cmdlet creates objects from CSV variable-length strings that are generated by the `ConvertTo-Csv` cmdlet.
You can also use the `Export-Csv` and `Import-Csv` cmdlets to convert objects to
file (and back). These cmdlets are the same as the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets, except that they save the CSV strings in a file.
-## Examples
+## EXAMPLES
### Example 1: Convert processes on the local computer to CSV format
When the **UseCulture** parameter is used, be sure that the current culture's de
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` cannot generate objects from the CSV strings.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe CSV strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns the objects described by the properties in the CSV strings.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings (by using the **ToString()*
object), so they are represented by the name of the property value. This cmdlet does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Convertfrom Json (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertFrom-Json.md
Title: ConvertFrom-Json
# ConvertFrom-Json
-## Synopsis
+## SYNOPSIS
Converts a JSON-formatted string to a custom object or a hash table.
-## Syntax
+## SYNTAX
``` ConvertFrom-Json [-InputObject] <String> [-AsHashtable] [-Depth <Int32>] [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Json` cmdlet converts a JavaScript Object Notation (JSON) formatted string to a custom **PSCustomObject** object that has a property for each field in the JSON string. JSON is
This cmdlet was introduced in PowerShell 3.0.
> be written in the file without corrupting the data or throwing an error as it did in PowerShell > 5.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a DateTime object to a JSON object
The JSON string contains an array with a single element. Without the switch, con
a PSObject and then converting it back with the `ConvertTo-Json` command results in a single integer.
-## Parameters
+## PARAMETERS
### -AsHashtable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `ConvertFrom-Json`.
-## Outputs
+## OUTPUTS
### PSCustomObject ### System.Collections.Hashtable
-## Notes
+## NOTES
This cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
follows:
offset is properly converted to the caller's configured time zone. The default output formatting does not indicate the original time zone offset.
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertfrom Markdown (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md
Title: ConvertFrom-Markdown
# ConvertFrom-Markdown
-## Synopsis
+## SYNOPSIS
Convert the contents of a string or a file to a **MarkdownInfo** object.
-## Syntax
+## SYNTAX
### PathParamSet (Default)
ConvertFrom-Markdown -LiteralPath <String[]> [-AsVT100EncodedString] [<CommonPar
ConvertFrom-Markdown -InputObject <PSObject> [-AsVT100EncodedString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet converts the specified content into a **MarkdownInfo**. When a file path is specified for the **Path** parameter, the contents on the file are converted. The output object has three
properties:
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a file containing Markdown content to HTML
of the `README.md` file.
The **MarkdownInfo** object is returned. The specified string `**Bold text**` is converted to a VT100-encoded string and available in **VT100EncodedString** property.
-## Parameters
+## PARAMETERS
### -AsVT100EncodedString
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
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.MarkdownInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Markdown Parser](https://github.com/lunet-io/markdig)
Microsoft.PowerShell.Utility Convertfrom Sddlstring (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md
Title: ConvertFrom-SddlString
--- # ConvertFrom-SddlString
-## Synopsis
+## SYNOPSIS
Converts a SDDL string to a custom object.
-## Syntax
+## SYNTAX
### All
Converts a SDDL string to a custom object.
ConvertFrom-SddlString [-Sddl] <String> [-Type <AccessRightTypeNames>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the access rights specified in a SDDL string.
This cmdlet was introduced in PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Convert file system access rights SDDL to a PSCustomObject
It doesn't use the `-Type` parameter, so the access rights shown are for file sy
The third command uses the `ConvertFrom-SddlString` cmdlet with the `-Type` parameter, so the access rights returned are for registry.
-## Parameters
+## PARAMETERS
### -Sddl
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a SDDL string to `ConvertFrom-SddlString`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Security Descriptor Definition Language](/windows/win32/secauthz/security-descriptor-definition-language)
Microsoft.PowerShell.Utility Convertfrom Stringdata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md
Title: ConvertFrom-StringData
--- # ConvertFrom-StringData
-## Synopsis
+## SYNOPSIS
Converts a string containing one or more key and value pairs to a hash table.
-## Syntax
+## SYNTAX
### All
Converts a string containing one or more key and value pairs to a hash table.
ConvertFrom-StringData [-StringData] <String> [[-Delimiter] <Char>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-StringData` cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often
sequences in your results.
PowerShell 7 adds the **Delimiter** parameter.
-## Examples
+## EXAMPLES
### Example 1: Convert a single-quoted here-string to a hash table
Name Value
Message Look in c:\Windows\System32 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string containing a key-value pair to `ConvertFrom-StringData`.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable This cmdlet returns a hash table that it creates from the key-value pairs.
-## Notes
+## NOTES
A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally.
This cmdlet can be useful in scripts that display user messages in multiple spok
can use the dictionary-style hash tables to isolate text strings from code, such as in resource files, and to format the text strings for use in translation tools.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Convertto Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## Synopsis
+## SYNOPSIS
Converts .NET objects into a series of character-separated value (CSV) strings.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## Examples
+## EXAMPLES
### Example 1: Convert an object to CSV
can see `ExtraProp` is now a header in the output.
If an added property has the _same_ name as a key from the hashtable, the key takes precedence and only the key is converted to CSV.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV output is returned as a collection of strings.
-## Notes
+## NOTES
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Convertto Html (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Title: ConvertTo-Html
--- # ConvertTo-Html
-## Synopsis
+## SYNOPSIS
Converts .NET objects into HTML that can be displayed in a Web browser.
-## Syntax
+## SYNTAX
### Page (Default)
ConvertTo-Html [-InputObject <PSObject>] [[-Property] <Object[]>] [-As <String>]
[-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
on the properties of the first object that you submit. If the remaining objects
the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.
-## Examples
+## EXAMPLES
### Example 1: Create a web page to display the date
Get-Service | ConvertTo-HTML -Transitional
This command sets the DOCTYPE of the returned HTML to XHTML Transitional DTD
-## Parameters
+## PARAMETERS
### -As
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any .NET object to `ConvertTo-Html`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument `ConvertTo-Html` returns series of strings that comprise valid HTML.
-## Notes
+## NOTES
To use this cmdlet, pipe one or more objects to the cmdlet or use the **InputObject** parameter to specify the object. When the input consists of multiple objects, the output of these two methods is
quite different.
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>`
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertto Json (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Title: ConvertTo-Json
--- # ConvertTo-Json
-## Synopsis
+## SYNOPSIS
Converts an object to a JSON-formatted string.
-## Syntax
+## SYNTAX
``` ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript Object Notation (JSON) format. The properties are converted to field names, the field values are converted to
the depth specified for the command. This prevents unwanted data loss when conve
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1
Year : 2018
This example shows how to use the `ConvertTo-Json` and `ConvertFrom-Json` cmdlets to convert an object to a JSON string and a JSON object.
-## Parameters
+## PARAMETERS
### -AsArray
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to `ConvertTo-Json`.
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
The `ConvertTo-Json` cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertto Xml (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Xml.md
Title: ConvertTo-Xml
--- # ConvertTo-Xml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object.
-## Syntax
+## SYNTAX
``` ConvertTo-Xml [-Depth <Int32>] [-InputObject] <PSObject> [-NoTypeInformation] [-As <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Xml` cmdlet creates an [XML-based](/dotnet/api/system.xml.xmldocument) representation of one or more .NET objects. To use this cmdlet, pipe one or more objects to the cmdlet, or use the
file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md).
returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` does not have an option to convert objects to CLI XML.
-## Examples
+## EXAMPLES
### Example 1: Convert a date to XML
ConvertTo-Xml -As "Document" -InputObject (Get-Process) -Depth 3
This command converts the process objects that represent all of the processes on the computer into an XML document. The objects are expanded to a depth of three levels.
-## Parameters
+## PARAMETERS
### -As
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `ConvertTo-XML`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument The value of the **As** parameter determines the type of object that `ConvertTo-XML` returns.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Debug Runspace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Debug-Runspace.md
Title: Debug-Runspace
--- # Debug-Runspace
-## Synopsis
+## SYNOPSIS
Starts an interactive debugging session with a runspace.
-## Syntax
+## SYNTAX
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Debug a remote runspace
In the last command, you start debugging an opened runspace that is running a sc
`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## Related links
+## RELATED LINKS
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
Title: Disable-PSBreakpoint
--- # Disable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Disables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets des
PowerShell scripts. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint and disable it
This command disables all breakpoints in the current console.
`Get-PSBreakpoint` | Disable-PSBreakpoint ```
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Disable Runspacedebug (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md
Title: Disable-RunspaceDebug
--- # Disable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Disable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Disable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-RunspaceDebug` cmdlet disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Examples
+## EXAMPLES
### 1: Disable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-RunspaceDebug](Enable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Enables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't gene
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Runspacedebug (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md
Title: Enable-RunspaceDebug
--- # Enable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Enable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-RunspaceDebug` cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Examples
+## EXAMPLES
### 1: Enable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 True False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Export Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-Alias.md
Title: Export-Alias
--- # Export-Alias
-## Synopsis
+## SYNOPSIS
Exports information about currently defined aliases to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file does not exist, the cmdlet will create it. `Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
-## Examples
+## EXAMPLES
### Example 1: Export an alias
The third and fourth commands add the aliases in the Alias.ps1 file to a remote
The third command uses the `New-PSSession` cmdlet to create the session. The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
-## Parameters
+## PARAMETERS
### -Append
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).
-## Inputs
+## INPUTS
### None. You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Export-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
* You can only Export-Aliases to a file.
-## Related links
+## RELATED LINKS
[Get-Alias](Get-Alias.md)
Microsoft.PowerShell.Utility Export Clixml (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-Clixml.md
Title: Export-Clixml
# Export-Clixml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-F
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Clixml` cmdlet creates a Common Language Infrastructure (CLI) XML-based representation of an object or objects and stores it in a file. You can then use the `Import-Clixml` cmdlet to
file. `ConvertTo-XML` returns the XML, so you can continue to process it in Powe
A valuable use of `Export-Clixml` on Windows computers is to export credentials and secure strings securely as XML. For an example, see Example 3.
-## Examples
+## EXAMPLES
### Example 1: Export a string to an XML file
The output of `Get-Content` in this example has been truncate to focus on the cr
in the XML file. Note that the plain text value of the password is stored in the XML file as a Unicode character array as proven by `Format-Hex`. So the value is encoded but not encrypted.
-## Parameters
+## PARAMETERS
### -Depth
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
+## INPUTS
### System.Management.Automation.PSObject You can pipeline any object to `Export-Clixml`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-Clixml` creates a file that contains the XML.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Html](ConvertTo-Html.md)
Microsoft.PowerShell.Utility Export Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## Synopsis
+## SYNOPSIS
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Export process properties to a CSV file
can see `ExtraProp` is now a header in the CSV file output.
If an added property has the _same_ name as a key from the hashtable, the key takes precedence and only the key is exported to CSV.
-## Parameters
+## PARAMETERS
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV list is sent to the file designated in the Path parameter.
-## Notes
+## NOTES
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Formatdata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-FormatData.md
Title: Export-FormatData
--- # Export-FormatData
-## Synopsis
+## SYNOPSIS
Saves formatting data from the current session in a formatting file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
[-IncludeScriptBlock] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
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).
-## Examples
+## EXAMPLES
### Example 1: Export session format data
The third command shows the effects of this change. The command uses the `Get-Pr
get processes that have names that begin with P. The output shows that property values that are calculated by using script blocks are missing from the display.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Management.Automation.ExtendedTypeDefinition You can pipe **ExtendedTypeDefinition** objects from `Get-FormatData` to `Export-FormatData`.
-## Outputs
+## OUTPUTS
### None `Export-FormatData` does not return any objects. It generates a file and saves it in the specified path.
-## Notes
+## NOTES
- To use any formatting file, including an exported formatting file, the execution policy for the session must allow scripts and configuration files to run. For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Export Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md
Title: Export-PSSession
# Export-PSSession
-## Synopsis
+## SYNOPSIS
Exports commands from another session and saves them in a PowerShell module.
-## Syntax
+## SYNTAX
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## Examples
+## EXAMPLES
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Export-PSSession`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-PSSession` returns a list of files that comprise the module that it created.
-## Notes
+## NOTES
`Export-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for remoting. For more information, see
The module that `Export-PSSession` creates might include a formatting file, even
does not import formatting data. If the command does not import formatting data, any formatting files that are created will not contain formatting data.
-## Related links
+## RELATED LINKS
[about_Command_Precedence](../Microsoft.PowerShell.Core/About/about_Command_Precedence.md)
Microsoft.PowerShell.Utility Format Custom (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Format-Custom.md
Title: Format-Custom
--- # Format-Custom
-## Synopsis
+## SYNOPSIS
Uses a customized view to format the output.
-## Syntax
+## SYNTAX
``` Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-View <String>]
Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-Vi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Custom` cmdlet formats the output of a command as defined in an alternate view. `Format-Custom` is designed to display views that are not just tables or just lists. You can use the views defined in PowerShell, or you can create your own views in a new `format.ps1xml` file and use the `Update-FormatData` cmdlet to add them to PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Format output with a custom view
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -Depth
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Custom`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Custom` returns the format objects that represent the display.
-## Notes
+## NOTES
`Format-Custom` is designed to display views that are not just tables or just lists. To display an alternate table view, use `Format-Table`. To display an alternate list view, use `Format-List`.
You can also refer to `Format-Custom` by its built-in alias, `fc`. For more info
The **GroupBy** parameter assumes that the objects are sorted. Before using `Format-Custom` to group the objects, use `Sort-Object` to sort them.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Hex (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Format-Hex.md
Title: Format-Hex
# Format-Hex
-## Synopsis
+## SYNOPSIS
Displays a file or other input as hexadecimal.
-## Syntax
+## SYNTAX
### Path
Format-Hex -InputObject <PSObject> [-Encoding <Encoding>] [-Count <Int64>] [-Off
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Hex` cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at
to get file information.
When using `Format-Hex` on a file, the cmdlet ignores newline characters and returns the entire contents of a file in one string with the newline characters preserved.
-## Examples
+## EXAMPLES
### Example 1: Get the hexadecimal representation of a string
data, and the adjacent object is also numeric, it will group them into a single
0000000000000000 01 00 00 00 00 00 00 00 � ```
-## Parameters
+## PARAMETERS
### -Count
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ByteCollection
by `Format-Hex`. The output also states they type of bytes being processed. If y
**Path** or **LiteralPath** parameter, the object contains the path of the file that contains each byte. If you pass a string, boolean, integer, etc, it will be labeled appropriately.
-## Notes
+## NOTES
The right-most column of output tries to render the bytes as ASCII characters:
Generally, each byte is interpreted as a Unicode code point, which means that:
- Multi-byte UTF-8 characters never render correctly - UTF-16 characters render correctly only if their high-order byte happens be `NUL`.
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Utility Format List (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Format-List.md
Title: Format-List
--- # Format-List
-## Synopsis
+## SYNOPSIS
Formats the output as a list of properties in which each property appears on a new line.
-## Syntax
+## SYNTAX
``` Format-List [[-Property] <Object[]>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-List` cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use `Format-List` to format and display all or
selected properties of an object as a list (format-list *).
Because more space is available for each item in a list than in a table, PowerShell displays more properties of the object in the list, and the property values are less likely to be truncated.
-## Examples
+## EXAMPLES
### Example 1: Format computer services
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -DisplayError
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-List`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-List` returns the format objects that represent the list.
-## Notes
+## NOTES
You can also refer to Format-List by its built-in alias, FL. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use the list format, otherwis
fails. If the alternate view is a table, use `Format-Table`. If the alternate view is not a list or a table, use `Format-Custom`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Table (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Format-Table.md
Title: Format-Table
# Format-Table
-## Synopsis
+## SYNOPSIS
Formats the output as a table.
-## Syntax
+## SYNTAX
### All
Format-Table [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [[-Property
[-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Table` cmdlet formats the output of a command as a table with the selected properties of the object in each column. The object type determines the default layout and properties that are
specify the column headings in the table. To add a calculated property, use the
**GroupBy** parameter. For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
-## Examples
+## EXAMPLES
### Example 1: Format PowerShell host
Wednesday
InvalidArgument: Failed to evaluate expression " $_ / $null ". ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object down the pipeline to `Format-Table`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Table` returns format objects that represent the table.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Wide (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Format-Wide.md
Title: Format-Wide
--- # Format-Wide
-## Synopsis
+## SYNOPSIS
Formats objects as a wide table that displays only one property of each object.
-## Syntax
+## SYNTAX
``` Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>]
Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Wide` cmdlet formats objects as a wide table that displays only one property of each object. You can use the **Property** parameter to determine which property is displayed.
-## Examples
+## EXAMPLES
### Example 1: Format names of files in the current directory
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Wide`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Wide` returns format objects that represent the table.
-## Notes
+## NOTES
You can also refer to `Format-Wide` by its built-in alias, `fw`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use table format; if it does
fails. If the alternate view is a list, use `Format-List`. If the alternate view is neither a list nor a table, use Format-Custom.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Get Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Alias.md
Title: Get-Alias
--- # Get-Alias
-## Synopsis
+## SYNOPSIS
Gets the aliases for the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Alias [[-Name] <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonP
Get-Alias [-Exclude <String[]>] [-Scope <String>] [-Definition <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Alias` cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your PowerShell profile.
parameter, `Get-Alias` takes a command name and returns its aliases.
Beginning in Windows PowerShell 3.0, `Get-Alias` displays non-hyphenated alias names in an `<alias> -> <definition>` format to make it even easier to find the information that you need.
-## Examples
+## EXAMPLES
### Example 1: Get all aliases in the current session
that begin with "e".
The command uses the **Scope** parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.
-## Parameters
+## PARAMETERS
### -Definition
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
+## INPUTS
### System.String You can pipe alias names to `Get-Alias`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
You can pipe alias names to `Get-Alias`.
every alias, but PowerShell uses an arrow-based format to display the names of non-hyphenated aliases.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To delete an alias, use `Remove-Item`. - The arrow-based alias name format is not used for aliases that include a hyphen. These are likely to be preferred substitute names for cmdlets and functions, instead of typical abbreviations or nicknames.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Get Culture (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Culture.md
Title: Get-Culture
# Get-Culture
-## Synopsis
+## SYNOPSIS
Gets the current culture set in the operating system.
-## Syntax
+## SYNTAX
### CurrentCulture (Default)
Get-Culture [-Name <String[]>] [-NoUserOverrides] [<CommonParameters>]
Get-Culture [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Culture` cmdlet gets information about the current culture settings. This includes information about the current language settings on the system, such as the keyboard layout, and the
system, and the [Set-Culture](/powershell/module/international/set-culture) cmdl
International module. The user-interface (UI) culture determines which text strings are used for user interface elements, such as menus and messages.
-## Examples
+## EXAMPLES
### Example 1: Get culture settings
LCID Name DisplayName
1036 fr-FR French (France) ```
-## Parameters
+## PARAMETERS
### -ListAvailable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo `Get-Culture` returns an object that represents the current culture.
-## Notes
+## NOTES
You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the name of the current culture and the `$PsUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
[Set-Culture](/powershell/module/international/set-culture)
Microsoft.PowerShell.Utility Get Date (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Date.md
Title: Get-Date
# Get-Date
-## Synopsis
+## SYNOPSIS
Gets the current date and time.
-## Syntax
+## SYNTAX
### Date (Default)
Get-Date -UnixTimeSeconds <Int64> [-Year <Int32>] [-Month <Int32>] [-Day <Int32>
-UFormat <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Date` cmdlet gets a **DateTime** object that represents the current date or a date that you specify. `Get-Date` can format the date and time in several .NET and UNIX formats. You can use
programs.
`Get-Date` uses the computer's culture settings to determine how the output is formatted. To view your computer's settings, use `(Get-Culture).DateTimeFormat`.
-## Examples
+## EXAMPLES
### Example 1: Get the current date and time
PS> Get-Date -Date "2020-01-01T00:00:00" -AsUTC
Wednesday, January 1, 2020 8:00:00 AM ```
-## Parameters
+## PARAMETERS
### -AsUTC
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Pipeline input `Get-Date` accepts pipeline input. For example, `Get-ChildItem | Get-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime or System.String
The method `(Get-Date).ToString()` converts a **DateTime** object a **String** o
To display an object's properties and methods, send the object down the pipeline to `Get-Member`. For example, `Get-Date | Get-Member`.
-## Notes
+## NOTES
**DateTime** objects are in long-date and long-time formats for the system locale.
The valid **UFormat specifiers** are displayed in the following table:
| `%y` | Year in 2-digit format | 19 | | `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |
-## Related links
+## RELATED LINKS
[ForEach-Object](../Microsoft.PowerShell.Core/ForEach-Object.md)
Microsoft.PowerShell.Utility Get Error (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Error.md
Title: Get-Error
# Get-Error
-## Synopsis
+## SYNOPSIS
Gets and displays the most recent error messages from the current session.
-## Syntax
+## SYNTAX
### Newest (Default)
Get-Error [[-Newest] <Int32>] [<CommonParameters>]
Get-Error [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Error` cmdlet gets a **PSExtendedError** object that represents the current error details from the last error that occurred in the session.
session using the **Newest** parameter.
The `Get-Error` cmdlet also receives error objects from a collection, such as `$Error`, to display multiple errors from the current session.
-## Examples
+## EXAMPLES
### Example 1: Get the most recent error details
messages, similar to the result of Example 1.
$Error | Get-Error ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### PSObject Supports input from any **PSObject**, but results vary unless either an **ErrorRecord** or **Exception** object are supplied.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ErrorRecord#PSExtendedError Output in a **PSExtendedError** object.
-## Notes
+## NOTES
`Get-Error` accepts pipeline input. For example, `$Error | Get-Error`.
-## Related links
+## RELATED LINKS
[about_Try_Catch_Finally](../Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md)
Microsoft.PowerShell.Utility Get Event (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Event.md
Title: Get-Event
--- # Get-Event
-## Synopsis
+## SYNOPSIS
Gets the events in the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-Event [[-SourceIdentifier] <String>] [<CommonParameters>]
Get-Event [-EventIdentifier] <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Event` cmdlet gets events in the PowerShell event queue for the current session. You can get all events or use the **EventIdentifier** or **SourceIdentifier** parameter to specify the
PowerShell exits. You can use `Get-Event` or `Wait-Event` to get the events.
This cmdlet does not get events from the Event Viewer logs. To get those events, use `Get-WinEvent` or `Get-EventLog`.
-## Examples
+## EXAMPLES
### Example 1: Get all events
PS C:\> Get-Event -EventIdentifier 2
This command gets the event with an event identifier of 2.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs `Get-Event` returns a **PSEventArgs** object for each event. To see a description of this object, type `Get-Help Get-Event -Full` and see the Notes section of the help topic.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The `Get-Event` cmdlet returns a **PSEventArgs** object
register an event. In the value of the **Action** parameter, the **MessageData** property of the `$Event` automatic variable contains this value.
-## Related links
+## RELATED LINKS
[New-Event](New-Event.md)
Microsoft.PowerShell.Utility Get Eventsubscriber (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-EventSubscriber.md
Title: Get-EventSubscriber
--- # Get-EventSubscriber
-## Synopsis
+## SYNOPSIS
Gets the event subscribers in the current session.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-EventSubscriber [[-SourceIdentifier] <String>] [-Force] [<CommonParameters>]
Get-EventSubscriber [-SubscriptionId] <Int32> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventSubscriber` cmdlet gets the event subscribers in the current session.
your Windows PowerShell session, and the events to which you subscribed are adde
queue whenever they are raised. To cancel an event subscription, delete the event subscriber by using the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get the event subscriber for a timer event
being generated when the Elapsed event occurs.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventSubscriber `Get-EventSubscriber` returns an object that represents each event subscriber.
-## Notes
+## NOTES
The `New-Event` cmdlet, which creates a custom event, does not generate a subscriber. Therefore, the `Get-EventSubscriber` cmdlet will not find a subscriber object for these events. However, if you use
generates.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Get Filehash (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-FileHash.md
Title: Get-FileHash
--- # Get-FileHash
-## Synopsis
+## SYNOPSIS
Computes the hash value for a file by using a specified hash algorithm.
-## Syntax
+## SYNTAX
### Path (Default)
Get-FileHash [-LiteralPath] <String[]> [[-Algorithm] <String>] [<CommonParameter
Get-FileHash [-InputStream] <Stream> [[-Algorithm] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FileHash` cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying
are also identical.
By default, the `Get-FileHash` cmdlet uses the SHA256 algorithm, although any hash algorithm that is supported by the target operating system can be used.
-## Examples
+## EXAMPLES
### Example 1: Compute the hash value for a file
Hash
64EC88CA00B268E5BA1A35678A1B5316D212F4F366B2477232534A8AECA37F3C ```
-## Parameters
+## PARAMETERS
### -Algorithm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string to the `Get-FileHash` cmdlet that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### Microsoft.Powershell.Utility.FileHash `Get-FileHash` returns an object that represents the path to the specified file, the value of the computed hash, and the algorithm used to compute the hash.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Get Formatdata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-FormatData.md
Title: Get-FormatData
--- # Get-FormatData
-## Synopsis
+## SYNOPSIS
Gets the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FormatData` cmdlet gets the formatting data in the current session.
cmdlet to serialize the objects, convert them to XML, and save them in `Format.p
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Get all formatting data
TypeNames FormatViewDefinition
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash} ```
-## Parameters
+## PARAMETERS
### -PowerShellVersion
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExtendedTypeDefinition
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-FormatData](Export-FormatData.md)
Microsoft.PowerShell.Utility Get Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Host.md
Title: Get-Host
--- # Get-Host
-## Synopsis
+## SYNOPSIS
Gets an object that represents the current host program.
-## Syntax
+## SYNTAX
``` Get-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Host` cmdlet gets an object that represents the program that is hosting Windows PowerShell.
including detailed information about the version of Windows PowerShell that is c
the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
-## Examples
+## EXAMPLES
### Example 1: Get information about the PowerShell console host
This command uses the **PrivateData** property of `$Host` as its ErrorBackground
see all of the properties of the object in the `$Host`.PrivateData property, type `$host.PrivateData | format-list *`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Internal.Host.InternalHost `Get-Host` returns a **System.Management.Automation.Internal.Host.InternalHost** object.
-## Notes
+## NOTES
The `$Host` automatic variable contains the same object that `Get-Host` returns, and you can use it in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variables contain the same
use these features interchangeably.
For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Get Markdownoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-MarkdownOption.md
Title: Get-MarkdownOption
# Get-MarkdownOption
-## Synopsis
+## SYNOPSIS
Returns the current colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
``` Get-MarkdownOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Returns the current colors and styles used for rendering Markdown content in the console. The strings displayed in the output of this cmdlet contain the ANSI escape codes used to change the
color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org/) website.
-## Examples
+## EXAMPLES
### Example 1 - Get the current colors and style
EmphasisItalics : [36m
> (`[char]0x1B`) for the ANSI escape sequence. For more information about ANSI escape codes work, > see [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-MarkdownOption](Set-MarkdownOption.md)
Microsoft.PowerShell.Utility Get Member (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Member.md
Title: Get-Member
--- # Get-Member
-## Synopsis
+## SYNOPSIS
Gets the properties and methods of objects.
-## Syntax
+## SYNTAX
``` Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Member` cmdlet gets the members, the properties and methods, of objects.
information about static members, the members of the class, not of the instance,
parameter. To get only certain types of members, such as **NoteProperties**, use the **MemberType** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get the members of process objects
LastWriteTimeUtc
Attributes ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Get-Member`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MemberDefinition `Get-Member` returns an object for each property or method that its gets.
-## Notes
+## NOTES
You can get information about a collection object either by using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`.
return information about the `[System.RuntimeType]` type. However, when you use
parameter, `Get-Member` returns the static members of the specific type represented by the `System.RuntimeType` instance.
-## Related links
+## RELATED LINKS
[Add-Member](Add-Member.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Title: Get-PSBreakpoint
--- # Get-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Gets the breakpoints that are set in the current session.
-## Syntax
+## SYNTAX
### Line (Default)
Get-PSBreakpoint [[-Script] <String[]>] [-Type] <BreakpointType[]> [-Runspace <R
Get-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints.
examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed
PowerShell scripts and commands. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Get all breakpoints for all scripts and functions
This command gets all line and variable breakpoints in the `Sample.ps1` script.
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1" ```
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## Notes
+## NOTES
You can use `Get-PSBreakpoint` or its alias, "gbp".
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Pscallstack (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-PSCallStack.md
Title: Get-PSCallStack
--- # Get-PSCallStack
-## Synopsis
+## SYNOPSIS
Displays the current call stack.
-## Syntax
+## SYNTAX
``` Get-PSCallStack [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSCallStack` cmdlet displays the current call stack.
display the call stack in a script or function outside of the debugger.
To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCallStack`.
-## Examples
+## EXAMPLES
### Example 1: Get the call stack for a function
stack.
The final command is a `Step-Out` command (`o`) that exits the debugger and continues executing the script to completion.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CallStackFrame `Get-PSCallStack` returns an object that represents the items in the call stack.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Random (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Random.md
Title: Get-Random
--- # Get-Random
-## Synopsis
+## SYNOPSIS
Gets a random number, or selects objects randomly from a collection.
-## Syntax
+## SYNTAX
### RandomNumberParameterSet (Default)
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<Commo
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Shuffle] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Random` cmdlet gets a randomly selected number. If you submit a collection of objects to `Get-Random`, it gets one or more randomly selected objects from the collection.
objects returned from a collection, or a seed number.
> the current session until you use **SetSeed** again or close the session. You can't reset the seed > to its default value.
-## Examples
+## EXAMPLES
### Example 1: Get a random integer
Get-Random -InputObject @('a','',$null)
`Get-Random` will return either `a`, empty string, or `$null`. The empty sting displays as a blank line and `$null` returns to a PowerShell prompt.
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe one or more objects. `Get-Random` selects values randomly from the piped objects.
-## Outputs
+## OUTPUTS
### System.Int32, System.Int64, System.Double `Get-Random` returns an integer or floating-point number, or an object selected randomly from a submitted collection.
-## Notes
+## NOTES
By default, `Get-Random` generates cryptographically secure randomness using the [RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class.
parameter set accepts arrays that contain an empty string or `$null`. In earlier
versions, only the **Maximum** parameter in the **RandomNumberParameterSet** parameter set accepted an empty string or `$null`.
-## Related links
+## RELATED LINKS
[System.Security.Cryptography.RandomNumberGenerator()](/dotnet/api/system.security.cryptography.randomnumbergenerator)
Microsoft.PowerShell.Utility Get Runspace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Runspace.md
Title: Get-Runspace
--- # Get-Runspace
-## Synopsis
+## SYNOPSIS
Gets active runspaces within a PowerShell host process.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Get-Runspace [-Id] <Int32[]> [<CommonParameters>]
Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Runspace` cmdlet gets active runspaces in a PowerShell host process.
-## Examples
+## EXAMPLES
### Example 1: Get runspaces
Id Name ComputerName Type State Availability
1 Runspace1 localhost Local Opened Busy ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to `Debug-Runspace`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Debug-Runspace](Debug-Runspace.md)
Microsoft.PowerShell.Utility Get Runspacedebug (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md
Title: Get-RunspaceDebug
--- # Get-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Shows runspace debugging options.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Get-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Get-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-RunspaceDebug` cmdlet shows runspace debugging options.
-## Examples
+## EXAMPLES
### 1: Show the state of the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Get Tracesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-TraceSource.md
Title: Get-TraceSource
--- # Get-TraceSource
-## Synopsis
+## SYNOPSIS
Gets PowerShell components that are instrumented for tracing.
-## Syntax
+## SYNTAX
``` Get-TraceSource [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TraceSource` cmdlet gets the trace sources for PowerShell components that are currently in use. You can use the data to determine which PowerShell components you can trace. When tracing, the
trace data to monitor data flow, program execution, and errors.
The tracing cmdlets were designed for PowerShell developers, but they are available to all users.
-## Examples
+## EXAMPLES
### Example 1: Get trace sources by name
Get-TraceSource
This command gets all of the PowerShell components that can be traced.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String You can pipe a string that contains the name of a trace source to `Get-TraceSource`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTraceSource `Get-TraceSource` returns objects that represent the trace sources.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TraceSource](Set-TraceSource.md)
Microsoft.PowerShell.Utility Get Typedata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-TypeData.md
Title: Get-TypeData
--- # Get-TypeData
-## Synopsis
+## SYNOPSIS
Gets the extended type data in the current session.
-## Syntax
+## SYNTAX
``` Get-TypeData [[-TypeName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TypeData` cmdlet gets the extended type data in the current session. This includes type data that was added to the session by `Types.ps1xml` file and dynamic type data that was added by
about dynamic type data that the `Update-TypeData` cmdlet adds, see `Update-Type
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all extended type data
The command gets the **DateTime** key in **Members** and its **GetScriptBlock**
The output shows the script block that creates the value of the **DateTime** property of every **System.DateTime** object in PowerShell.
-## Parameters
+## PARAMETERS
### -TypeName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe type names to `Get-TypeData`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.TypeData
-## Notes
+## NOTES
`Get-TypeData` gets only the extended type data in the current session. It does not get extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Get Uiculture (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-UICulture.md
Title: Get-UICulture
--- # Get-UICulture
-## Synopsis
+## SYNOPSIS
Gets the current UI culture settings in the operating system.
-## Syntax
+## SYNTAX
``` Get-UICulture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-UICulture` cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such
as menus and messages.
You can also use the `Get-Culture` cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.
-## Examples
+## EXAMPLES
### Example 1: Get the UI culture
This command displays the short date pattern for the current UI culture. To see
subproperties of the **DateTimeFormat** property of the UI culture, type `(Get-UICulture).DateTimeFormat | Get-Member`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo, Microsoft.PowerShell.VistaCultureInfo
You cannot pipe input to this cmdlet.
it returns a **CultureInfo** object. In Windows PowerShell 2.0, it returns a **VistaCultureInfo** object.
-## Notes
+## NOTES
You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the name of the current culture, and the `$PSUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Get Unique (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Unique.md
Title: Get-Unique
--- # Get-Unique
-## Synopsis
+## SYNOPSIS
Returns unique items from a sorted list.
-## Syntax
+## SYNTAX
### AsString (Default)
Get-Unique [-InputObject <PSObject>] [-AsString] [<CommonParameters>]
Get-Unique [-InputObject <PSObject>] [-OnType] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Unique` cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. The list must be sorted for the cmdlet to work properly.
and returns only one instance of each item. The list must be sorted for the cmdl
`Get-Unique` is case-sensitive. As a result, strings that differ only in character casing are considered to be unique.
-## Examples
+## EXAMPLES
### Example 1: Get unique words in a text file
The **AsString** parameter tells `Get-Unique` to treat the **ProcessName** value
Without this parameter, `Get-Unique` treats the **ProcessName** values as objects and returns only one instance of the object, that is, the first process name in the list.
-## Parameters
+## PARAMETERS
### -AsString
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any type of object to `Get-Unique`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject The type of object that `Get-Unique` returns is determined by the input.
-## Notes
+## NOTES
You can also refer to `Get-Unique` by its built-in alias, `gu`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md). To sort a list, use Sort-Object. You can also use the **Unique** parameter of `Sort-Object` to find the unique items in a list.
-## Related links
+## RELATED LINKS
[Select-Object](Select-Object.md)
Microsoft.PowerShell.Utility Get Uptime (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Uptime.md
Title: Get-Uptime
# Get-Uptime
-## Synopsis
+## SYNOPSIS
Get the **TimeSpan** since last boot.
-## Syntax
+## SYNTAX
### Timespan (Default)
Get-Uptime [<CommonParameters>]
Get-Uptime [-Since] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet returns the time elapsed since the last boot of the operating system. The `Get-Uptime` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Show time since last boot
Get-Uptime -Since
Tuesday, June 18, 2019 2:34:56 PM ```
-## Parameters
+## PARAMETERS
### -Since
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
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.TimeSpan
This type is returned when using the **Since** parameter.
> For more information about Windows fast startup, see > [Distinguishing Fast Startup from Wake-from-Hibernation](/windows-hardware/drivers/kernel/distinguishing-fast-startup-from-wake-from-hibernation).
-## Notes
+## NOTES
On Windows, the value returned is the same as the **LastBootUpTime** property of the **Win32_OperatingSystem** class in WMI.
-## Related links
+## RELATED LINKS
[Win32_OperatingSystem](/windows/win32/cimwin32prov/win32-operatingsystem#properties)
Microsoft.PowerShell.Utility Get Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Variable.md
Title: Get-Variable
--- # Get-Variable
-## Synopsis
+## SYNOPSIS
Gets the variables in the current console.
-## Syntax
+## SYNTAX
``` Get-Variable [[-Name] <String[]>] [-ValueOnly] [-Include <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Variable` cmdlet gets the PowerShell variables in the current console. You can retrieve just the values of the variables by specifying the **ValueOnly** parameter, and you can filter the variables returned by name.
-## Examples
+## EXAMPLES
### Example 1: Get variables by letter
Get-Variable -Scope 0
Compare-Object (Get-Variable -Scope 0) (Get-Variable -Scope 1) ```
-## Parameters
+## PARAMETERS
### -Exclude
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the variable name to `Get-Variable`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSVariable
When you specify the **ValueOnly** parameter, if the specified variable's value
processing the variable's values one at a time. A workaround to force collection enumeration is to enclose the `Get-Variable` command in parenthesis.
-## Notes
+## NOTES
- This cmdlet does not manage environment variables. To manage environment variables, you can use the environment variable provider.
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Get Verb (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Get-Verb.md
Title: Get-Verb
--- # Get-Verb
-## Synopsis
+## SYNOPSIS
Gets approved PowerShell verbs.
-## Syntax
+## SYNTAX
``` Get-Verb [[-Verb] <String[]>] [[-Group] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Verb` function gets verbs that are approved for use in PowerShell commands.
warning message.
> [Approved Verbs](../../docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md) in > the Microsoft Docs.
-## Examples
+## EXAMPLES
### Example 1 - Get a list of all verbs
Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility ```
-## Parameters
+## PARAMETERS
### -Group
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Management.Automation.VerbInfo
-## Notes
+## NOTES
PowerShell verbs are assigned to a group based on their most common use. The groups are designed to make the verbs easy to find and compare, not to restrict their use. You can use any approved verb
Some of the cmdlets that are installed with PowerShell, such as `Tee-Object` and
unapproved verbs. These cmdlets are historic exceptions and their verbs are classified as **reserved**.
-## Related links
+## RELATED LINKS
[Import-Module](../microsoft.powershell.core/import-module.md)
Microsoft.PowerShell.Utility Group Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Group-Object.md
Title: Group-Object
# Group-Object
-## Synopsis
+## SYNOPSIS
Groups objects that contain the same value for specified properties.
-## Syntax
+## SYNTAX
### HashTable
Group-Object [-NoElement] [-AsHashTable] [-AsString] [-InputObject <PSObject>]
[[-Property] <Object[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Group-Object` cmdlet displays objects in groups based on the value of a specified property. `Group-Object` returns a table with one row for each property value and a column that displays the
Beginning in PowerShell 7, `Group-Object` can combine the **CaseSensitive** and
parameters to create a case-sensitive hash table. The hash table keys use case-sensitive comparisons and output a **System.Collections.Hashtable** object.
-## Examples
+## EXAMPLES
### Example 1: Group files by extension
pipeline. `Group-Object` groups the objects using the **Property** value **Exten
**CaseSensitive** and **AsHashTable** parameters create the hash table and the keys are grouped using the case-sensitive keys `.txt` and `.TXT`.
-## Parameters
+## PARAMETERS
### -AsHashTable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Group-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GroupInfo or System.Collections.Hashtable When you use the **AsHashTable** parameter, `Group-Object` returns a **Hashtable** object. Otherwise, it returns a **GroupInfo** object.
-## Notes
+## NOTES
You can use the **GroupBy** parameter of the formatting cmdlets, such as `Format-Table` and `Format-List`, to group objects. Unlike `Group-Object`, which creates a single table with a row for
type. When grouping objects of different .NET Core types, `Group-Object` uses th
Objects that don't have a specified property can't be grouped. Objects that aren't grouped appear in the final **GroupInfo** object output in a group named `AutomationNull.Value`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Import Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-Alias.md
Title: Import-Alias
--- # Import-Alias
-## Synopsis
+## SYNOPSIS
Imports an alias list from a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-What
[<CommonParameters>] ```
-## Description
+## 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.
-## Examples
+## EXAMPLES
### Example 1: Import aliases from a file
Import-Alias test.txt
This command imports alias information from a file named test.txt.
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Alias`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Import-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Import Clixml (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-Clixml.md
Title: Import-Clixml
# Import-Clixml
-## Synopsis
+## SYNOPSIS
Imports a CLIXML file and creates corresponding objects in PowerShell.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Clixml -LiteralPath <String[]> [-IncludeTotalCount] [-Skip <UInt64>] [-Fi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Clixml` cmdlet imports a Common Language Infrastructure (CLI) XML file with data that represents Microsoft .NET Framework objects and creates the PowerShell objects. For more information
that were exported as secure XML using `Export-Clixml`. For an example, see Exam
`Import-Clixml` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import a serialized file and recreate an object
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -First
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
+## INPUTS
### System.String You can pipeline a string that contains a path to `Import-Clixml`.
-## Outputs
+## OUTPUTS
### PSObject `Import-Clixml` returns objects that were deserialized from the stored XML files.
-## Notes
+## NOTES
When specifying multiple values for a parameter, use commas to separate the values. For example, `<parameter-name> <value1>, <value2>`.
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Import Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-Csv.md
Title: Import-Csv
--- # Import-Csv
-## Synopsis
+## SYNOPSIS
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## Syntax
+## SYNTAX
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## Examples
+## EXAMPLES
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns the objects described by the content in the CSV file.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Localizeddata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-LocalizedData.md
Title: Import-LocalizedData
--- # Import-LocalizedData
-## Synopsis
+## SYNOPSIS
Imports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
-## Syntax
+## SYNTAX
``` Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-LocalizedData` cmdlet dynamically retrieves strings from a subdirectory whose name matches the UI language set for the current user of the operating system. It is designed to enable
it easy for scripts to display user messages in the UI language of the current u
information about this and about the format of the `.psd1` files, see [about_Script_Internationalization](../Microsoft.PowerShell.Core/About/about_Script_Internationalization.md).
-## Examples
+## EXAMPLES
### Example 1: Import text strings
The sample output shows the results of running both scripts when the UI culture
and there are no matching files or directories for that UI culture. `Day1.ps1` displays an error message and English output. `Day2.ps1` just displays the English output.
-## Parameters
+## PARAMETERS
### -BaseDirectory
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable `Import-LocalizedData` saves the hash table in the variable that is specified by the value of the **BindingVariable** parameter.
-## Notes
+## NOTES
- Before using `Import-LocalizedData`, localize your user messages. Format the messages for each locale (UI culture) in a hash table of key-value pairs, and save the hash table in a file with the
You cannot pipe input to this cmdlet.
For more information, see [about_Script_Internationalization](../Microsoft.Powershell.Core/About/about_Script_Internationalization.md).
-## Related links
+## RELATED LINKS
[Write-Host](Write-Host.md)
Microsoft.PowerShell.Utility Import Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-PSSession.md
Title: Import-PSSession
--- # Import-PSSession
-## Synopsis
+## SYNOPSIS
Imports commands from another session into the current session.
-## Syntax
+## SYNTAX
``` Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <Stri
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PSSession` cmdlet imports commands , such as cmdlets, functions, and aliases, from a PSSession on a local or remote computer into the current session. You can import any command that
Beginning in Windows PowerShell 3.0, you can use the `Import-Module` cmdlet to i
remote session into the current session. This feature uses implicit remoting. It is equivalent to using `Import-PSSession` to import selected modules from a remote session into the current session.
-## Examples
+## EXAMPLES
### Example 1: Import all commands from a PSSession
which returns the module name.
The `Get-Command` command is the equivalent of `Get-Command $M.Name`".
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
You cannot pipe objects to this cmdlet.
However, the imported module is temporary and exists only in the current session. To create a permanent module on disk, use the `Export-PSSession` cmdlet.
-## Notes
+## NOTES
- `Import-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for WS-Management remoting. For more information, see
permanent module on disk, use the `Export-PSSession` cmdlet.
include the prefix that you assign by using the **Prefix** parameter. To get help for an imported command in Windows PowerShell 2.0, use the original (non-prefixed) command name.
-## Related links
+## RELATED LINKS
[Export-PSSession](Export-PSSession.md)
Microsoft.PowerShell.Utility Import Powershelldatafile (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md
Title: Import-PowerShellDataFile
--- # Import-PowerShellDataFile
-## Synopsis
+## SYNOPSIS
Imports values from a `.PSD1` file without invoking its contents.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-PowerShellDataFile [-Path] <String[]> [-SkipLimitCheck] [<CommonParameter
Import-PowerShellDataFile [-LiteralPath] <String[]> [-SkipLimitCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a `.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
However, `Invoke-Expression` runs any code contained in the file. This could pro
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the code. By default there is a 500 key limit but can be bypassed with the **SkipLimitCheck** switch.
-## Examples
+## EXAMPLES
### Example 1: Retrieve values from PSD1
NodeName DSC-01
NodeName DSC-02 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Expression](Invoke-Expression.md)
Microsoft.PowerShell.Utility Invoke Expression (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Invoke-Expression.md
Title: Invoke-Expression
--- # Invoke-Expression
-## Synopsis
+## SYNOPSIS
Runs commands or expressions on the local computer.
-## Syntax
+## SYNTAX
``` Invoke-Expression [-Command] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Expression` cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without `Invoke-Expression`, a string submitted at the command
Expressions are evaluated and run in the current scope. For more information, se
> before running it. In general, it is best to design your script with predefined input options, > rather than allowing freeform input.
-## Examples
+## EXAMPLES
### Example 1: Evaluate an expression
command fails if the example number is not valid.
> If the example code from the help file has output in the example, PowerShell attempts to run the > output along with the code and an error will be thrown.
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String or PSObject You can pipe an object that represents the command to `Invoke-Expression`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### PSObject Returns the output that is generated by the invoked command (the value of the **Command** parameter).
-## Notes
+## NOTES
In most cases, you invoke expressions using PowerShell's call operator and achieve the same results. The call operator is a safer method. For more information, see [about_Operators](../microsoft.powershell.core/about/about_operators.md#call-operator-).
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Invoke Restmethod (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
Title: Invoke-RestMethod
# Invoke-RestMethod
-## Synopsis
+## SYNOPSIS
Sends an HTTP or HTTPS request to a RESTful web service.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-RestMethod -CustomMethod <String> [-FollowRelLink] [-MaximumFollowRelLink
[-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that return richly structured data.
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## Examples
+## EXAMPLES
### Example 1: Get the PowerShell RSS feed
$x
30 ```
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## Outputs
+## OUTPUTS
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## Notes
+## NOTES
Some features may not be available on all platforms.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Invoke Webrequest (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
Title: Invoke-WebRequest
# Invoke-WebRequest
-## Synopsis
+## SYNOPSIS
Gets content from a web page on the internet.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-WebSession <WebRequestSessio
[-PreserveAuthorizationOnRedirect] [-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WebRequest` cmdlet sends HTTP and HTTPS requests to a web page or web service. It parses the response and returns collections of links, images, and other significant HTML elements.
variables. See the [Notes](#notes) section of this article.
> However, since the `contoso.com` sites do not exist, the examples do not work. Adapt the examples > to hosts in your environment.
-## Examples
+## EXAMPLES
### Example 1: Send a web request
$StatusCode
The terminating error is caught by the `catch` block, which retrieves the **StatusCode** from the **Exception** object.
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-WebRequest`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject
-## Notes
+## NOTES
Beginning with PowerShell 6.0.0 `Invoke-WebRequest` supports basic parsing only.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[Invoke-RestMethod](Invoke-RestMethod.md)
Microsoft.PowerShell.Utility Join String (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Join-String.md
Title: Join-String
# Join-String
-## Synopsis
+## SYNOPSIS
Combines objects from the pipeline into a single string.
-## Syntax
+## SYNTAX
### Default (Default)
Join-String [[-Property] <PSPropertyExpression>] [[-Separator] <String>] [-Outpu
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-String` cmdlet joins, or combines, text from pipeline objects into a single string.
or the result of the object that was converted to a string.
This cmdlet was introduced in PowerShell 6.2.
-## Examples
+## EXAMPLES
### Example 1: Join directory names
class {
} ```
-## Parameters
+## PARAMETERS
### -DoubleQuote
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Measure Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Measure-Command.md
Title: Measure-Command
--- # Measure-Command
-## Synopsis
+## SYNOPSIS
Measures the time it takes to run script blocks and cmdlets.
-## Syntax
+## SYNTAX
``` Measure-Command [-InputObject <PSObject>] [-Expression] <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Command` cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.
operation, and returns the execution time.
> [!NOTE] > Script blocks run by `Measure-Command` run in the current scope, not a child scope.
-## Examples
+## EXAMPLES
### Example 1: Measure a command
Value 2
For more information about the invocation operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#call-operator-).
-## Parameters
+## PARAMETERS
### -Expression
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe an object to `Measure-Command`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `Measure-Command` returns a time span object that represents the result.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Measure Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Measure-Object.md
Title: Measure-Object
--- # Measure-Object
-## Synopsis
+## SYNOPSIS
Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
-## Syntax
+## SYNTAX
### GenericMeasure (Default)
Measure-Object [[-Property] <PSPropertyExpression[]>] [-InputObject <PSObject>]
[-Character] [-IgnoreWhiteSpace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Object` cmdlet calculates the property values of certain types of object. `Measure-Object` performs three types of measurements, depending on the parameters in the command.
The `Measure-Object` cmdlet performs calculations on the property values of obje
**Average** of numeric values. For **String** objects, you can also use `Measure-Object` to count the number of lines, words, and characters.
-## Examples
+## EXAMPLES
### Example 1: Count the files and folders in a directory
StandardDeviation :
Property : PeakPagedMemorySize ```
-## Parameters
+## PARAMETERS
### -AllStats
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Measure-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GenericMeasureInfo
You can pipe objects to `Measure-Object`.
If you use the **Word** parameter, `Measure-Object` returns a **TextMeasureInfo** object. Otherwise, it returns a **GenericMeasureInfo** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility New Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-Alias.md
Title: New-Alias
# New-Alias
-## Synopsis
+## SYNOPSIS
Creates a new alias.
-## Syntax
+## SYNTAX
``` New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Alias` cmdlet creates a new alias in the current PowerShell session. Aliases created by using `New-Alias` are not saved after you exit the session or close PowerShell. You can use the `Export-Alias` cmdlet to save your alias information to a file. You can later use `Import-Alias` to retrieve that saved alias information.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
description, quick wmi alias, for the alias and makes it read-only. The last lin
uses `Get-Alias` to get the new alias and pipes it to Format-List to display all of the information about it.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **Passthru** parameter, `New-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the new alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To change an alias, use `Set-Alias`. To delete an alias, use `Remove-Item`.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility New Event (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-Event.md
Title: New-Event
--- # New-Event
-## Synopsis
+## SYNOPSIS
Creates a new event.
-## Syntax
+## SYNTAX
``` New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Event` cmdlet creates a new custom event.
the event subscription by using the `Unregister-Event` cmdlet, the event subscri
are deleted from the session. If you do not subscribe to the custom event, to delete the event, you must change the program conditions or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Create a new event in the event queue
Instrumentation (WMI) event that is raised when a new process is created. The co
Because the events that `New-Event` raises are automatically added to the PowerShell event queue, you do not need to register for that event.
-## Parameters
+## PARAMETERS
### -EventArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The new custom event, the event subscription, and the event queue exist only in
If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility New Guid (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-Guid.md
Title: New-Guid
--- # New-Guid
-## Synopsis
+## SYNOPSIS
Creates a GUID.
-## Syntax
+## SYNTAX
``` New-Guid [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Guid` cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
-## Examples
+## EXAMPLES
### Example 1: Create a GUID
New-Guid
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Guid This cmdlet returns a GUID.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-Object.md
Title: New-Object
--- # New-Object
-## Synopsis
+## SYNOPSIS
Creates an instance of a Microsoft .NET Framework or COM object.
-## Syntax
+## SYNTAX
### Net (Default)
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictio
New-Object [-ComObject] <String> [-Strict] [-Property <IDictionary>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Object` cmdlet creates an instance of a .NET Framework or COM object.
you type the fully qualified name of a .NET Framework class and the cmdlet retur
instance of that class. To create an instance of a COM object, use the **ComObject** parameter and specify the ProgID of the object as its value.
-## Examples
+## EXAMPLES
### Example 1: Create a System.Version object
members of `$array` to parameters of the constructor but the constructor does no
parameter. Wrapping `$array` in another array prevents PowerShell from attempting to bind the three members of `$array` to parameters of the constructor.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Object `New-Object` returns the object that is created.
-## Notes
+## NOTES
- `New-Object` provides the most commonly-used functionality of the VBScript CreateObject function. A statement like `Set objShell = CreateObject("Shell.Application")` in VBScript can be
You cannot pipe input to this cmdlet.
- `New-Object` expands upon the functionality available in the Windows Script Host environment by making it easy to work with .NET Framework objects from the command line and within scripts.
-## Related links
+## RELATED LINKS
[about_Object_Creation](../Microsoft.PowerShell.Core/About/about_Object_Creation.md)
Microsoft.PowerShell.Utility New Temporaryfile (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-TemporaryFile.md
Title: New-TemporaryFile
--- # New-TemporaryFile
-## Synopsis
+## SYNOPSIS
Creates a temporary file.
-## Syntax
+## SYNTAX
``` New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates temporary files that you can use in scripts.
order and uses the first path found:
- On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary file
$TempFile = New-TemporaryFile
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file in the `$TempFile` variable. You can use this file later in your script.
-## Parameters
+## PARAMETERS
### -Confirm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a **FileInfo** object that represents the temporary file.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Timespan (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-TimeSpan.md
Title: New-TimeSpan
--- # New-TimeSpan
-## Synopsis
+## SYNOPSIS
Creates a TimeSpan object.
-## Syntax
+## SYNTAX
### Date (Default)
New-TimeSpan [[-Start] <DateTime>] [[-End] <DateTime>] [<CommonParameters>]
New-TimeSpan [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Seconds <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-TimeSpan` cmdlet creates a **TimeSpan** object that represents a time interval. You can use a **TimeSpan** object to add or subtract time from **DateTime** objects.
You can use a **TimeSpan** object to add or subtract time from **DateTime** obje
Without parameters, a `New-TimeSpan` command returns a **TimeSpan** object that represents a time interval of zero.
-## Examples
+## EXAMPLES
### Example 1: Create a TimeSpan object for a specified duration
TotalSeconds : 27813562.3127728
TotalMilliseconds : 27813562312.7728 ```
-## Parameters
+## PARAMETERS
### -Days
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a **DateTime** object that represents that start time to `New-TimeSpan`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `New-TimeSpan` returns an object that represents the time span.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility New Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/New-Variable.md
Title: New-Variable
# New-Variable
-## Synopsis
+## SYNOPSIS
Creates a new variable.
-## Syntax
+## SYNTAX
``` New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Opti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Variable` cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
a variable, and determine whether variables are public or private.
Typically, you create a new variable by typing the variable name and its value, such as `$Var = 3`, but you can use the `New-Variable` cmdlet to use its parameters.
-## Examples
+## EXAMPLES
### Example 1: Create a variable
abc123xyz
This command demonstrates that variables with spaces can be created. The variables can be accessed using the `Get-Variable` cmdlet or directly by delimiting a variable with braces.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### System.Object You can pipe a value to `New-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `New-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Out File (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Out-File.md
Title: Out-File
--- # Out-File
-## Synopsis
+## SYNOPSIS
Sends output to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Out-File [[-Encoding] <Encoding>] -LiteralPath <string> [-Append] [-Force] [-NoC
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means
that the output may not be ideal for programmatic processing unless all input ob
When you need to specify parameters for the output, use `Out-File` rather than the redirection operator (`>`). For more information about redirection, see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md).
-## Examples
+## EXAMPLES
### Example 1: Send output and create a file
DemoDefaultOutFileWidth
For more information about `$PSDefaultParameterValues`, see [about_Preference_Variables](../Microsoft.Powershell.Core/About/about_preference_variables.md#psdefaultparametervalues).
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-File`.
-## Outputs
+## OUTPUTS
### None `Out-File` does not generate any output.
-## Notes
+## NOTES
Input objects are automatically formatted as they would be in the terminal, but you can use a `Format-*` cmdlet to explicitly control the formatting of the output to the file. For example,
cmdlet.
`Out-File` saves data to a file but it does not produce any output objects to the pipeline.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.Powershell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Out Gridview (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Out-GridView.md
Title: Out-GridView
--- # Out-GridView
-## Synopsis
+## SYNOPSIS
Sends output to an interactive table in a separate window.
-## Syntax
+## SYNTAX
### PassThru (Default)
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputMod
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For full instructions, see the [Notes](#notes) section of this article.
> [GraphicalTools](https://www.powershellgallery.com/packages/Microsoft.PowerShell.GraphicalTools) > module in the PowerShell Gallery.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a grid view
This command line can be used in a Windows shortcut. Without the **Wait** parame
would exit as soon as the `Out-GridView` window opened, which would close the `Out-GridView` window almost immediately.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None Normally, `Out-GridView` does not return any objects. When using the **PassThru** parameter, the objects representing the selected rows are returned to the pipeline.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The criteria only affects the display. It does not delete items from the table.
- To delete selected criteria, click the red X beside each criterion. - To delete all criteria, click the **Clear All** button.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out Printer (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Out-Printer.md
Title: Out-Printer
# Out-Printer
-## Synopsis
+## SYNOPSIS
Sends output to a printer.
-## Syntax
+## SYNTAX
``` Out-Printer [[-Name] <String>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified.
> This cmdlet was reintroduced in PowerShell 7. This cmdlet is only available on Windows systems > that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1 - Send a file to be printed on the default printer
Out-Printer -InputObject $H
`Get-Help` gets the full version of the Help topic for `Get-CimInstance` and stores it in the `$H` variable. The **InputObject** parameter passes the value of `$H` to `Out-Printer`.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-Printer`.
-## Outputs
+## OUTPUTS
### None `Out-Printer` does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
cmdlet sends it to a formatting cmdlet before rendering it.
you pipe the output of `Out-Printer` to `Get-Member`, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out String (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Out-String.md
Title: Out-String
# Out-String
-## Synopsis
+## SYNOPSIS
Outputs input objects as a string.
-## Syntax
+## SYNTAX
### NoNewLineFormatting (Default)
Out-String [-Width <Int32>] [-NoNewline] [-InputObject <PSObject>] [<CommonParam
Out-String [-Stream] [-Width <Int32>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-String` cmdlet converts input objects into strings. By default, `Out-String` accumulates the strings and returns them as a single string, but you can use the **Stream**
parameter to direct `Out-String` to return one line at a time or create an array
cmdlet lets you search and manipulate string output as you would in traditional shells when object manipulation is less convenient.
-## Examples
+## EXAMPLES
### Example 1: Get the current culture and convert the data to strings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-String`.
-## Outputs
+## OUTPUTS
### System.String `Out-String` returns the string that it creates from the input object.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb don't format objects. The `Out` cmdlets send objects to the formatter for the specified display destination.
-## Related links
+## RELATED LINKS
[about_Formatting](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md)
Microsoft.PowerShell.Utility Read Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Read-Host.md
Title: Read-Host
--- # Read-Host
-## Synopsis
+## SYNOPSIS
Reads a line of input from the console.
-## Syntax
+## SYNTAX
### AsString (Default)
Read-Host [[-Prompt] <Object>] [-MaskInput] [<CommonParameters>]
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
-## Examples
+## EXAMPLES
### Example 1: Save console input to a variable
value is stored as a plaintext **String** object in the `$pwd_string` variable.
$pwd_string = Read-Host "Enter a Password" -MaskInput ```
-## Parameters
+## PARAMETERS
### -AsSecureString
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept input from the PowerShell pipeline.
-## Outputs
+## OUTPUTS
### System.String or System.Security.SecureString If the **AsSecureString** parameter is used, `Read-Host` returns a **SecureString**. Otherwise, it returns a string.
-## Notes
+## NOTES
This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is connected to the keyboard of the host console.
-## Related links
+## RELATED LINKS
[Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Utility Register Engineevent (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Register-EngineEvent.md
Title: Register-EngineEvent
# Register-EngineEvent
-## Synopsis
+## SYNOPSIS
Subscribes to events that are generated by the PowerShell engine and by the `New-Event` cmdlet.
-## Syntax
+## SYNTAX
``` Register-EngineEvent [-SourceIdentifier] <String> [[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-EngineEvent` cmdlet subscribes to events that are generated by the PowerShell engine and the `New-Event` cmdlet. Use the **SourceIdentifier** parameter to specify the event.
the `Unregister-Event` cmdlet, which deletes the event subscriber from the sessi
When the subscribed event is raised, it is added to the event queue in your session. To get events in the event queue, use the `Get-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Register a PowerShell engine event on remote computers
The `Unregister-Event` cmdlet stops the job associated with the event subscripti
Id 19 is still running and creating new events. We use the **Job** cmdlets stop the job and remove the unneeded job objects. `Get-Content` displays the contents of the log file.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Register-EngineEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob If you use the **Action** parameter, `Register-EngineEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
when PowerShell has been idle for 300 milliseconds (ms).
> 2.2.0-beta4, **OnIdle** behavior changed to signal the event only if there is a `ReadKey()` > timeout and the current editing buffer is empty.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Register Objectevent (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Register-ObjectEvent.md
Title: Register-ObjectEvent
--- # Register-ObjectEvent
-## Synopsis
+## SYNOPSIS
Subscribes to the events that are generated by a Microsoft .NET Framework object.
-## Syntax
+## SYNTAX
``` Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceId
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ObjectEvent` cmdlet subscribes to events that are generated by .NET objects on the local computer or on a remote computer.
When you subscribe to an event, an event subscriber is added to your session. To
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events when a new process starts
value of the `$Random` variable.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None You cannot pipe objects to `Register-ObjectEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob When you use the **Action** parameter, `Register-ObjectEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-Alias.md
Title: Remove-Alias
# Remove-Alias
-## Synopsis
+## SYNOPSIS
Remove an alias from the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Remove an alias from the current session.
Remove-Alias [-Name] <String[]> [-Scope <String>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Alias` cmdlet removes an alias from the current PowerShell session. To remove an alias with the **Option** property set to **ReadOnly**, use the **Force** parameter. The `Remove-Alias` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Remove an alias
represent the current pipeline object. The parameter **NE** (not equal), selects
have an **Options** value set to **Constant**. `Remove-Alias` uses the **Force** parameter to remove aliases, including read-only aliases, from the PowerShell session.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String[] You can pipe an alias object to `Remove-Alias`.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
Changes only affect the current scope. To remove an alias from all sessions, add a `Remove-Alias` command to your PowerShell profile. For more information, see [about_Aliases](../microsoft.powershell.core/about/about_aliases.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Remove Event (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-Event.md
Title: Remove-Event
# Remove-Event
-## Synopsis
+## SYNOPSIS
Deletes events from the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Remove-Event [-SourceIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameter
Remove-Event [-EventIdentifier] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Event` cmdlet deletes events from the event queue in the current session. This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Remove an event by source identifier
PS C:\> Get-Event | Remove-Event
This command deletes all events from the event queue.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventArgs You can pipe events from `Get-Event` to `Remove-Event`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms. Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Deletes breakpoints from the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
not function.
information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Remove all breakpoints
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator (`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint[]
You can pipe breakpoint objects to `Remove-PSBreakpoint`.
### System.Management.Automation.Runspaces.Runspace
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Typedata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-TypeData.md
Title: Remove-TypeData
# Remove-TypeData
-## Synopsis
+## SYNOPSIS
Deletes extended types from the current session.
-## Syntax
+## SYNTAX
### RemoveTypeDataSet (Default)
Remove-TypeData [-TypeName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-TypeData -Path <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-TypeData` cmdlet deletes extended type data from the current session. This cmdlet affects only the current session and sessions that are created in the current session.
files, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/about/about_Types.p
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Remove type data for a specified type
cmdlet to remove extended type data for all CIM types in the sessions in the `$S
Invoke-Command -Session $S {Get-TypeData -TypeName *CIM* | Remove-TypeData} ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.TypeData
You can pipe **TypeData** object, such as the ones that the `Get-TypeData` cmdle
You can pipe the type names to `Remove-TypeData`. When you pipe an object to `Remove-TypeData`, `Remove-TypeData` gets the type name of the object and removes all type data for the object type.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-TypeData` can remove only the extended type data in the current session. It cannot remove extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[Get-TypeData](Get-TypeData.md)
Microsoft.PowerShell.Utility Remove Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Remove-Variable.md
Title: Remove-Variable
--- # Remove-Variable
-## Synopsis
+## SYNOPSIS
Deletes a variable and its value.
-## Syntax
+## SYNTAX
``` Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Variable` cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
-## Examples
+## EXAMPLES
### Example 1: Remove a variable
Remove-Variable Smp
This command deletes the `$Smp` variable.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### System.Management.Automation.PSVariable You can pipe a variable object to `Remove-Variable`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- Changes affect only the current scope, such as a session. To delete a variable from all sessions, add a `Remove-Variable` command to your PowerShell profile.
This cmdlet does not return any output.
- You can also refer to `Remove-Variable` by its built-in alias, `rv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Select Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Select-Object.md
Title: Select-Object
--- # Select-Object
-## Synopsis
+## SYNOPSIS
Selects objects or object properties.
-## Syntax
+## SYNTAX
### DefaultParameter (Default)
Select-Object [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<C
Select-Object [-InputObject <PSObject>] [-Unique] [-SkipIndex <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Object` cmdlet selects specified properties of an object or set of objects. It can also select unique objects, a specified number of objects, or objects in a specified position in an
objects is generated, even when the command that generates the objects appears b
`Select-Object` command in the pipeline. To turn off this optimizing behavior, use the **Wait** parameter.
-## Examples
+## EXAMPLES
### Example 1: Select objects by property
Diagnostics.Format.ps1xml 4.955078125 223
DotNetTypes.format.ps1xml 134.9833984375 223 ```
-## Parameters
+## PARAMETERS
### -ExcludeProperty
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Select-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject
-## Notes
+## NOTES
- You can also refer to the `Select-Object` cmdlet by its built-in alias, `select`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
You can pipe any object to `Select-Object`.
information, see _Write Single Records to the Pipeline_ in [Strongly Encouraged Development Guidelines](/powershell/scripting/developer/windows-powershell).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Select String (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Select-String.md
Title: Select-String
# Select-String
-## Synopsis
+## SYNOPSIS
Finds text in strings and files.
-## Syntax
+## SYNTAX
### File (Default)
Select-String [-Culture <String>] [-Pattern] <String[]> -LiteralPath <String[]>
[-NotMatch] [-AllMatches] [-Encoding <Encoding>] [-Context <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
You can also specify that `Select-String` should expect a particular character e
when you're searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Find a case-sensitive match
Name foo
Piping to `Out-String -Stream` converts the formatted output into a multiple single-line string objects. This means that when `Select-String` finds a match it outputs only the matching line.
-## Parameters
+## PARAMETERS
### -AllMatches
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has a `ToString()` method to `Select-String`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MatchInfo, System.Boolean, System.String
By default, the output is a set of **MatchInfo** objects with one for each match
the **Quiet** parameter, the output is a **Boolean** value indicating whether the pattern was found. If you use the **Raw** parameter, the output is a set of **String** objects that match the pattern.
-## Notes
+## NOTES
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
To find the properties of a **MatchInfo** object, type the following command:
`Select-String -Path test.txt -Pattern 'test' | Get-Member | Format-List -Property *`
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Select Xml (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Select-Xml.md
Title: Select-Xml
--- # Select-Xml
-## Synopsis
+## SYNOPSIS
Finds text in an XML string or document.
-## Syntax
+## SYNTAX
### Xml (Default)
Select-Xml [-XPath] <string> -LiteralPath <string[]> [-Namespace <hashtable>] [<
Select-Xml [-XPath] <string> -Content <string[]> [-Namespace <hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Xml` cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the **Content**, **Path**, or **Xml** parameter to specify the XML to be searched.
-## Examples
+## EXAMPLES
### Example 1: Select AliasProperty nodes
Select-Xml -Path $Home\Documents\WindowsPowerShell\Snippets -Namespace $SnippetN
ForEach-Object {$_.Node.Innerxml} ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String or System.Xml.XmlNode You can pipe a path or XML node to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.SelectXmlInfo
-## Notes
+## NOTES
XPath is a standard language that is designed to identify parts of an XML document. For more information about the XPath language, see [XPath Reference](/dotnet/standard/data/xml/select-nodes-using-xpath-navigation) and the Selection Filters section of [Event Selection](/previous-versions//aa385231(v=vs.85)).
-## Related links
+## RELATED LINKS
[ConvertTo-Xml](ConvertTo-Xml.md)
Microsoft.PowerShell.Utility Send Mailmessage (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Send-MailMessage.md
Title: Send-MailMessage
--- # Send-MailMessage
-## Synopsis
+## SYNOPSIS
Sends an email message.
-## Syntax
+## SYNTAX
### All
Send-MailMessage [-Attachments <String[]>] [-Bcc <String[]>] [[-Body] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Send-MailMessage` cmdlet sends an email message from within PowerShell.
information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About
> not use `Send-MailMessage`. For more information, see > [Platform Compatibility note DE0005](https://aka.ms/SendMailMessage).
-## Examples
+## EXAMPLES
### Example 1: Send an email from one person to another person
The **Credential** parameter specifies a domain administrator's credentials are
message. The **UseSsl** parameter specifies that Secure Socket Layer (SSL) creates a secure connection.
-## Parameters
+## PARAMETERS
### -Attachments
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
+## INPUTS
### System.String You can pipe the path and file names of attachments to `Send-MailMessage`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
Microsoft.PowerShell.Utility Set Alias (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-Alias.md
Title: Set-Alias
# Set-Alias
-## Synopsis
+## SYNOPSIS
Creates or changes an alias for a cmdlet or other command in the current PowerShell session.
-## Syntax
+## SYNTAX
### Default (Default)
Set-Alias [-Name] <string> [-Value] <string> [-Description <string>] [-Option <S
[-PassThru] [-Scope <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Alias` cmdlet creates or changes an alias for a cmdlet or a command, such as a function, script, file, or other executable. An alias is an alternate name that refers to a cmdlet or command.
as the description.
An alias that is created or changed by `Set-Alias` is not permanent and is only available during the current PowerShell session. When the PowerShell session is closed, the alias is removed.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
Set-Alias -Name Go -Option ReadOnly, Private
The alias `Go` should already exist. After running the command above, the alias is not be able to be changed without using the **Force** parameter and is only available in the current scope.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### None `Set-Alias` does not accept input from the pipeline.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **PassThru** parameter, `Set-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the alias. Otherwise, `Set-Alias` does not generate any output.
-## Notes
+## NOTES
PowerShell includes built-in aliases that are available in each PowerShell session. The `Get-Alias` cmdlet displays the aliases available in a PowerShell session.
An alias can be saved and reused in another PowerShell session by doing an expor
save an alias to a file, use `Export-Alias`. To add a saved alias to a new PowerShell session, use `Import-Alias`.
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Utility Set Date (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-Date.md
Title: Set-Date
--- # Set-Date
-## Synopsis
+## SYNOPSIS
Changes the system time on the computer to a time that you specify.
-## Syntax
+## SYNTAX
### Date (Default)
Set-Date [-Date] <DateTime> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm
Set-Date [-Adjust] <TimeSpan> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Date` cmdlet changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a **Date
**TimeSpan** object to `Set-Date`. To specify a new date or time, use the **Date** parameter. To specify a change interval, use the **Adjust** parameter.
-## Examples
+## EXAMPLES
### Example 1: Add three days to the system date
$90mins = New-TimeSpan -Minutes 90
Set-Date -Adjust $90mins ```
-## Parameters
+## PARAMETERS
### -Adjust
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a date to `Set-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime `Set-Date` returns an object that represents the date that it set.
-## Notes
+## NOTES
- Use this cmdlet cautiously when changing the date and time on the computer. The change might prevent the computer from receiving system-wide events and updates that are triggered by a date or
You can pipe a date to `Set-Date`.
[TimeSpan Methods](/dotnet/api/system.timespan) in the .NET SDK.
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility Set Markdownoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-MarkdownOption.md
Title: Set-MarkdownOption
--- # Set-MarkdownOption
-## Synopsis
+## SYNOPSIS
Sets the colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
### IndividualSetting (Default)
Set-MarkdownOption [-PassThru] -Theme <String> [<CommonParameters>]
Set-MarkdownOption [-PassThru] [-InputObject] <PSObject> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Sets the colors and styles used for rendering Markdown content in the console. These styles are defined using ANSI escape codes that change the color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org
> string. For more information about ANSI escape codes work, see > [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Examples
+## EXAMPLES
### Example 1 - Switch to the Light Theme
EmphasisBold : [1m
EmphasisItalics : [36m ```
-## Parameters
+## PARAMETERS
### -BoldForegroundColor
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
The string values used to define the color and style must match the regular expression `^\[*[0-9;]*?m{1}`.
-## Related links
+## RELATED LINKS
[Get-MarkdownOption](Get-MarkdownOption.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
Title: Set-PSBreakpoint
--- # Set-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Sets a breakpoint on a line, command, or variable.
-## Syntax
+## SYNTAX
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [-Runspace <Runspace>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging P
For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint on a line
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Set-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You cannot pipe input to `Set-PSBreakpoint`.
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## Notes
+## NOTES
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Tracesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-TraceSource.md
Title: Set-TraceSource
--- # Set-TraceSource
-## Synopsis
+## SYNOPSIS
Configures, starts, and stops a trace of PowerShell components.
-## Syntax
+## SYNTAX
### optionsSet (Default)
Set-TraceSource [-Name] <String[]> [-RemoveListener <String[]>] [<CommonParamete
Set-TraceSource [-Name] <String[]> [-RemoveFileListener <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TraceSource` cmdlet configures, starts, and stops a trace of a PowerShell component. You can use it to specify which components will be traced and where the tracing output is sent.
-## Examples
+## EXAMPLES
### Example 1: Trace the ParameterBinding component
This command stops the trace of the **ParameterBinding** component of PowerShell
**Name** parameter to identify the component that was being traced and the **RemoveListener** parameter to identify the trace listener.
-## Parameters
+## PARAMETERS
### -Debugger
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a name to `Set-TraceSource`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSTraceSource
When you use the **PassThru** parameter, `Set-TraceSource` generates a
**System.Management.Automation.PSTraceSource** object representing the trace session. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
this cmdlet does not generate any output.
module are loaded automatically when the component is in use, and they appear in the output of `Get-TraceSource`.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Set Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-Variable.md
Title: Set-Variable
--- # Set-Variable
-## Synopsis
+## SYNOPSIS
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## Syntax
+## SYNTAX
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## Examples
+## EXAMPLES
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## Parameters
+## PARAMETERS
### -Description
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Show Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Show-Command.md
Title: Show-Command
# Show-Command
-## Synopsis
+## SYNOPSIS
Displays PowerShell command information in a graphical window.
-## Syntax
+## SYNTAX
``` Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1: Open the Commands window
command, instead of creating a new command. When you run this command, the `Show
opens. You can use the window features to set parameter values. To run the command, click the **Run** button in the `Show-Command` window.
-## Parameters
+## PARAMETERS
### -ErrorPopup
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
+## INPUTS
### None You cannot pipe input to `Show-Command`.
-## Outputs
+## OUTPUTS
### None, System.String, System.Object
When you use the **PassThru** parameter, `Show-Command` returns a command string
**ErrorPopup** parameter, `Show-Command` returns the command output (any object). Otherwise, `Show-Command` does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. `Show-Command` does not work in remote sessions.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Show Markdown (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Show-Markdown.md
Title: Show-Markdown
# Show-Markdown
-## Synopsis
+## SYNOPSIS
Shows a Markdown file or string in the console in a friendly way using VT100 escape sequences or in a browser using HTML.
-## Syntax
+## SYNTAX
### Path (Default)
Show-Markdown -InputObject <PSObject> [-UseBrowser] [<CommonParameters>]
Show-Markdown -LiteralPath <String[]> [-UseBrowser] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-Markdown` cmdlet is used to render Markdown in a human readable format either in a terminal or in a browser.
You can change how `Show-Markdown` renders Markdown in a terminal by using `Set-
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Simple example specifying a path
__underlines__
Show-Markdown -Path ./README.md -UseBrowser ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject ### System.String[]
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-Markdown](ConvertFrom-Markdown.md)
Microsoft.PowerShell.Utility Sort Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Sort-Object.md
Title: Sort-Object
# Sort-Object
-## Synopsis
+## SYNOPSIS
Sorts objects by property values.
-## Syntax
+## SYNTAX
### Default (Default)
Sort-Object [-Descending] [-Unique] -Bottom <Int32> [-InputObject <PSObject>] [[
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Sort-Object` cmdlet sorts objects in ascending or descending order based on object property values. If sort properties are not included in a command, PowerShell uses default sort properties
tables to sort in ascending order, descending order, or a combination of sort or
sorted as case-sensitive or case-insensitive. Use the **Unique** parameter to eliminate duplicates from the output.
-## Examples
+## EXAMPLES
### Example 1: Sort the current directory by name
The `Get-ChildItem` cmdlet gets the files from the directory specified by the **
down the pipeline to the `Sort-Object` cmdlet. `Sort-Object` uses the **Length** and **Name** parameter to sort the files by length in ascending order. Since `File01.txt` and `File03.txt` have the same length, they are further sorted by their property **Name**.
-## Parameters
+## PARAMETERS
### -Bottom
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be sorted to `Sort-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Sort-Object` returns the sorted objects.
-## Notes
+## NOTES
The `Sort-Object` cmdlet sorts objects based on properties specified in the command or the default sort properties for the object type. Default sort properties are defined using the `PropertySet`
see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrolle
The performance of the sorting algorithm is slower when doing a stable sort.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Start Sleep (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Start-Sleep.md
Title: Start-Sleep
--- # Start-Sleep
-## Synopsis
+## SYNOPSIS
Suspends the activity in a script or session for the specified period of time.
-## Syntax
+## SYNTAX
### Seconds (Default)
Start-Sleep [-Seconds] <Double> [<CommonParameters>]
Start-Sleep -Milliseconds <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Sleep` cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.
-## Examples
+## EXAMPLES
### Example 1: Sleep all commands for 15 seconds
This example makes all the commands in the session sleep for one and one-half of
Start-Sleep -Seconds 1.5 ```
-## Parameters
+## PARAMETERS
### -Milliseconds
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int32 You can pipe the number of seconds to `Start-Sleep`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You can also refer to `Start-Sleep` by its built-in alias, `sleep`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
This cmdlet does not return any output.
- `Ctrl+C` does not break out of `[Threading.Thread]::Sleep`. For more information, see [Thread.Sleep Method](/dotnet/api/system.threading.thread.sleep).
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Tee Object (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Tee-Object.md
Title: Tee-Object
--- # Tee-Object
-## Synopsis
+## SYNOPSIS
Saves command output in a file or variable and also sends it down the pipeline.
-## Syntax
+## SYNTAX
### File (Default)
Tee-Object [-InputObject <PSObject>] -LiteralPath <String> [[-Encoding] <Encodin
Tee-Object [-InputObject <PSObject>] -Variable <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Tee-Object` cmdlet redirects output, that is, it sends the output of a command in two directions (like the letter T). It stores the output in a file or variable and also sends it down the pipeline. If `Tee-Object` is the last command in the pipeline, the command output is displayed at the prompt.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a file and to the console
drive. A pipeline operator (`|`) sends the list to `Tee-Object`, which appends t
AllSystemFiles.txt file and passes the list down the pipeline to the `Out-File` cmdlet, which saves the list in the `NewSystemFiles.txt file`.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Tee-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Tee-Object` returns the object that it redirects.
-## Notes
+## NOTES
You can also use the `Out-File` cmdlet or the redirection operator, both of which save the output in a file but do not send it down the pipeline.
a file but do not send it down the pipeline.
Beginning in PowerShell 6, `Tee-Object` uses BOM-less UTF-8 encoding when it writes to files. If you need a different encoding, use the `Out-File` cmdlet with the **Encoding** parameter.
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility Test Json (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Test-Json.md
Title: Test-Json
# Test-Json
-## Synopsis
+## SYNOPSIS
Tests whether a string is a valid JSON document
-## Syntax
+## SYNTAX
### __AllParameterSets (Default) ```
Test-Json [-Json] <String> [[-Schema] <String>] [<CommonParameters>]
Test-Json [-Json] <String> [-SchemaFile <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Json` cmdlet tests whether a string is a valid JavaScript Object Notation (JSON) document and can optionally verify that JSON document against a provided schema.
web-based apps.
This cmdlet was introduced in PowerShell 6.1
-## Examples
+## EXAMPLES
### Example 1: Test if an object is valid JSON
True
For more information, see [Structuring a complex schema](https://json-schema.org/understanding-json-schema/structuring.html).
-## Parameters
+## PARAMETERS
### -Json
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `Test-Json`.
-## Outputs
+## OUTPUTS
### Boolean
-## Notes
+## NOTES
The `Test-Json` cmdlet is implemented by using the [NJsonSchema Class](https://github.com/RSuter/NJsonSchema).
Newtonsoft's implementation includes several extensions to the JSON standard, su
comments and use of single quotes. For a full list of features, see the Newtonsoft documentation at [https://www.newtonsoft.com/json](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Trace Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Trace-Command.md
Title: Trace-Command
# Trace-Command
-## Synopsis
+## SYNOPSIS
Configures and starts a trace of the specified expression or command.
-## Syntax
+## SYNTAX
### expressionSet (Default)
Trace-Command [-InputObject <PSObject>] [-Name] <String[]> [[-Option] <PSTraceSo
[-Debugger] [-PSHost] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Trace-Command` cmdlet configures and starts a trace of the specified expression or command. It works like Set-TraceSource, except that it applies only to the specified command.
-## Examples
+## EXAMPLES
### Example 1: Trace metadata processing, parameter binding, and an expression
the **InputObject** parameter. The **InputObject** parameter passes the variable
expression. In effect, the command being processed during the trace is `Get-Alias -InputObject $A" or "$A | Get-Alias`.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects that represent input to the expression to `Trace-Command`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject Returns the command trace in the debug stream.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
Returns the command trace in the debug stream.
**Expression**, **Option** or **Name**, **Command**, **Option**. If you include the parameter names, the parameters can appear in any order.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Unblock File (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Unblock-File.md
Title: Unblock-File
--- # Unblock-File
-## Synopsis
+## SYNOPSIS
Unblocks files that were downloaded from the Internet.
-## Syntax
+## SYNTAX
### ByPath (Default)
Unblock-File [-Path] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Unblock-File -LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet only works on the Windows and macOS platforms.**
For more information about PowerShell execution policies, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Unblock a file
At line:1 char:1
PS C:\> Get-Item C:\ps-test\Start-ActivityTracker.ps1 | Unblock-File ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a file path to `Unblock-File`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Support for macOS was added in PowerShell 7. - The `Unblock-File` cmdlet works only in file system drives.
This cmdlet does not generate any output.
- If you use the `Unblock-File` cmdlet on a file that is not blocked, the command has no effect on the unblocked file and the cmdlet does not generate errors.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Utility Unregister Event (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Unregister-Event.md
Title: Unregister-Event
# Unregister-Event
-## Synopsis
+## SYNOPSIS
Cancels an event subscription.
-## Syntax
+## SYNTAX
### BySource (Default)
Unregister-Event [-SourceIdentifier] <String> [-Force] [-WhatIf] [-Confirm] [<Co
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-Event` cmdlet cancels an event subscription that was created by using the `Register-EngineEvent`, `Register-ObjectEvent`, or `Register-WmiEvent` cmdlet.
created by using the `New-Event` cmdlet, the new event is also deleted from the
`Unregister-Event` does not delete events from the event queue. To delete events, use the `Remove-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Cancel an event subscription by source identifier
It uses a pipeline operator (`|`) to send the subscriber objects to `Unregister-
deletes them from the session. To complete the task, the **Force** parameter is also required on `Unregister-Event`.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventSubscriber You can pipe the output from `Get-EventSubscriber` to `Unregister-Event`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
current session, the event queue is discarded and the event subscription is canc
subscribed to the event by using the `Register-EngineEvent` cmdlet. To delete a custom event from the session, you must remove it programmatically or close the session.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Update Formatdata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Update-FormatData.md
Title: Update-FormatData
# Update-FormatData
-## Synopsis
+## SYNOPSIS
Updates the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-FormatData` cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell.
interrupt the session.
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Reload previously loaded formatting files
The second command uses the `Update-FormatData` cmdlet to reload the formatting
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it without using parameters.
-## Parameters
+## PARAMETERS
### -AppendPath
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
+## INPUTS
### System.String You can pipe a string that contains the append path to `Update-FormatData`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
- `Update-FormatData` also updates the formatting data for commands in the session that were imported from modules. If the formatting file for a module changes, you can run an `Update-FormatData` command to update the formatting data for imported commands. You do not need to import the module again.
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Update List (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Update-List.md
Title: Update-List
# Update-List
-## Synopsis
+## SYNOPSIS
Adds items to and removes items from a property value that contains a collection of objects.
-## Syntax
+## SYNTAX
### AddRemoveSet (Default)
Update-List [-Add <Object[]>] [-Remove <Object[]>] [-InputObject <PSObject>] [[-
Update-List -Replace <Object[]> [-InputObject <PSObject>] [[-Property] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-List` cmdlet adds, removes, or replaces items in a property value of an object and returns the updated object. This cmdlet is designed for properties that contain collections of
determine whether a cmdlet supports `Update-List`, see the cmdlet Help topic.
This cmdlet was reintroduced in PowerShell 7.
-## Examples
+## EXAMPLES
### Example 1: Add items to a property value
Deck : 2ΓÖú KΓÖÑ 4ΓÖá 10ΓÖÑ 8ΓÖá 10ΓÖª 9ΓÖá 6ΓÖá KΓÖª 7ΓÖú 3ΓÖú QΓÖú AΓÖÑ
8ΓÖÑ ```
-## Parameters
+## PARAMETERS
### -Add
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be updated to `Update-List`.
-## Outputs
+## OUTPUTS
### Objects or System.Management.Automation.PSListModifier `Update-List` returns the updated object, or it returns an object that represents the update action.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Update Typedata (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Update-TypeData.md
Title: Update-TypeData
# Update-TypeData
-## Synopsis
+## SYNOPSIS
Updates the extended type data in the session.
-## Syntax
+## SYNTAX
### FileSet (Default)
Update-TypeData [-MemberType <PSMemberTypes>] [-MemberName <String>] [-Value <Ob
Update-TypeData [-Force] [-TypeData] <TypeData[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-TypeData` cmdlet updates the extended type data in the session by reloading the `Types.ps1xml` files into memory and adding new extended type data.
the `Update-TypeData` cmdlet cannot use method syntax.
For more information about the `Types.ps1xml` files in PowerShell, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Update extended types
modules. The value of the **Value** parameter is a script that returns `$True` i
The second command pipes the module objects from `Get-Module` to the `Format-Table` cmdlet, which displays the **Name** and **SupportsUpdatableHelp** properties of all modules in a list.
-## Parameters
+## PARAMETERS
### -AppendPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the values of the **AppendPath**, **TypeName**, or **TypeData** parameters to `Update-TypeData`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Wait Debugger (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Wait-Debugger.md
Title: Wait-Debugger
--- # Wait-Debugger
-## Synopsis
+## SYNOPSIS
Stops a script in the debugger before running the next statement in the script.
-## Syntax
+## SYNTAX
``` Wait-Debugger [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Stops the PowerShell script execution engine at the point immediately after the `Wait-Debugger` cmdlet and waits for a debugger to be attached. This is similar to using
cmdlet and waits for a debugger to be attached. This is similar to using
> Make sure you remove the `Wait-Debugger` lines after you are done. A running script appears to be > hung when it is stopped at a `Wait-Debugger`.
-## Examples
+## EXAMPLES
### Example 1: Insert breakpoint for debugging
class FileResource
} ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-DscDebug](/powershell/module/PSDesiredStateConfiguration/Enable-DscDebug)
Microsoft.PowerShell.Utility Wait Event (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Wait-Event.md
Title: Wait-Event
# Wait-Event
-## Synopsis
+## SYNOPSIS
Waits until a particular event is raised before continuing to run.
-## Syntax
+## SYNTAX
``` Wait-Event [[-SourceIdentifier] <String>] [-Timeout <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Event` cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes when the event is detected. To cancel the wait, press
response to an event in two different ways:
- using the **Action** parameter of the event subscription - waiting for an event to return and then respond with an action
-## Examples
+## EXAMPLES
### Example 1: Wait for the next event
identifier of **ProcessStarted**. If the specified time expires, the wait ends.
Wait-Event -SourceIdentifier "ProcessStarted" -Timeout 90 ```
-## Parameters
+## PARAMETERS
### -SourceIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Write Debug (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Debug.md
Title: Write-Debug
--- # Write-Debug
-## Synopsis
+## SYNOPSIS
Writes a debug message to the console.
-## Syntax
+## SYNTAX
``` Write-Debug [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Debug` cmdlet writes debug messages to the host from a script or command. By default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the `$DebugPreference` variable.
-## Examples
+## EXAMPLES
### Example 1: Understand $DebugPreference
change only affects the scope of the function. The value is not affected outside
For more information about the **Debug** common parameter, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a debug message to `Write-Debug`.
-## Outputs
+## OUTPUTS
### None `Write-Debug` only writes to the debug stream. It does not write any objects to the pipeline.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Error (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Error.md
Title: Write-Error
# Write-Error
-## Synopsis
+## SYNOPSIS
Writes an object to the error stream.
-## Syntax
+## SYNTAX
### NoException (Default)
Write-Error [-ErrorRecord] <ErrorRecord> [-RecommendedAction <String>] [-Categor
[-CategoryReason <String>] [-CategoryTargetName <String>] [-CategoryTargetType <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Error` cmdlet declares a non-terminating error. By default, errors are sent in the error stream to the host program to be displayed, along with output.
continues to process the other items in the collection.
To declare a terminating error, use the `Throw` keyword. For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
-## Examples
+## EXAMPLES
### Example 1: Write an error for RegistryKey object
has a null constructor.
The second command uses the `Write-Error` cmdlet to declare a non-terminating error. The value of the **Exception** parameter is the **Exception** object in the `$E` variable.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains an error message to `Write-Error`.
-## Outputs
+## OUTPUTS
### Error object `Write-Error` writes only to the error stream. It does not return any objects.
-## Notes
+## NOTES
`Write-Error` does not change the value of the `$?` automatic variable, therefore it does not signal a terminating error condition. To signal a terminating error, use the [$PSCmdlet.WriteError()](/dotnet/api/system.management.automation.cmdlet.writeerror) method.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Write Host (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Host.md
Title: Write-Host
# Write-Host
-## Synopsis
+## SYNOPSIS
Writes customized output to a host.
-## Syntax
+## SYNTAX
``` Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
hosting PowerShell.
> affect `Write-Host` messages. The exception to this rule is `-InformationAction Ignore`, which > effectively suppresses `Write-Host` output. (see "Example 5")
-## Examples
+## EXAMPLES
### Example 1: Write to the console without adding a new line
These commands effectively suppress output of the `Write-Host` cmdlet. The first
The second example redirects the information stream of the command to the `$null` variable and thereby suppresses it.
-## Parameters
+## PARAMETERS
### -BackgroundColor
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).
-## Inputs
+## INPUTS
### System.Object You can pipe objects to be written to the host.
-## Outputs
+## OUTPUTS
### None `Write-Host` sends the objects to the host. It does not return any objects. However, the host displays the objects that `Write-Host` sends to it.
-## Notes
+## NOTES
- When writing a collection to the host, elements of the collection are printed on the same line separated by a single space. This can be overridden with the **Separator** parameter.
displays the objects that `Write-Host` sends to it.
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Write Information (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Information.md
Title: Write-Information
# Write-Information
-## Synopsis
+## SYNOPSIS
Specifies how PowerShell handles information stream data for a command.
-## Syntax
+## SYNTAX
``` Write-Information [-MessageData] <Object> [[-Tags] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Information` cmdlet specifies how PowerShell handles information stream data for a command.
the `InformationAction` common parameter to your command. For more information,
`Write-Information` is also a supported workflow activity in PowerShell 5.x.
-## Examples
+## EXAMPLES
### Example 1: Write information for Get- results
Get-Process | Sort-Object CPU -Descending |
@{Id=9044; ProcessName=explorer; CPU=2358.765625} ```
-## Parameters
+## PARAMETERS
### -MessageData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object `Write-Information` accepts piped objects to pass to the information stream.
-## Outputs
+## OUTPUTS
### System.Management.Automation.InformationRecord
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Output (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Output.md
Title: Write-Output
--- # Write-Output
-## Synopsis
+## SYNOPSIS
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
-## Syntax
+## SYNTAX
``` Write-Output [-InputObject] <PSObject[]> [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
be written, `"Home directory: $HOME"`.
By default, `Write-Output` enumerates through collection objects. However, `Write-Output` can also be used to pass collections down the pipeline as a single object with the **NoEnumerate** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get objects and write them to the console
Count : 1
... ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Write-Output`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Write-Output` returns the objects that are submitted as input.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Progress (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Progress.md
Title: Write-Progress
--- # Write-Progress
-## Synopsis
+## SYNOPSIS
Displays a progress bar within a PowerShell command window.
-## Syntax
+## SYNTAX
``` Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-PercentComplete <Int32>]
Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-Perce
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script. You can select the indicators that the bar reflects and the
you to control progress view bar rendering.
> If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is automatically set to > `Classic`.
-## Examples
+## EXAMPLES
### Example 1: Display the progress of a For loop
Step 1
In this example you can use the **ParentId** parameter to have indented output to show parent/child relationships in the progress of each step.
-## Parameters
+## PARAMETERS
### -Activity
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None `Write-Progress` does not generate any output.
-## Notes
+## NOTES
If the progress bar does not appear, check the value of the `$ProgressPreference` variable. If the value is set to SilentlyContinue, the progress bar is not displayed. For more information about
The parameters of the cmdlet correspond to the properties of the
**System.Management.Automation.ProgressRecord** class. For more information, see [ProgressRecord Class](/dotnet/api/system.management.automation.progressrecord).
-## Related links
+## RELATED LINKS
[Write-Debug](Write-Debug.md)
Microsoft.PowerShell.Utility Write Verbose (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Verbose.md
Title: Write-Verbose
--- # Write-Verbose
-## Synopsis
+## SYNOPSIS
Writes text to the verbose message stream.
-## Syntax
+## SYNTAX
``` Write-Verbose [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Verbose` cmdlet writes text to the verbose message stream in PowerShell. Typically, the verbose message stream is used to deliver more in depth information about command processing.
By default, the verbose message stream is not displayed, but you can display it
value of the `$VerbosePreference` variable or using the **Verbose** common parameter in any command.
-## Examples
+## EXAMPLES
### Example 1: Write a status message
The first command assigns a value of Continue to the `$VerbosePreference` prefer
default value, `SilentlyContinue`, suppresses verbose messages. The second command writes a verbose message.
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the message to `Write-Verbose`.
-## Outputs
+## OUTPUTS
### None `Write-Verbose` writes only to the verbose message stream.
-## Notes
+## NOTES
- Verbose messages are returned only when the command uses the **Verbose** common parameter. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
You can pipe a string that contains the message to `Write-Verbose`.
For more information about the `$VerbosePreference` variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Warning (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Write-Warning.md
Title: Write-Warning
# Write-Warning
-## Synopsis
+## SYNOPSIS
Writes a warning message.
-## Syntax
+## SYNTAX
``` Write-Warning [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Warning` cmdlet writes a warning message to the PowerShell host. The response to the warning depends on the value of the user's `$WarningPreference` variable and the use of the **WarningAction** common parameter.
-## Examples
+## EXAMPLES
### Example 1: Write a warning message
warning.
For more information about the **WarningAction** common parameter, see [about_CommonParameters](../Microsoft.Powershell.Core/About/about_CommonParameters.md).
-## Parameters
+## PARAMETERS
### -Message Specifies the warning message.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the warning to `Write-Warning`.
-## Outputs
+## OUTPUTS
### None `Write-Warning` writes only to the warning stream. It does not generate any other output.
-## Notes
+## NOTES
The default value for the `$WarningPreference` variable is `Continue`, which displays the warning and then continues executing the command. To determine valid values for a preference variable such as `$WarningPreference`, set it to a string of random characters, such as "abc". The resulting error message lists the valid values.
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.WSMan.Management Connect Wsman (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Connect-WSMan.md
Title: Connect-WSMan
# Connect-WSMan
-## Synopsis
+## SYNOPSIS
Connects to the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Connect-WSMan [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-Port <Int32>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
workgroups.
For information about how to disconnect from the WinRM service on a remote computer, see the `Disconnect-WSMan` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Connect to a remote computer
The second command uses the **SessionOption** parameter to pass the credentials
the `$a` variable to `Connect-WSMan`. Then, `Connect-WSMan` connects to the remote server01 computer by using the specified session options.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
You can run management commands or query management data on a remote computer without creating a WS-Management session. You can do this by using the **ComputerName** parameters of
WS-Management session. You can do this by using the **ComputerName** parameters
PowerShell creates a temporary connection that is used for the single command. After the command runs, the connection is closed.
-## Related links
+## RELATED LINKS
[Disable-WSManCredSSP](Disable-WSManCredSSP.md)
Microsoft.WSMan.Management Disable Wsmancredssp (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Disable-WSManCredSSP.md
Title: Disable-WSManCredSSP
# Disable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Disables CredSSP authentication on a computer.
-## Syntax
+## SYNTAX
``` Disable-WSManCredSSP [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
performs the following action:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Disable CredSSP on a client
Disable-WSManCredSSP -Role Server
This command disables CredSSP on the server, which prevents delegation from clients.
-## Parameters
+## PARAMETERS
### -Role
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To enable CredSSP authentication, use the Enable-WSManCredSSP cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Disconnect Wsman (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Disconnect-WSMan.md
Title: Disconnect-WSMan
# Disconnect-WSMan
-## Synopsis
+## SYNOPSIS
Disconnects the client from the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
``` Disconnect-WSMan [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
change to the WSMan provider.
For more information about how to connect to the WinRM service on a remote computer, see `Connect-WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Delete a connection to a remote computer
computer, in this case the server01 computer. However, you can also use `Disconn
connections to remote computers before you change to the WSMan provider. Those connections do not appear in the ComputerName list.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Enable Wsmancredssp (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Enable-WSManCredSSP.md
Title: Enable-WSManCredSSP
# Enable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Enables Credential Security Support Provider (CredSSP) authentication on a computer.
-## Syntax
+## SYNTAX
### All
Enables Credential Security Support Provider (CredSSP) authentication on a compu
Enable-WSManCredSSP [[-DelegateComputer] <String[]>] [-Force] [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Parameters section.
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Delegate client credentials
Set-Item -Path "WSMan:\server02\service\auth\credSSP" -Value $True
parameter to specify the **WSMan** provider's location. The **Value** parameter sets the **Service** setting to true.
-## Parameters
+## PARAMETERS
### -DelegateComputer
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement If CredSSP authentication is successfully enabled, this cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmancredssp (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Get-WSManCredSSP.md
Title: Get-WSManCredSSP
--- # Get-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Gets the Credential Security Support Provider-related configuration for the client.
-## Syntax
+## SYNTAX
``` Get-WSManCredSSP [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The cmdlet performs the following actions:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Display CredSSP configuration
If the computer is not configured for CredSSP, this is the output:
`The machine is not configured to allow delegating fresh credentials.`
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet. To enable CredSSP authentication, use the `Enable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmaninstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Get-WSManInstance.md
Title: Get-WSManInstance
# Get-WSManInstance
-## Synopsis
+## SYNOPSIS
Displays management information for a resource instance specified by a Resource URI.
-## Syntax
+## SYNTAX
### GetInstance (Default)
Get-WSManInstance [-ApplicationName <String>] [-BasePropertiesOnly] [-ComputerNa
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WSManInstance` cmdlet retrieves an instance of a management resource that is specified by a resource Uniform Resource Identifier (URI). The information that is retrieved can be a complex XML
standard Web Services for Management (WS-Management) **Get** command.
This cmdlet uses the WS-Management connection/transport layer to retrieve information.
-## Examples
+## EXAMPLES
### Example 1: Get all information from WMI
returns association instances, not associated instances.
You must enclose the filter in quotation marks, as shown in the example.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This command does not accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement This cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Invoke Wsmanaction (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Invoke-WSManAction.md
Title: Invoke-WSManAction
--- # Invoke-WSManAction
-## Synopsis
+## SYNOPSIS
Invokes an action on the object that is specified by the Resource URI and by the selectors.
-## Syntax
+## SYNTAX
### URI (Default)
Invoke-WSManAction [-Action] <String> [-ApplicationName <String>] [-ComputerName
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
parameters are specified by key value pairs.
This cmdlet uses the WSMan connection/transport layer to run the action.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
the remote server01 computer.
The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started.
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmaninstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/New-WSManInstance.md
Title: New-WSManInstance
--- # New-WSManInstance
-## Synopsis
+## SYNOPSIS
Creates a new instance of a management resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-WSManInstance [-ConnectionURI <Uri>] [-FilePath <String>] [-OptionSet <Hasht
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
URI and a value set or input file to create the new instance of the management r
This cmdlet uses the WinRM connection/transport layer to create the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Create a HTTPS listener
This command creates an instance of a WS-Management HTTPS listener on all IP add
New-WSManInstance winrm/config/Listener -SelectorSet @{Transport='HTTPS'; Address='*'} -ValueSet @{Hostname="HOST";CertificateThumbprint="XXXXXXXXXX"} ```
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The `Set-WmiInstance` cmdlet, a Windows Management Instrumentation (WMI) cmdlet, is similar. `Set-WmiInstance` uses the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmansessionoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/New-WSManSessionOption.md
Title: New-WSManSessionOption
# New-WSManSessionOption
-## Synopsis
+## SYNOPSIS
Creates session option hash table to use as input parameters for WS-Management cmdlets.
-## Syntax
+## SYNTAX
``` New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentication <ProxyAuthentication>]
New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthenticatio
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
WSMan cmdlets:
- `Invoke-WSManAction` - `Connect-WSMan`
-## Examples
+## EXAMPLES
### Example 1: Create a connection that uses connection options
computer, in this case the server01 computer. However, you can use the cmdlet to
connections to remote computers before you change to the WSMan provider. Those connections appear in the **ComputerName** list.
-## Parameters
+## PARAMETERS
### -NoEncryption
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SessionOption
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Remove Wsmaninstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Remove-WSManInstance.md
Title: Remove-WSManInstance
--- # Remove-WSManInstance
-## Synopsis
+## SYNOPSIS
Deletes a management resource instance.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Remove-WSManInstance [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-ResourceU
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the **ResourceURI** and **SelectorSet** parameters.
This cmdlet uses the WinRM connection/transport layer to delete the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Delete a listener
Remove-WSManInstance -ResourceUri winrm/config/Listener -SelectorSet Address=tes
This command deletes the WS-Management HTTP listener on a computer.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The cmdlets in the CimCmdlets module are similar. They use the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmaninstance (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Set-WSManInstance.md
Title: Set-WSManInstance
--- # Set-WSManInstance
-## Synopsis
+## SYNOPSIS
Modifies the management information that is related to a resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Set-WSManInstance [-ConnectionURI <Uri>] [-Dialect <Uri>] [-FilePath <String>] [
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The Set-WSManInstance cmdlet modifies the management information that is related to a resource. This cmdlet uses the WinRM connection/transport layer to modify the information.
-## Examples
+## EXAMPLES
### Example 1: Disable a listener on the local computer
This fails: -ValueSet @{enabled="False"}
This succeeds: -ValueSet @{Enabled="False"}
-## Parameters
+## PARAMETERS
### -ApplicationName
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).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmanquickconfig (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Set-WSManQuickConfig.md
Title: Set-WSManQuickConfig
# Set-WSManQuickConfig
-## Synopsis
+## SYNOPSIS
Configures the local computer for remote management.
-## Syntax
+## SYNTAX
### All
Configures the local computer for remote management.
Set-WSManQuickConfig [-UseSSL] [-Force] [-SkipNetworkProfileCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
are sent by using the Web Services for Management (WS-Management) technology.
To run `Set-WSManQuickConfig`, start PowerShell with the **Run as Administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Enable remote management of the local computer over HTTP
Set-WSManQuickConfig -UseSSL
> **HTTPS** requires manual configuration. For more information, see the **UseSSL** parameter's > description.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Test Wsman (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.WSMan.Management/Test-WSMan.md
Title: Test-WSMan
--- # Test-WSMan
-## Synopsis
+## SYNOPSIS
Tests whether the WinRM service is running on a local or remote computer.
-## Syntax
+## SYNTAX
``` Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>] [-Port <Int32>] [-UseSSL]
Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is running on a local or remote computer. If the tested computer is running the
displays the WS-Management identity schema, the protocol version, the product vendor, and the product version of the tested service.
-## Examples
+## EXAMPLES
### Example 1: Determine the status of the WinRM service
server01 using the authentication parameter.
Using the authentication parameter enables `Test-WSMan` to return the operating system version.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output object.
-## Notes
+## NOTES
By default, the `Test-WSMan` cmdlet queries the WinRM service without using authentication, and it returns no information that is specific to the operating-system version. Instead, it displays null values for the operating system version and service pack level (OS: 0.0.0 SP: 0.0).
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
PSDiagnostics Disable Pstrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Disable-PSTrace.md
Title: Disable-PSTrace
--- # Disable-PSTrace
-## Synopsis
+## SYNOPSIS
Disables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Disable-PSTrace [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the Analytic event log for PowerShell
provider.
Disable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Disable Pswsmancombinedtrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Disable-PSWSManCombinedTrace.md
Title: Disable-PSWSManCombinedTrace
--- # Disable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Stop the logging session started by Enable-PSWSManCombinedTrace.
-## Syntax
+## SYNTAX
``` Disable-PSWSManCombinedTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the combined logging session
You must run this cmdlet from an elevated PowerShell session.
Disable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Disable Wsmantrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Disable-WSManTrace.md
Title: Disable-WSManTrace
--- # Disable-WSManTrace
-## Synopsis
+## SYNOPSIS
Stop the WSMan logging session started by Enable-WSManTrace.
-## Syntax
+## SYNTAX
``` Disable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan trace
You must run this cmdlet from an elevated PowerShell session.
Disable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Pstrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Enable-PSTrace.md
Title: Enable-PSTrace
--- # Enable-PSTrace
-## Synopsis
+## SYNOPSIS
Enables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Enable-PSTrace [-Force] [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Enable the Analytic event log for PowerShell
provider.
Enable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Enable Pswsmancombinedtrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Enable-PSWSManCombinedTrace.md
Title: Enable-PSWSManCombinedTrace
--- # Enable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan and PowerShell providers enabled.
-## Syntax
+## SYNTAX
``` Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a combined logging session
You must run this cmdlet from an elevated PowerShell session.
Enable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### -DoNotOverwriteExistingTrace
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Wsmantrace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Enable-WSManTrace.md
Title: Enable-WSManTrace
--- # Enable-WSManTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan providers enabled.
-## Syntax
+## SYNTAX
``` Enable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan logging session.
You must run this cmdlet from an elevated PowerShell session.
Enable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Get Logproperties (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Get-LogProperties.md
Title: Get-LogProperties
--- # Get-LogProperties
-## Synopsis
+## SYNOPSIS
Retrieves the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Get-LogProperties [-Name] <Object> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** This cmdlet gets the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Get the configuration settings of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails The **PSDiagnostics** module adds the **LogDetails** class to the `Microsoft.PowerShell.Diagnostics` namespace.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-LogProperties](Set-LogProperties.md)
PSDiagnostics Set Logproperties (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Set-LogProperties.md
Title: Set-LogProperties
--- # Set-LogProperties
-## Synopsis
+## SYNOPSIS
Changes the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet changes the configuration settings of a Windows event log. This cmdl
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Change the retention setting of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails
You must pass a fully configured **LogDetails** object to the `Set-LogProperties
Therefore, to change one setting, you should use `Get-LogProperties` to retrieve the current configuration.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Start Trace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Start-Trace.md
Title: Start-Trace
# Start-Trace
-## Synopsis
+## SYNOPSIS
Start an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFilePath] <String>]
Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFile
[-BufferSizeInKB <Int32>] [-MaxLogFileSizeInMB <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Start-Trace -SessionName 'wsmlog' -ETS -OutputFilePath "$env:windir\system32\wsmtraces.log" -Format 'bincirc' -MinBuffers 16 -MaxBuffers 256 -BufferSizeInKb 64 -MaxLogFileSizeInMB 256 -ProviderFilePath "$env:windir\system32\wsmtraceproviders.txt" ```
-## Parameters
+## PARAMETERS
### -BufferSizeInKB Event Trace Session buffer size in kilobytes (KB).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Stop Trace (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSDiagnostics/Stop-Trace.md
Title: Stop-Trace
--- # Stop-Trace
-## Synopsis
+## SYNOPSIS
Stop an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Stop-Trace [-SessionName] <Object> [-ETS] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Stop-Trace -SessionName 'wsmlog' ```
-## Parameters
+## PARAMETERS
### -ETS Send commands to Event Trace Sessions directly without saving or scheduling.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSReadLine Get Psreadlinekeyhandler (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Get-PSReadLineKeyHandler.md
Title: Get-PSReadLineKeyHandler
# Get-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Gets the key bindings for the PSReadLine module.
-## Syntax
+## SYNTAX
### FullListing (default)
Get-PSReadLineKeyHandler [-Bound] [-Unbound] [<CommonParameters>]
Get-PSReadLineKeyHandler [-Chord] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
If no parameter is specified, returns the currently bound key functions for the PSReadLine module. If **Chord** parameter is specified, the cmdlet returns the specific bound keys.
-## Examples
+## EXAMPLES
### Example 1: Get all key mappings
Shift+Enter AddLine Move the cursor to the next line without attempting to ex
... ```
-## Parameters
+## PARAMETERS
### -Bound
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.KeyHandler
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Get Psreadlineoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Get-PSReadLineOption.md
Title: Get-PSReadLineOption
--- # Get-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Gets values for the options that can be configured.
-## Syntax
+## SYNTAX
``` Get-PSReadLineOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineOption` cmdlet returns the current state of the settings that can be configured by using the `Set-PSReadLineOption` cmdlet. You can use the returned object to change **PSReadLine** options. This provides a slightly simpler way to set syntax coloring options for multiple kinds of tokens.
-## Examples
+## EXAMPLES
### Example 1: Get options and their values
VariableColor : "`e[92m"
This command returns the list of available PSReadLine options and their current values.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.PSConsoleReadLineOptions An instance of the current options. Changing the property values of this object updates the settings in PSReadLine directly without invoking `Set-PSReadLineOption`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Remove Psreadlinekeyhandler (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Remove-PSReadLineKeyHandler.md
Title: Remove-PSReadLineKeyHandler
# Remove-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Removes a key binding.
-## Syntax
+## SYNTAX
``` Remove-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSReadLineKeyHandler` cmdlet removes a specified key binding.
-## Examples
+## EXAMPLES
### Example 1: Remove a binding
Remove-PSReadLineKeyHandler -Chord Ctrl+B
This command removes the binding from the key combination, or chord, `Ctrl+B`. The `Ctrl+B` chord is created in the `Set-PSReadLineKeyHandler` article.
-## Parameters
+## PARAMETERS
### -Chord
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlinekeyhandler (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Set-PSReadLineKeyHandler.md
Title: Set-PSReadLineKeyHandler
--- # Set-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Binds keys to user-defined or PSReadLine key handler functions.
-## Syntax
+## SYNTAX
### ScriptBlock
Set-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [-Function] <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineKeyHandler` cmdlet customizes the result when a key or sequence of keys is pressed. With user-defined key bindings, you can do almost anything that is possible from within a PowerShell script.
-## Examples
+## EXAMPLES
### Example 1: Bind the arrow key to a function
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
} ```
-## Parameters
+## PARAMETERS
### -BriefDescription
This cmdlet supports the common parameters: -Debug, -ErrorAction,
For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlineoption (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PSReadLine/Set-PSReadLineOption.md
Title: Set-PSReadLineOption
--- # Set-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Customizes the behavior of command line editing in **PSReadLine**.
-## Syntax
+## SYNTAX
``` Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-HistoryNoDuplicates]
Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-His
[-PredictionViewStyle <PredictionViewStyle>] [-Colors <Hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineOption` cmdlet customizes the behavior of the **PSReadLine** module when you're editing the command line. To view the **PSReadLine** settings, use `Get-PSReadLineOption`.
-## Examples
+## EXAMPLES
### Example 1: Set foreground and background colors
block object.
For more information, see [about_Providers](/powershell/module/microsoft.powershell.core/about/about_providers).
-## Parameters
+## PARAMETERS
### -AddToHistoryHandler
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Set-PSReadLineOption.`
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_PSReadLine](./About/about_PSReadLine.md)
PackageManagement Find Package (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Find-Package.md
Title: Find-Package
--- # Find-Package
-## Synopsis
+## SYNOPSIS
Finds software packages in available package sources.
-## Syntax
+## SYNTAX
### NuGet
Find-Package [-IncludeDependencies] [-AllVersions] [-Source <String[]>] [-Creden
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` and `Get-PackageSource` display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Find all available packages from a package provider
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transfor
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... ```
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### None `Find-Package` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentify[] `Find-Package` outputs a **SoftwareIdentity** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Find Packageprovider (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Find-PackageProvider.md
Title: Find-PackageProvider
--- # Find-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of Package Management package providers available for installation.
-## Syntax
+## SYNTAX
``` Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-IncludeDependencies]
Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-
[-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in package sources registered with PowerShellGet. These are package providers available for
the PowerShell Gallery with the **PackageManagement** and **Provider** tags.
`Find-PackageProvider` also finds matching Package Management providers that are available in the Package Management Azure Blob store. Use the bootstrapper provider to find and install them.
-## Examples
+## EXAMPLES
### Example 1: Find all available package providers
Find-PackageProvider -Name "Gistprovider" -Source "PSGallery"
This command finds a package provider available by using a specified package source.
-## Parameters
+## PARAMETERS
### -AllVersions
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
+## INPUTS
-## Outputs
+## OUTPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into `Install-PackageProvider` to install the results of `Find-PackageProvider`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Package (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Get-Package.md
Title: Get-Package
# Get-Package
-## Synopsis
+## SYNOPSIS
Returns a list of all software packages that were installed with **PackageManagement**.
-## Syntax
+## SYNTAX
### NuGet
Get-Package [[-Name] <String[]>] [-RequiredVersion <String>] [-MinimumVersion <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Package` cmdlet returns a list of all software packages on the local computer that were installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as part of an `Invoke-Command` or `Enter-PSSession` command or script.
-## Examples
+## EXAMPLES
### Example 1: Get all installed packages
Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package
**RequiredVersion** parameter is a specific version of the package. The object is sent down the pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package.
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packageprovider (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Get-PackageProvider.md
Title: Get-PackageProvider
--- # Get-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of package providers that are connected to Package Management.
-## Syntax
+## SYNTAX
``` Get-PackageProvider [[-Name] <String[]>] [-ListAvailable] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or part of one or more provider names.
-## Examples
+## EXAMPLES
### Example 1: Get all currently loaded package providers
Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider installed.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageProvider[]
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packagesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Get-PackageSource.md
Title: Get-PackageSource
--- # Get-PackageSource
-## Synopsis
+## SYNOPSIS
Gets a list of package sources that are registered for a package provider.
-## Syntax
+## SYNTAX
### NuGet
Get-PackageSource [[-Name] <String>] [-Location <String>] [-Force] [-ForceBootst
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageSource` cmdlet gets a list of package sources that are registered with **PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` gets only those sources that are associated with the specified provider. Otherwise, the command returns all package sources that are registered with **PackageManagement**.
-## Examples
+## EXAMPLES
### Example 1: Get all package sources
MyNuget NuGet False https://www.nuget.org/api/v2
`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object is sent down the pipeline to `Get-PackageSource`.
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageSource[] Specifies one or more package sources.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
Specifies one or more package sources.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Import Packageprovider (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Import-PackageProvider.md
Title: Import-PackageProvider
--- # Import-PackageProvider
-## Synopsis
+## SYNOPSIS
Adds Package Management package providers to the current session.
-## Syntax
+## SYNTAX
``` Import-PackageProvider [-Name] <String[]> [-RequiredVersion <String>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. The provider that you import must be installed on the local computer.
Due to security reasons, **PackageManagement** requires C#-based providers to co
injected, see the `.csproj` project files on [https://github.com/oneget/oneget](https://github.com/oneget/oneget).
-## Examples
+## EXAMPLES
### Example 1: Import a package provider from the local computer
Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose
This command finds, installs, and imports a specific version of the Nuget package provider.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Implementation.PackageProvider You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into `Import-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Package (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Install-Package.md
Title: Install-Package
# Install-Package
-## Synopsis
+## SYNOPSIS
Installs one or more software packages.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-Package [-Credential <PSCredential>] [-Proxy <Uri>] [-ProxyCredential <P
[-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Package` cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Install a package by package name
PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -Maxi
**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The highest version in the range is installed.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Install-Package` accepts input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Packageprovider (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Install-PackageProvider.md
Title: Install-PackageProvider
--- # Install-PackageProvider
-## Synopsis
+## SYNOPSIS
Installs one or more Package Management package providers.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-PackageProvider [-Scope <String>] [-InputObject] <SoftwareIdentity[]> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-PackageProvider` cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules
them to your target computer. Use the following steps to do this:
Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider to the current Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Install a package provider from the PowerShell Gallery
so that only the current user can use it.
Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser ```
-## Parameters
+## PARAMETERS
### -AllVersions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a **SoftwareIdentity** object that can be piped into `Install-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProv
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-PackageProvider](Find-PackageProvider.md)
PackageManagement Register Packagesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Register-PackageSource.md
Title: Register-PackageSource
--- # Register-PackageSource
-## Synopsis
+## SYNOPSIS
Adds a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch
Register-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [[-Name]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package sources are always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.
-## Examples
+## EXAMPLES
### Example 1: Register a package source for the NuGet provider
Name ProviderName IsTrusted Location
MyNuGet NuGet False https://www.nuget.org/api/v2 ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Save Package (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Save-Package.md
Title: Save-Package
--- # Save-Package
-## Synopsis
+## SYNOPSIS
Saves packages to the local computer without installing them.
-## Syntax
+## SYNTAX
### PackageBySearch
Save-Package [-Path <String>] [-LiteralPath <String>] [-Credential <PSCredential
[-RoleCapability <String[]>] [-Command <String[]>] [-AcceptLicense] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The **Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same command.
-## Examples
+## EXAMPLES
### Example 1: Save a package to the local computer
PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg
`Save-Package` downloads the package file and its dependencies to the local computer. `Install-Package` installs the package and dependencies from the specified directory.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Save-Package` accepts objects from the pipeline.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Set Packagesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Set-PackageSource.md
Title: Set-PackageSource
--- # Set-PackageSource
-## Synopsis
+## SYNOPSIS
Replaces a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch (Default)
Set-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PackageSource` replaces a package source for a specified package provider. Package sources are always managed by a package provider.
-## Examples
+## EXAMPLES
### Example 1: Change a package source
eliminates prompts to verify the source when packages are installed.
PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Set-PackageSource` doesn't accept pipeline input.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Uninstall Package (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Uninstall-Package.md
Title: Uninstall-Package
# Uninstall-Package
-## Synopsis
+## SYNOPSIS
Uninstalls one or more software packages.
-## Syntax
+## SYNTAX
### PackageByInputObject
Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm]
[-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To find installed packages, use the `Get-Package` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a package
parameter:
`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )`
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
### SoftwareIdentity `Uninstall-Package` accepts **SoftwareIdentity** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### SoftwareIdentity `Uninstall-Package` returns a **SoftwareIdentity** object for each package uninstalled.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
and includes the provider's parameter set. For example, `Uninstall-Package` has
**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Unregister Packagesource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PackageManagement/Unregister-PackageSource.md
Title: Unregister-PackageSource
# Unregister-PackageSource
-## Synopsis
+## SYNOPSIS
Removes a registered package source.
-## Syntax
+## SYNTAX
### SourceBySearch
Unregister-PackageSource [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Unregister a package source for the Nuget provider
parameter:
`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )`
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Unregister-PackageSource` accepts **PackageSource** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### `Unregister-PackageSource` doesn't generate any output.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets and includes the provider's parameter set.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PowerShellGet Find Command (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Find-Command.md
Title: Find-Command
# Find-Command
-## Synopsis
+## SYNOPSIS
Finds PowerShell commands in modules.
-## Syntax
+## SYNTAX
### All
Find-Command [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <Strin
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and workflows. `Find-Command` searches modules in registered repositories.
For each command found by `Find-Command`, a **PSGetCommandInfo** object is retur
**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module that contains the command.
-## Examples
+## EXAMPLES
### Example 1: Find all commands in a specified repository
VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modul
optional parameter, but displays status output in the PowerShell console. The verbose output is beneficial for troubleshooting.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetCommandInfo `Find-Command` outputs a **PSGetCommandInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Dscresource (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Find-DscResource.md
Title: Find-DscResource
# Find-DscResource
-## Synopsis
+## SYNOPSIS
Finds Desired State Configuration (DSC) resources.
-## Syntax
+## SYNTAX
### All
Find-DscResource [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <S
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in modules. By default `Find-DscResource` searches all registered repositories.
For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object i
**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module.
-## Examples
+## EXAMPLES
### Example 1: Find all DSC resources
xDSCFirewall 1.6.21 xDSCFirewall PSGallery
dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetDscResourceInfo `Find-DscResource` returns a **PSGetDscResourceInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Find-Module.md
Title: Find-Module
--- # Find-Module
-## Synopsis
+## SYNOPSIS
Finds modules in a repository that match specified criteria.
-## Syntax
+## SYNTAX
### All
Find-Module [[-Name] <string[]>] [-MinimumVersion <string>] [-MaximumVersion <st
[-Credential <pscredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. `Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be
The following examples use the [PowerShell Gallery](https://www.powershellgaller
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find a module by name
Version Name Repository Description
The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo `Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets such as `Install-Module`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
such as `Install-Module`.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Find Rolecapability (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Find-RoleCapability.md
Title: Find-RoleCapability
# Find-RoleCapability
-## Synopsis
+## SYNOPSIS
Finds role capabilities in modules.
-## Syntax
+## SYNTAX
### All
Find-RoleCapability [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role capabilities and modules.
PowerShell role capabilities define which commands and applications are availabl
Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` extension.
-## Examples
+## EXAMPLES
### Example 1: Find role capabilities
The object is sent down the pipeline. `Install-Module` uses the **Verbose** para
status messages during the installation. After the install is finished, the `Get-InstalledModule` output confirms that the **JeaExamples** module was installed.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.Uri ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSGetRoleCapabilityInfo The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md)
PowerShellGet Find Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Find-Script.md
Title: Find-Script
--- # Find-Script
-## Synopsis
+## SYNOPSIS
Finds a script.
-## Syntax
+## SYNTAX
``` Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>]
Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <St
[-Repository <String[]>] [-Credential <PSCredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Script` cmdlet finds a specified script in registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Find all available scripts
Version Name Type Repository D
This command uses the wildcard character (`*`) to find scripts that begin with Required-Script.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Installedmodule (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Get-InstalledModule.md
Title: Get-InstalledModule
--- # Get-InstalledModule
-## Synopsis
+## SYNOPSIS
Gets a list of modules on the computer that were installed by PowerShellGet.
-## Syntax
+## SYNTAX
``` Get-InstalledModule [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllVersions] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` command.
-## Examples
+## EXAMPLES
### Example 1: Get all installed modules
Version Name Type Repository Descrip
This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
PowerShellGet Get Installedscript (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Get-InstalledScript.md
Title: Get-InstalledScript
--- # Get-InstalledScript
-## Synopsis
+## SYNOPSIS
Gets an installed script.
-## Syntax
+## SYNTAX
``` Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes.
-## Examples
+## EXAMPLES
### Example 1: Get all installed scripts
Version Name Type Repository D
This command gets scripts where the name begins with **Required-Scri**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Psrepository (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Get-PSRepository.md
Title: Get-PSRepository
--- # Get-PSRepository
-## Synopsis
+## SYNOPSIS
Gets PowerShell repositories.
-## Syntax
+## SYNTAX
``` Get-PSRepository [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the current user.
-## Examples
+## EXAMPLES
### Example 1: Get all module repositories
ProviderOptions : {}
This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Register-PSRepository](Register-PSRepository.md)
PowerShellGet Install Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Install-Module.md
Title: Install-Module
--- # Install-Module
-## Synopsis
+## SYNOPSIS
Downloads one or more modules from a repository, and installs them on the local computer.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Module [-InputObject] <PSObject[]> [-Credential <PSCredential>] [-Scope
[-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online repository. The cmdlet verifies that search results are valid modules and copies the module folders
These examples use the [PowerShell Gallery](https://www.powershellgallery.com/)
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find and install a module
The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet*
`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current user's directory, `$home\Documents\PowerShell\Modules`.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### PSRepositoryItemInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSRepositoryItemInfo When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object for the module. This is the same information that you get from the `Find-Module` cmdlet.
-## Notes
+## NOTES
`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later releases of Windows.
the **RequiredVersion** value.
A module installation will also install any dependent modules specified as required by the module publisher. The publisher will specify the required modules and their versions in the module manifest.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Install Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Install-Script.md
Title: Install-Script
--- # Install-Script
-## Synopsis
+## SYNOPSIS
Installs a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Script [-InputObject] <PSObject[]> [-Scope <String>] [-NoPathUpdate] [-P
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the payload is a valid PowerShell script, and copies the script file to a specified installation
cmdlets. When operating against multiple repositories, `Install-Script` installs
that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) from the first repository without any error.
-## Examples
+## EXAMPLES
### Example 1: Find a script and install it
repository.
The final command gets installed scripts and displays the results.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet New Scriptfileinfo (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/New-ScriptFileInfo.md
Title: New-ScriptFileInfo
# New-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Creates a script file with metadata.
-## Syntax
+## SYNTAX
### All
New-ScriptFileInfo [[-Path] <String>] [-Version <String>] [-Author <String>] -De
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the script.
script.
The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more information, see [about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Create a script file and specify its version, author, and description
Feature 5
Param() ```
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md)
PowerShellGet Publish Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Publish-Module.md
Title: Publish-Module
# Publish-Module
-## Synopsis
+## SYNOPSIS
Publishes a specified module from the local computer to an online gallery.
-## Syntax
+## SYNTAX
### ModuleNameParameterSet (Default)
Publish-Module -Path <String> [-NuGetApiKey <String>] [-Repository <String>]
[-SkipAutomaticTags] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, stored as part of a user's profile in the gallery. You can specify the module to publish either by
from the module manifest, some metadata must be specified in `Publish-Module` pa
**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters match fields in a NuGet-based gallery.
-## Examples
+## EXAMPLES
### Example 1: Publish a module
specifies a name, version, description, and author, an error occurs.
Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -LicenseUri "http://contoso.com/license" -Tag "Active Directory","DSC" -ReleaseNote "Updated the ActiveDirectory DSC Resources to support adding users." ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.
module manifest, but some metadata can be specified in `Publish-Module` paramete
**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. For more information, see [Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui).
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Publish Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Publish-Script.md
Title: Publish-Script
--- # Publish-Script
-## Synopsis
+## SYNOPSIS
Publishes a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Publish-Script -LiteralPath <String> [-NuGetApiKey <String>] [-Repository <Strin
[-Credential <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Script` cmdlet publishes the specified script to the online gallery.
-## Examples
+## EXAMPLES
### Example 1: Create a script file, add content to it, and publish it
The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Scrip
the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for `Demo-Script.ps1` in the **LocalRepo1** repository.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Register Psrepository (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Register-PSRepository.md
Title: Register-PSRepository
--- # Register-PSRepository
-## Synopsis
+## SYNOPSIS
Registers a PowerShell repository.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSRepository [-Default] [-InstallationPolicy <String>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and
specific type of repository. For example, the NuGet provider is designed to inte
NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet attempts to find a OneGet provider that can handle the specified source location.
-## Examples
+## EXAMPLES
### Example 1: Register a repository
PowerShellGet polls available package providers and associates it with the NuGet
The second command gets registered repositories and displays the results.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSCredential ### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Save Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Save-Module.md
Title: Save-Module
# Save-Module
-## Synopsis
+## SYNOPSIS
Saves a module and its dependencies on the local computer but doesn't install the module.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Module [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. `Save-Module` downloads and saves the most current version of a module. The files are saved to a
inspection by an administrator. The saved module can then be copied into the app
`Get-PSRepository` displays the local computer's registered repositories. You can use the `Find-Module` cmdlet to search registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Save a module
The object is sent down the pipeline to `Save-Module`. The **Path** parameter sp
store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents of **Path** where the files are stored.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Save Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Save-Script.md
Title: Save-Script
# Save-Script
-## Synopsis
+## SYNOPSIS
Saves a script.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Script [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Script` cmdlet saves the specified script.
-## Examples
+## EXAMPLES
### Example 1: Save a script and validate the script's metadata
Version Name Author Description
specifies where to find the script. The script is saved in the location specified by the **Path** parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Set Psrepository (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Set-PSRepository.md
Title: Set-PSRepository
--- # Set-PSRepository
-## Synopsis
+## SYNOPSIS
Sets values for a registered repository.
-## Syntax
+## SYNTAX
``` Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <Uri>]
Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <U
[-PackageManagementProvider <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are persistent for the current user and apply to all versions of PowerShell installed for that user.
-## Examples
+## EXAMPLES
### Example 1: Set the installation policy for a repository
Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.
This command sets the source location and publish location for **myInternalSource** to the specified URIs.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Test Scriptfileinfo (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Test-ScriptFileInfo.md
Title: Test-ScriptFileInfo
--- # Test-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Validates a comment block for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Test-ScriptFileInfo [-Path] <String> [<CommonParameters>]
Test-ScriptFileInfo -LiteralPath <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns information about where the error is located or how to correct it.
-## Examples
+## EXAMPLES
### Example 1: Test a script file
At line:1 char:1
This command tests the script file Hello-World.ps1, which has no metadata associated with it.
-## Parameters
+## PARAMETERS
### -LiteralPath
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
PowerShellGet Uninstall Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Uninstall-Module.md
Title: Uninstall-Module
# Uninstall-Module
-## Synopsis
+## SYNOPSIS
Uninstalls a module.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Module [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Module [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a module
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the pipeline to `Uninstall-Module` and is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Uninstall Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Uninstall-Script.md
Title: Uninstall-Script
# Uninstall-Script
-## Synopsis
+## SYNOPSIS
Uninstalls a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a script
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script
`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the pipeline to `Uninstall-Script` and the script is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Unregister Psrepository (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Unregister-PSRepository.md
Title: Unregister-PSRepository
--- # Unregister-PSRepository
-## Synopsis
+## SYNOPSIS
Unregisters a repository.
-## Syntax
+## SYNTAX
``` Unregister-PSRepository [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSRepository` cmdlet unregisters a repository for the current user.
-## Examples
+## EXAMPLES
### Example 1: Unregister a repository
This example uses `Get-PSRepository` to get all registered repositories, and use
Get-PSRepository | Unregister-PSRepository ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Update Module (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Update-Module.md
Title: Update-Module
# Update-Module
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest version of specified modules from an online gallery to the local computer.
-## Syntax
+## SYNTAX
### All
Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're prompted to confirm the update before it's installed. Updates are installed only for modules that
found in `$env:PSModulePath`, an error is displayed.
To display the installed modules, use `Get-InstalledModule`.
-## Examples
+## EXAMPLES
### Example 1: Update all modules
Update-Module -Name SpeculationControl -Force
`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The **Force** parameter updates the module without requesting user confirmation.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
For PowerShell version 6.0 and above, the default installation scope is always **CurrentUser**. Module updates for **CurrentUser**, `$home\Documents\PowerShell\Modules`, don't need elevated
If `Update-Module` attempts to update binaries that are in use, `Update-Module`
that identifies the problem processes. The user is informed to retry `Update-Module` after the processes are stopped.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Update Modulemanifest (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Update-ModuleManifest.md
Title: Update-ModuleManifest
# Update-ModuleManifest
-## Synopsis
+## SYNOPSIS
Updates a module manifest file.
-## Syntax
+## SYNTAX
### All
Update-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>
[-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file.
-## Examples
+## EXAMPLES
### Example 1: Update a module manifest
Update-ModuleManifest @Parms
**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Parms` and updates the module manifest, **TestManifest.psd1**.
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Update Script (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Update-Script.md
Title: Update-Script
# Update-Script
-## Synopsis
+## SYNOPSIS
Updates a script.
-## Syntax
+## SYNTAX
### All
Update-Script [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated script is downloaded from the same repository as the installed version.
-## Examples
+## EXAMPLES
### Example 1: Update the specified script
Version Name Repository Description
parameter specifies the script version. `Get-InstalledScript` displays the updated version of the script.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Update Scriptfileinfo (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/PowerShellGet/Update-ScriptFileInfo.md
Title: Update-ScriptFileInfo
# Update-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Updates information for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Update-ScriptFileInfo [-LiteralPath] <String> [-Version <String>] [-Author <Stri
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for version, author, or description.
-## Examples
+## EXAMPLES
### Example 1: Update the version of a script file
Param()
**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the script. The **PassThru** parameter displays the script's contents in the PowerShell console.
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values for version, GUID, description, and author.
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
ThreadJob Start Threadjob (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/ThreadJob/Start-ThreadJob.md
Title: Start-ThreadJob
--- # Start-ThreadJob
-## Synopsis
+## SYNOPSIS
Creates background jobs similar to the `Start-Job` cmdlet.
-## Syntax
+## SYNTAX
### ScriptBlock
Start-ThreadJob [-FilePath] <String> [-Name <String>] [-InitializationScript <Sc
[-StreamingHost <PSHost>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Start-ThreadJob` creates background jobs similar to the `Start-Job` cmdlet. The main difference is that the jobs which are created run in separate threads within the local process. By default, the
The cmdlet also supports a **ThrottleLimit** parameter to limit the number of jo
time. As more jobs are started, they are queued and wait until the current number of jobs drops below the throttle limit.
-## Examples
+## EXAMPLES
### Example 1 - Create background jobs with a thread limit of 2
Notice that the prompt from `Read-Host` is displayed and you are able to type in
message from `Write-Warning` is displayed. The `Receive-Job` cmdlet returns all the output from the job.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### ThreadJob.ThreadJob
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Start-Job](../Microsoft.PowerShell.Core/Start-Job.md)
CimCmdlets Get Cimassociatedinstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Get-CimAssociatedInstance.md
Title: Get-CimAssociatedInstance
# Get-CimAssociatedInstance
-## Synopsis
+## SYNOPSIS
Retrieves the CIM instances that are connected to a specific CIM instance by an association.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimAssociatedInstance [[-Association] <String>] [-ResultClassName <String>]
[-ResourceUri <Uri>] -CimSession <CimSession[]> [-KeyOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the InputObject parameter is not specified, the cmdlet works in one of the fo
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get all the associated instances of a specific instance
named `$s`. The association class name for the **Win32_DependentService** is ret
the `Get-CimAssociatedInstance` cmdlet to get all the associated instances of the retrieved association class.
-## Parameters
+## PARAMETERS
### -Association
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets Get Cimclass (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Get-CimClass.md
Title: Get-CimClass
# Get-CimClass
-## Synopsis
+## SYNOPSIS
Gets a list of CIM classes in a specific namespace.
-## Syntax
+## SYNTAX
### ComputerSet (Default)
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutS
[-QualifierName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-CimClass` cmdlet retrieves a list of CIM classes in a specific namespac
class name supplied, then the cmdlet returns all the classes in the namespace. Unlike a CIM instance, CIM classes do not contain the CIM session or computer name from which they are retrieved.
-## Examples
+## EXAMPLES
### Example 1: Get all the class definitions
Get-CimClass -ClassName *disk* -CimSession $s
This set of commands creates a session with multiple computers and stores it into a variable `$s` using the `New-CimSession` cmdlet, and then gets the classes using the `Get-CimClass` cmdlet.
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimClass This cmdlet returns a CIM class object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimSession](New-CimSession.md)
CimCmdlets Get Ciminstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Get-CimInstance.md
Title: Get-CimInstance
# Get-CimInstance
-## Synopsis
+## SYNOPSIS
Gets the CIM instances of a class from a CIM server.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-Namespace <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
- If the either the **ComputerName** parameter or the **CimSession** parameter is specified, then this cmdlet uses the either the CimSession parameter value or **ComputerName** parameter value.
-## Examples
+## EXAMPLES
### Example 1: Get the CIM instances of a specified class
$s = New-CimSession -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s ```
-## Parameters
+## PARAMETERS
### -CimSession
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
+## INPUTS
### CIM Instance This cmdlet accepts an input objects specified with the InputObject parameter.
-## Outputs
+## OUTPUTS
### CIM Instance This cmdlet returns one or more CIM instance objects representing a snapshot of the CIM instances on the CIM server.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Get Cimsession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Get-CimSession.md
Title: Get-CimSession
# Get-CimSession
-## Synopsis
+## SYNOPSIS
Gets the CIM session objects from the current session.
-## Syntax
+## SYNTAX
### ComputerNameSet (Default)
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
sessions that were created in other PowerShell sessions or that were created on
For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
-## Examples
+## EXAMPLES
### Example 1: Get CIM sessions from the current PowerShell session
ComputerName : Server02
Protocol : WSMAN ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Table](../microsoft.powershell.utility/format-table.md)
CimCmdlets Import Binarymilog (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Import-BinaryMiLog.md
Title: Import-BinaryMiLog
# Import-BinaryMiLog
-## Synopsis
+## SYNOPSIS
Used to re-create the saved objects based on the contents of an export file.
-## Syntax
+## SYNTAX
``` Import-BinaryMiLog [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
Use this cmdlet to re-create saved objects based on the contents of an export fi
`Export-BinaryMILog`. This cmdlet is similar to `Import-Clixml`, except that `Export-BinaryMILog` stores the resulting object in a binary encoded file.
-## Examples
+## EXAMPLES
### Example 1 - Restore objects exported to a file
stores the resulting object in a binary encoded file.
Import-BinaryMiLog -Path "Processes.bmil" ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
CimCmdlets Invoke Cimmethod (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Invoke-CimMethod.md
Title: Invoke-CimMethod
# Invoke-CimMethod
-## Synopsis
+## SYNOPSIS
Invokes a method of a CIM class.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Invoke-CimMethod -Query <String> [-QueryDialect <String>] -CimSession <CimSessio
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not a common scenario.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' } ```
-## Parameters
+## PARAMETERS
### -Arguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### CIM class
This cmdlet accepts a CIM class as an input object.
This cmdlet accepts a CIM instance as an input object.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject This cmdlet returns an object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Ciminstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/New-CimInstance.md
Title: New-CimInstance
# New-CimInstance
-## Synopsis
+## SYNOPSIS
Creates a CIM instance.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
New-CimInstance [-CimClass] <CimClass> [[-Property] <IDictionary>] [-OperationTi
[-ComputerName <String[]>] [-ClientOnly] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `New-CimInstance` cmdlet creates an instance of a CIM class based on the cla
either the local computer or a remote computer. By default, the `New-CimInstance` cmdlet creates an instance on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Create an instance of a CIM class
that **Prop1** and **Prop2** actually exist and that the keys are marked correct
You cannot use the **ComputerName** or **CimSession** parameter with the **ClientOnly** parameter.
-## Parameters
+## PARAMETERS
### -CimClass
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains the CIM instance information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimClass](get-cimclass.md)
CimCmdlets New Cimsession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/New-CimSession.md
Title: New-CimSession
--- # New-CimSession
-## Synopsis
+## SYNOPSIS
Creates a CIM session.
-## Syntax
+## SYNTAX
### CredentialParameterSet (Default)
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-
[-SessionOption <CimSessionOptions>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
identifiers.
This cmdlet returns a CIM session object that can be used by all other CIM cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session with default options
$SessionOption = New-CimSessionOption -Protocol DCOM
New-CimSession -ComputerName Server1 -SessionOption $SessionOption ```
-## Parameters
+## PARAMETERS
### -Authentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet accepts no inputs.
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimSession
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)
CimCmdlets New Cimsessionoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/New-CimSessionOption.md
Title: New-CimSessionOption
# New-CimSessionOption
-## Synopsis
+## SYNOPSIS
Specifies advanced options for the New-CimSession cmdlet.
-## Syntax
+## SYNTAX
### ProtocolTypeSet (Default)
New-CimSessionOption [-Impersonation <ImpersonationType>] [-PacketIntegrity] [-P
[-UICulture <CultureInfo>] [-Culture <CultureInfo>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet has two parameter sets, one for WsMan options and one for Distribute
Model (DCOM) options. Depending on which parameters you use, the cmdlet returns either an instance of DCOM session options or returns WsMan session options.
-## Examples
+## EXAMPLES
### Example 1: Create a CIM session options object for DCOM
This example specifies the culture that is used for the CIM session. By default,
client is used when performing operations. However, the default culture can be overridden using the **Culture** parameter.
-## Parameters
+## PARAMETERS
### -Culture
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### CIMSessionOption This cmdlet returns an object that contains CIM session options information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
CimCmdlets Register Cimindicationevent (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Register-CimIndicationEvent.md
Title: Register-CimIndicationEvent
--- # Register-CimIndicationEvent
-## Synopsis
+## SYNOPSIS
Subscribes to indications using a filter expression or a query expression.
-## Syntax
+## SYNTAX
### ClassNameComputerSet (Default)
Register-CimIndicationEvent [-Namespace <String>] [-Query] <String> [-QueryDiale
[-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
a query expression. Use the **SourceIdentifier** parameter give a name to the su
This cmdlet returns an **EventSubscription** object. You can use this object to cancel the subscription.
-## Examples
+## EXAMPLES
### Example 1: Register the events generated by a class
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifi
Get-Event -SourceIdentifier "ProcessStarted" ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet outputs an **EventSubscription** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Event](../microsoft.powershell.utility/get-event.md)
CimCmdlets Remove Ciminstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Remove-CimInstance.md
Title: Remove-CimInstance
--- # Remove-CimInstance
-## Synopsis
+## SYNOPSIS
Removes a CIM instance from a computer.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Remove-CimInstance [-ComputerName <String[]>] [[-Namespace] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is not specified, the cmdlet works in one of th
cmdlet works against the CIM server specified by either the **ComputerName** parameter or the **CimSession** parameter.
-## Examples
+## EXAMPLES
### Example 1: Remove the CIM instance
$var = Get-CimInstance -Query 'Select * from Win32_Process where name LIKE "note
Remove-CimInstance -InputObject $var ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### None This cmdlet produces no outputs.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-CimInstance](New-CimInstance.md)
CimCmdlets Remove Cimsession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Remove-CimSession.md
Title: Remove-CimSession
# Remove-CimSession
-## Synopsis
+## SYNOPSIS
Removes one or more CIM sessions.
-## Syntax
+## SYNTAX
### CimSessionSet (Default)
Remove-CimSession -InstanceId <Guid[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-CimSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Remove-CimSession` cmdlet removes one or more CIM session objects from the local PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove all the CIM sessions
but only output what would happen if it were done.
Remove-CimSession -Name a* -WhatIf ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet accepts no input objects.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns an object that contains CIM session information.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimSession](Get-CimSession.md)
CimCmdlets Set Ciminstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/CimCmdlets/Set-CimInstance.md
Title: Set-CimInstance
--- # Set-CimInstance
-## Synopsis
+## SYNOPSIS
Modifies a CIM instance on a CIM server by calling the ModifyInstance method of the CIM class.
-## Syntax
+## SYNTAX
### CimInstanceComputerSet (Default)
Set-CimInstance [-ComputerName <String[]>] [-Namespace <String>] [-OperationTime
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If the **InputObject** parameter is specified, the cmdlet works in one of the fo
this cmdlet uses the either the **CimSession** parameter value or **ComputerName** parameter value. This is not very common.
-## Examples
+## EXAMPLES
### Example 1: Set the CIM instance
$x = New-CimInstance -ClassName Win32_Environment -Property @{Name="testvar";Use
Set-CimInstance -CimInstance $x -Property @{VariableValue="somevalue"} -PassThru ```
-## Parameters
+## PARAMETERS
### -CimSession
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### Microsoft.Management.Infrastructure.CimInstance
-## Outputs
+## OUTPUTS
### Microsoft.Management.Infrastructure.CimInstance When the **Passthru** parameter is specified, this cmdlet returns a modified CIM instance object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-CimInstance](get-ciminstance.md)
Microsoft.PowerShell.Archive Compress Archive (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Archive/Compress-Archive.md
Title: Compress-Archive
# Compress-Archive
-## Synopsis
+## SYNOPSIS
Creates a compressed archive, or zipped file, from specified files and directories.
-## Syntax
+## SYNTAX
### Path (Default)
Compress-Archive -LiteralPath <String[]> [-DestinationPath] <String> [-Compressi
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compress-Archive` cmdlet creates a compressed, or zipped, archive file from one or more specified files or directories. An archive packages multiple files, with optional compression, into
The maximum file size is 2 GB because there's a limitation of the underlying API
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Compress files to create an archive file
The command updates `Draft.Zip` with newer versions of existing files in the `C:
directory and its subdirectories. And, new files that were added to `C:\Reference` or its subdirectories are included in the updated `Draft.Zip` archive.
-## Parameters
+## PARAMETERS
### -CompressionLevel
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo The cmdlet only returns a **FileInfo** object when you use the **PassThru** parameter.
-## Notes
+## NOTES
Using recursion and sending objects down the pipeline can duplicate files in your archive. For example, if you use `Get-ChildItem` with the **Recurse** parameter, each **FileInfo** and
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Expand-Archive](Expand-Archive.md)
Microsoft.PowerShell.Archive Expand Archive (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Archive/Expand-Archive.md
Title: Expand-Archive
# Expand-Archive
-## Synopsis
+## SYNOPSIS
Extracts files from a specified archive (zipped) file.
-## Syntax
+## SYNTAX
### Path (Default)
Expand-Archive -LiteralPath <String> [[-DestinationPath] <String>] [-Force] [-Pa
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Expand-Archive` cmdlet extracts files from a specified zipped archive file to a specified destination folder. An archive file allows multiple files to be packaged, and optionally compressed, into a single zipped file for easier distribution and storage.
-## Examples
+## EXAMPLES
### Example 1: Extract the contents of an archive
specified by the **DestinationPath** parameter.
Expand-Archive -Path Draftv2.Zip -DestinationPath C:\Reference ```
-## Parameters
+## PARAMETERS
### -DestinationPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to an existing archive file.
-## Outputs
+## OUTPUTS
### System.IO.FileSystemInfo When the `-PassThru` parameter is used, the cmdlet outputs a list of files that were expanded from the archive.
-## Notes
+## NOTES
The [ZIP file specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) does not specify a standard way of encoding filenames that contain non-ASCII characters. The
scheme. When extracting files with filenames not stored using UTF-8 encoding, `E
the raw value found in the archive. This can result in a filename that is different than the source filename stored in the archive.
-## Related links
+## RELATED LINKS
[Compress-Archive](compress-archive.md)
Microsoft.PowerShell.Core About Language Keywords (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/About/about_Language_Keywords.md
--- description: Describes the keywords in the PowerShell scripting language. Locale: en-US Previously updated : 06/25/2021 Last updated : 03/07/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_keywords?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 Title: about Language Keywords
about topic for the keyword and the information that follows the table.
| Keyword | Reference | | ------------ | ----------------------------------------------------------------------------------------------------------------- |
-| Begin | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Break | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
-| Catch | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Class | [about_Classes](about_Classes.md) |
-| Continue | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
-| Data | [about_Data_Sections](about_Data_Sections.md) |
-| Define | Reserved for future use |
-| Do | [about_Do](about_Do.md), [about_While](about_While.md) |
-| DynamicParam | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
-| Else | [about_If](about_If.md) |
-| Elseif | [about_If](about_If.md) |
-| End | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Enum | [about_Enum](about_Enum.md) |
-| Exit | [Described in this topic](#exit) |
-| Filter | [about_Functions](about_Functions.md) |
-| Finally | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| For | [about_For](about_For.md) |
-| ForEach | [about_ForEach](about_ForEach.md) |
-| From | Reserved for future use |
-| Function | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Hidden | [about_Hidden](about_Hidden.md) |
-| If | [about_If](about_If.md) |
-| In | [about_ForEach](about_ForEach.md) |
-| Param | [about_Functions](about_Functions.md) |
-| Process | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
-| Return | [about_Return](about_Return.md) |
-| Static | [about_Classes](about_Classes.md) |
-| Switch | [about_Switch](about_Switch.md) |
-| Throw | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
-| Trap | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Try | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
-| Until | [about_Do](about_Do.md) |
-| Using | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
-| Var | Reserved for future use |
-| While | [about_While](about_While.md), [about_Do](about_Do.md) |
+| `begin` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `break` | [about_Break](about_Break.md), [about_Trap](about_Trap.md) |
+| `catch` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `class` | [about_Classes](about_Classes.md) |
+| `continue` | [about_Continue](about_Continue.md), [about_Trap](about_Trap.md) |
+| `data` | [about_Data_Sections](about_Data_Sections.md) |
+| `define` | Reserved for future use |
+| `do` | [about_Do](about_Do.md), [about_While](about_While.md) |
+| `dynamicparam` | [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) |
+| `else` | [about_If](about_If.md) |
+| `elseif` | [about_If](about_If.md) |
+| `end` | [about_Functions](about_Functions.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `enum` | [about_Enum](about_Enum.md) |
+| `exit` | [Described in this topic](#exit) |
+| `filter` | [about_Functions](about_Functions.md) |
+| `finally` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `for` | [about_For](about_For.md) |
+| `foreach` | [about_ForEach](about_ForEach.md) |
+| `from` | Reserved for future use |
+| `function` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `hidden` | [about_Hidden](about_Hidden.md) |
+| `if` | [about_If](about_If.md) |
+| `in` | [about_ForEach](about_ForEach.md) |
+| `param` | [about_Functions](about_Functions.md) |
+| `process` | [about_Functions](about_Functions.md), [about_Functions_Advanced](about_Functions_Advanced.md) |
+| `return` | [about_Return](about_Return.md) |
+| `static` | [about_Classes](about_Classes.md) |
+| `switch` | [about_Switch](about_Switch.md) |
+| `throw` | [about_Throw](about_Throw.md), [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) |
+| `trap` | [about_Trap](about_Trap.md), [about_Break](about_Break.md), [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `try` | [about_Try_Catch_Finally](about_Try_Catch_Finally.md) |
+| `until` | [about_Do](about_Do.md) |
+| `using` | [about_Using](about_Using.md), [about_Classes](about_Classes.md) |
+| `var` | Reserved for future use |
+| `while` | [about_While](about_While.md), [about_Do](about_Do.md) |
The following keywords are used by PowerShell workflows: -- InlineScript-- Parallel-- Sequence-- Workflow
+- `inlinescript`
+- `parallel`
+- `sequence`
+- `workflow`
PowerShell workflows are only supported in PowerShell 5.1. For more information about workflows, see [Running PowerShell Commands in a Workflow](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574197(v=ws.11)).
-## Begin
+## `begin`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Process`, and `End` keywords. The `Begin` statement list runs one time before
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`process`, and `end` keywords. The `begin` statement list runs one time before
any objects are received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Break
+## `break`
Causes a script to exit a loop.
while (<condition>) {
} ```
-## Catch
+## `catch`
-Specifies a statement list to run if an error occurs in the accompanying `Try`
+Specifies a statement list to run if an error occurs in the accompanying `try`
statement list. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
try {<statement list>}
catch [[<error type>]] {<statement list>} ```
-## Class
+## `class`
Specifies a new class in PowerShell.
class <class-name> {
} ```
-## Continue
+## `continue`
Causes a script to stop running a loop and to go back to the condition. If the condition is met, the script begins the loop again.
while (<condition>) {
} ```
-## Data
+## `data`
In a script, defines a section that isolates data from the script logic. Can
-also include `If` statements and some limited commands.
+also include `if` statements and some limited commands.
Syntax:
Syntax:
data <variable> [-supportedCommand <cmdlet-name>] {<permitted content>} ```
-## Do
+## `do`
-Used with the `While` or `Until` keyword as a looping construct. PowerShell
-runs the statement list at least one time, unlike a loop that uses `While`.
+Used with the `while` or `until` keyword as a looping construct. PowerShell
+runs the statement list at least one time, unlike a loop that uses `while`.
-Syntax for `While`:
+Syntax for `while`:
```Syntax do {<statement list>} while (<condition>) ```
-Syntax for `Until`:
+Syntax for `until`:
```Syntax do {<statement list>} until (<condition>) ```
-## DynamicParam
+## `dynamicparam`
-Specifies one part of the body of a function, along with the `Begin`, `Process`,
-and `End` keywords. Dynamic parameters are added at run time.
+Specifies one part of the body of a function, along with the `begin`, `process`,
+and `end` keywords. Dynamic parameters are added at runtime.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Else
+## `else`
-Used with the `If` keyword to specify the default statement list.
+Used with the `if` keyword to specify the default statement list.
Syntax:
if (<condition>) {<statement list>}
else {<statement list>} ```
-## Elseif
+## `elseif`
-Used with the `If` and `Else` keywords to specify additional conditionals. The
-`Else` keyword is optional.
+Used with the `if` and `else` keywords to specify additional conditionals. The
+`else` keyword is optional.
Syntax:
elseif (<condition>) {<statement list>}
else {<statement list>} ```
-## End
+## `end`
-Specifies one part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. The `End` statement list runs one time after all
+Specifies one part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. The `end` statement list runs one time after all
the objects have been received from the pipeline. Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Enum
+## `enum`
`enum` is used to declare an enumeration; a distinct type that consists of a set of named labels called the enumerator list.
enum <enum-name> {
} ```
-## Exit
+## `exit`
Causes PowerShell to exit a script or a PowerShell instance.
On Unix, only positive numbers between `[byte]::MinValue` and
example, `-2` is transformed to `254`. In PowerShell, the `exit` statement sets the value of the `$LASTEXITCODE`
-variable. In the Windows Command Shell (cmd.exe), the exit statement sets the
+variable. In the Windows Command Shell (`cmd.exe`), the exit statement sets the
value of the `%ERRORLEVEL%` environment variable. Any argument that is non-numeric or outside the platform-specific range is translated to the value of `0`.
-In the following example, the user sets the error level variable value to 4 by
-adding `exit 4` to the script file `test.ps1`.
+In the following example, the user sets the error level variable value to **4**
+by adding `exit 4` to the script file `test.ps1`.
```cmd C:\scripts\test>type test.ps1
the `exit` command. If the script has no `exit` statement, the exit code is
always `0` when the script completes without error or `1` when the script terminates from an unhandled exception.
-## Filter
+## `filter`
Specifies a function in which the statement list runs one time for each input
-object. It has the same effect as a function that contains only a Process
+object. It has the same effect as a function that contains only a `process`
block. Syntax:
Syntax:
filter <name> {<statement list>} ```
-## Finally
+## `finally`
Defines a statement list that runs after statements that are associated with
-`Try` and `Catch`. A `Finally` statement list runs even if you press
-<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the Exit keyword
+`try` and `catch`. A `finally` statement list runs even if you press
+<kbd>CTRL</kbd>+<kbd>C</kbd> to leave a script or if you use the `exit` keyword
in the script. Syntax:
catch [<error type>] {<statement list>}
finally {<statement list>} ```
-## For
+## `for`
-Defines a loop by using a condition.
+Defines a loop with a condition.
Syntax:
Syntax:
for (<initialize>; <condition>; <iterate>) { <statement list> } ```
-## ForEach
+## `foreach`
-Defines a loop by using each member of a collection.
+Defines a loop using each member of a collection.
Syntax: ```Syntax
-ForEach (<item> in <collection>) { <statement list> }
+foreach (<item> in <collection>) { <statement list> }
```
-## From
+## `from`
Reserved for future use.
-## Function
+## `function`
Creates a named statement list of reusable code. You can name the scope a
-function belongs to. And, you can specify one or more named parameters by using
-the `Param` keyword. Within the function statement list, you can include
-`DynamicParam`, `Begin`, `Process`, and `End` statement lists.
+function belongs to. You can also specify one or more named parameters by using
+the `param` keyword. Within the function statement list, you can include
+`dynamicparam`, `begin`, `process`, and `end` statement lists.
Syntax: ```Syntax function [<scope:>]<name> { param ([type]<$pname1> [, [type]<$pname2>])
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>}
Syntax:
```Syntax function [<scope:>]<name> [([type]<$pname1>, [[type]<$pname2>])] {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## If
+## `if`
Defines a conditional.
Syntax:
if (<condition>) {<statement list>} ```
-## Hidden
+## `hidden`
-Hides class members from the default results of the `Get-Member` cmdlet, and
-from IntelliSense and tab completion results.
+Hides class members from the default results of the `Get-Member` cmdlet,
+IntelliSense, and tab completion results.
Syntax: ```Syntax
-Hidden [data type] $member_name
+hidden [data type] $member_name
```
-## In
+## `in`
-Used in a `ForEach` statement to create a loop that uses each member of a
+Used in a `foreach` statement to create a loop that uses each member of a
collection. Syntax: ```Syntax
-ForEach (<item> in <collection>){<statement list>}
+foreach (<item> in <collection>){<statement list>}
```
-## Param
+## `param`
Defines the parameters in a function.
function [<scope:>]<name> {
} ```
-## Process
+## `process`
-Specifies a part of the body of a function, along with the `DynamicParam`,
-`Begin`, and `End` keywords. When a `Process` statement list receives input
-from the pipeline, the `Process` statement list runs one time for each element
-from the pipeline. If the pipeline provides no objects, the `Process` statement
+Specifies a part of the body of a function, along with the `dynamicparam`,
+`begin`, and `end` keywords. When a `process` statement list receives input
+from the pipeline, the `process` statement list runs one time for each element
+from the pipeline. If the pipeline provides no objects, the `process` statement
list does not run. If the command is the first command in the pipeline, the
-`Process` statement list runs one time.
+`process` statement list runs one time.
Syntax: ```Syntax function <name> {
- DynamicParam {<statement list>}
+ dynamicparam {<statement list>}
begin {<statement list>} process {<statement list>} end {<statement list>} } ```
-## Return
+## `return`
Causes PowerShell to leave the current scope, such as a script or function, and writes the optional expression to the output.
Syntax:
return [<expression>] ```
-## Static
+## `static`
Specifies the property or method defined is common to all instances of the
-class in which is defined.
+class in which it is defined.
-See `Class` for usage examples.
+See `class` for usage examples.
-## Switch
+## `switch`
-To check multiple conditions, use a `Switch` statement. The `Switch` statement
-is equivalent to a series of `If` statements, but it is simpler.
+To check multiple conditions, use a `switch` statement. The `switch` statement
+is equivalent to a series of `if` statements, but it is simpler.
-The `Switch` statement lists each condition and an optional action. If a
+The `switch` statement lists each condition and an optional action. If a
condition obtains, the action is performed. Syntax 1:
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
} ```
-## Throw
+## `throw`
Throws an object as an error.
Syntax:
throw [<object>] ```
-## Trap
+## `trap`
Defines a statement list to be run if an error is encountered. An error type requires brackets. The second pair of brackets indicates that the error type
Syntax:
trap [[<error type>]] {<statement list>} ```
-## Try
+## `try`
Defines a statement list to be checked for errors while the statements run. If
-an error occurs, PowerShell continues running in a `Catch` or `Finally`
+an error occurs, PowerShell continues running in a `catch` or `finally`
statement. An error type requires brackets. The second pair of brackets indicates that the error type is optional.
catch [[<error type>]] {<statement list>}
finally {<statement list>} ```
-## Until
+## `until`
-Used in a `Do` statement as a looping construct where the statement list is
+Used in a `do` statement as a looping construct where the statement list is
executed at least one time. Syntax:
Syntax:
do {<statement list>} until (<condition>) ```
-## Using
+## `using`
-Allows to indicate which namespaces are used in the session. Classes and
-members require less typing to mention them. You can also include classes from
-modules.
+Allows indicating which namespaces are used in the session. Classes and members
+require less typing to mention them. You can also include classes from modules.
Syntax #1:
Syntax #2:
using module <module-name> ```
-## While
+## `while`
The `while` statement is a looping construct where the condition is tested
-before the statements are executed. If the condition is FALSE, then the
+before the statements are executed. If the condition is false, then the
statements do not execute. Statement syntax:
while (<condition>) {
} ```
-When used in a `Do` statement, `while` is part of a looping construct where
+When used in a `do` statement, `while` is part of a looping construct where
the statement list is executed at least one time.
-Do loop Syntax:
+`do` loop Syntax:
```Syntax do {<statement list>} while (<condition>)
Microsoft.PowerShell.Core Add History (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Add-History.md
Title: Add-History
# Add-History
-## Synopsis
+## SYNOPSIS
Appends entries to the session history.
-## Syntax
+## SYNTAX
``` Add-History [[-InputObject] <PSObject[]>] [-Passthru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-History` cmdlet adds entries to the end of the session history, that is, the list of commands entered during the current session.
export the commands to a CSV or XML file, then import the commands, and pass the
`Add-History`. You can use this cmdlet to add specific commands to the history or to create a single history file that includes commands from more than one session.
-## Examples
+## EXAMPLES
### Example 1: Add commands to the history of a different session
The **InputObject** parameter passes the results of the command in parentheses t
cmdlet. The command in parentheses, which is executed first, imports the `history.xml` file into PowerShell. The `Add-History` cmdlet then adds the commands in the file to the session history.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Commands.HistoryInfo You can pipe a **HistoryInfo** object to this cmdlet.
-## Outputs
+## OUTPUTS
### None or Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a **HistoryInfo** object if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session together with the ID. The session history represents the order of execution, the status, and the start and end times of the
the file.
To modify the session history, export the session to a CSV or XML file, modify the file, import the file, and use `Add-History` to append it to the current session history.
-## Related links
+## RELATED LINKS
[Clear-History](Clear-History.md)
Microsoft.PowerShell.Core Clear History (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Clear-History.md
Title: Clear-History
# Clear-History
-## Synopsis
+## SYNOPSIS
Deletes entries from the PowerShell session command history.
-## Syntax
+## SYNTAX
### IDParameter (Default)
Clear-History [[-Count] <int>] [-CommandLine <string[]>] [-Newest] [-WhatIf] [-C
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Clear-History` deletes the command history from a PowerShell session. Each PowerShell session has its own command history. To display the command history, use the `Get-History` cmdlet.
history. To display the `PSReadLine` configuration for command history, use `Get
`PSReadLine` shipped with PowerShell 5.0 and above. For more information, see [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Delete the command history from a PowerShell session
command history. The **Id** parameter specifies to begin with **Id 7**. The **Co
specifies to delete five commands, inclusive of the specified **Id**. `Get-History` displays the updated command history and confirms that five commands were deleted, **Id 3** - **Id 7**.
-## Parameters
+## PARAMETERS
### -CommandLine
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-History`.
-## Outputs
+## OUTPUTS
### None `Clear-History` does not generate any output.
-## Notes
+## NOTES
The PowerShell session history is a list of the commands entered during a PowerShell session. You can view the history, add and delete commands, and run commands from the history. For more
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Related links
+## RELATED LINKS
[about_History](About/about_History.md)
Microsoft.PowerShell.Core Clear Host (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Clear-Host.md
Title: Clear-Host
# Clear-Host
-## Synopsis
+## SYNOPSIS
Clears the display in the host program.
-## Syntax
+## SYNTAX
``` Clear-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Host` function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function
function.
Because the behavior of the `Clear-Host` function is determined by the host program, `Clear-Host` might work differently in different host programs.
-## Examples
+## EXAMPLES
### Example 1
PS C:>
This command uses the `cls` alias of `Clear-Host` to clear the current display.
-## Parameters
+## PARAMETERS
### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Clear-Host`.
-## Outputs
+## OUTPUTS
### None `Clear-Host` does not generate any output
-## Notes
+## NOTES
`Clear-Host` is a simple function, not an advanced function. As such, you cannot use common parameters, such as **Debug**, in a `Clear-Host` command.
-## Related links
+## RELATED LINKS
[Get-Host](../Microsoft.PowerShell.Utility/Get-Host.md)
Microsoft.PowerShell.Core Connect Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Connect-PSSession.md
Title: Connect-PSSession
--- # Connect-PSSession
-## Synopsis
+## SYNOPSIS
Reconnects to disconnected sessions.
-## Syntax
+## SYNTAX
### Name (Default)
Connect-PSSession -InstanceId <Guid[]> [-ThrottleLimit <Int32>] [-WhatIf] [-Conf
Connect-PSSession [-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Reconnect to a session
The ninth command disconnects from the session in the `$s` variable.The administ
PowerShell and closes the computer. She can reconnect to the session on the next day and check the script status from her work computer.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session (**PSSession**) to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession This cmdlet returns an object that represents the session to which it reconnected.
-## Notes
+## NOTES
- This cmdlet is only available on Windows platforms.
This cmdlet returns an object that represents the session to which it reconnecte
sessions are considered to be idle from the moment that they are disconnected, even if commands are running in the disconnected session.
-## Related links
+## RELATED LINKS
[Disconnect-PSSession](Disconnect-PSSession.md)
Microsoft.PowerShell.Core Debug Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Debug-Job.md
Title: Debug-Job
# Debug-Job
-## Synopsis
+## SYNOPSIS
Debugs a running background or remote job.
-## Syntax
+## SYNTAX
### JobParameterSet (Default)
Debug-Job [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Job [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Job` cmdlet lets you debug scripts that are running within jobs. The cmdlet is designed to debug PowerShell Workflow jobs, background jobs, and jobs running in remote sessions. `Debug-Job`
accepts a running job object, name, ID, or instance ID as input, and starts a de
the script it is running. The debugger `quit` command stops the job and running script. The `exit` command detaches the debugger, and allows the job to continue to run.
-## Examples
+## EXAMPLES
### Example 1: Debug a job by job ID
Id Name PSJobTypeName State HasMoreData Location
18: SampleWorkflowTest -MyOutput "Hello" ```
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Disable Experimentalfeature (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Disable-ExperimentalFeature.md
Title: Disable-ExperimentalFeature
--- # Disable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Disable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Disable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-ExperimentalFeature` cmdlet disables experimental features by removing the named experimental features from the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Disable an experimental feature
PS C:\> Disable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to disable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Enable-ExperimentalFeature](Enable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Disable Psremoting (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Disable-PSRemoting.md
Title: Disable-PSRemoting
--- # Disable-PSRemoting
-## Synopsis
+## SYNOPSIS
Prevents PowerShell endpoints from receiving remote connections.
-## Syntax
+## SYNTAX
``` Disable-PSRemoting [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is only available on the Windows platform. It is not available on Li
versions of PowerShell. To run this cmdlet, start PowerShell with the **Run as administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Prevent remote access to all PowerShell session configurations
PowerShell.6 NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrat
PowerShell.6.2.0 NT AUTHORITY\NETWORK AccessDenied, NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Adm ... ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
configurations, you effectively prevent remote users from establishing sessions that connect to the computer.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disable Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Disable-PSSessionConfiguration.md
Title: Disable-PSSessionConfiguration
--- # Disable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Disables session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Disable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
connect to the computer.
To disable all session configurations on the computer, use `Disable-PSRemoting`.
-## Examples
+## EXAMPLES
### Example 1: Disable the default configuration
For more information, see the about_Remote_Troubleshooting Help topic.
> Disabling the configuration does not prevent you from changing the configuration using the > `Set-PSSessionConfiguration` cmdlet. It only prevents use of the configuration.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Enable-PSSessionConfiguration](Enable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Disconnect Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Disconnect-PSSession.md
Title: Disconnect-PSSession
# Disconnect-PSSession
-## Synopsis
+## SYNOPSIS
Disconnects from a session.
-## Syntax
+## SYNTAX
### Session (Default)
Disconnect-PSSession [-IdleTimeoutSec <Int32>] [-OutputBufferingMode <OutputBuff
[-ThrottleLimit <Int32>] [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
This cmdlet is introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1 - Disconnect a session by name
timeout to the 12-hour maximum.
The seventh command gets the value of the **IdleTimeout** property of the disconnected session, which is measured in milliseconds. The output confirms that the command was successful.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session to `Disconnect-PSSession`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession `Disconnect-PSSession` returns an object that represents the session that it disconnected.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Enable Experimentalfeature (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Enable-ExperimentalFeature.md
Title: Enable-ExperimentalFeature
--- # Enable-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Enable an experimental feature on startup of new instance of PowerShell.
-## Syntax
+## SYNTAX
``` Enable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-ExperimentalFeature` cmdlet enables experimental features by adding the named experimental features to the `powershell.config.json` settings file read on PowerShell startup.
This cmdlet was introduced in PowerShell 6.2.
> [!NOTE] > Any changes to experimental feature state only takes effect on restart of PowerShell
-## Examples
+## EXAMPLES
### Example 1: Enable an experimental feature
Enable-ExperimentalFeature PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell. ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### ExperimentalFeature Pipe instances of ExperimentalFeature from `Get-ExperimentalFeature` cmdlet to enable.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
Changes to state of an experimental feature only take effect on restart of PowerShell.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Enable Psremoting (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Enable-PSRemoting.md
Title: Enable-PSRemoting
--- # Enable-PSRemoting
-## Synopsis
+## SYNOPSIS
Configures the computer to receive remote commands.
-## Syntax
+## SYNTAX
``` Enable-PSRemoting [-Force] [-SkipNetworkProfileCheck] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
option. This cmdlet is not available on Linux or MacOS versions of PowerShell.
> disable PowerShell remoting endpoints that are hosted by Windows PowerShell, run the > `Enable-PSRemoting` cmdlet from within a Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Configure a computer to receive remote commands
OS Microsoft Windows 10.0.18363
> The name of the firewall rule can be different depending on the version of Windows. Use the > `Get-NetFirewallRule` cmdlet to list the names of the rules on your system.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns strings that describe its results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
property of all session configurations to `$True`.
`Enable-PSRemoting` removes the **Deny_All** and **Network_Deny_All** settings. This provides remote access to session configurations that were reserved for local use.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enable Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Enable-PSSessionConfiguration.md
Title: Enable-PSSessionConfiguration
--- # Enable-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Enables the session configurations on the local computer.
-## Syntax
+## SYNTAX
``` Enable-PSSessionConfiguration [[-Name] <String[]>] [-Force] [-SecurityDescriptorSddl <String>] [-SkipNetworkProfileCheck] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
also sets the value of the **Enabled** property of the session configuration
(`AccessMode=Local`) security descriptor setting that allows only users of the local computer to use to the session configuration.
-## Examples
+## EXAMPLES
### Example 1: Re-enable the default session
$sddl = "O:NSG:BAD:P(A;;GXGWGR;;;BA)(A;;GAGR;;;S-1-5-21-123456789-188441444-3100
Enable-PSSessionConfiguration -Name MaintenanceShell -SecurityDescriptorSDDL $sddl ```
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration, System.String You can pipe a session configuration object or a string that contains the name of a session configuration to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To use this cmdlet, you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Enter Pshostprocess (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Enter-PSHostProcess.md
Title: Enter-PSHostProcess
# Enter-PSHostProcess
-## Synopsis
+## SYNOPSIS
Connects to and enters into an interactive session with a local process.
-## Syntax
+## SYNTAX
### ProcessIdParameterSet (Default)
Enter-PSHostProcess [-HostProcessInfo] <PSHostProcessInfo> [[-AppDomainName] <St
Enter-PSHostProcess -CustomPipeName <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSHostProcess` cmdlet connects to and enters into an interactive session with a local process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
To support attaching to processes on remote computers, the `Enter-PSHostProcess`
in a specified remote computer, so that you can attach to a local process within a remote PowerShell session.
-## Examples
+## EXAMPLES
### Example Part 1: Start debugging a runspace within the PowerShell ISE process
cmdlet. This returns you to the `PS C:\>` prompt.
PS C:\> ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Enter-PSHostProcess` cannot enter the process of the PowerShell session in which you are running the command. You can, however, enter the process of another PowerShell session, or a PowerShell ISE
Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote ses
capability was limited to sessions using WinRM. PowerShell 7.1 allows `Enter-PSSession` and `Enter-PSHostProcess` to work from within any interactive remote session.
-## Related links
+## RELATED LINKS
[Exit-PSHostProcess](Exit-PSHostProcess.md)
Microsoft.PowerShell.Core Enter Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Enter-PSSession.md
Title: Enter-PSSession
--- # Enter-PSSession
-## Synopsis
+## SYNOPSIS
Starts an interactive session with a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Enter-PSSession [-ContainerId] <String> [-ConfigurationName <String>] [-RunAsAdm
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enter-PSSession` cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type run on the remote computer, just as if you were
information about how to set up PowerShell SSH remoting, see
To end the interactive session and disconnect from the remote computer, use the `Exit-PSSession` cmdlet, or type `exit`.
-## Examples
+## EXAMPLES
### Example 1: Start an interactive session
This example shows how to start an interactive session using SSH. The **Options*
hashtable of values that are passed as options to the underlying `ssh` command the established the connection to the remote system.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.Runspaces.PSSession You can pipe a computer name, as a string, or a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
To connect to a remote computer, you must be a member of the Administrators group on the remote computer. To start an interactive session on the local computer, you must start PowerShell with the
hashtable. For more information about `ssh_config` files, see
-## Related links
+## RELATED LINKS
[Exit-PSSession](Exit-PSSession.md)
Microsoft.PowerShell.Core Exit Pshostprocess (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Exit-PSHostProcess.md
Title: Exit-PSHostProcess
--- # Exit-PSHostProcess
-## Synopsis
+## SYNOPSIS
Closes an interactive session with a local process.
-## Syntax
+## SYNTAX
``` Exit-PSHostProcess [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSHostProcess` cmdlet closes an interactive session with a local process that you have opened by running the `Enter-PSHostProcess` cmdlet. You run the `Exit-PSHostProcess` cmdlet from within the process, when you are finished debugging or troubleshooting a script that is running within a process. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### Example 1: Exit a process
in the process, as described in `Enter-PSHostProcess`. After you type the `exit`
debugger, run the `Exit-PSHostProcess` cmdlet to close your interactive session with the process. The cmdlet closes your session in the process, and returns you to the `PS C:\>` prompt.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enter-PSHostProcess](Enter-PSHostProcess.md)
Microsoft.PowerShell.Core Exit Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Exit-PSSession.md
Title: Exit-PSSession
# Exit-PSSession
-## Synopsis
+## SYNOPSIS
Ends an interactive session with a remote computer.
-## Syntax
+## SYNTAX
``` Exit-PSSession [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using the `Enter-PSSession` cmdlet.
The `Exit-PSSession` cmdlet ends interactive sessions that you started by using
You can also use the `exit` keyword to end an interactive session. The effect is the same as using `Exit-PSSession`.
-## Examples
+## EXAMPLES
### Example 1: Start and stop an interactive session
PS>
This example uses the `exit` keyword to stop an interactive session started by using `Enter-PSSession`. The `exit` keyword has the same effect as using `Exit-PSSession`.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet takes only the common parameters.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Export Modulemember (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Export-ModuleMember.md
Title: Export-ModuleMember
--- # Export-ModuleMember
-## Synopsis
+## SYNOPSIS
Specifies the module members that are exported.
-## Syntax
+## SYNTAX
``` Export-ModuleMember [[-Function] <String[]>] [-Cmdlet <String[]>] [-Variable <String[]>] [-Alias <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-ModuleMember` cmdlet specifies the module members that are exported from a script module (`.psm1`) file, or from a dynamic module created by using the `New-Module` cmdlet. Module members
module imports from other modules.
An `Export-ModuleMember` command is optional, but it is a best practice. Even if the command confirms the default values, it demonstrates the intention of the module author.
-## Examples
+## EXAMPLES
### Example 1: Export functions and aliases in a script module
This command shows how to use `Export-ModuleMember` in a dynamic module that is
In this example, `Export-ModuleMember` is used to export both the `Hi` alias and the `SayHello` function in the dynamic module.
-## Parameters
+## PARAMETERS
### -Alias
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
+## INPUTS
### System.String You can pipe function name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To exclude a member from the list of exported members, add an `Export-ModuleMember` command that lists all other members but omits the member that you want to exclude.
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Foreach Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/ForEach-Object.md
Title: ForEach-Object
--- # ForEach-Object
-## Synopsis
+## SYNOPSIS
Performs an operation against each item in a collection of input objects.
-## Syntax
+## SYNTAX
### ScriptBlockSet (Default)
ForEach-Object -Parallel <scriptblock> [-InputObject <PSObject>] [-ThrottleLimit
[-UseNewRunspace] [-TimeoutSeconds <int>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ForEach-Object` cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the cmdlet or specified by using the **InputObject** parameter.
command.
Terminating errors can be converted to non-terminating errors using PowerShell try/catch or trap blocks.
-## Examples
+## EXAMPLES
### Example 1: Divide integers in an array
Output: 5
> [PipelineVariable](About/about_CommonParameters.md) common parameter variables are _not_ > supported in `Foreach-Object -Parallel` scenarios even with the `$using:` keyword.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns objects that are determined by the input.
-## Notes
+## NOTES
- The `ForEach-Object` cmdlet works much like the **Foreach** statement, except that you cannot pipe input to a **Foreach** statement. For more information about the **Foreach** statement, see
This cmdlet returns objects that are determined by the input.
> referenced objects that don't change. But if the object state is being modified then you must > used thread safe objects, such as .Net **System.Collection.Concurrent** types (See Example 11).
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Core Get Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-Command.md
Title: Get-Command
--- # Get-Command
-## Synopsis
+## SYNOPSIS
Gets all commands.
-## Syntax
+## SYNTAX
### CmdletSet (Default)
Get-Command [[-Name] <String[]>] [-Module <String[]>]
[-UseAbbreviationExpansion] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Command` cmdlet gets all commands that are installed on the computer, including cmdlets, aliases, functions, filters, scripts, and applications. `Get-Command` gets the commands from
information from help topics.
Starting in Windows PowerShell 5.0, results of the `Get-Command` cmdlet display a **Version** column by default. A new **Version** property has been added to the **CommandInfo** class.
-## Examples
+## EXAMPLES
### Example 1: Get cmdlets, functions, and aliases
Application getconf 0.0.0.0 /u
Application command 0.0.0.0 /usr/bin/command ```
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe command names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandInfo
Represents cmdlets.
Represents functions and filters.
-## Notes
+## NOTES
- When more than one command that has the same name is available to the session, `Get-Command` returns the command that runs when you type the command name. To get commands that have the same
Represents functions and filters.
`$PSModuleAutoLoadingPreference` preference variable. For more information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Export-PSSession](../Microsoft.PowerShell.Utility/Export-PSSession.md)
Microsoft.PowerShell.Core Get Experimentalfeature (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-ExperimentalFeature.md
Title: Get-ExperimentalFeature
--- # Get-ExperimentalFeature
-## Synopsis
+## SYNOPSIS
Gets experimental features.
-## Syntax
+## SYNTAX
``` Get-ExperimentalFeature [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ExperimentalFeature` cmdlet returns all experimental features discovered by PowerShell. Experimental features can come from modules or the PowerShell engine. Experimental features allow users to safely test new features and provide feedback (typically via GitHub) before the design is considered complete and any changes can become a breaking change.
-## Examples
+## EXAMPLES
### Example 1
Name Enabled Source Description
PSImplicitRemotingBatching False PSEngine Batch implicit remoting proxy commands to improve performance ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[] Name or names of experimental features to return.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExperimentalFeature Returns instances that match the requested names or all experimental features if no name is specified.
-## Related links
+## RELATED LINKS
[Disable-ExperimentalFeature](Disable-ExperimentalFeature.md)
Microsoft.PowerShell.Core Get Help (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-Help.md
Title: Get-Help
# Get-Help
-## Synopsis
+## SYNOPSIS
Displays information about PowerShell commands and concepts.
-## Syntax
+## SYNTAX
### AllUsersView (Default)
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Detailed
[-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Examples
+### EXAMPLES
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Examples [-Component <String[]>] [-Functionality <String[]>] [-Role <String[]>] [<CommonParameters>] ```
-### Parameters
+### PARAMETERS
``` Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] -Parameter <String[]>
Get-Help [[-Name] <String>] [-Path <String>] [-Category <String[]>] [-Component
[-Functionality <String[]>] [-Role <String[]>] -ShowWindow [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Help` cmdlet displays information about PowerShell concepts and commands, including cmdlets, functions, Common Information Model (CIM) commands, workflows, providers, aliases, and
For information about parameter attributes, such as **Required** and **Position*
> in a module, import the module, either by using the `Import-Module` cmdlet or by running a cmdlet > that's included in the module.
-## Examples
+## EXAMPLES
### Example 1: Display basic help information about a cmdlet
your functions and scripts, see [about_Comment_Based_Help](./About/about_Comment
Get-Help -Name C:\PS-Test\MyScript.ps1 ```
-## Parameters
+## PARAMETERS
### -Category
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
+## INPUTS
### None You can't send objects down the pipeline to `Get-Help`.
-## Outputs
+## OUTPUTS
### ExtendedCmdletHelpInfo
If you get a conceptual help article, `Get-Help` returns it as a string.
If you get a command that has a help file, `Get-Help` returns a **MamlCommandHelpInfo** object.
-## Notes
+## NOTES
PowerShell 3.0 doesn't include help files. To download and install the help files that `Get-Help` reads, use the `Update-Help` cmdlet. You can use the `Update-Help` cmdlet to download and install
following fields:
- **Accepts wildcard characters**. Indicates whether the value of a parameter can include wildcard characters, such as an asterisk (`*`) or question mark (`?`).
-## Related links
+## RELATED LINKS
[about_Command_Syntax](About/about_Command_Syntax.md)
Microsoft.PowerShell.Core Get History (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-History.md
Title: Get-History
--- # Get-History
-## Synopsis
+## SYNOPSIS
Gets a list of the commands entered during the current session.
-## Syntax
+## SYNTAX
``` Get-History [[-Id] <Int64[]>] [[-Count] <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-History` cmdlet gets the session history, that is, the list of commands entered during the current session.
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Get the session history
command.
Get-History | Format-List -Property * ```
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64 You can pipe a history ID to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.HistoryInfo This cmdlet returns a history object for each history item that it gets.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the run order, the status, and the start and end times of the command. As you enter each
Starting in Windows PowerShell 3.0, the default value of the `$MaximumHistoryCou
variable is `4096`. In Windows PowerShell 2.0, the default value is `64`. For more information about the `$MaximumHistoryCount` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core Get Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-Job.md
Title: Get-Job
--- # Get-Job
-## Synopsis
+## SYNOPSIS
Gets PowerShell background jobs that are running in the current session.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Get-Job [-IncludeChildJob] [-ChildJobState <JobState>] [-HasMoreData <Boolean>]
Get-Job [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Job` cmdlet gets objects that represent the background jobs that were started in the current session. You can use `Get-Job` to get jobs that were started by using the `Start-Job`
into the session before you run a `Get-Job` command, either by using the `Import
by using or getting a cmdlet in the module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get all background jobs started in the current session
Access is denied.
For more information, see the [about_Remote_Troubleshooting](./about/about_Remote_Troubleshooting.md) Help topic.
-## Parameters
+## PARAMETERS
### -After
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.RemotingJob This cmdlet returns objects that represent the jobs in the session.
-## Notes
+## NOTES
The **PSJobTypeName** property of jobs indicates the job type of the job. The property value is determined by the job type author. The following list shows common job types.
determined by the job type author. The following list shows common job types.
`Invoke-Command` cmdlet. - **PSWorkflowJob**. Job started by using the **AsJob** common parameter of workflows.
-## Related links
+## RELATED LINKS
[Invoke-Command](Invoke-Command.md)
Microsoft.PowerShell.Core Get Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-Module.md
Title: Get-Module
--- # Get-Module
-## Synopsis
+## SYNOPSIS
List the modules imported in the current session or that can be imported from the PSModulePath.
-## Syntax
+## SYNTAX
### Loaded (Default)
Get-Module [[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Module` cmdlet lists the PowerShell modules that have been imported, or that can be imported, into a PowerShell session. Without parameters, `Get-Module` gets modules that have been
Management Instrumentation (WMI) on the remote computer. Then use the **CIMSessi
`Import-Module` cmdlet and then run the imported commands, the commands run implicitly on the remote computer. You can use this WMI and CIM strategy to manage the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Get modules imported into the current session
The fourth command runs the `Get-Disk` command. Although the command is typed in
it runs implicitly on the remote computer from which it was imported. The command gets objects from the remote computer and returns them to the local session.
-## Parameters
+## PARAMETERS
### -All
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe module names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
This cmdlet returns objects that represent modules.
When you specify the **ListAvailable** parameter, `Get-Module` returns a **ModuleInfoGrouping** object, which is a type of **PSModuleInfo** object that has the same properties and methods.
-## Notes
+## NOTES
- Beginning in Windows PowerShell 3.0, the core commands that are included in PowerShell are packaged in modules. The exception is **Microsoft.PowerShell.Core**, which is a snap-in
object, which is a type of **PSModuleInfo** object that has the same properties
remoting enabled. This includes the local computer. When you create a CIM session on the local computer, PowerShell uses DCOM, instead of WMI, to create the session.
-## Related links
+## RELATED LINKS
[Get-CimSession](../CimCmdlets/Get-CimSession.md)
Microsoft.PowerShell.Core Get Pshostprocessinfo (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-PSHostProcessInfo.md
Title: Get-PSHostProcessInfo
--- # Get-PSHostProcessInfo
-## Synopsis
+## SYNOPSIS
Gets process information about the PowerShell host.
-## Syntax
+## SYNTAX
### ProcessNameParameterSet (Default)
Get-PSHostProcessInfo [-Process] <Process[]> [<CommonParameters>]
Get-PSHostProcessInfo [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSHostProcessInfo` cmdlet gets information about PowerShell host processes running on the local computer. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
-## Examples
+## EXAMPLES
### 1: Get a list of PowerShell hosts running on the system
ProcessName ProcessId AppDomainName
pwsh 13912 DefaultAppDomain ```
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### System.Diagnostics.Process You can pipe a **Process** object from `Get-Process` to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSHostProcessInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Process](../Microsoft.PowerShell.Management/get-process.md)
Microsoft.PowerShell.Core Get Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-PSSession.md
Title: Get-PSSession
--- # Get-PSSession
-## Synopsis
+## SYNOPSIS
Gets the PowerShell sessions on local and remote computers.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSSession [-InstanceId <Guid[]>] [<CommonParameters>]
Get-PSSession [-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSession` cmdlet gets the user-managed PowerShell sessions (**PSSessions**) on local and remote computers.
the current session and connect to the specified computer.
For more information about PowerShell sessions, see [about_PSSessions](about/about_PSSessions.md).
-## Examples
+## EXAMPLES
### Example 1: Get sessions created in the current session
Get-PSSession -Id 2
This command gets the **PSSession** with ID 2. Because the value of the **ID** property is unique only in the current session, the **Id** parameter is valid only for local commands.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
- This cmdlet gets user-managed sessions **PSSession** objects" such as those that are created by using the New-PSSession, `Enter-PSSession`, and Invoke-Command cmdlets. It does not get the
For more information about the values of the **State** property of sessions, see
For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability Enumeration](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Get Pssessioncapability (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-PSSessionCapability.md
Title: Get-PSSessionCapability
--- # Get-PSSessionCapability
-## Synopsis
+## SYNOPSIS
Gets the capabilities of a specific user on a constrained session configuration.
-## Syntax
+## SYNTAX
``` Get-PSSessionCapability [-ConfigurationName] <String> [-Username] <String> [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionCapability` cmdlet gets the capabilities of a specific user on a constrained session configuration. Use this cmdlet to audit customized session configurations for users.
object. This object contains details about the PowerShell runspace the specified
with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.
-## Examples
+## EXAMPLES
### Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -F
This example returns details about the runspace the user CONTOSO\User would interact with when connecting to the Endpoint1 constrained endpoint.
-## Parameters
+## PARAMETERS
### -ConfigurationName
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
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.Runspaces.InitialSessionState
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSRoleCapabilityFile](New-PSRoleCapabilityFile.md)
Microsoft.PowerShell.Core Get Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-PSSessionConfiguration.md
Title: Get-PSSessionConfiguration
--- # Get-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Gets the registered session configurations on the computer.
-## Syntax
+## SYNTAX
``` Get-PSSessionConfiguration [[-Name] <String[]>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSSessionConfiguration` cmdlet gets the session configurations that have been registered on the local computer. This is an advanced cmdlet that is designed to be used by system administrators
session configuration authors to examine and compare session configurations.
To create and register a session configuration, use the `Register-PSSessionConfiguration` cmdlet. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1 - Get session configurations on the local computer
create a session. This variable is set on the local computer, but it specifies a
the remote computer. For more information about the `$PSSessionConfiguration` variable, see [about_Preference_Variables](About/about_Preference_Variables.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration
-## Notes
+## NOTES
- To run this cmdlet, start PowerShell with the **Run as administrator** option.
You cannot pipe input to this cmdlet.
commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Get Pssubsystem (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Get-PSSubsystem.md
Title: Get-PSSubsystem
--- # Get-PSSubsystem
-## Synopsis
+## SYNOPSIS
Retrieves information about the subsystems registered in PowerShell.
-## Syntax
+## SYNTAX
### GetAllSet (Default)
Get-PSSubsystem -Kind <SubsystemKind> [<CommonParameters>]
Get-PSSubsystem -SubsystemType <Type> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Retrieves information about the subsystems registered in PowerShell.
the PSReadLine module to provide custom prediction plugins. In future, **Job**,
**CommandCompleter**, **Remoting** and other components could be separated into subsystem assemblies outside of `System.Management.Automation.dll`.
-## Examples
+## EXAMPLES
### Example 1 - Display all available subsystems
IsRegistered : False
Implementations : {} ```
-## Parameters
+## PARAMETERS
### -Kind
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Subsystem.SubsystemKind ### System.Type
-## Outputs
+## OUTPUTS
### System.Management.Automation.Subsystem.SubsystemInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_experimental_features](about/about_experimental_features.md)
Microsoft.PowerShell.Core Import Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Import-Module.md
Title: Import-Module
# Import-Module
-## Synopsis
+## SYNOPSIS
Adds modules to the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Import-Module [-Global] [-Prefix <String>] [-Function <String[]>] [-Cmdlet <Stri
[-NoClobber] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Module` cmdlet adds one or more modules to the current session. Starting in PowerShell 3.0, installed modules are automatically imported to the session when you use any commands or
import CIM modules from the remote computer. The imported commands run implicitl
computer. A **CIMSession** is a connection to Windows Management Instrumentation (WMI) on the remote computer.
-## Examples
+## EXAMPLES
### Example 1: Import the members of a module into the current session
Number Friendly Name OperationalStatus Total Size Partition Style
0 Virtual HD ATA Device Online 40 GB MBR ```
-## Parameters
+## PARAMETERS
### -Alias
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo, System.Reflection.Assembly You can pipe a module name, module object, or assembly object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSModuleInfo, or System.Management.Automation.PSCustomObject
By default, `Import-Module` does not generate any output. If you specify the **P
the cmdlet generates a **System.Management.Automation.PSModuleInfo** object that represents the module. If you specify the **AsCustomObject** parameter, it generates a **PSCustomObject** object.
-## Notes
+## NOTES
- Before you can import a module, the module must be installed on the local computer. That is, the module directory must be copied to a directory that is accessible to your local computer. For more
module. If you specify the **AsCustomObject** parameter, it generates a **PSCust
statement at the beginning of your script. This imports the module, including the class and enum definitions. For more information, see [about_Using](About/about_Using.md).
-## Related links
+## RELATED LINKS
[about_Modules](about/about_Modules.md)
Microsoft.PowerShell.Core Invoke Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Invoke-Command.md
Title: Invoke-Command
# Invoke-Command
-## Synopsis
+## SYNOPSIS
Runs commands on local and remote computers.
-## Syntax
+## SYNTAX
### InProcess (Default)
Invoke-Command [-AsJob] [-HideComputerName] [-FilePath] <String> -SSHConnection
[-RemoteDebug] [-InputObject <PSObject>] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Command` cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. Using a single `Invoke-Command` command, you can run commands on
connection information. For more information about how to set up PowerShell SSH
Some code samples use splatting to reduce the line length. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Run a script on a server
$options = @{
$results = Invoke-Command -FilePath c:\Scripts\CollectEvents.ps1 -KeyFilePath '/Users/UserB/id_rsa' -Options $options ```
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.ScriptBlock You can pipe a command in a script block to `Invoke-Command`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob, System.Management.Automation.Runspaces.PSSession, or the output of the invoked command
This cmdlet returns a job object, if you use the **AsJob** parameter. If you spe
**InDisconnectedSession** parameter, `Invoke-Command` returns a **PSSession** object. Otherwise, it returns the output of the invoked command, which is the value of the **ScriptBlock** parameter.
-## Notes
+## NOTES
On Windows Vista, and later versions of the Windows operating system, to use the **ComputerName** parameter of `Invoke-Command` to run a command on the local computer, you must run PowerShell using
Any values explicitly passed by parameters take precedence over values passed in
hashtable. For more information about `ssh_config` files, see [ssh_config(5)](https://man.openbsd.org/ssh_config.5).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Invoke History (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Invoke-History.md
Title: Invoke-History
--- # Invoke-History
-## Synopsis
+## SYNOPSIS
Runs commands from the session history.
-## Syntax
+## SYNTAX
``` Invoke-History [[-Id] <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-History` cmdlet runs commands from the session history. You can pass objects representing the commands from Get-History to `Invoke-History`, or you can identify commands in the
The session history is managed separately from the history maintained by the **P
Both histories are available in sessions where **PSReadLine** is loaded. This cmdlet only works with the session history. For more information see, [about_PSReadLine](../PSReadLine/About/about_PSReadLine.md).
-## Examples
+## EXAMPLES
### Example 1: Run the most recent command in the history
the command uses the `ForEach-Object` cmdlet to run the `Invoke-History` command
Get-History -Id 255 -Count 7 | ForEach {Invoke-History -Id $_.Id} ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a history **Id** to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output, but output might be generated by the commands that `Invoke-History` runs.
-## Notes
+## NOTES
The session history is a list of the commands entered during the session. The session history represents the order of execution, the status, and the start and end times of the command. As you
about the session history, see [about_History](About/about_History.md).
You can also refer to `Invoke-History` by its built-in aliases, `r` and `ihy`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Add-History](Add-History.md)
Microsoft.PowerShell.Core New Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-Module.md
Title: New-Module
--- # New-Module
-## Synopsis
+## SYNOPSIS
Creates a new dynamic module that exists only in memory.
-## Syntax
+## SYNTAX
### ScriptBlock (Default)
New-Module [-Name] <String> [-ScriptBlock] <ScriptBlock> [-Function <String[]>]
[-ReturnResult] [-AsCustomObject] [-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Module` cmdlet creates a dynamic module from a script block. The members of the dynamic module, such as functions and variables, are immediately available in the session and remain
To make a dynamic module available to `Get-Module`, pipe a `New-Module` command
pipe the module object that `New-Module` returns to `Import-Module`. This action adds the dynamic module to the `Get-Module` list, but it does not save the module to disk or make it persistent.
-## Examples
+## EXAMPLES
### Example 1: Create a dynamic module
New-Module -ScriptBlock {function SayHello {"Hello, World!"}; SayHello} -ReturnR
Hello, World! ```
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a module name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo, System.Management.Automation.PSCustomObject, or None
This cmdlet generates a **PSModuleInfo** object, by default. If you use the **As
parameter, it generates a **PSCustomObject** object. If you use the **ReturnResult** parameter, it returns the result of evaluating the script block in the dynamic module.
-## Notes
+## NOTES
You can also refer to `New-Module` by its alias, `nmo`. For more information, see [about_Aliases](About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Modulemanifest (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-ModuleManifest.md
Title: New-ModuleManifest
# New-ModuleManifest
-## Synopsis
+## SYNOPSIS
Creates a new module manifest.
-## Syntax
+## SYNTAX
### All
New-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>] [
[-DefaultCommandPrefix <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ModuleManifest` cmdlet creates a new module manifest (`.psd1`) file, populates its values, and saves the manifest file in the specified path.
values for certain properties. For more information, see
[Required metadata for items published to the PowerShell Gallery](/powershell/scripting/gallery/how-to/publishing-packages/publishing-a-package#required-metadata-for-items-published-to-the-powershell-gallery) in the Gallery documentation.
-## Examples
+## EXAMPLES
### Example 1 - Create a new module manifest
ExportedFormatFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\Event.
ExportedTypeFiles : {C:\Windows\system32\WindowsPowerShell\v1.0\GetEvent.types.ps1xml} ```
-## Parameters
+## PARAMETERS
### -AliasesToExport
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).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.String By default, `New-ModuleManifest` doesn't generate any output. However, if you use the **PassThru** parameter, it generates a **System.String** object representing the module manifest.
-## Notes
+## NOTES
`New-ModuleManifest` running on Windows and non-Windows platforms creates module manifest (`.psd1`) files encoded as **UTF8NoBOM**.
The caller's session state is the session state into which a module is imported.
refers to the global session state, but when a module imports nested modules, the caller is the module and the caller's session state is the module's session state.
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core New Psrolecapabilityfile (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-PSRoleCapabilityFile.md
Title: New-PSRoleCapabilityFile
--- # New-PSRoleCapabilityFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a set of capabilities to be exposed through a session configuration.
-## Syntax
+## SYNTAX
``` New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-Description <String>]
New-PSRoleCapabilityFile [-Path] <String> [-Guid <Guid>] [-Author <String>] [-De
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSRoleCapabilityFile` cmdlet creates a file that defines a set of user capabilities that can be exposed through session configuration files. This includes determining which cmdlets,
in the **RoleDefinitions** field in a PowerShell Session Configuration (.pssc) f
This cmdlet was introduced in Windows PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Create a blank role capability file
$roleParameters = @{
New-PSRoleCapabilityFile @roleParameters ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-PSSessionConfigurationFile](New-PSSessionConfigurationFile.md)
Microsoft.PowerShell.Core New Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-PSSession.md
Title: New-PSSession
--- # New-PSSession
-## Synopsis
+## SYNOPSIS
Creates a persistent connection to a local or remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-PSSession [-Name <String[]>] [-Port <Int32>] [-HostName] <String[]> [-UserNa
New-PSSession [-Name <String[]>] -SSHConnection <Hashtable[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSession` cmdlet creates a PowerShell session (**PSSession**) on a local or remote computer. When you create a **PSSession**, PowerShell establishes a persistent connection to the
connection information. For more information about how to set up PowerShell SSH
> this if you are in an environment where you can be certain of the server certificate and the > network connection to the target system.
-## Examples
+## EXAMPLES
### Example 1: Create a session on the local computer
This example shows how to create a new SSH-based session a remote Linux-based ma
options. The **Options** parameter takes a hashtable of values that are passed as options to the underlying `ssh` command the established the connection to the remote system.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.URI, System.Management.Automation.Runspaces.PSSession You can pipe a string, URI, or session object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.PSSession
-## Notes
+## NOTES
This cmdlet uses the PowerShell remoting infrastructure. To use this cmdlet, the local computer and any remote computers must be configured for PowerShell remoting. For more information, see
Any values explicitly passed by parameters take precedence over values passed in
hashtable. For more information about `ssh_config` files, see [ssh_config(5)](https://man.openbsd.org/ssh_config.5).
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core New Pssessionconfigurationfile (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-PSSessionConfigurationFile.md
Title: New-PSSessionConfigurationFile
--- # New-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Creates a file that defines a session configuration.
-## Syntax
+## SYNTAX
``` New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Guid <Guid>]
New-PSSessionConfigurationFile [-Path] <String> [-SchemaVersion <Version>] [-Gui
[-FormatsToProcess <String[]>] [-AssembliesToLoad <String[]>] [-Full] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about session configurations and session configuration file
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Creating and using a NoLanguage session
AssembliesToLoad = 'System.Web.Services', 'FSharp.Compiler.CodeDom.dll'
} ```
-## Parameters
+## PARAMETERS
### -AliasDefinitions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe any objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
Before using an edited session configuration file, use the `Test-PSSessionConfigurationFile` cmdlet to verify that the configuration file entries are valid.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core New Pssessionoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-PSSessionOption.md
Title: New-PSSessionOption
--- # New-PSSessionOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a PSSession.
-## Syntax
+## SYNTAX
``` New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachineProfile] [-Culture <CultureInfo>]
New-PSSessionOption [-MaximumRedirection <Int32>] [-NoCompression] [-NoMachinePr
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [-IncludePortInSPN] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSSessionOption` cmdlet creates an object that contains advanced options for a user-managed session (**PSSession**). You can use the object as the value of the **SessionOption**
in the session configuration. However, they do not take precedence over maximum
limits set in the session configuration. For more information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Create a default session option
commands in the remote session. The data appears in the **ApplicationArguments**
The final `Invoke-Command` shows how the data might be used.
-## Parameters
+## PARAMETERS
### -ApplicationArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Remoting.PSSessionOption
-## Notes
+## NOTES
If the **SessionOption** parameter is not used in a command to create a **PSSession**, the session options are determined by the property values of the `$PSSessionOption` preference variable, if it
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Enter-PSSession](Enter-PSSession.md)
Microsoft.PowerShell.Core New Pstransportoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/New-PSTransportOption.md
Title: New-PSTransportOption
# New-PSTransportOption
-## Synopsis
+## SYNOPSIS
Creates an object that contains advanced options for a session configuration.
-## Syntax
+## SYNTAX
``` New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int32>] [-MaxSessions <Int32>]
New-PSTransportOption [-MaxIdleTimeoutSec <Int32>] [-ProcessIdleTimeoutSec <Int3
[-OutputBufferingMode <OutputBufferingMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSTransportOption` cmdlet creates an object that contains transport options for session configurations. You can use the object as the value of the **TransportOption** parameter of cmdlets
session configurations, see [about_Session_Configurations](About/about_Session_C
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Generate a default transport option
The fourth command uses the `Format-List` cmdlet to display all properties of th
`$s` variable in a list. The output shows that the session has an idle time-out of one hour (360,000 milliseconds).
-## Parameters
+## PARAMETERS
### -IdleTimeoutSec
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.WSManConfigurationOption
-## Notes
+## NOTES
- The properties of a session configuration object vary with the options set for the session configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[New-PSSession](New-PSSession.md)
Microsoft.PowerShell.Core Out Default (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Out-Default.md
Title: Out-Default
--- # Out-Default
-## Synopsis
+## SYNOPSIS
Sends the output to the default formatter and to the default output cmdlet.
-## Syntax
+## SYNTAX
``` Out-Default [-Transcript] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
PowerShell automatically adds `Out-Default` to the end of every pipeline. `Out-Default` decides how to format and output the object stream. If the object stream is a stream of strings, `Out-Default`
This cmdlet isn't intended to be used by the end user. Other cmdlets are recomme
output like [Out-Host](Out-Host.md) or using `Format-*` cmdlets and the [Format.ps1xml](About/about_format.ps1xml.md) file to control formatting.
-## Examples
+## EXAMPLES
### Example 1
Get-Process | Select-Object -First 5 | Out-Default
No error is thrown when using `Out-Default` but the output isn't changed if it's not explicitly called.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-Custom](../Microsoft.PowerShell.Utility/Format-Custom.md)
Microsoft.PowerShell.Core Out Host (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Out-Host.md
Title: Out-Host
# Out-Host
-## Synopsis
+## SYNOPSIS
Sends output to the command line.
-## Syntax
+## SYNTAX
### All
Sends output to the command line.
Out-Host [-Paging] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Host` cmdlet sends output to the PowerShell host for display. The host displays the output at the command line. Because `Out-Host` is the default, you don't have to specify it unless you want
pipeline to the host executing the command. `Out-Host` ignores ANSI escape seque
sequences are handled by the host. `Out-Host` passes ANSI escape sequences to the host without trying to interpret or change them.
-## Examples
+## EXAMPLES
### Example 1: Display output one page at a time
Out-Host -InputObject $io
`Out-Host` uses the **InputObject** parameter to specify the `$io` variable and displays the history.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-Host`.
-## Outputs
+## OUTPUTS
### None `Out-Host` doesn't generate any output. It sends objects to the host for display.
-## Notes
+## NOTES
The **Paging** parameter isn't supported by all PowerShell hosts. For example, if you use the **Paging** parameter in the PowerShell ISE, the following error is displayed:
variable and use the **InputObject** parameter to pass the data to the cmdlet.
`Out-Host` sends data, but it doesn't produce any output objects. If you pipeline the output of `Out-Host` to the `Get-Member` cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Clear-Host](Clear-Host.md)
Microsoft.PowerShell.Core Out Null (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Out-Null.md
Title: Out-Null
--- # Out-Null
-## Synopsis
+## SYNOPSIS
Hides the output instead of sending it down the pipeline or displaying it.
-## Syntax
+## SYNTAX
``` Out-Null [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-Null` cmdlet sends its output to NULL, in effect, removing it from the pipeline and preventing the output to be displayed at the screen.
-## Examples
+## EXAMPLES
### Example 1: Delete output
Get-ChildItem | Out-Null
This command gets items in the current location/directory, but its output is not passed through the pipeline nor displayed at the command line. This is useful for hiding output that you do not need.
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The cmdlets that contain the **Out** verb (the **Out** cmdlets) do not have parameters for names or file paths. To send data to an **Out** cmdlet, use a pipeline operator (`|`) to send the output
This cmdlet does not generate any output.
- `Out-Null` does not return any output objects. If you pipe the output of `Out-Null` to the Get-Member cmdlet, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-Default](Out-Default.md)
Microsoft.PowerShell.Core Receive Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Receive-Job.md
Title: Receive-Job
--- # Receive-Job
-## Synopsis
+## SYNOPSIS
Gets the results of the PowerShell background jobs in the current session.
-## Syntax
+## SYNTAX
### Location (Default)
Receive-Job [-Keep] [-NoRecurse] [-Force] [-Wait] [-AutoRemoveJob] [-WriteEvents
[-Id] <Int32[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Receive-Job` cmdlet gets the results of PowerShell background jobs, such as those started by using the `Start-Job` cmdlet or the **AsJob** parameter of any cmdlet.
custom job type into the session before it runs a `Receive-Job` command, either
For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Get results for a particular job
Cannot find drive. A drive with the name 'Z' does not exist.
+ PSComputerName : localhost ```
-## Parameters
+## PARAMETERS
### -AutoRemoveJob
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.Job You can pipe job objects to this cmdlet.
-## Outputs
+## OUTPUTS
### PSObject This cmdlet returns the results of the commands in the job.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Receive Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Receive-PSSession.md
Title: Receive-PSSession
# Receive-PSSession
-## Synopsis
+## SYNOPSIS
Gets results of commands in disconnected sessions
-## Syntax
+## SYNTAX
### Session (Default)
Receive-PSSession -Name <String> [-OutTarget <OutTarget>] [-JobName <String>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For more information about the Disconnected Sessions feature, see
Some examples use splatting to reduce the line length and improve readability. For more information, see [about_Splatting](./About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Connect to a PSSession
the command is run in the same session, `Receive-PSSession` returns the results
and reuses the same job object. The command saves the job in the `$j2` variable. The `Receive-Job` cmdlet gets the results of the job in the `$j` variable.
-## Parameters
+## PARAMETERS
### -AllowRedirection
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.PSSession
You can pipe the instance Ids of sessions this cmdlet.
You can pipe session names to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Job or PSObject
This cmdlet returns the results of commands that ran in the disconnected session
value or default value of the **OutTarget** parameter is Job, `Receive-PSSession` returns a job object. Otherwise, it returns objects that represent that command results.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
When you disconnect a **PSSession**, the session state is Disconnected and the a
- For more information about the values of the **Availability** property of sessions, see [RunspaceAvailability](/dotnet/api/system.management.automation.runspaces.runspaceavailability).
-## Related links
+## RELATED LINKS
[about_PSSessions](./About/about_PSSessions.md)
Microsoft.PowerShell.Core Register Argumentcompleter (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Register-ArgumentCompleter.md
Title: Register-ArgumentCompleter
# Register-ArgumentCompleter
-## Synopsis
+## SYNOPSIS
Registers a custom argument completer.
-## Syntax
+## SYNTAX
### NativeSet
Register-ArgumentCompleter [-CommandName <String[]>] -ParameterName <String>
-ScriptBlock <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ArgumentCompleter` cmdlet registers a custom argument completer. An argument completer allows you to provide dynamic tab completion, at run time for any command that you specify.
-## Examples
+## EXAMPLES
### Example 1: Register a custom argument completer
The results are piped to the `ForEach-Object` cmdlet which use the **new** stati
[System.Management.Automation.CompletionResult](/dotnet/api/system.management.automation.completionresult) class to create a new **CompletionResult** object for each value.
-## Parameters
+## PARAMETERS
### -CommandName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](./About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet returns no output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Core Register Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Register-PSSessionConfiguration.md
Title: Register-PSSessionConfiguration
--- # Register-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Creates and registers a new session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSSessionConfiguration [-ProcessorArchitecture <String>] [-Name] <Strin
[-TransportOption <PSTransportOption>] -Path <String> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration class and by using a script that runs in the session. Beginning in
For information about session configurations, see [about_Session_Configurations](About/about_Session_Configurations.md). For information about session configuration files, see [about_Session_Configuration_Files](About/about_Session_Configuration_Files.md).
-## Examples
+## EXAMPLES
### Example 1: Register a NewShell session configuration
The script contains a single command that uses dot sourcing to run the user's
For more information about profiles, see [about_Profiles](./About/about_Profiles.md). For more information about dot sourcing, see [about_Scopes](./About/about_Scopes.md).
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigContainerElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The properties of a session configuration object vary with the options set for t
configuration and the values of those options. Also, session configurations that use a session configuration file have additional properties.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Remove Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Remove-Job.md
Title: Remove-Job
# Remove-Job
-## Synopsis
+## SYNOPSIS
Deletes a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Remove-Job [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Job [-Command <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Job` cmdlet deletes PowerShell background jobs that were started by the `Start-Job` cmdlet or by cmdlets such as `Invoke-Command` that support the **AsJob** parameter.
job. Or, use `Remove-Job` with the **Force** parameter to delete a running job.
Jobs remain in the global job cache until you delete the background job or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Delete a job by using its name
asterisk (`*`) to specify that all the object's properties are displayed in a li
`Remove-Job` uses the **InstanceId** parameter to specify the job to delete.
-## Parameters
+## PARAMETERS
### -Command
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
+## INPUTS
### System.Management.Automation.Job You can send a job object down the pipeline to `Remove-Job`.
-## Outputs
+## OUTPUTS
### None `Remove-Job` doesn't generate any output.
-## Notes
+## NOTES
A PowerShell job creates a new process. When the job completes, the process exits. When `Remove-Job` is run, the job's state is removed. If a job stops before completion and its process hasn't exited, the process is forcibly terminated.
-## Related links
+## RELATED LINKS
[about_Jobs](./About/about_Jobs.md)
Microsoft.PowerShell.Core Remove Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Remove-Module.md
Title: Remove-Module
--- # Remove-Module
-## Synopsis
+## SYNOPSIS
Removes modules from the current session.
-## Syntax
+## SYNTAX
### name
Remove-Module [-FullyQualifiedName] <ModuleSpecification[]> [-Force] [-WhatIf] [
Remove-Module [-ModuleInfo] <PSModuleInfo[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Module` cmdlet removes the members of a module, such as cmdlets and functions, from the current session.
removed, but the assembly is not unloaded.
This cmdlet does not uninstall the module or delete it from the computer. It affects only the current PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Remove a module
Remove-Module -ModuleInfo $a
This command uses the **ModuleInfo** parameter to remove the BitsTransfer module.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String, System.Management.Automation.PSModuleInfo You can pipe module names and module objects to `Remove-Module`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
When removing a module, there is an event on the module that will execute. This event allows a module to react to being removed and perform some cleanup such as freeing up resources. Example:
For full consistency, it might be also useful to react to the closing of the Pow
Register-EngineEvent -SourceIdentifier ([System.Management.Automation.PsEngineEvent]::Exiting) -Action $OnRemoveScript
-## Related links
+## RELATED LINKS
[Get-Module](Get-Module.md)
Microsoft.PowerShell.Core Remove Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Remove-PSSession.md
Title: Remove-PSSession
--- # Remove-PSSession
-## Synopsis
+## SYNOPSIS
Closes one or more PowerShell sessions (PSSessions).
-## Syntax
+## SYNTAX
### Id (Default)
Remove-PSSession -Name <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-PSSession [-ComputerName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSSession` cmdlet closes PowerShell sessions (**PSSessions**) in the current session. It stops any commands that are running in the **PSSessions**, ends the **PSSession**, and releases the
session.
If you have saved the **PSSession** in a variable, the session object remains in the variable, but the state of the **PSSession** is Closed.
-## Examples
+## EXAMPLES
### Example 1: Remove sessions by using IDs
Function EndPSS { Get-PSSession | Remove-PSSession }
This function deletes all of the **PSSessions** in the current session. After you add this function to your PowerShell profile, to delete all sessions, type `EndPSS`.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.Management.Automation.Runspaces.PSSession You can pipe a session object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
- The **Id** parameter is mandatory. To delete all the **PSSessions** in the current session, type `Get-PSSession | Remove-PSSession`.
This cmdlet does not return any objects.
- **PSSessions** are specific to the current session. When you end a session, the **PSSessions** that you created in that session are forcibly closed.
-## Related links
+## RELATED LINKS
[Connect-PSSession](Connect-PSSession.md)
Microsoft.PowerShell.Core Save Help (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Save-Help.md
Title: Save-Help
--- # Save-Help
-## Synopsis
+## SYNOPSIS
Downloads and saves the newest help files to a file system directory.
-## Syntax
+## SYNTAX
### Path (Default)
Save-Help -LiteralPath <String[]> [[-Module] <PSModuleInfo[]>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Help` cmdlet downloads the newest help files for PowerShell modules and saves them to a directory that you specify. This feature lets you update the help files on computers that do not
group on the computer to download the help files for these modules.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Save the help for the DhcpServer module
The command uses the `Save-Help` cmdlet to download and save the help files to t
The **Force** parameter is required when you have to run a `Save-Help` command more than one time each day.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSModuleInfo You can pipe a module object from the `Get-Module` cmdlet to the **Module** parameter of `Save-Help`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To save help for modules in the $pshome\Modules folder, start PowerShell by using the Run as administrator option. Only members of the Administrators group on the computer can download help
This cmdlet does not generate any output.
- The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Help](Get-Help.md)
Microsoft.PowerShell.Core Set Psdebug (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Set-PSDebug.md
Title: Set-PSDebug
# Set-PSDebug
-## Synopsis
+## SYNOPSIS
Turns script debugging features on and off, sets the trace level, and toggles strict mode.
-## Syntax
+## SYNTAX
### on
Set-PSDebug [-Trace <Int32>] [-Step] [-Strict] [<CommonParameters>]
Set-PSDebug [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSDebug` cmdlet turns script debugging features on and off, sets the trace level, and toggles strict mode. By default, the PowerShell debug features are off.
When the **Trace** parameter has a value of `1`, each line of script is traced a
parameter has a value of `2`, variable assignments, function calls, and script calls are also traced. If the **Step** parameter is specified, you're prompted before each line of the script runs.
-## Examples
+## EXAMPLES
### Example 1: Set the trace level
Set-PSDebug -Off; foreach ($i in 1..3) {$i}
3 ```
-## Parameters
+## PARAMETERS
### -Off
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
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Debuggers](./About/about_Debuggers.md)
Microsoft.PowerShell.Core Set Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Set-PSSessionConfiguration.md
Title: Set-PSSessionConfiguration
--- # Set-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Changes the properties of a registered session configuration.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Set-PSSessionConfiguration [-Name] <String> [-RunAsCredential <PSCredential>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
to the local computer. For more information about session configurations, see [a
To see the properties of a session configuration, use the `Get-PSSessionConfiguration` cmdlet or the WSMan Provider. For more information about the WSMan Provider, type `Get-Help WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Create and change a session configuration
PSVersion 2.0
startupscript c:\ps-test\Maintenance.ps1 ```
-## Parameters
+## PARAMETERS
### -AccessMode
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.WSMan.Management.WSManConfigLeafElement
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
properties that are introduced in PowerShell 3.0, such as **OutputBufferingMode*
PowerShell 2.0 commands do not generate an error, but they are ineffective. To change properties introduced in PowerShell 3.0, use the WSMan: drive in PowerShell 3.0.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Set Strictmode (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Set-StrictMode.md
Title: Set-StrictMode
--- # Set-StrictMode
-## Synopsis
+## SYNOPSIS
Establishes and enforces coding rules in expressions, scripts, and script blocks.
-## Syntax
+## SYNTAX
### Version (Default)
Set-StrictMode -Version <Version> [<CommonParameters>]
Set-StrictMode [-Off] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-StrictMode` cmdlet configures strict mode for the current scope and all child scopes, and turns it on and off. When strict mode is on, PowerShell generates a terminating error when the
When `Set-StrictMode` is off, PowerShell has the following behaviors:
- Results of improper function syntax vary with the error conditions - Attempting to retrieve a value using an invalid index in an array returns `$Null`
-## Examples
+## EXAMPLES
### Example 1: Turn on strict mode as version 1.0
InvalidArgument: Cannot convert value "abc" to type "System.Int32". Error: "Inpu
With strict mode set to version 3 or higher, invalid or out of bounds indexes result in errors.
-## Parameters
+## PARAMETERS
### -Off
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
While `Set-StrictMode` **Version** parameter will accept values greater than `3.0`, currently there are no additional rules defined for anything higher than `3.0`.
are no additional rules defined for anything higher than `3.0`.
`Set-StrictMode` is effective only in the scope in which it is set and in its child scopes. For more information about scopes in PowerShell, see [about_Scopes](about/about_Scopes.md).
-## Related links
+## RELATED LINKS
[Set-PSDebug](Set-PSDebug.md)
Microsoft.PowerShell.Core Start Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Start-Job.md
Title: Start-Job
# Start-Job
-## Synopsis
+## SYNOPSIS
Starts a PowerShell background job.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Start-Job [-Name <String>] [-Credential <PSCredential>] -LiteralPath <String>
[-ArgumentList <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Job` cmdlet starts a PowerShell background job on the local computer.
directory of the caller that started the job.
> > The substitute in that scenario is `Start-ThreadJob` from the module **[ThreadJob](https://www.powershellgallery.com/packages/ThreadJob)**.
-## Examples
+## EXAMPLES
### Example 1: Start a background job
Major Minor Build Revision
5 1 14393 3383 ```
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### System.String You can use the pipeline to send an object with the **Name** property to the **Name** parameter. For example, you can pipeline a **FileInfo** object from `Get-ChildItem` to `Start-Job`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob `Start-Job` returns a **PSRemotingJob** object that represents the job that it started.
-## Notes
+## NOTES
To run in the background, `Start-Job` runs in its own session in the current session. When you use the `Invoke-Command` cmdlet to run a `Start-Job` command in a session on a remote computer, `Start-Job` runs in a session in the remote session.
-## Related links
+## RELATED LINKS
[about_Arrays](./about/about_arrays.md)
Microsoft.PowerShell.Core Stop Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Stop-Job.md
Title: Stop-Job
--- # Stop-Job
-## Synopsis
+## SYNOPSIS
Stops a PowerShell background job.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Stop-Job [-PassThru] [-State] <JobState> [-WhatIf] [-Confirm] [<CommonParameters
Stop-Job [-PassThru] [-Filter] <Hashtable> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Job` cmdlet stops PowerShell background jobs that are in progress. You can use this cmdlet to stop all jobs or stop selected jobs based on their name, ID, instance ID, or state, or by passing
either by using the `Import-Module` cmdlet or by using or getting a cmdlet in th
information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Stop a job on a remote computer by using Invoke-Command
display confirms that the state of the job is Stopped.
For more information about remote background jobs, see [about_Remote_Jobs](About/about_Remote_Jobs.md).
-## Parameters
+## PARAMETERS
### -Filter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSRemotingJob This cmdlet returns a job object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Switch Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Switch-Process.md
schema: 2.0.0
# Switch-Process
-## Synopsis
+## SYNOPSIS
On Linux and macOS, the cmdlet calls the `execv()` function to provide similar behavior as POSIX shells.
-## Syntax
+## SYNTAX
``` Switch-Process [[-WithCommand] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Some native Unix commands shell out to run something (like ssh) and use the `bash` built-in command `exec` to spawn a new process that replaces the current one. By default, `exec` is not a valid
calls `execv()` function to provide similar behavior as POSIX shells.
The `PSExec` experimental feature must be enabled for this cmdlet to be available. This cmdlet is only available for non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1 - Execute a command that depends on `exec`
ssh-copy-id user@host
With the `PSExec` feature enabled, the `ssh-copy-id` script succeeds.
-## Parameters
+## PARAMETERS
### -WithCommand
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
This feature is not intended to have parity with the built-in `exec` function in POSIX shells (like how file descriptors are handled), but should cover most cases.
Microsoft.PowerShell.Core Test Modulemanifest (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Test-ModuleManifest.md
Title: Test-ModuleManifest
--- # Test-ModuleManifest
-## Synopsis
+## SYNOPSIS
Verifies that a module manifest file accurately describes the contents of a module.
-## Syntax
+## SYNTAX
``` Test-ModuleManifest [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ModuleManifest` cmdlet verifies that the files that are listed in the module manifest (`.psd1`) file are actually in the specified paths.
module.
that `Get-Module` returns. If any files are not in the locations specified in the manifest, the cmdlet also generates an error for each missing file.
-## Examples
+## EXAMPLES
### Example 1: Test a manifest
previous command generates no error, the command displays `$True`, and `$False`
You can use this function in conditional statements, such as those that might precede an `Import-Module` command or a command that uses the module.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe the path to a module manifest to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo This cmdlet returns a **PSModuleInfo** object that represents the module. It returns this object even if the manifest has errors.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-ModuleMember](Export-ModuleMember.md)
Microsoft.PowerShell.Core Test Pssessionconfigurationfile (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Test-PSSessionConfigurationFile.md
Title: Test-PSSessionConfigurationFile
--- # Test-PSSessionConfigurationFile
-## Synopsis
+## SYNOPSIS
Verifies the keys and values in a session configuration file.
-## Syntax
+## SYNTAX
``` Test-PSSessionConfigurationFile [-Path] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
configuration files, see [about_Session_Configuration_Files](About/about_Session
This cmdlet was introduced in PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Test a session configuration file
the **ConfigFilePath** property value. Then it uses the `Test-PSSessionConfigura
test the file in the **ConfigFilePath** value. The **Verbose** parameter returns the file error when the file fails the test.
-## Parameters
+## PARAMETERS
### -Path
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
+## INPUTS
### System.String You can pipe a session configuration file path to `Test-PSSessionConfigurationFile`.
-## Outputs
+## OUTPUTS
### System.Boolean
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Unregister Pssessionconfiguration (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Unregister-PSSessionConfiguration.md
Title: Unregister-PSSessionConfiguration
--- # Unregister-PSSessionConfiguration
-## Synopsis
+## SYNOPSIS
Deletes registered session configurations from the computer.
-## Syntax
+## SYNTAX
``` Unregister-PSSessionConfiguration [-Name] <String> [-Force] [-NoServiceRestart] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
If you accidentally delete the default **Microsoft.PowerShell** or **Microsoft.P
session configurations, use the `Enable-PSRemoting` cmdlet to restore them. For more information, see [about_Session_Configurations](About/about_Session_Configurations.md).
-## Examples
+## EXAMPLES
### Example 1: Delete a session configuration
Finally, the `New-PSSession` cmdlet tries to create a session that uses the **Ma
configuration. This time, the session fails because the **MaintenanceShell** configuration was deleted when the WinRM service restarted.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration You can pipe a session configuration object from `Get-PSSessionConfiguration` to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet you must start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Disable-PSSessionConfiguration](Disable-PSSessionConfiguration.md)
Microsoft.PowerShell.Core Update Help (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Update-Help.md
Title: Update-Help
# Update-Help
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest help files on your computer.
-## Syntax
+## SYNTAX
### Path (Default)
Update-Help [[-Module] <String[]>] [-FullyQualifiedModule <ModuleSpecification[]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Help` cmdlet downloads the newest help files for PowerShell modules and installs them on your computer. You need not restart PowerShell to make the change effective. You can use the
The `Update-Help` cmdlet was introduced in Windows PowerShell 3.0.
> Core modules, start PowerShell by using the **Run as administrator** option. > For example: `Start-Process pwsh.exe -Verb RunAs`.
-## Examples
+## EXAMPLES
### Example 1: Update help files for all modules
ADDSDeployment en-US
ADFS en-US 3.0.0.0 ```
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.IO.DirectoryInfo
You can pipe a directory path to `Update-Help`.
You can pipe a module object from the `Get-Module` cmdlet to `Update-Help`.
-## Outputs
+## OUTPUTS
### None `Update-Help` doesn't generate any output.
-## Notes
+## NOTES
To update help for the core PowerShell modules, that contain the commands that are installed with PowerShell, or any module in the `$PSHOME\Modules` directory, start PowerShell with the option to
that you author, see [Supporting Updatable Help](/powershell/scripting/developer
The `Update-Help` and `Save-Help` cmdlets are not supported on Windows Preinstallation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
Microsoft.PowerShell.Core Wait Job (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Wait-Job.md
Title: Wait-Job
--- # Wait-Job
-## Synopsis
+## SYNOPSIS
Waits until one or all of the PowerShell jobs running in the session are in a terminating state.
-## Syntax
+## SYNTAX
### SessionIdParameterSet (Default)
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-State] <JobState> [<CommonParamete
Wait-Job [-Any] [-Timeout <Int32>] [-Force] [-Filter] <Hashtable> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Job` cmdlet waits for a job to be in a terminating state before continuing execution. The terminating states are:
type, import the module that supports the custom job type into the session befor
module. For information about a particular custom job type, see the documentation of the custom job type feature.
-## Examples
+## EXAMPLES
### Example 1: Wait for all jobs
Wait-Job -Id 1
This command waits for the job with an ID value of 1.
-## Parameters
+## PARAMETERS
### -Any
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.RemotingJob You can pipe a job object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSRemotingJob This cmdlet returns job objects that represent the jobs in a terminating state. If the wait ends because the value of the **Timeout** parameter is exceeded, `Wait-Job` does not return any objects.
-## Notes
+## NOTES
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the following states:
By default, `Wait-Job` returns, or ends the wait, when jobs are in one of the fo
- Disconnected To direct `Wait-Job` to continue to wait for Suspended and Disconnected jobs, use the **Force** parameter.
-## Related links
+## RELATED LINKS
[Get-Job](Get-Job.md)
Microsoft.PowerShell.Core Where Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Core/Where-Object.md
Title: Where-Object
--- # Where-Object
-## Synopsis
+## SYNOPSIS
Selects objects from a collection based on their property values.
-## Syntax
+## SYNTAX
### EqualSet (Default)
Where-Object [-InputObject <PSObject>] [-Property] <String> [[-Value] <Object>]
Where-Object [-InputObject <PSObject>] [-Property] <String> -Not [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Where-Object` cmdlet selects objects that have particular property values from the collection of objects that are passed to it. For example, you can use the `Where-Object` cmdlet to select files
The previous example is functionally equivalent to:
For more information about how booleans are evaluated, see [about_Booleans](about/about_Booleans.md).
-## Examples
+## EXAMPLES
### Example 1: Get stopped services
valid only in script blocks. You cannot use them in the comparison statement for
- For more information about the Updatable Help feature, see [about_Updatable_Help](./About/about_Updatable_Help.md).
-## Parameters
+## PARAMETERS
### -CContains
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns selected items from the input object set.
-## Notes
+## NOTES
Starting in Windows PowerShell 4.0, `Where` and `ForEach` methods were added for use with collections. You can read more about these new methods here [about_arrays](./About/about_Arrays.md)
-## Related links
+## RELATED LINKS
[Compare-Object](../Microsoft.PowerShell.Utility/Compare-Object.md)
Microsoft.PowerShell.Diagnostics Get Counter (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Diagnostics/Get-Counter.md
Title: Get-Counter
# Get-Counter
-## Synopsis
+## SYNOPSIS
Gets performance counter data from local and remote computers.
-## Syntax
+## SYNTAX
### GetCounterSet (Default)
Get-Counter [[-Counter] <String[]>] [-SampleInterval <Int32>] [-MaxSamples <Int6
Get-Counter [-ListSet] <String[]> [-ComputerName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
> performance objects, counters, and instances. The names will be different on a system that uses > another language. Use the `Get-Counter -ListSet` command to see the localized names.
-## Examples
+## EXAMPLES
### Example 1: Get the counter set list
objects down the pipeline. `Sort-Object` uses the **Property** parameter to sort
the columns for the output. The **AutoSize** parameter adjusts the column widths to minimize truncation.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String[] `Get-Counter` accepts pipeline input for counter paths and counter set names.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GetCounter.CounterSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet, Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample
that are output are as follows:
**CounterSamples** property: **Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSample**
-## Notes
+## NOTES
If no parameters are specified, `Get-Counter` gets one sample for each specified performance counter. Use the **MaxSamples** and **Continuous** parameters to get more samples.
command. To set different values for different counters, enter separate `Get-Cou
In PowerShell 7, when using the **ListSet** parameter, `Get-Counter` can't retrieve the **Description** property of the counter set. The **Description** is set to `$null`.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Diagnostics Get Winevent (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Diagnostics/Get-WinEvent.md
Title: Get-WinEvent
# Get-WinEvent
-## Synopsis
+## SYNOPSIS
Gets events from event logs and event tracing log files on local and remote computers.
-## Syntax
+## SYNTAX
### GetLogSet (Default)
Get-WinEvent [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCrede
[-FilterXml] <XmlDocument> [-Oldest] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
table queries.
If you're not running PowerShell as an Administrator, you might see error messages that you cannot retrieve information about a log.
-## Examples
+## EXAMPLES
### Example 1: Get all the logs from a local computer
Get-WinEvent -FilterHashtable $filter
In this example, `Get-WinEvent` gets all events from the **Application** log for the last two days except those that have a **Level** of 4 (Information).
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String, System.Xml.XmlDocument, System.Collections.Hashtable You can pipeline a **LogName** (string), a **FilterXML** query, or a **FilterHashtable** query to `Get-WinEvent`.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Eventing.Reader.EventLogConfiguration, System.Diagnostics.Eventing.Reader.EventLogRecord, System.Diagnostics.Eventing.Reader.ProviderMetadata
With the **ListProvider** parameter, `Get-WinEvent` returns
With all other parameters, `Get-WinEvent` returns **System.Diagnostics.Eventing.Reader.EventLogRecord** objects.
-## Notes
+## NOTES
`Get-WinEvent` is designed to replace the `Get-EventLog` cmdlet on computers running Windows Vista and later versions of Windows. `Get-EventLog` gets events only in classic event logs. `Get-EventLog`
is retained for backward compatibility.
The `Get-WinEvent` and `Get-EventLog` cmdlets are not supported in Windows Pre-installation Environment (Windows PE).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/about/about_automatic_variables.md)
Microsoft.PowerShell.Diagnostics New Winevent (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Diagnostics/New-WinEvent.md
Title: New-WinEvent
--- # New-WinEvent
-## Synopsis
+## SYNOPSIS
Creates a new Windows event for the specified event provider.
-## Syntax
+## SYNTAX
``` New-WinEvent [-ProviderName] <String> [-Id] <Int32> [-Version <Byte>] [[-Payload] <Object[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `New-WinEvent` cmdlet creates an Event Tracing for Windows (ETW) event for an event provider. You can use this cmdlet to add events to ETW channels from PowerShell.
-## Examples
+## EXAMPLES
### Example 1
New-WinEvent -ProviderName Microsoft-Windows-PowerShell -Id 45090 -Payload @("Wo
This command uses the `New-WinEvent` cmdlet to create event 45090 for the Microsoft-Windows-PowerShell provider.
-## Parameters
+## PARAMETERS
### -Id
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
+## INPUTS
### None This cmdlet does not take input from the pipeline.
-## Outputs
+## OUTPUTS
### None This cmdlet does to generate any output.
-## Notes
+## NOTES
- After the provider writes the event to an eventlog, you can use the `Get-WinEvent` cmdlet to get the event from the event log.
-## Related links
+## RELATED LINKS
[Get-WinEvent](Get-WinEvent.md)
Microsoft.PowerShell.Host Start Transcript (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Host/Start-Transcript.md
Title: Start-Transcript
--- # Start-Transcript
-## Synopsis
+## SYNOPSIS
Creates a record of all or part of a PowerShell session to a text file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Start-Transcript [[-OutputDirectory] <String>] [-Append] [-Force] [-NoClobber]
[-IncludeInvocationHeader] [-UseMinimalHeader] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Transcript` cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the
share.
If the target file doesn't have a Byte Order Mark (BOM), `Start-Transcript` defaults to `Utf8NoBom` encoding in the target file.
-## Examples
+## EXAMPLES
### Example 1: Start a transcript file with default settings
This command starts a transcript in the `Transcript0.txt` file in `C:\transcript
**NoClobber** parameter is used, the command prevents any existing files from being overwritten. If the `Transcript0.txt` file already exists, the command fails.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a confirmation message and the path to the output file.
-## Notes
+## NOTES
To stop a transcript, use the `Stop-Transcript` cmdlet. To record an entire session, add the `Start-Transcript` command to your profile. For more information, see [about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
-## Related links
+## RELATED LINKS
[Stop-Transcript](Stop-Transcript.md)
Microsoft.PowerShell.Host Stop Transcript (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Host/Stop-Transcript.md
Title: Stop-Transcript
--- # Stop-Transcript
-## Synopsis
+## SYNOPSIS
Stops a transcript.
-## Syntax
+## SYNTAX
``` Stop-Transcript [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Transcript` cmdlet stops a transcript that was started by the `Start-Transcript` cmdlet. Alternatively, you can end a session to stop a transcript.
-## Examples
+## EXAMPLES
### Example 1: Stop all transcripts
Stop-Transcript
This command stops all transcripts.
-## Parameters
+## PARAMETERS
### 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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains a status message and the path to the output file.
-## Notes
+## NOTES
* If a transcript has not been started, the command fails. *
-## Related links
+## RELATED LINKS
[Start-Transcript](Start-Transcript.md)
Microsoft.PowerShell.Management Add Content (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Add-Content.md
Title: Add-Content
--- # Add-Content
-## Synopsis
+## SYNOPSIS
Adds content to the specified items, such as adding words to a file.
-## Syntax
+## SYNTAX
### Path (Default)
Add-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Content` cmdlet appends content to a specified item or file. You can specify the content by typing the content in the command or by specifying an object that contains the content. If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Add a string to all text files with an exception
directory.
Add-Content -Path C:\Temp\* -Filter *.txt -Value "Done" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object, System.Management.Automation.PSCredential You can pipe values, paths, or credentials to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Add-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- When you pipe an object to `Add-Content`, the object is converted to a string before it is added to the item. The object type determines the string format, but the format might be different than
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Clear Content (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Clear-Content.md
Title: Clear-Content
--- # Clear-Content
-## Synopsis
+## SYNOPSIS
Deletes the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Content -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [-Stream <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Content` cmdlet deletes the contents of an item, such as deleting the text from a file, but it does not delete the item. As a result, the item exists, but it is empty. The `Clear-Content` is similar to `Clear-Item`, but it works on items with contents, instead of items with values.
-## Examples
+## EXAMPLES
### Example 1: Delete all content from a directory
PS C:\>Get-Content C:\Test\Copy-Script.ps1 -Stream Zone.Identifier
PS C:\> ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Clear-Content`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any objects.
-## Notes
+## NOTES
You can use `Clear-Content` with the PowerShell FileSystem provider and with other providers that manipulate content. To clear items that are not considered to be content, such as items managed by
The `Clear-Content` cmdlet is designed to work with the data exposed by any prov
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Add-Content](Add-Content.md)
Microsoft.PowerShell.Management Clear Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Clear-Item.md
Title: Clear-Item
--- # Clear-Item
-## Synopsis
+## SYNOPSIS
Clears the contents of an item, but does not delete the item.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-Item -LiteralPath <String[]> [-Force] [-Filter <String>] [-Include <String
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Item` cmdlet clears the content of an item, but it does not delete the item. For example, the `Clear-Item` cmdlet can delete the value of a variable, but it does not delete the variable. The value that used to represent a cleared item is defined by each PowerShell provider. This cmdlet is similar to `Clear-Content`, but it works on aliases and variables, instead of files.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of a variable
You can use the **Include** and **Exclude** parameters to identify particular re
Clear-Item HKLM:\Software\MyCompany\MyKey -Confirm ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- The `Clear-Item` cmdlet is supported only by several PowerShell providers, including the **Alias**, **Environment**, **Function**, **Registry**, and **Variable** providers. As such, you can use
This cmdlet does not generate any output.
- You cannot use `Clear-Item` to delete the contents of a file, because the PowerShell FileSystem provider does not support this cmdlet. To clear files, use the `Clear-Content`.
-## Related links
+## RELATED LINKS
[Copy-Item](Copy-Item.md)
Microsoft.PowerShell.Management Clear Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Clear-ItemProperty.md
Title: Clear-ItemProperty
--- # Clear-ItemProperty
-## Synopsis
+## SYNOPSIS
Clears the value of a property but does not delete the property.
-## Syntax
+## SYNTAX
### Path (Default)
Clear-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-ItemProperty` cmdlet clears the value of a property, but it does not delete the property. You can use this cmdlet to delete the data from a registry value.
-## Examples
+## EXAMPLES
### Example 1: Clear the value of registry key
This command clears the data in the "Options" registry value in the "MyApp" subk
Clear-ItemProperty -Path "HKLM:\Software\MyCompany\MyApp" -Name "Options" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a path string to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, `Clear-ItemProperty` generates a **PSCustomObject** object that represents the cleared item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can use `Clear-ItemProperty` to delete the data in registry values without deleting the value. If the data type of the value is Binary or DWORD, clearing the data sets the value to zero.
that represents the cleared item property. Otherwise, this cmdlet does not gener
the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Copy-ItemProperty](Copy-ItemProperty.md)
Microsoft.PowerShell.Management Clear Recyclebin (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Title: Clear-RecycleBin
# Clear-RecycleBin
-## Synopsis
+## SYNOPSIS
Clears the contents of a recycle bin.
-## Syntax
+## SYNTAX
### All
Clears the contents of a recycle bin.
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
using Windows **Empty Recycle Bin**.
This cmdlet was readded in PowerShell 7.
-## Examples
+## EXAMPLES
### 1: Clear all recycle bins
clear all recycle bins on the local computer.
An alternative is to replace `-Force` with `-Confirm:$false`.
-## Parameters
+## PARAMETERS
### -DriveLetter
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
+## INPUTS
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Convert Path (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Convert-Path.md
Title: Convert-Path
--- # Convert-Path
-## Synopsis
+## SYNOPSIS
Converts a path from a PowerShell path to a PowerShell provider path.
-## Syntax
+## SYNTAX
### Path (Default)
Convert-Path [-Path] <String[]> [<CommonParameters>]
Convert-Path -LiteralPath <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Convert-Path` cmdlet converts a path from a PowerShell path to a PowerShell provider path.
-## Examples
+## EXAMPLES
### Example 1: Convert the working directory to a standard file system path
PS C:\> Convert-Path ~
C:\Users\User01 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the converted path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use in programs and
available in your session, type `Get-PSProvider`. For more information, see
`Convert-Path` only converts existing paths. It cannot be used to convert a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Join-Path](Join-Path.md)
Microsoft.PowerShell.Management Copy Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Copy-Item.md
Title: Copy-Item
# Copy-Item
-## Synopsis
+## SYNOPSIS
Copies an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-Item -LiteralPath <String[]> [[-Destination] <String>] [-Container] [-Force
[-WhatIf] [-Confirm] [-FromSession <PSSession>] [-ToSession <PSSession>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-Item` cmdlet copies an item from one location to another location in the same namespace. For instance, it can copy a file to a folder, but it can't copy a file to a certificate drive.
This cmdlet can copy and rename items in the same command. To rename an item, en
the value of the **Destination** parameter. To rename an item and not copy it, use the `Rename-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Copy a file to the specified directory
The `Copy-Item` cmdlet has the **Container** parameter set to `$false`. This cau
the source folder to be copied but does not preserve the folder structure. Notice that files with the same name are overwritten in the destination folder.
-## Parameters
+## PARAMETERS
### -Container
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the copied item When you use the **PassThru** parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management Copy Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Copy-ItemProperty.md
Title: Copy-ItemProperty
--- # Copy-ItemProperty
-## Synopsis
+## SYNOPSIS
Copies a property and value from a specified location to another location.
-## Syntax
+## SYNTAX
### Path (Default)
Copy-ItemProperty -LiteralPath <String[]> [-Name] <String> [-Destination] <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Copy-ItemProperty` cmdlet copies a property and value from a specified location to another location. For instance, you can use this cmdlet to copy one or more registry entries from one registry key to another registry key.
-## Examples
+## EXAMPLES
### Example 1: Copy a property from a registry key to another registry key
This command copies the property named "MyProperty" from the "MyApplication" reg
Copy-ItemProperty -Path "MyApplication" -Destination "HKLM:\Software\MyApplicationRev2" -Name "MyProperty" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **Passthru** parameter, this cmdlet generates a **PsCustomObject** representing the copied item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Debug Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Debug-Process.md
Title: Debug-Process
--- # Debug-Process
-## Synopsis
+## SYNOPSIS
Debugs one or more processes running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Debug-Process [-Id] <Int32[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Debug-Process -InputObject <Process[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Process` cmdlet attaches a debugger to one or more running processes on a local computer. You can specify the processes by their process name or process ID (PID), or you can pipe process
objects to this cmdlet.
This cmdlet attaches the debugger that is currently registered for the process. Before using this cmdlet, verify that a debugger is downloaded and correctly configured.
-## Examples
+## EXAMPLES
### Example 1: Attach a debugger to a process on the computer
computer. It saves the resulting process object in the variable named `$P`.
The second command uses the **InputObject** parameter of the `Debug-Process` cmdlet to submit the process object in the `$P` variable.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32, System.Diagnostics.Process, System.String You can pipe a process ID (Int32), a process object (System.Diagnostics.Process), or a process name (String) to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet uses the AttachDebugger method of the Windows Management Instrumentation (WMI) Win32_Process class. For more information about this method, see [AttachDebugger method](https://go.microsoft.com/fwlink/?LinkId=143640) in the MSDN library.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Childitem (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-ChildItem.md
Title: Get-ChildItem
--- # Get-ChildItem
-## Synopsis
+## SYNOPSIS
Gets the items and child items in one or more specified locations.
-## Syntax
+## SYNTAX
### Items (Default)
Get-ChildItem [[-Filter] <string>] -LiteralPath <string[]> [-Include <string[]>]
[-ReadOnly] [-System] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the **Recurse**
of levels to recurse.
Locations are exposed to `Get-ChildItem` by PowerShell providers. A location can be a file system directory, registry hive, or a certificate store. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Get child items from a file system directory
Mode LastWriteTime Length Name
l---- 12/16/2021 9:29 AM tmp -> C:\Users\user1\AppData\Local\Temp ```
-## Parameters
+## PARAMETERS
### -Attributes
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
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ChildItem`.
-## Outputs
+## OUTPUTS
### System.Object
path.
If you use the **Name** parameter, `Get-ChildItem` returns the object names as strings.
-## Notes
+## NOTES
- `Get-ChildItem` can be run using any of the built-in aliases, `ls`, `dir`, and `gci`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
If you use the **Name** parameter, `Get-ChildItem` returns the object names as s
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md)
Microsoft.PowerShell.Management Get Clipboard (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Clipboard.md
Title: Get-Clipboard
--- # Get-Clipboard
-## Synopsis
+## SYNOPSIS
Gets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Get-Clipboard [-Raw] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is not supported on macOS.**
returned as an array of strings similar to `Get-Content`.
> [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Get the content of the clipboard and display it to the command-line
Get-Clipboard
hello ```
-## Parameters
+## PARAMETERS
### -Raw
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-Clipboard](Set-Clipboard.md)
Microsoft.PowerShell.Management Get Computerinfo (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-ComputerInfo.md
Title: Get-ComputerInfo
--- # Get-ComputerInfo
-## Synopsis
+## SYNOPSIS
Gets a consolidated object of system and operating system properties.
-## Syntax
+## SYNTAX
``` Get-ComputerInfo [[-Property] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-ComputerInfo` cmdlet gets a consolidated object of system and operating system properties. This cmdlet was introduced in Windows PowerShell 5.1.
-## Examples
+## EXAMPLES
### Example 1: Get all computer properties
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0 ```
-## Parameters
+## PARAMETERS
### -Property
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Management.ComputerInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Content (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Content.md
Title: Get-Content
--- # Get-Content
-## Synopsis
+## SYNOPSIS
Gets the content of the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Content [-ReadCount <Int64>] [-TotalCount <Int64>] [-Tail <Int32>] -LiteralP
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Content` cmdlet gets the content of the item at the location specified by the path, such as the text in a file or the content of a function. For files, the content is read one line at a time
and returns a collection of objects, each of which represents a line of content.
Beginning in PowerShell 3.0, `Get-Content` can also get a specified number of lines from the beginning or end of an item.
-## Examples
+## EXAMPLES
### Example 1: Get the content of a text file
The **Raw** parameter ensures that the bytes are returned as a `[System.Byte[]]`
parameter was absent, the return value is a stream of bytes, which is interpreted by PowerShell as `[System.Object[]]`.
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int64, System.String[], System.Management.Automation.PSCredential You can pipe the read count, total count, paths, or credentials to `Get-Content`.
-## Outputs
+## OUTPUTS
### System.Byte, System.String `Get-Content` returns strings or bytes. The output type depends upon the type of content that you specify as input.
-## Notes
+## NOTES
The `Get-Content` cmdlet is designed to work with the data exposed by any provider. To get the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Management Get Hotfix (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-HotFix.md
Title: Get-HotFix
# Get-HotFix
-## Synopsis
+## SYNOPSIS
Gets the hotfixes that are installed on local or remote computers.
-## Syntax
+## SYNTAX
### Default (Default)
Get-HotFix [[-Id] <String[]>] [-ComputerName <String[]>] [-Credential <PSCredent
[<CommonParameters>] ```
-### Description
+### DESCRIPTION
``` Get-HotFix [-Description <String[]>] [-ComputerName <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Get-Hotfix` cmdlet gets hotfixes, or updates, that are installed on the loc
specified remote computers. The updates can be installed by Windows Update, Microsoft Update, Windows Server Update Services, or manually installed.
-## Examples
+## EXAMPLES
### Example 1: Get all hotfixes on the local computer
This example gets the most recent hotfix installed on a computer.
objects by ascending order and uses the **Property** parameter to evaluate each **InstalledOn** date. The array notation `[-1]` selects the most recent installed hotfix.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### String You can pipe one or more computer names to Get-HotFix.
-## Outputs
+## OUTPUTS
### System.Management.ManagementObject#root\CIMV2\Win32_QuickFixEngineering `Get-HotFix` returns objects that represent the hotfixes on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Installer (MSI) or the [Windows Update](https://update.microsoft.com) site are n
The `Get-HotFix` output might vary on different operating systems.
-## Related links
+## RELATED LINKS
[about_Arrays](../Microsoft.PowerShell.Core/About/about_Arrays.md)
Microsoft.PowerShell.Management Get Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Item.md
Title: Get-Item
--- # Get-Item
-## Synopsis
+## SYNOPSIS
Gets the item at the specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Get-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Excl
[-Force] [-Credential <PSCredential>] [-Stream <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Item` cmdlet gets the item at the specified location. It doesn't get the contents of the item at the location unless you use a wildcard character (`*`) to request all the contents of the
item.
This cmdlet is used by PowerShell providers to navigate through different types of data stores.
-## Examples
+## EXAMPLES
### Example 1: Get the current directory
The new properties that are now part of the output are:
> [!NOTE] > This feature was moved from experimental to mainstream in PowerShell 7.1.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the objects that it gets. The type is determined by the type of objects in the path.
-## Notes
+## NOTES
This cmdlet does not have a **Recurse** parameter, because it gets only an item, not its contents. To get the contents of an item recursively, use `Get-ChildItem`.
This cmdlet is designed to work with the data exposed by any provider. To list t
available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Get Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-ItemProperty.md
Title: Get-ItemProperty
--- # Get-ItemProperty
-## Synopsis
+## SYNOPSIS
Gets the properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemProperty -LiteralPath <String[]> [[-Name] <String[]>] [-Filter <String>]
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemProperty` cmdlet gets the properties of the specified items. For example, you can use this cmdlet to get the value of the LastAccessTime property of a file object. You can also use this cmdlet to view registry entries and their values.
-## Examples
+## EXAMPLES
### Example 1: Get information about a specific directory
CTPVersion : 5
PSCompatibleVersion : 1.0,2.0 ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-ItemProperty`.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime `Get-ItemProperty` returns an object for each item property that it gets. The object type depends on the object that is retrieved. For example, in a file system drive, it might return a file or folder.
-## Notes
+## NOTES
The `Get-ItemProperty` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Get Itempropertyvalue (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-ItemPropertyValue.md
Title: Get-ItemPropertyValue
--- # Get-ItemPropertyValue
-## Synopsis
+## SYNOPSIS
Gets the value for one or more properties of a specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Get-ItemPropertyValue -LiteralPath <String[]> [-Name] <String[]> [-Filter <Strin
[-Exclude <String[]>] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-ItemPropertyValue` gets the current value for a property that you specify when you use the **Name** parameter, located in a path that you specify with either the **Path** or **LiteralPath** parameters.
-## Examples
+## EXAMPLES
### Example 1: Get the value of the ProductID property
Target :
LinkType : ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean, System.String, System.DateTime
This cmdlet returns an object for each item property value that it gets.
The object type depends on the property value that is retrieved. For example, in a file system drive, the cmdlet might return a file or folder.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, run the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-ItemProperty](Get-ItemProperty.md)
Microsoft.PowerShell.Management Get Location (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Location.md
Title: Get-Location
--- # Get-Location
-## Synopsis
+## SYNOPSIS
Gets information about the current working location or a location stack.
-## Syntax
+## SYNTAX
### Location (Default)
Get-Location [-PSProvider <String[]>] [-PSDrive <String[]>] [<CommonParameters>]
Get-Location [-Stack] [-StackName <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Location` cmdlet gets an object that represents the current directory, much like the print working directory (pwd) command.
scripts, such as in a function that displays the current directory in the PowerS
You can also use this cmdlet to display the locations in a location stack. For more information, see the Notes and the descriptions of the **Stack** and **StackName** parameters.
-## Examples
+## EXAMPLES
### Example 1: Display your current drive location
change the prompt in your console by creating a new function named `prompt`.
To see the current prompt function, type the following command: `Get-Content Function:\prompt`
-## Parameters
+## PARAMETERS
### -PSDrive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo or System.Management.Automation.PathInfoStack If you use the **Stack** or **StackName** parameters, this cmdlet returns a **PathInfoStack** object. Otherwise, it returns a **PathInfo** object.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
cmdlet to display the locations in the unnamed stack. To make the unnamed stack
use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Pop-Location](Pop-Location.md)
Microsoft.PowerShell.Management Get Psdrive (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-PSDrive.md
Title: Get-PSDrive
--- # Get-PSDrive
-## Synopsis
+## SYNOPSIS
Gets drives in the current session.
-## Syntax
+## SYNTAX
### Name (Default)
Get-PSDrive [[-Name] <String[]>] [-Scope <String>] [-PSProvider <String[]>] [<Co
Get-PSDrive [-LiteralName] <String[]> [-Scope <String>] [-PSProvider <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSDrive` cmdlet gets the drives in the current session. You can get a particular drive or all drives in the session.
You do not need to restart Windows PowerShell. Similarly, when an external drive
from the computer, Windows PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Get drives in the current session
The last command uses the `Get-CimInstance` cmdlet to display the instances of t
**Win32_NetworkConnection** class. Like **net use**, it returns only the persistent G: drive created by `New-PSDrive`.
-## Parameters
+## PARAMETERS
### -LiteralName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo This cmdlet returns objects that represent the drives in the session.
-## Notes
+## NOTES
* This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, use the `Get-PSProvider` cmdlet. For more information, see
This cmdlet returns objects that represent the drives in the session.
sessions that are started without explicit credentials or with the credentials of the current user.
-## Related links
+## RELATED LINKS
[New-PSDrive](New-PSDrive.md)
Microsoft.PowerShell.Management Get Psprovider (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-PSProvider.md
Title: Get-PSProvider
--- # Get-PSProvider
-## Synopsis
+## SYNOPSIS
Gets information about the specified PowerShell provider.
-## Syntax
+## SYNTAX
``` Get-PSProvider [[-PSProvider] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSProvider` cmdlet gets the PowerShell providers in the current session. You can get a particular drive or all drives in the session.
PowerShell providers let you access a variety of data stores as though they were
For information about PowerShell providers, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Examples
+## EXAMPLES
### Example 1: Display a list of all available providers
This example shows that the tilde symbol (~) represents the value of the **Home*
FileSystem provider. The **Home** property value is optional, but for the **FileSystem** provider, it is defined as `$env:homedrive\$env:homepath` or `$home`.
-## Parameters
+## PARAMETERS
### -PSProvider
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### String[] You can pipe one or more provider name strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ProviderInfo This cmdlet returns objects that represent the PowerShell providers in the session.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Management Get Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Process.md
Title: Get-Process
--- # Get-Process
-## Synopsis
+## SYNOPSIS
Gets the processes that are running on the local computer.
-## Syntax
+## SYNTAX
### Name (Default)
Get-Process -InputObject <Process[]> [-Module] [-FileVersionInfo] [<CommonParame
Get-Process -InputObject <Process[]> -IncludeUserName [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Process` cmdlet gets the processes on a local or remote computer.
supports methods that let you start and stop the process. You can also use the p
`Get-Process` cmdlet to get file version information for the program that runs in the process and to get the modules that the process loaded.
-## Examples
+## EXAMPLES
### Example 1: Get a list of all active processes on the local computer
The **mainWindowTitle** property is just one of many useful properties of the **
that `Get-Process` returns. To view all of the properties, pipe the results of a `Get-Process` command to the `Get-Member` cmdlet `Get-Process | Get-Member`.
-## Parameters
+## PARAMETERS
### -FileVersionInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Diagnostics.Process, System.Diagnostics.FileVersionInfo, System.Diagnostics.ProcessModule
By default, this cmdlet returns a **System.Diagnostics.Process** object. If you
use the **Module** parameter, without the **FileVersionInfo** parameter, it returns a **System.Diagnostics.ProcessModule** object.
-## Notes
+## NOTES
- You can also refer to this cmdlet by its built-in aliases, ps and gps. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
use the **Module** parameter, without the **FileVersionInfo** parameter, it retu
- You can also use the built-in alternate views of the processes available with `Format-Table`, such as **StartTime** and **Priority**, and you can design your own views.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Get Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-Service.md
Title: Get-Service
# Get-Service
-## Synopsis
+## SYNOPSIS
Gets the services on the computer.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Service [-DependentServices] [-RequiredServices] [-Include <String[]>] [-Exc
[-InputObject <ServiceController[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
computer's services are returned.
You can direct this cmdlet to get only particular services by specifying the service name or the display name of the services, or you can pipe service objects to this cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get all services on the computer
quotation marks, is sent down the pipeline to `Get-Service`.
"WinRM" | Get-Service ```
-## Parameters
+## PARAMETERS
### -DependentServices
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns objects that represent the services on the computer.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
appears before because Running because Stopped has a value of 1, and Running has
more information, see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrollerstatus).
-## Related links
+## RELATED LINKS
[New-Service](New-Service.md)
Microsoft.PowerShell.Management Get Timezone (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Get-TimeZone.md
Title: Get-TimeZone
--- # Get-TimeZone
-## Synopsis
+## SYNOPSIS
Gets the current time zone or a list of available time zones.
-## Syntax
+## SYNTAX
### Name (Default)
Get-TimeZone -Id <String[]> [<CommonParameters>]
Get-TimeZone [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Get-TimeZone` cmdlet gets the current time zone or a list of available time zones.
-## Examples
+## EXAMPLES
### Example 1: Get the current time zone
Get-TimeZone -ListAvailable
This command gets all available time zones.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.TimeZoneInfo[]
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Set-TimeZone](Set-TimeZone.md)
Microsoft.PowerShell.Management Invoke Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Invoke-Item.md
Title: Invoke-Item
--- # Invoke-Item
-## Synopsis
+## SYNOPSIS
Performs the default action on the specified item.
-## Syntax
+## SYNTAX
### Path (Default)
Invoke-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Item` cmdlet performs the default action on the specified item. For example, it runs an executable file or opens a document file in the application associated with
the document file type.
The default action depends on the type of item and is determined by the PowerShell provider that provides access to the data.
-## Examples
+## EXAMPLES
### Example 1: Open a file
In this case, opening in Excel is the default action for `.xls` files.
Invoke-Item "C:\Documents and Settings\Lister\My Documents\*.xls" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None The command does not generate any output. However, output might be generated by the item that it invokes.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Join Path (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Join-Path.md
Title: Join-Path
--- # Join-Path
-## Synopsis
+## SYNOPSIS
Combines a path and a child path into a single path.
-## Syntax
+## SYNTAX
``` Join-Path [-Path] <String[]> [-ChildPath] <String> [[-AdditionalChildPath] <String[]>] [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-Path` cmdlet combines a path and child-path into a single path. The provider supplies the path delimiters.
-## Examples
+## EXAMPLES
### Example 1: Combine a path with a child path
The `AdditionalChildPath` parameter allows the joining of an unlimited number of
In this example, no parameter names are used, thus "a" binds to `Path`, "b" to `ChildPath` and "c-g" to `AdditionalChildPath`
-## Parameters
+## PARAMETERS
### -AdditionalChildPath
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String This cmdlet returns a string that contains the resulting path.
-## Notes
+## NOTES
The cmdlets that contain the Path noun (the Path cmdlets) manipulate path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for
This cmdlet is designed to work with the data exposed by any provider.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Move Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Move-Item.md
Title: Move-Item
--- # Move-Item
-## Synopsis
+## SYNOPSIS
Moves an item from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-Item -LiteralPath <String[]> [[-Destination] <String>] [-Force] [-Filter <S
[-Exclude <String[]>] [-PassThru] [-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-Item` cmdlet moves an item, including its properties, contents, and child items, from one location to another location. The locations must be supported by the same provider.
For example, it can move a file or subdirectory from one directory to another or
subkey from one key to another. When you move an item, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a file to another directory and rename it
misinterpreted.
The **Destination** parameter does not require a literal path, because the Destination variable also must be enclosed in single quotation marks, because it includes brackets that can be misinterpreted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the moved item When you use the *PassThru* parameter, this cmdlet generates an object representing the moved item. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet will move files between drives that are supported by the same provider, but it will move directories only within the same drive.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Move Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Move-ItemProperty.md
Title: Move-ItemProperty
--- # Move-ItemProperty
-## Synopsis
+## SYNOPSIS
Moves a property from one location to another.
-## Syntax
+## SYNTAX
### Path (Default)
Move-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Destination] <Str
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Move-ItemProperty` cmdlet moves a property of an item from one item to another item. For instance, it can move a registry entry from one registry key to another registry key. When you move an item property, it is added to the new location and deleted from its original location.
-## Examples
+## EXAMPLES
### Example 1: Move a registry value and its data to another key
subkey of the `HKLM\Software\MyCompany` registry key.
Move-ItemProperty "HKLM:\Software\MyCompany\MyApp" -Name "Version" -Destination "HKLM:\Software\MyCompany\NewApp" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSCustomObject When you use the **PassThru** parameter, this cmdlet generates a **PSCustomObject** representing the moved item property. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/New-Item.md
Title: New-Item
--- # New-Item
-## Synopsis
+## SYNOPSIS
Creates a new item.
-## Syntax
+## SYNTAX
### pathSet (Default)
New-Item [[-Path] <String[]>] -Name <String> [-ItemType <String>] [-Value <Objec
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Item` cmdlet creates a new item and sets its value. The types of items that can be created depend on the location of the item. For example, in the file system, `New-Item` creates files and
folders. In the registry, `New-Item` creates registry keys and entries.
`New-Item` can also set the value of the items that it creates. For example, when it creates a new file, `New-Item` can add initial content to the file.
-## Examples
+## EXAMPLES
### Example 1: Create a file in the current directory
Mode LastWriteTime Length Name
> the same as when overwriting a file. If the registry key already exists, the key and all > properties and values will be overwritten with an empty registry key.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe a value for the new item to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Object This cmdlet returns the item that it creates.
-## Notes
+## NOTES
`New-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management New Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/New-ItemProperty.md
Title: New-ItemProperty
--- # New-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates a new property for an item and sets its value.
-## Syntax
+## SYNTAX
### Path (Default)
New-ItemProperty -LiteralPath <String[]> [-Name] <String> [-PropertyType <String
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ItemProperty` cmdlet creates a new property for a specified item and sets its value. Typically, this cmdlet is used to create new registry values, because registry values are properties
This cmdlet does not add properties to an object.
- To add a property to an instance of an object, use the `Add-Member` cmdlet. - To add a property to all objects of a particular type, modify the Types.ps1xml file.
-## Examples
+## EXAMPLES
### Example 1: Add a registry entry
$newValue.multistring[0]
a ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject `New-ItemProperty` returns a custom object that contains the new property.
-## Notes
+## NOTES
`New-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management New Psdrive (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/New-PSDrive.md
Title: New-PSDrive
# New-PSDrive
-## Synopsis
+## SYNOPSIS
Creates temporary and persistent drives that are associated with a location in an item data store.
-## Syntax
+## SYNTAX
### All
New-PSDrive [-Name] <String> [-PSProvider] <String> [-Root] <String> [-Descripti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-PSDrive` cmdlet creates temporary and persistent drives that are mapped to or associated with a location in a data store, such as a network drive, a directory on the local computer, or a
information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Spla
> Unless you use the **Scope** parameter, PSDrives are created in the scope in which the > `New-PSDrive` command is run.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary drive mapped to a network share
New-PSDrive -Persist -Name "X" -PSProvider "FileSystem" -Root "\\Server01\Public
To ensure that the drive is available outside of the script to must use the **Scope** parameter to create the drive in the **Global** scope.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipeline input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSDriveInfo
-## Notes
+## NOTES
`New-PSDrive` is designed to work with the data exposed by any provider. To list the providers available in your session, use `Get-PSProvider`. For more information about providers, see
Mapped network drives are specific to a user account. Mapped drives created in e
sessions using the credential of another user aren't visible in sessions started using different credentials.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Management New Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/New-Service.md
Title: New-Service
--- # New-Service
-## Synopsis
+## SYNOPSIS
Creates a new Windows service.
-## Syntax
+## SYNTAX
``` New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>] [-Description <String>]
New-Service [-Name] <String> [-BinaryPathName] <String> [-DisplayName <String>]
[-DependsOn <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
service database. A new service requires an executable file that runs during the
The parameters of this cmdlet let you set the display name, description, startup type, and dependencies of the service.
-## Examples
+## EXAMPLES
### Example 1: Create a service
New-Service @params
The **SecurityDescriptor** is stored in the `$SDDLToSet` variable. The **SecurityDescriptorSddl** parameter uses `$SDDL` to set the **SecurityDescriptor** of the new service.
-## Parameters
+## PARAMETERS
### -BinaryPathName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController This cmdlet returns an object that represents the new service.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Pop Location (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Pop-Location.md
Title: Pop-Location
--- # Pop-Location
-## Synopsis
+## SYNOPSIS
Changes the current location to the location most recently pushed onto the stack.
-## Syntax
+## SYNTAX
``` Pop-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Pop-Location` cmdlet changes the current location to the location most recently pushed onto the stack by using the `Push-Location` cmdlet. You can pop a location from the default stack or from a stack that you create by using a `Push-Location` command.
-## Examples
+## EXAMPLES
### Example 1: Change to most recent location
the PowerShell certificate provider.
The last two commands pop those locations off the stack. The first `popd` command returns to the Registry drive, and the second command returns to the file system drive.
-## Parameters
+## PARAMETERS
### -PassThru
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo
This cmdlet generates a **System.Management.Automation.PathInfo** object that re
location, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
You can also refer to `Pop-Location` by its built-in alias, `popd`. For more inf
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Push Location (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Push-Location.md
Title: Push-Location
--- # Push-Location
-## Synopsis
+## SYNOPSIS
Adds the current location to the top of a location stack.
-## Syntax
+## SYNTAX
### Path (Default)
Push-Location [[-Path] <String>] [-PassThru] [-StackName <String>] [<CommonParam
Push-Location [-LiteralPath <String>] [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Push-Location` cmdlet adds ("pushes") the current location onto a location stack. If you specify a path, `Push-Location` pushes the current location onto a location stack and then changes
does not exist, `Push-Location` creates it.
For more information about location stacks, see the [Notes](#notes).
-## Examples
+## EXAMPLES
### Example 1
the `Pop-Location` cmdlet to pop the original location (`C:\`) from the Stack2 s
For more information about location stacks, see the [Notes](#notes).
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path (but not a literal path) to `Push-Location`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PathInfo
When you use the **PassThru** parameter, `Push-Location` generates a
**System.Management.Automation.PathInfo** object that represents the location. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
The `Push-Location` cmdlet is designed to work with the data exposed by any prov
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Remove Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Remove-Item.md
Title: Remove-Item
--- # Remove-Item
-## Synopsis
+## SYNOPSIS
Deletes the specified items.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-Item -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-E
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Item` cmdlet deletes one or more items. Because it is supported by many providers, it can delete many different types of items, including files, folders, registry keys, variables, aliases, and functions.
-## Examples
+## EXAMPLES
### Example 1: Delete files that have any file name extension
The **Stream** parameter `Get-Item` gets the `Zone.Identifier` stream of the `Co
file. `Remove-Item` uses the **Stream** parameter to remove the `Zone.Identifier` stream of the file. Finally, the `Get-Item` cmdlet shows that the `Zone.Identifier` stream was deleted.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
The `Remove-Item` cmdlet is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see
When you try to delete a folder that contains items without using the **Recurse*
cmdlet prompts for confirmation. Using `-Confirm:$false` does not suppress the prompt. This is by design.
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Remove Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Remove-ItemProperty.md
Title: Remove-ItemProperty
--- # Remove-ItemProperty
-## Synopsis
+## SYNOPSIS
Deletes the property and its value from an item.
-## Syntax
+## SYNTAX
### Path (Default)
Remove-ItemProperty -LiteralPath <String[]> [-Name] <String[]> [-Force] [-Filter
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-ItemProperty` cmdlet deletes a property and its value from an item. You can use it to delete registry values and the data that they store.
-## Examples
+## EXAMPLES
### Example 1: Delete a registry value
It uses a pipeline operator (`|`) to send the object to `Remove-ItemProperty`.
Then, it uses the **Name** parameter of `Remove-ItemProperty` to specify the name of the registry value.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- In the PowerShell Registry provider, registry values are considered to be properties of a registry key or subkey. You can use the **ItemProperty** cmdlets to manage these values.
This cmdlet does not return any output.
providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-Item](Get-Item.md)
Microsoft.PowerShell.Management Remove Psdrive (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Remove-PSDrive.md
Title: Remove-PSDrive
--- # Remove-PSDrive
-## Synopsis
+## SYNOPSIS
Deletes temporary PowerShell drives and disconnects mapped network drives.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-PSDrive [-LiteralName] <String[]> [-PSProvider <String[]>] [-Scope <Strin
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSDrive` cmdlet deletes temporary PowerShell drives that were created by using the `New-PSDrive` cmdlet.
Beginning in Windows PowerShell 3.0, when an external drive is connected to the
You do not need to restart PowerShell. Similarly, when an external drive is disconnected from the computer, PowerShell automatically deletes the PSDrive that represents the removed drive.
-## Examples
+## EXAMPLES
### Example 1: Remove a file system drive
This command uses `Remove-PSDrive` to disconnect the X: and S: mapped network dr
Get-PSDrive X, S | Remove-PSDrive ```
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.Management.Automation.PSDriveInfo You can pipe a drive object, such as one from the `Get-PSDrive` cmdlet, to the `Remove-PSDrive` cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- The `Remove-PSDrive` cmdlet is designed to work with the data exposed by any PowerShell provider. To list the providers in your session, use the `Get-PSProvider` cmdlet. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Get-PSDrive](Get-PSDrive.md)
Microsoft.PowerShell.Management Remove Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Remove-Service.md
Title: Remove-Service
--- # Remove-Service
-## Synopsis
+## SYNOPSIS
Removes a Windows service.
-## Syntax
+## SYNTAX
### Name (Default)
Remove-Service [-Name] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-Service [-InputObject <ServiceController>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Service` cmdlet removes a Windows service in the registry and in the service database. The `Remove-Service` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1: Remove a service
the object to `Remove-Service`, which removes the service.
Get-Service -DisplayName "Test Service" | Remove-Service ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. To run this cmdlet, start PowerShell by using the **Run as administrator** option.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Rename Computer (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Rename-Computer.md
Title: Rename-Computer
--- # Rename-Computer
-## Synopsis
+## SYNOPSIS
Renames a computer.
-## Syntax
+## SYNTAX
``` Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCredential>]
Rename-Computer [-ComputerName <String>] [-PassThru] [-DomainCredential <PSCrede
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
It renames one computer in each command.
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Rename the local computer
The **Force** parameter suppresses the confirmation prompt.
Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force ```
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not have parameters that take input by value. However, you can pipe the values of the **ComputerName** and **NewName** properties of objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ComputerChangeInfo This cmdlet returns a **ComputerChangeInfo** object, if you specify the **PassThru** parameter. Otherwise, it does not return any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Rename Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Rename-Item.md
Title: Rename-Item
--- # Rename-Item
-## Synopsis
+## SYNOPSIS
Renames an item in a PowerShell provider namespace.
-## Syntax
+## SYNTAX
### ByPath (Default)
Rename-Item -LiteralPath <String> [-NewName] <String> [-Force] [-PassThru]
[-Credential <PSCredential>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-Item` cmdlet changes the name of a specified item. This cmdlet does not affect the content of the item being renamed.
content of the item being renamed.
You can't use `Rename-Item` to move an item, such as by specifying a path together with the new name. To move and rename an item, use the `Move-Item` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Rename a file
command through the pipeline. The script block uses the `-replace` operator to r
extension of each file with `.log`. Notice that matching using the `-replace` operator is not case sensitive.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object that represents the renamed item. This cmdlet generates an object that represents the renamed item, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Rename-Item` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Rename Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Rename-ItemProperty.md
Title: Rename-ItemProperty
--- # Rename-ItemProperty
-## Synopsis
+## SYNOPSIS
Renames a property of an item.
-## Syntax
+## SYNTAX
### Path (Default)
Rename-ItemProperty -LiteralPath <String> [-Name] <String> [-NewName] <String> [
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Rename-ItemProperty` cmdlet changes the name of a specified item property. The value of the property is not changed. For example, you can use `Rename-ItemProperty` to change the name of a registry entry.
-## Examples
+## EXAMPLES
### Example 1: Rename a registry entry
This command renames the config registry entry that is contained in the
Rename-ItemProperty -Path HKLM:\Software\SmpApplication -Name config -NewName oldconfig ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject This cmdlet generates a **PSCustomObject** that represents the renamed item property, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Resolve Path (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Resolve-Path.md
Title: Resolve-Path
--- # Resolve-Path
-## Synopsis
+## SYNOPSIS
Resolves the wildcard characters in a path, and displays the path contents.
-## Syntax
+## SYNTAX
### Path (Default)
Resolve-Path [-Path] <String[]> [-Relative] [-Credential <PSCredential>] [<Commo
Resolve-Path -LiteralPath <String[]> [-Relative] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Resolve-Path` cmdlet displays the items and containers that match the wildcard pattern at the location specified. The match can include files, folders, registry keys, or any other object accessible from a PSDrive provider.
-## Examples
+## EXAMPLES
### Example 1: Resolve the home folder path
expression.
PS C:\> Resolve-Path -LiteralPath 'test[xml]' ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet
-## Outputs
+## OUTPUTS
### System.Management.Automation.PathInfo, System.String Returns a **PathInfo** object. Returns a string value for the resolved path if you specify the **Relative** parameter.
-## Notes
+## NOTES
The `*-Path` cmdlets work with the FileSystem, Registry, and Certificate providers.
session, type `Get-PSProvider`. For more information, see
`Resolve-Path` only resolves existing paths. It cannot be used to resolve a location that does not exist yet.
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Restart Computer (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Restart-Computer.md
Title: Restart-Computer
# Restart-Computer
-## Synopsis
+## SYNOPSIS
Restarts the operating system on local and remote computers.
-## Syntax
+## SYNTAX
### DefaultSet (Default)
Restart-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[-Delay <Int16>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
command. Specify a waiting time-out and query interval, and wait for particular
available on the restarted computer. This feature makes it practical to use `Restart-Computer` in scripts and functions.
-## Examples
+## EXAMPLES
### Example 1: Restart the local computer
Restart-Computer -ComputerName Server01 -WsmanAuthentication Kerberos
`Restart-Computer` uses the **ComputerName** parameter to specify the remote computer, **Server01**. The **WsmanAuthentication** parameter specifies the authentication method as **Kerberos**.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### System.String `Restart-Computer` accepts computer names from the pipeline or variables.
-## Outputs
+## OUTPUTS
### None `Restart-Computer` doesn't generate any output.
-## Notes
+## NOTES
- In Windows, `Restart-Computer` uses the [Win32Shutdown method](/windows/desktop/CIMWin32Prov/win32shutdown-method-in-class-win32-operatingsystem) of the Windows Management Instrumentation (WMI) [Win32_OperatingSystem](/windows/desktop/CIMWin32Prov/win32-operatingsystem)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
used to restart the machine. - On Linux and Mac OS, `Restart-Computer` uses the `/sbin/shutdown` bash tool.
-## Related links
+## RELATED LINKS
[About Windows Remote Management](/windows/desktop/WinRM/about-windows-remote-management)
Microsoft.PowerShell.Management Restart Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Restart-Service.md
Title: Restart-Service
--- # Restart-Service
-## Synopsis
+## SYNOPSIS
Stops and then starts one or more services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Restart-Service [-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
notifying you of an error. You can specify the services by their service names o
you can use the **InputObject** parameter to pass an object that represents each service that you want to restart.
-## Examples
+## EXAMPLES
### Example 1: Restart a service on the local computer
sends the selected services to `Restart-Service`.
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
restarted service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Resume Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Resume-Service.md
Title: Resume-Service
--- # Resume-Service
-## Synopsis
+## SYNOPSIS
Resumes one or more suspended (paused) services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Resume-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclu
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is ignored. You can specify the services by their service names or display names
**InputObject** parameter to pass a service object that represents the services that you want to resume.
-## Examples
+## EXAMPLES
### Example 1: Resume a service on the local computer
next pipeline operator sends the results to `Resume-Service`, which resumes the
In practice, you would use the **WhatIf** parameter to determine the effect of the command before you run it.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
resumed service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Clipboard (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-Clipboard.md
Title: Set-Clipboard
--- # Set-Clipboard
-## Synopsis
+## SYNOPSIS
Sets the contents of the clipboard.
-## Syntax
+## SYNTAX
``` Set-Clipboard -Value <String[]> [-Append] [-WhatIf] [-Confirm] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Clipboard` cmdlet sets the contents of the clipboard. > [!NOTE] > On Linux, this cmdlet requires the `xclip` utility to be in the path.
-## Examples
+## EXAMPLES
### Example 1: Copy text to the clipboard
ssh key so that it can be pasted into another application, like GitHub.
Get-Content C:\Users\user1\.ssh\id_ed25519.pub | Set-Clipboard ```
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
In rare cases when using `Set-Clipboard` with a high number of values in rapid succession, like in a loop, you might sporadically get a blank value from the clipboard. This can be fixed by using `Start-Sleep -Milliseconds 1` in the loop.
-## Related links
+## RELATED LINKS
[Get-Clipboard](Get-Clipboard.md)
Microsoft.PowerShell.Management Set Content (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-Content.md
Title: Set-Content
--- # Set-Content
-## Synopsis
+## SYNOPSIS
Writes new content or replaces existing content in a file.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Content [-Value] <Object[]> -LiteralPath <string[]> [-PassThru] [-Filter <st
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Set-Content` is a string-processing cmdlet that writes new content or replaces the content in a file. `Set-Content` replaces the existing content and differs from the `Add-Content` cmdlet that
the command line or send content through the pipeline.
If you need to create files or directories for the following examples, see [New-Item](New-Item.md).
-## Examples
+## EXAMPLES
### Example 1: Replace the contents of multiple files in a directory
directory to the **Value** empty.
Set-Content -Path C:\Temp\* -Filter *.txt -Value "Empty" ```
-## Parameters
+## PARAMETERS
### -AsByteStream
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that contains the new value for the item to `Set-Content`.
-## Outputs
+## OUTPUTS
### None or System.String When you use the **PassThru** parameter, `Set-Content` generates a **System.String** object that represents the content. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Set-Content` by its built-in alias, `sc`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
represents the content. Otherwise, this cmdlet does not generate any output.
providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Management Set Item (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-Item.md
Title: Set-Item
--- # Set-Item
-## Synopsis
+## SYNOPSIS
Changes the value of an item to the value specified in the command.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Item -LiteralPath <String[]> [[-Value] <Object>] [-Force] [-PassThru] [-Filt
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Item` cmdlet changes the value of an item, such as a variable or registry key, to the value specified in the command.
-## Examples
+## EXAMPLES
### Example 1: Create an alias
The **Options** parameter is available in `Set-Item` only when you use it with t
Set-Item -Path function:prompt -Options "AllScope,ReadOnly" ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the new value of the item to this cmdlet.
-## Outputs
+## OUTPUTS
### None or an object representing the new or changed item. This cmdlet generates an object that represent the item, if you specify the *PassThru* parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- `Set-Item` is not supported by the PowerShell FileSystem provider. To change the values of items in the file system, use the `Set-Content` cmdlet.
Otherwise, this cmdlet does not generate any output.
To list the providers available in your session, type `Get-PsProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-Item](Clear-Item.md)
Microsoft.PowerShell.Management Set Itemproperty (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-ItemProperty.md
Title: Set-ItemProperty
--- # Set-ItemProperty
-## Synopsis
+## SYNOPSIS
Creates or changes the value of a property of an item.
-## Syntax
+## SYNTAX
### propertyValuePathSet (Default)
Set-ItemProperty -LiteralPath <String[]> -InputObject <PSObject> [-PassThru] [-F
[-WhatIf] [-Confirm] [-Type <RegistryValueKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-ItemProperty` cmdlet changes the value of the property of the specified item. You can use the cmdlet to establish or change the properties of items.
file object to `$True`.
You also use `Set-ItemProperty` to create and change registry values and data. For example, you can add a new registry entry to a key and establish or change its value.
-## Examples
+## EXAMPLES
### Example 1: Set a property of a file
specify the property and its new value.
Get-ChildItem weekly.txt | Set-ItemProperty -Name IsReadOnly -Value $True ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PSCustomObject
This cmdlet generates a **PSCustomObject** object that represents the item that
new property value, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
`Set-ItemProperty` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Clear-ItemProperty](Clear-ItemProperty.md)
Microsoft.PowerShell.Management Set Location (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-Location.md
Title: Set-Location
--- # Set-Location
-## Synopsis
+## SYNOPSIS
Sets the current working location to a specified location.
-## Syntax
+## SYNTAX
### Path (Default)
Set-Location -LiteralPath <String> [-PassThru] [<CommonParameters>]
Set-Location [-PassThru] [-StackName <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Location` cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.
PowerShell 6.2 added support for `-` and `+` as a values for the **Path** parame
maintains a history of the last 20 locations that can be accessed with `-` and `+`. This list is independent from the location stack that is accessed using the **StackName** parameter.
-## Examples
+## EXAMPLES
### Example 1: Set the current location
PS Cert:\>
Using the alias, `cd -` or `cd +` is an easy way to navigate through your location history while in your terminal. For more information on navigating with `-`/`+`, see the **Path** parameter.
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Management.Automation.PathInfo, System.Management.Automation.PathInfoStack
This cmdlet does not generate any output unless you specify the **PassThru** par
new location. Using **PassThru** with **StackName** generates a **PathInfoStack** object representing the new stack context.
-## Notes
+## NOTES
PowerShell supports multiple runspaces per process. Each runspace has its own _current directory_. This is not the same as `[System.Environment]::CurrentDirectory`. This behavior can be an issue
If you make a named location stack the current location stack, you can no longer
the current stack, use the **StackName** parameter of the `Set-Location` cmdlet with a value of `$null` or an empty string (`""`).
-## Related links
+## RELATED LINKS
[Get-Location](Get-Location.md)
Microsoft.PowerShell.Management Set Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-Service.md
Title: Set-Service
# Set-Service
-## Synopsis
+## SYNOPSIS
Starts, stops, and suspends a service, and changes its properties.
-## Syntax
+## SYNTAX
### Name (Default)
Set-Service [-InputObject] <ServiceController> [-DisplayName <String>] [-Credent
[-Status <String>] [-Force] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The `Set-Service` cmdlet changes the properties of a service such as the **Statu
pause a service. To identify a service, enter its service name or submit a service object. Or, send a service name or service object down the pipeline to `Set-Service`.
-## Examples
+## EXAMPLES
### Example 1: Change a display name
The **SecurityDescriptor** is stored in the `$SDDL` variable. `Set-Service` uses
parameter to specify the **BITS** service. The **SecurityDescriptorSddl** parameter uses `$SDDL` to change the **SecurityDescriptor** for the **BITS** service.
-## Parameters
+## PARAMETERS
### -Credential
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can use the pipeline to send a service object or a string that contains a service name to `Set-Service`.
-## Outputs
+## OUTPUTS
### System.ServiceProcess.ServiceController By default, `Set-Service` doesn't return any objects. Use the **PassThru** parameter to output a **ServiceController** object.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
a command doesn't work correctly, you might not have the required permissions.
To find a service's service name or display name, use `Get-Service`. The service names are in the **Name** column and the display names are in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Set Timezone (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Set-TimeZone.md
Title: Set-TimeZone
--- # Set-TimeZone
-## Synopsis
+## SYNOPSIS
Sets the system time zone to a specified time zone.
-## Syntax
+## SYNTAX
### Name (Default)
Set-TimeZone -Id <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-TimeZone [-InputObject] <TimeZoneInfo> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** The `Set-TimeZone` cmdlet sets the system time zone to a specified time zone.
-## Examples
+## EXAMPLES
### Example 1: Set the time zone by Id
As we saw in the previous example, the **Id** and the **Name** of the Time Zone
The **Name** parameter must match the **StandardName** or **DaylightName** properties of the **TimeZoneInfo** object.
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String, System.TimeZoneInfo, System.String
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-TimeZone](Get-TimeZone.md)
Microsoft.PowerShell.Management Split Path (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Split-Path.md
Title: Split-Path
--- # Split-Path
-## Synopsis
+## SYNOPSIS
Returns the specified part of a path.
-## Syntax
+## SYNTAX
### ParentSet (Default)
Split-Path [-Path] <String[]> [-Resolve] -IsAbsolute [-Credential <PSCredential>
Split-Path -LiteralPath <String[]> [-Resolve] [-Credential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Split-Path` cmdlet returns only the specified part of a path, such as the parent folder, a subfolder, or a file name. It can also get items that are referenced by the split path and tell
whether the path is relative or absolute.
You can use this cmdlet to get or submit only a selected part of a path.
-## Examples
+## EXAMPLES
### Example 1: Get the qualifier of a path
C:\Documents and Settings\User01\My Documents
This command uses a pipeline operator (`|`) to send a path to `Split-Path`. The path is enclosed in quotation marks to indicate that it is a single token.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to this cmdlet.
-## Outputs
+## OUTPUTS
### System.String, System.Boolean
items, such as a **FileInfo** or **RegistryKey** object.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean** value.
-## Notes
+## NOTES
- The split location parameters (**Qualifier**, **Parent**, **Extension**, **Leaf**, **LeafBase**, and **NoQualifier**) are exclusive. You can use only one in each command.
When you specify the **IsAbsolute** parameter, `Split-Path` returns a **Boolean*
- `Split-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Start Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Start-Process.md
Title: Start-Process
--- # Start-Process
-## Synopsis
+## SYNOPSIS
Starts one or more processes on the local computer.
-## Syntax
+## SYNTAX
### Default (Default)
Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-WorkingDirecto
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Process` cmdlet starts one or more processes on the local computer. By default, `Start-Process` creates a new process that inherits all the environment variables that are defined
cmdlet.
You can use the parameters of `Start-Process` to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.
-## Examples
+## EXAMPLES
### Example 1: Start a process that uses default values
In this example, `Start-Process` is running the Linux `nohup` command, which lau
detached process. For more information, see the man page for [nohup](https://linux.die.net/man/1/nohup).
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet generates a **System.Diagnostics.Process** object, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not return any output.
-## Notes
+## NOTES
By default, `Start-Process` launches a process _asynchronously_. Control is instantly returned to PowerShell even if the new process is still running.
This cmdlet is implemented by using the **Start** method of the **System.Diagnos
class. For more information about this method, see [Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Management Start Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Start-Service.md
Title: Start-Service
--- # Start-Service
-## Synopsis
+## SYNOPSIS
Starts one or more stopped services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Start-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclud
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. If a service is already running, the message is ignored with
specify the services by their service names or display names, or you can use the **InputObject** parameter to supply a service object that represents the services that you want to start.
-## Examples
+## EXAMPLES
### Example 1: Start a service by using its name
that the **StartMode** property of the Tlntsvr service is **Disabled**. The `Set
changes the start type to **Manual**. Now, we can resubmit the `Start-Service` command. This time, the command succeeds. To verify that the command succeeded, run `Get-Service`.
-## Parameters
+## PARAMETERS
### -DisplayName
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
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe objects that represent the services or strings that contain the service names to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you specify **PassThru**. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
work to do. When PowerShell starts a service that stops itself almost immediately, it displays the following message: `Service \<display-name\> start failed.`
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Stop Computer (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Stop-Computer.md
Title: Stop-Computer
# Stop-Computer
-## Synopsis
+## SYNOPSIS
Stops (shuts down) local and remote computers.
-## Syntax
+## SYNTAX
### All
Stop-Computer [-WsmanAuthentication <String>] [[-ComputerName] <String[]>]
[[-Credential] <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Computer` cmdlet shuts down the local computer and remote computers.
credentials, and to force an immediate shut down.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. The parameters have no effect on these platforms. The cmdlet is just calling the native command `/sbin/shutdown`.
-## Examples
+## EXAMPLES
### Example 1: Shut down the local computer
administrator. The credentials are stored in the `$c` variable.
computers in the `$s` variable. The **Force** parameter forces an immediate shutdown. The **Credential** parameter submits the credentials saved in the `$c` variable.
-## Parameters
+## PARAMETERS
### -ComputerName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the **Win32Shutdown** method of the **Win32_OperatingSystem** WMI class. This method requires the **SeShutdownPrivilege** privilege be enabled for the user account used to
restart the machine.
In PowerShell 7.1, `Stop-Computer` was added for Linux and macOS. For these platorms, the cmdlet calls the native command `/sbin/shutdown`.
-## Related links
+## RELATED LINKS
[Rename-Computer](Rename-Computer.md)
Microsoft.PowerShell.Management Stop Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Stop-Process.md
Title: Stop-Process
--- # Stop-Process
-## Synopsis
+## SYNOPSIS
Stops one or more running processes.
-## Syntax
+## SYNTAX
### Id (Default)
Stop-Process -Name <String[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<Common
Stop-Process [-InputObject] <Process[]> [-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Stop-Process` cmdlet stops one or more running processes. You can specify a process by process name or process ID (PID), or pass a process object to `Stop-Process`. `Stop-Process` works only on
On Windows Vista and later versions of the Windows operating system, to stop a p
owned by the current user, you must start PowerShell by using the Run as administrator option. Also, you are not prompted for confirmation unless you specify the **Confirm** parameter.
-## Examples
+## EXAMPLES
### Example 1: Stop all instances of a process
PowerShell prompts you for confirmation.
The second command specifies **Force** to suppress the prompt. As a result, the process is stopped without confirmation.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.Diagnostics.Process This cmdlet returns a **System.Diagnostics.Process** object that represents the stopped process, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- You can also refer to `Stop-Process` by its built-in aliases, `kill` and `spps` For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate
- When stopping processes, realize that stopping a process can stop process and services that depend on the process. In an extreme case, stopping a process can stop Windows.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Management Stop Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Stop-Service.md
Title: Stop-Service
--- # Stop-Service
-## Synopsis
+## SYNOPSIS
Stops one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Stop-Service [-Force] [-NoWait] [-PassThru] -DisplayName <String[]> [-Include <S
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified services. You can specify the services by their service names or displ
use the **InputObject** parameter to pass a service object that represents the service that you want to stop.
-## Examples
+## EXAMPLES
### Example 1: Stop a service on the local computer
The second command stops the IISAdmin service. The **Force** parameter is requir
that has dependent services. The command uses the **Confirm** parameter to request confirmation from the user before it stops each service.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains the name of a service to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController This cmdlet generates a **System.ServiceProcess.ServiceController** object that represents the service, if you use the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
To find the service names and display names of the services on your system, type
service names appear in the **Name** column and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Suspend Service (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Suspend-Service.md
Title: Suspend-Service
--- # Suspend-Service
-## Synopsis
+## SYNOPSIS
Suspends (pauses) one or more running services.
-## Syntax
+## SYNTAX
### InputObject (Default)
Suspend-Service [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Excl
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
until resumed, such as by usingthe `Resume-Service` cmdlet. You can specify the
service names or display names, or you can use the **InputObject** parameter to pass a service object that represents the services that you want to suspend.
-## Examples
+## EXAMPLES
### Example 1: Suspend a service
of `$True` for the **CanPauseAndContinue** property. Another pipeline operator p
`Suspend-Service`. The **Confirm** parameter prompts you for confirmation before suspending each of the services.
-## Parameters
+## PARAMETERS
### -DisplayName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.ServiceProcess.ServiceController, System.String You can pipe a service object or a string that contains a service name to this cmdlet.
-## Outputs
+## OUTPUTS
### None, System.ServiceProcess.ServiceController
This cmdlet generates a **System.ServiceProcess.ServiceController** object that
service, if you specify the **PassThru** parameter. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
This cmdlet is only available on Windows platforms.
The service names appear in the **Name** column, and the display names appear in the **DisplayName** column.
-## Related links
+## RELATED LINKS
[Get-Service](Get-Service.md)
Microsoft.PowerShell.Management Test Connection (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Test-Connection.md
Title: Test-Connection
# Test-Connection
-## Synopsis
+## SYNOPSIS
Sends ICMP echo request packets, or pings, to one or more computers.
-## Syntax
+## SYNTAX
### DefaultPing (Default)
Test-Connection [-TargetName] <string[]> -TcpPort <int> [-IPv4] [-IPv6] [-Resolv
[-Source <string>] [-TimeoutSeconds <int>] [-Quiet] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Connection` cmdlet sends Internet Control Message Protocol (ICMP) echo request packets, or pings, to one or more remote computers and returns the echo response replies. You can use this
Unlike the familiar **ping** command, `Test-Connection` returns a
parameter returns a **Boolean** value in a **System.Boolean** object for each tested connection. If multiple connections are tested, an array of **Boolean** values is returned.
-## Examples
+## EXAMPLES
### Example 1: Send echo requests to a remote computer
The `Test-Connection` command is called with the **Traceroute** parameter. The r
`[Microsoft.PowerShell.Commands.TestConnectionCommand+TraceStatus]` objects, are output to the **Success** output stream.
-## Parameters
+## PARAMETERS
### -BufferSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You can't pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### TestConnectionCommand+PingStatus, TestConnectionCommand+TraceStatus, Boolean, TestConnectionCommand+PingMtuStatus
If you specify the **Traceroute** parameter, the cmdlet will return a
If you specify the **Quiet** or **TcpPort** parameters, it returns a **Boolean** value. If multiple connections are tested, an array of **Boolean** values is returned.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Restart-Computer](Restart-Computer.md)
Microsoft.PowerShell.Management Test Path (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Test-Path.md
Title: Test-Path
--- # Test-Path
-## Synopsis
+## SYNOPSIS
Determines whether all elements of a path exist.
-## Syntax
+## SYNTAX
### Path (Default)
Test-Path -LiteralPath <String[]> [-Filter <String>] [-Include <String[]>] [-Exc
[-OlderThan <DateTime>] [-NewerThan <DateTime>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Path` cmdlet determines whether all elements of the path exist. It returns `$True` if all elements exist and `$False` if any are missing. It can also tell whether the path syntax is valid
and whether the path leads to a container or a terminal or leaf element. If the
whitespace or empty string, then `$False` is returned. If the **Path** is `$null`, array of `$null` or empty array, a non-terminating error is returned.
-## Examples
+## EXAMPLES
### Example 1: Test a path
False
False ```
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path, but not a literal path, to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Boolean The cmdlet returns a **Boolean** value.
-## Notes
+## NOTES
The cmdlets that contain the **Path** noun (the **Path** cmdlets) work with path names and return the names in a concise format that all PowerShell providers can interpret. They are designed for use
manipulators.
The `Test-Path` is designed to work with the data exposed by any provider. To list the providers available in your session, type `Get-PSProvider`. For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
-## Related links
+## RELATED LINKS
[Convert-Path](Convert-Path.md)
Microsoft.PowerShell.Management Wait Process (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Management/Wait-Process.md
Title: Wait-Process
--- # Wait-Process
-## Synopsis
+## SYNOPSIS
Waits for the processes to be stopped before accepting more input.
-## Syntax
+## SYNTAX
### Name (Default)
Wait-Process [-Id] <Int32[]> [[-Timeout] <Int32>] [<CommonParameters>]
Wait-Process [[-Timeout] <Int32>] -InputObject <Process[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet does not work on Linux or macOS.**
stopped. You can specify a process by process name or process ID (PID), or pipe
`Wait-Process` works only on processes running on the local computer.
-## Examples
+## EXAMPLES
### Example 1: Stop a process and wait
prompt.
Wait-Process -Name outlook, winword -Timeout 30 ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Process You can pipe a process object to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- This cmdlet uses the **WaitForExit** method of the **System.Diagnostics.Process** class.
This cmdlet does not generate any output.
`Start-Process -Wait` waits for the process tree (the process and all its descendants) to exit before returning control.
-## Related links
+## RELATED LINKS
[Debug-Process](Debug-Process.md)
Microsoft.PowerShell.Security Convertfrom Securestring (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/ConvertFrom-SecureString.md
Title: ConvertFrom-SecureString
--- # ConvertFrom-SecureString
-## Synopsis
+## SYNOPSIS
Converts a secure string to an encrypted standard string.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertFrom-SecureString [-SecureString] <SecureString> [-AsPlainText] [<CommonP
ConvertFrom-SecureString [-SecureString] <SecureString> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-SecureString` cmdlet converts a secure string (**System.Security.SecureString**) into an encrypted standard string (**System.String**). Unlike a secure string, an encrypted standard
representation.
> Note that per [DotNet](/dotnet/api/system.security.securestring?view=netcore-2.1#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Create a secure string
$secureString # 'System.Security.SecureString'
ConvertFrom-SecureString -SecureString $secureString -AsPlainText # 'Example' ```
-## Parameters
+## PARAMETERS
### -AsPlainText
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
+## INPUTS
### System.Security.SecureString You can pipe a **SecureString** object to ConvertFrom-SecureString.
-## Outputs
+## OUTPUTS
### System.String ConvertFrom-SecureString returns a standard string object.
-## Notes
+## NOTES
- To create a secure string from characters that are typed at the command prompt, use the **AsSecureString** parameter of the `Read-Host` cmdlet.
ConvertFrom-SecureString returns a standard string object.
them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertTo-SecureString](ConvertTo-SecureString.md)
Microsoft.PowerShell.Security Convertto Securestring (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/ConvertTo-SecureString.md
Title: ConvertTo-SecureString
--- # ConvertTo-SecureString
-## Synopsis
+## SYNOPSIS
Converts plain text or encrypted strings to secure strings.
-## Syntax
+## SYNTAX
### Secure (Default)
ConvertTo-SecureString [-String] <String> [-AsPlainText] [-Force] [<CommonParame
ConvertTo-SecureString [-String] <String> [-Key <Byte[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-SecureString` cmdlet converts encrypted standard strings into secure strings. It can also convert plain text to secure strings. It is used with `ConvertFrom-SecureString` and
of the `ConvertTo-SecureString` cmdlet.
> Note that per [DotNet](/dotnet/api/system.security.securestring#remarks), the > contents of a SecureString are not encrypted on non-Windows systems.
-## Examples
+## EXAMPLES
### Example 1: Convert a secure string to an encrypted string
$Secure_String_Pwd = ConvertTo-SecureString "P@ssW0rD!" -AsPlainText -Force
> You should avoid using plain text strings in script or from the command line. The plain text can > show up in event logs and command history logs.
-## Parameters
+## PARAMETERS
### -AsPlainText
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a standard encrypted string to `ConvertTo-SecureString`.
-## Outputs
+## OUTPUTS
### System.Security.SecureString `ConvertTo-SecureString` returns a **SecureString** object.
-## Notes
+## NOTES
Some characters, such as emoticons, correspond to several code points in the string that contains them. Avoid using these characters because they may cause problems and misunderstandings when used in a password.
-## Related links
+## RELATED LINKS
[ConvertFrom-SecureString](ConvertFrom-SecureString.md)
Microsoft.PowerShell.Security Get Acl (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-Acl.md
Title: Get-Acl
--- # Get-Acl
-## Synopsis
+## SYNOPSIS
Gets the security descriptor for a resource, such as a file or registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-Acl [-LiteralPath <String[]>] [-Audit] [-Filter <String>] [-Include <String[
[-Exclude <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
permissions that users and user groups have to access the resource.
Beginning in Windows PowerShell 3.0, you can use the **InputObject** parameter of `Get-Acl` to get the security descriptor of objects that do not have a path.
-## Examples
+## EXAMPLES
### Example 1- Get an ACL for a folder
storage subsystem object.
Get-Acl -InputObject (Get-StorageSubSystem -Name S087) ```
-## Parameters
+## PARAMETERS
### -Audit
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Get-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity, System.Security.AccessControl.DirectorySecurity, System.Security.AccessControl.RegistrySecurity `Get-Acl` returns an object that represents the ACLs that it gets. The object type depends upon the ACL type.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
Because `Get-Acl` is supported by the file system and registry providers, you ca
view the ACL of file system objects, such as files and directories, and registry objects, such as registry keys and entries.
-## Related links
+## RELATED LINKS
[Set-Acl](Set-Acl.md)
Microsoft.PowerShell.Security Get Authenticodesignature (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md
Title: Get-AuthenticodeSignature
--- # Get-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Gets information about the Authenticode signature for a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-AuthenticodeSignature -LiteralPath <String[]> [<CommonParameters>]
Get-AuthenticodeSignature -SourcePathOrExtension <String[]> -Content <Byte[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Windows catalog signature is used.
If the file is not signed, the information is retrieved, but the fields are blank.
-## Examples
+## EXAMPLES
### Example 1: Get the Authenticode signature for a file
Get-AuthenticodeSignature -Content (Get-Content foo.ps1 -AsByteStream) -SourcePa
This command gets information about the Authenticode signature for the content of a file. In this example, the file extension is specified along with the content of the file.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature `Get-AuthenticodeSignature` returns a signature object for each signature that it gets.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. For information about Authenticode signatures in PowerShell, see [about_Signing](../Microsoft.PowerShell.Core/About/about_Signing.md).
-## Related links
+## RELATED LINKS
[Get-ExecutionPolicy](Get-ExecutionPolicy.md)
Microsoft.PowerShell.Security Get Cmsmessage (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-CmsMessage.md
Title: Get-CmsMessage
--- # Get-CmsMessage
-## Synopsis
+## SYNOPSIS
Gets content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent
Get-CmsMessage [-Path] <String> [<CommonParameters>]
Get-CmsMessage [-LiteralPath] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-CmsMessage` cmdlet gets content that has been encrypted using the Cryptographic Message Syntax (CMS) format.
encryption certificate that was used to encrypt the content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Get encrypted content
This command pipes the results of the `Get-CmsMessage` cmdlet from Example 1 to
the **To** parameter is the value of the encrypting certificate's Subject line. The decrypted message, "Try the new Break All command," is the result.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Get Credential (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-Credential.md
Title: Get-Credential
--- # Get-Credential
-## Synopsis
+## SYNOPSIS
Gets a credential object based on a user name and password.
-## Syntax
+## SYNTAX
### CredentialSet (Default)
Get-Credential [[-Credential] <PSCredential>] [<CommonParameters>]
Get-Credential [-Message <String>] [[-UserName] <String>] [-Title <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Credential` cmdlet creates a credential object for a specified user name and password. You can use the credential object in security operations.
can use the credential object in security operations.
The `Get-Credential` cmdlet prompts the user for a password or a user name and password. You can use the **Message** parameter to specify a customized message in the command line prompt.
-## Examples
+## EXAMPLES
### Example 1
This command gets a credential from the Server01 remote computer. The command us
`Invoke-Command` cmdlet to run a `Get-Credential` command on the remote computer. The output shows the remote security message that `Get-Credential` includes in the authentication prompt.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCredential `Get-Credential` returns a credential object.
-## Notes
+## NOTES
You can use the **PSCredential** object that `Get-Credential` creates in cmdlets that request user authentication, such as those with a **Credential** parameter.
The **Credential** parameter is not supported by all providers that are installe
Beginning in PowerShell 3.0, it is supported on select cmdlets, such as the `Get-Content` and `New-PSDrive` cmdlets.
-## Related links
+## RELATED LINKS
[PromptForCredential](/dotnet/api/system.management.automation.host.pshostuserinterface.promptforcredential)
Microsoft.PowerShell.Security Get Executionpolicy (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-ExecutionPolicy.md
Title: Get-ExecutionPolicy
# Get-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Gets the execution policies for the current session.
-## Syntax
+## SYNTAX
### All
Gets the execution policies for the current session.
Get-ExecutionPolicy [[-Scope] <ExecutionPolicyScope>] [-List] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
To display the execution policies for each scope in the order of precedence, use `Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use
The effective execution policy is determined by execution policies that are set
For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md).
-## Examples
+## EXAMPLES
### Example 1: Get all execution policies
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -List
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
+## INPUTS
### None `Get-ExecutionPolicy` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.ExecutionPolicy The cmdlet always returns **Unrestricted** on Linux and macOS platforms.
-## Notes
+## NOTES
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, whether scripts must be digitally signed before they are run.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/about/about_Execution_Policies.md)
Microsoft.PowerShell.Security Get Pfxcertificate (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Get-PfxCertificate.md
Title: Get-PfxCertificate
--- # Get-PfxCertificate
-## Synopsis
+## SYNOPSIS
Gets information about PFX certificate files on the computer.
-## Syntax
+## SYNTAX
### ByPath (Default)
Get-PfxCertificate -LiteralPath <String[]> [-Password <SecureString>] [-NoPrompt
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PfxCertificate` cmdlet gets an object representing each specified PFX certificate file. A PFX file includes both the certificate and a private key.
-## Examples
+## EXAMPLES
### Example 1: Get a PFX certificate
to run a `Get-PfxCertificate` command remotely.
When the PFX certificate file is not password-protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Parameters
+## PARAMETERS
### -FilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a file path to `Get-PfxCertificate`.
-## Outputs
+## OUTPUTS
### System.Security.Cryptography.X509Certificates.X509Certificate2 `Get-PfxCertificate` returns an object for each certificate that it gets.
-## Notes
+## NOTES
When using the `Invoke-Command` cmdlet to run a `Get-PfxCertificate` command remotely, and the PFX certificate file is not password protected, the value of the **Authentication** parameter of `Invoke-Command` must be CredSSP.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security New Filecatalog (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/New-FileCatalog.md
Title: New-FileCatalog
--- # New-FileCatalog
-## Synopsis
+## SYNOPSIS
`New-FileCatalog` creates a catalog file of file hashes that can be used to validate the authenticity of a file.
-## Syntax
+## SYNTAX
``` New-FileCatalog [-CatalogVersion <Int32>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
create file hashes, and version 2 uses SHA256. Catalog version 2 is not supporte
2008 R2 or Windows 7. You should use catalog version 2 on Windows 8, Windows Server 2012, and later operating systems.
-## Examples
+## EXAMPLES
### Example 1: Create a file catalog for `Microsoft.PowerShell.Utility`
Mode LastWriteTime Length Name
-a---- 11/2/2018 11:58 AM 950 Microsoft.PowerShell.Utility.cat ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String The pipeline takes a string that is used as the catalog filename.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Test-FileCatalog](Test-FileCatalog.md)
Microsoft.PowerShell.Security Protect Cmsmessage (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Protect-CmsMessage.md
Title: Protect-CmsMessage
--- # Protect-CmsMessage
-## Synopsis
+## SYNOPSIS
Encrypts content by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByContent (Default)
Protect-CmsMessage [-To] <CmsMessageRecipient[]> [-LiteralPath] <String> [[-OutF
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Protect-CmsMessage` cmdlet encrypts content by using the Cryptographic Message Syntax (CMS) format.
document encryption, see Example 1 in this topic.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Create a certificate for encrypting content
To view document encryption certificates in the certificate provider, you can ad
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md), available only when the certificate provider is loaded.
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar
`-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Security Set Acl (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Set-Acl.md
Title: Set-Acl
--- # Set-Acl
-## Synopsis
+## SYNOPSIS
Changes the security descriptor of a specified item, such as a file or a registry key.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-Acl -LiteralPath <String[]> [-AclObject] <Object> [-ClearCentralAccessPolicy
[-Filter <String>] [-Include <String[]>] [-Exclude <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
supply a security descriptor that has the values you want to apply. `Set-Acl` ap
descriptor that is supplied. It uses the value of the **AclObject** parameter as a model and changes the values in the item's security descriptor to match the values in the **AclObject** parameter.
-## Examples
+## EXAMPLES
### Example 1: Copy a security descriptor from one file to another
is an argument list is to be passed when making the new **FileSystemAccessRule**
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
+## PARAMETERS
### -AclObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Security.AccessControl.ObjectSecurity, System.Security.AccessControl.CommonSecurityDescriptor You can pipe an ACL object or a security descriptor to `Set-Acl`.
-## Outputs
+## OUTPUTS
### System.Security.AccessControl.FileSecurity By default, `Set-Acl` does not generate any output. However, if you use the **Passthru** parameter, it generates a security object. The type of the security object depends on the type of the item.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. The `Set-Acl` cmdlet is supported by the PowerShell file system and registry providers. As such, you can use it to change the security descriptors of files, directories, and registry keys.
-## Related links
+## RELATED LINKS
[Get-Acl](Get-Acl.md)
Microsoft.PowerShell.Security Set Authenticodesignature (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Set-AuthenticodeSignature.md
Title: Set-AuthenticodeSignature
--- # Set-AuthenticodeSignature
-## Synopsis
+## SYNOPSIS
Adds an [Authenticode](/windows-hardware/drivers/install/authenticode) signature to a PowerShell script or other file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Set-AuthenticodeSignature [-Certificate] <X509Certificate2> [-IncludeChain <Stri
-Content <Byte[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
In a PowerShell script file, the signature takes the form of a block of text tha
of the instructions that are executed in the script. If there is a signature in the file when this cmdlet runs, that signature is removed.
-## Examples
+## EXAMPLES
### Example 1 - Sign a script using a certificate from the local certificate store
the **IncludeChain** parameter to include all of the signatures in the trust cha
root authority. It also uses the **TimeStampServer** parameter to add a timestamp to the signature. This prevents the script from failing when the certificate expires.
-## Parameters
+## PARAMETERS
### -Certificate
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the file path to `Set-AuthenticodeSignature`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Signature
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Get-AuthenticodeSignature](Get-AuthenticodeSignature.md)
Microsoft.PowerShell.Security Set Executionpolicy (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Set-ExecutionPolicy.md
Title: Set-ExecutionPolicy
# Set-ExecutionPolicy
-## Synopsis
+## SYNOPSIS
Sets the PowerShell execution policies for Windows computers.
-## Syntax
+## SYNTAX
### All
Set-ExecutionPolicy [-ExecutionPolicy] <ExecutionPolicy> [[-Scope] <ExecutionPol
[-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## 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).
To display the execution policies for each scope in the order of precedence, use
`Get-ExecutionPolicy -List`. To see the effective execution policy for your PowerShell session use `Get-ExecutionPolicy` with no parameters.
-## Examples
+## EXAMPLES
### Example 1: Set an execution policy
effective execution policy, **RemoteSigned**.
The script, **Start-ActivityTracker.ps1** is executed from the current directory. The script begins to run because it was unblocked by the `Unblock-File` cmdlet.
-## Parameters
+## PARAMETERS
### -ExecutionPolicy
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
+## INPUTS
### Microsoft.PowerShell.ExecutionPolicy, System.String You can pipe an execution policy object or a string that contains the name of an execution policy to `Set-ExecutionPolicy`.
-## Outputs
+## OUTPUTS
### None `Set-ExecutionPolicy` doesn't return any output.
-## Notes
+## NOTES
`Set-ExecutionPolicy` doesn't change the **MachinePolicy** and **UserPolicy** scopes because they are set by Group Policies.
If the Group Policy **Turn on Script Execution** is enabled for the computer or
preference is saved, but it is not effective. PowerShell displays a message that explains the conflict.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Security Test Filecatalog (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Test-FileCatalog.md
Title: Test-FileCatalog
--- # Test-FileCatalog
-## Synopsis
+## SYNOPSIS
`Test-FileCatalog` validates whether the hashes contained in a catalog file (.cat) matches the hashes of the actual files in order to validate their authenticity. This cmdlet is only supported on Windows.
-## Syntax
+## SYNTAX
``` Test-FileCatalog [-Detailed] [-FilesToSkip <String[]>] [-CatalogFilePath] <String> [[-Path] <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
validation by using the -FilesToSkip parameter.
This cmdlet is only supported on Windows.
-## Examples
+## EXAMPLES
### Example 1: Create and validate a file catalog
PathItems : {[Microsoft.PowerShell.Utility.psd1,
Signature : System.Management.Automation.Signature ```
-## Parameters
+## PARAMETERS
### -CatalogFilePath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.IO.DirectoryInfo[], System.String[] The pipeline accepts an array of strings or `DirectoryInfo` objects that represent paths to the files that need to be validated.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CatalogValidationStatus
A more detailed object returned when using `-Detailed` which can be used to anal
that may or may not have passed validation, which hashes were expected vs. found, and the algorithm used in the catalog.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[New-FileCatalog](New-FileCatalog.md)
Microsoft.PowerShell.Security Unprotect Cmsmessage (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Security/Unprotect-CmsMessage.md
Title: Unprotect-CmsMessage
--- # Unprotect-CmsMessage
-## Synopsis
+## SYNOPSIS
Decrypts content that has been encrypted by using the Cryptographic Message Syntax format.
-## Syntax
+## SYNTAX
### ByWinEvent (Default)
Unprotect-CmsMessage [-LiteralPath] <String> [-IncludeContext] [[-To] <CmsMessag
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unprotect-CmsMessage` cmdlet decrypts content that has been encrypted by using the Cryptographic Message Syntax (CMS) format.
content.
Support for Linux and macOS was added in PowerShell 7.1.
-## Examples
+## EXAMPLES
### Example 1: Decrypt a message
Unprotect-CmsMessage -LiteralPath @parameters
Try the new Break All command ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Diagnostics.Eventing.Reader.EventLogRecord or System.String You can pipe an object containing encrypted content to `Unprotect-CmsMessage`.
-## Outputs
+## OUTPUTS
### System.String The unencrypted message.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Add Member (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Add-Member.md
Title: Add-Member
--- # Add-Member
-## Synopsis
+## SYNOPSIS
Adds custom properties and methods to an instance of a PowerShell object.
-## Syntax
+## SYNTAX
### TypeNameSet (Default)
Add-Member -InputObject <PSObject> [-MemberType] <PSMemberTypes> [-Name] <String
[[-SecondValue] <Object>] [-TypeName <String>] [-Force] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Member` cmdlet lets you add members (properties and methods) to an instance of a PowerShell object. For instance, you can add a NoteProperty member that contains a description of the object or
Also, beginning in Windows PowerShell 3.0, the **PassThru** parameter, which gen
object, is needed less frequently. `Add-Member` now adds the new members directly to the input object of more types. For more information, see the **PassThru** parameter description.
-## Examples
+## EXAMPLES
### Example 1: Add a note property to a PSObject
PSVersion NoteProperty System.String PSVersion=4.0
System NoteProperty System.String System=Server Core ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object type to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Object When you use the **PassThru** parameter, this cmdlet returns the newly-extended object. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
You can add members only to **PSObject** objects. To determine whether an object is a **PSObject** object, use the `-is` operator.
and methods.
The `$this` variable refers to the instance of the object to which the properties and methods are being added. For more information about the `$this` variable, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Add Type (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Add-Type.md
Title: Add-Type
# Add-Type
-## Synopsis
+## SYNOPSIS
Adds a Microsoft .NET class to a PowerShell session.
-## Syntax
+## SYNTAX
### FromSource (Default)
Add-Type -LiteralPath <String[]> [-ReferencedAssemblies <String[]>] [-OutputAsse
Add-Type -AssemblyName <String[]> [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Add-Type` cmdlet lets you define a Microsoft .NET Core class in your PowerShell session. You can then instantiate objects, by using the `New-Object` cmdlet, and use the objects just as you
Beginning in PowerShell 7, `Add-Type` does not compile a type if a type with the
exists. Also, `Add-Type` looks for assemblies in a `ref` folder under the folder that contains `pwsh.dll`.
-## Examples
+## EXAMPLES
### Example 1: Add a .NET type to a session
represents the `SW_RESTORE` value.
To maximize the window, use the value of `3` that represents `SW_MAXIMIZE`.
-## Parameters
+## PARAMETERS
### -AssemblyName
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
+## INPUTS
### None You can't send objects down the pipeline to `Add-Type`.
-## Outputs
+## OUTPUTS
### None or System.Type When you use the **PassThru** parameter, `Add-Type` returns a **System.Type** object that represents the new type. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
The types that you add exist only in the current session. To use the types in all sessions, add them to your PowerShell profile. For more information about the profile, see
any version of PowerShell.
Assemblies in the GAC can be loaded by type name, rather than by path. Loading assemblies from an arbitrary path requires `Add-Type`, since those assemblies cannot not be loaded automatically.
-## Related links
+## RELATED LINKS
[about_Profiles](../Microsoft.PowerShell.Core/About/about_profiles.md)
Microsoft.PowerShell.Utility Clear Variable (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Clear-Variable.md
Title: Clear-Variable
--- # Clear-Variable
-## Synopsis
+## SYNOPSIS
Deletes the value of a variable.
-## Syntax
+## SYNTAX
``` Clear-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Clear-Variable` cmdlet deletes the data stored in a variable, but it does not delete the variable. As a result, the value of the variable is NULL (empty). If the variable has a specified data or object type, this cmdlet preserves the type of the object stored in the variable.
-## Examples
+## EXAMPLES
### Example 1: Remove the value of global variables that begin with a search string
Clear-Variable -Name "Processes"
This command deletes the value of the variable named Processes. After the cmdlet completes the operation, the variable named Processes still exists, but the value is null.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, this cmdlet generates a
**System.Management.Automation.PSVariable** object representing the cleared variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To delete a variable, along with its value, use `Remove-Variable` or `Remove-Item`.
this cmdlet does not generate any output.
You can also refer to `Clear-Variable` by its built-in alias, `clv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Get-Variable](Get-Variable.md)
Microsoft.PowerShell.Utility Compare Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Compare-Object.md
Title: Compare-Object
--- # Compare-Object
-## Synopsis
+## SYNOPSIS
Compares two sets of objects.
-## Syntax
+## SYNTAX
``` Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
Compare-Object [-ReferenceObject] <PSObject[]> [-DifferenceObject] <PSObject[]>
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Compare-Object` cmdlet compares two sets of objects. One set of objects is the **reference**, and the other set of objects is the **difference**.
terminating error.
Some examples use splatting to reduce the line length of the code samples. For more information, see [about_Splatting](../Microsoft.PowerShell.Core/About/about_Splatting.md).
-## Examples
+## EXAMPLES
### Example 1 - Compare the content of two text files
InputObject SideIndicator
In the second case, the **TimeSpan** is converted to a string so the object are different.
-## Parameters
+## PARAMETERS
### -CaseSensitive
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send an object down the pipeline to the **DifferenceObject** parameter.
-## Outputs
+## OUTPUTS
### None
When you use the **PassThru** parameter, the **Type** of the object is not chang
of the object returned has an added **NoteProperty** named **SideIndicator**. **SideIndicator** shows which input object the output belongs to.
-## Notes
+## NOTES
When using the **PassThru** parameter, the output displayed in the console may not include the **SideIndicator** property. The default format view for the object type output by `Compare-Object` does not include the **SideIndicator** property. For more information see [Example 3](#ex3) in this article.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertfrom Csv (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Title: ConvertFrom-Csv
--- # ConvertFrom-Csv
-## Synopsis
+## SYNOPSIS
Converts object properties in comma-separated value (CSV) format into CSV versions of the original objects.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertFrom-Csv [[-Delimiter] <Char>] [-InputObject] <PSObject[]> [-Header <Stri
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Csv` cmdlet creates objects from CSV variable-length strings that are generated by the `ConvertTo-Csv` cmdlet.
You can also use the `Export-Csv` and `Import-Csv` cmdlets to convert objects to
file (and back). These cmdlets are the same as the `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets, except that they save the CSV strings in a file.
-## Examples
+## EXAMPLES
### Example 1: Convert processes on the local computer to CSV format
When the **UseCulture** parameter is used, be sure that the current culture's de
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` cannot generate objects from the CSV strings.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe CSV strings to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject This cmdlet returns the objects described by the properties in the CSV strings.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
object. The property values are converted to strings (by using the **ToString()*
object), so they are represented by the name of the property value. This cmdlet does not export the methods of the object.
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Convertfrom Json (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertFrom-Json.md
Title: ConvertFrom-Json
# ConvertFrom-Json
-## Synopsis
+## SYNOPSIS
Converts a JSON-formatted string to a custom object or a hash table.
-## Syntax
+## SYNTAX
``` ConvertFrom-Json [-InputObject] <String> [-AsHashtable] [-Depth <Int32>] [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-Json` cmdlet converts a JavaScript Object Notation (JSON) formatted string to a custom **PSCustomObject** object that has a property for each field in the JSON string. JSON is
This cmdlet was introduced in PowerShell 3.0.
> be written in the file without corrupting the data or throwing an error as it did in PowerShell > 5.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a DateTime object to a JSON object
The JSON string contains an array with a single element. Without the switch, con
a PSObject and then converting it back with the `ConvertTo-Json` command results in a single integer.
-## Parameters
+## PARAMETERS
### -AsHashtable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `ConvertFrom-Json`.
-## Outputs
+## OUTPUTS
### PSCustomObject ### System.Collections.Hashtable
-## Notes
+## NOTES
This cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
follows:
offset is properly converted to the caller's configured time zone. The default output formatting does not indicate the original time zone offset.
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertfrom Markdown (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertFrom-Markdown.md
Title: ConvertFrom-Markdown
# ConvertFrom-Markdown
-## Synopsis
+## SYNOPSIS
Convert the contents of a string or a file to a **MarkdownInfo** object.
-## Syntax
+## SYNTAX
### PathParamSet (Default)
ConvertFrom-Markdown -LiteralPath <String[]> [-AsVT100EncodedString] [<CommonPar
ConvertFrom-Markdown -InputObject <PSObject> [-AsVT100EncodedString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet converts the specified content into a **MarkdownInfo**. When a file path is specified for the **Path** parameter, the contents on the file are converted. The output object has three
properties:
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Convert a file containing Markdown content to HTML
of the `README.md` file.
The **MarkdownInfo** object is returned. The specified string `**Bold text**` is converted to a VT100-encoded string and available in **VT100EncodedString** property.
-## Parameters
+## PARAMETERS
### -AsVT100EncodedString
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
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.MarkdownInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Markdown Parser](https://github.com/lunet-io/markdig)
Microsoft.PowerShell.Utility Convertfrom Sddlstring (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertFrom-SddlString.md
Title: ConvertFrom-SddlString
--- # ConvertFrom-SddlString
-## Synopsis
+## SYNOPSIS
Converts a SDDL string to a custom object.
-## Syntax
+## SYNTAX
### All
Converts a SDDL string to a custom object.
ConvertFrom-SddlString [-Sddl] <String> [-Type <AccessRightTypeNames>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the access rights specified in a SDDL string.
This cmdlet was introduced in PowerShell 5.0.
-## Examples
+## EXAMPLES
### Example 1: Convert file system access rights SDDL to a PSCustomObject
It doesn't use the `-Type` parameter, so the access rights shown are for file sy
The third command uses the `ConvertFrom-SddlString` cmdlet with the `-Type` parameter, so the access rights returned are for registry.
-## Parameters
+## PARAMETERS
### -Sddl
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a SDDL string to `ConvertFrom-SddlString`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
-## Related links
+## RELATED LINKS
[Security Descriptor Definition Language](/windows/win32/secauthz/security-descriptor-definition-language)
Microsoft.PowerShell.Utility Convertfrom Stringdata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertFrom-StringData.md
Title: ConvertFrom-StringData
--- # ConvertFrom-StringData
-## Synopsis
+## SYNOPSIS
Converts a string containing one or more key and value pairs to a hash table.
-## Syntax
+## SYNTAX
### All
Converts a string containing one or more key and value pairs to a hash table.
ConvertFrom-StringData [-StringData] <String> [[-Delimiter] <Char>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertFrom-StringData` cmdlet converts a string that contains one or more key and value pairs into a hash table. Because each key-value pair must be on a separate line, here-strings are often
sequences in your results.
PowerShell 7 adds the **Delimiter** parameter.
-## Examples
+## EXAMPLES
### Example 1: Convert a single-quoted here-string to a hash table
Name Value
Message Look in c:\Windows\System32 ```
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string containing a key-value pair to `ConvertFrom-StringData`.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable This cmdlet returns a hash table that it creates from the key-value pairs.
-## Notes
+## NOTES
A here-string is a string consisting of one or more lines within which quotation marks are interpreted literally.
This cmdlet can be useful in scripts that display user messages in multiple spok
can use the dictionary-style hash tables to isolate text strings from code, such as in resource files, and to format the text strings for use in translation tools.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Convertto Csv (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## Synopsis
+## SYNOPSIS
Converts .NET objects into a series of character-separated value (CSV) strings.
-## Syntax
+## SYNTAX
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## Examples
+## EXAMPLES
### Example 1: Convert an object to CSV
can see `ExtraProp` is now a header in the output.
If an added property has the _same_ name as a key from the hashtable, the key takes precedence and only the key is converted to CSV.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV output is returned as a collection of strings.
-## Notes
+## NOTES
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Convertto Html (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertTo-Html.md
Title: ConvertTo-Html
--- # ConvertTo-Html
-## Synopsis
+## SYNOPSIS
Converts .NET objects into HTML that can be displayed in a Web browser.
-## Syntax
+## SYNTAX
### Page (Default)
ConvertTo-Html [-InputObject <PSObject>] [[-Property] <Object[]>] [-As <String>]
[-PostContent <String[]>] [-PreContent <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Html` cmdlet converts .NET objects into HTML that can be displayed in a Web browser. You can use this cmdlet to display the output of a command in a Web page.
on the properties of the first object that you submit. If the remaining objects
the specified properties, the property value of that object is an empty cell. If the remaining objects have additional properties, those property values are not included in the file.
-## Examples
+## EXAMPLES
### Example 1: Create a web page to display the date
Get-Service | ConvertTo-HTML -Transitional
This command sets the DOCTYPE of the returned HTML to XHTML Transitional DTD
-## Parameters
+## PARAMETERS
### -As
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any .NET object to `ConvertTo-Html`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument `ConvertTo-Html` returns series of strings that comprise valid HTML.
-## Notes
+## NOTES
To use this cmdlet, pipe one or more objects to the cmdlet or use the **InputObject** parameter to specify the object. When the input consists of multiple objects, the output of these two methods is
quite different.
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>`
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Convertto Json (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertTo-Json.md
Title: ConvertTo-Json
--- # ConvertTo-Json
-## Synopsis
+## SYNOPSIS
Converts an object to a JSON-formatted string.
-## Syntax
+## SYNTAX
``` ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Json` cmdlet converts any .NET object to a string in JavaScript Object Notation (JSON) format. The properties are converted to field names, the field values are converted to
the depth specified for the command. This prevents unwanted data loss when conve
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1
Year : 2018
This example shows how to use the `ConvertTo-Json` and `ConvertFrom-Json` cmdlets to convert an object to a JSON string and a JSON object.
-## Parameters
+## PARAMETERS
### -AsArray
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Object You can pipe any object to `ConvertTo-Json`.
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
The `ConvertTo-Json` cmdlet is implemented using [Newtonsoft Json.NET](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Convertto Xml (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/ConvertTo-Xml.md
Title: ConvertTo-Xml
--- # ConvertTo-Xml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object.
-## Syntax
+## SYNTAX
``` ConvertTo-Xml [-Depth <Int32>] [-InputObject] <PSObject> [-NoTypeInformation] [-As <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `ConvertTo-Xml` cmdlet creates an [XML-based](/dotnet/api/system.xml.xmldocument) representation of one or more .NET objects. To use this cmdlet, pipe one or more objects to the cmdlet, or use the
file that can be reimported as objects with [Import-Clixml](./Import-Clixml.md).
returns an in-memory representation of an XML document, so you can continue to process it in PowerShell. `ConvertTo-Xml` does not have an option to convert objects to CLI XML.
-## Examples
+## EXAMPLES
### Example 1: Convert a date to XML
ConvertTo-Xml -As "Document" -InputObject (Get-Process) -Depth 3
This command converts the process objects that represent all of the processes on the computer into an XML document. The objects are expanded to a depth of three levels.
-## Parameters
+## PARAMETERS
### -As
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `ConvertTo-XML`.
-## Outputs
+## OUTPUTS
### System.String or System.Xml.XmlDocument The value of the **As** parameter determines the type of object that `ConvertTo-XML` returns.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Csv](ConvertTo-Csv.md)
Microsoft.PowerShell.Utility Debug Runspace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Debug-Runspace.md
Title: Debug-Runspace
--- # Debug-Runspace
-## Synopsis
+## SYNOPSIS
Starts an interactive debugging session with a runspace.
-## Syntax
+## SYNTAX
### RunspaceParameterSet (Default)
Debug-Runspace [-Id] <Int32> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters
Debug-Runspace [-InstanceId] <Guid> [-BreakAll] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Debug-Runspace` cmdlet starts an interactive debugging session with a local or remote active runspace. You can find a runspace that you want to debug by first running `Get-Process` to find
running the process, or you are running the script that you want to debug. Also,
the host process that is running the current PowerShell session. You can only enter a host process that is running a different PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Debug a remote runspace
In the last command, you start debugging an opened runspace that is running a sc
`TestWFVar1.ps1`, by running `Debug-Runspace`, and identifying the runspace by its ID, 2, by adding the **Id** parameter. Because there's a breakpoint in the script, the debugger opens.
-## Parameters
+## PARAMETERS
### -BreakAll
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to **Debug-Runspace.**
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
`Debug-Runspace` works on runspaces that are in the Opened state. If a runspace state changes from Opened to another state, that runspace is automatically removed from the running list. A runspace is
added to the running list only if it meets the following criteria.
- If it is coming from a PowerShell workflow, and its workflow job ID is the same as the current active debugger workflow job ID.
-## Related links
+## RELATED LINKS
[about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md)
Microsoft.PowerShell.Utility Disable Psbreakpoint (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.md
Title: Disable-PSBreakpoint
--- # Disable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Disables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Disable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-PSBreakpoint` cmdlet disables breakpoints, which assures that they are not hit when the script runs. You can use it to disable all breakpoints, or you can specify breakpoints by submitting
instructions in the script. `Disable-PSBreakpoint` is one of several cmdlets des
PowerShell scripts. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint and disable it
This command disables all breakpoints in the current console.
`Get-PSBreakpoint` | Disable-PSBreakpoint ```
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Disable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Disable-PSBreakpoint` returns an object that represents the disabled breakpoint. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-PSBreakpoint](Enable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Disable Runspacedebug (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Disable-RunspaceDebug.md
Title: Disable-RunspaceDebug
--- # Disable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Disable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Disable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Disable-RunspaceDebug` cmdlet disables debugging on one or more runspaces, and releases any pending debugger stop.
-## Examples
+## EXAMPLES
### 1: Disable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-RunspaceDebug](Enable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Enable Psbreakpoint (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Enable-PSBreakpoint.md
Title: Enable-PSBreakpoint
# Enable-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Enables the breakpoints in the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Enable-PSBreakpoint [-PassThru] [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-PSBreakpoint` cmdlet re-enables disabled breakpoints. You can use it to enable all breakpoints, or specific breakpoints by providing breakpoint objects or IDs.
Technically, this cmdlet changes the value of the **Enabled** property of a brea
information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Enable all breakpoints
Enable-PSBreakpoint -Breakpoint $B
This example is equivalent to running `Enable-PSBreakpoint -Id 3, 5`.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint You can pipe a breakpoint object to `Enable-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.Breakpoint When you use the **PassThru** parameter, `Enable-PSBreakpoint` returns a breakpoint object that represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't generate any output.
-## Notes
+## NOTES
- The `Enable-PSBreakpoint` cmdlet doesn't generate an error if you try to enable a breakpoint that is already enabled. As such, you can enable all breakpoints without error, even when only a few
represents that breakpoint that was enabled. Otherwise, this cmdlet doesn't gene
- Breakpoints are enabled when you create them by using the `Set-PSBreakpoint` cmdlet. You don't need to enable newly created breakpoints.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Enable Runspacedebug (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Enable-RunspaceDebug.md
Title: Enable-RunspaceDebug
--- # Enable-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Enable-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Enable-RunspaceDebug` cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
-## Examples
+## EXAMPLES
### 1: Enable the default runspace debugger
Get-RunspaceDebug
1 Runspace1 True False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Export Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Export-Alias.md
Title: Export-Alias
--- # Export-Alias
-## Synopsis
+## SYNOPSIS
Exports information about currently defined aliases to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Alias -LiteralPath <String> [[-Name] <String[]>] [-PassThru] [-As <Export
[-Force] [-NoClobber] [-Description <String>] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Alias` cmdlet exports the aliases in the current session to a file. If the output file does not exist, the cmdlet will create it. `Export-Alias` can export the aliases in a particular scope or all scopes, it can generate the data in CSV format or as a series of Set-Alias commands that you can add to a session or to a PowerShell profile.
-## Examples
+## EXAMPLES
### Example 1: Export an alias
The third and fourth commands add the aliases in the Alias.ps1 file to a remote
The third command uses the `New-PSSession` cmdlet to create the session. The fourth command uses the **FilePath** parameter of the `Invoke-Command` cmdlet to run the Alias.ps1 file in the new session.
-## Parameters
+## PARAMETERS
### -Append
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).
-## Inputs
+## INPUTS
### None. You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Export-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
* You can only Export-Aliases to a file.
-## Related links
+## RELATED LINKS
[Get-Alias](Get-Alias.md)
Microsoft.PowerShell.Utility Export Clixml (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Export-Clixml.md
Title: Export-Clixml
# Export-Clixml
-## Synopsis
+## SYNOPSIS
Creates an XML-based representation of an object or objects and stores it in a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-Clixml [-Depth <Int32>] -LiteralPath <String> -InputObject <PSObject> [-F
[-Encoding <Encoding>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-Clixml` cmdlet creates a Common Language Infrastructure (CLI) XML-based representation of an object or objects and stores it in a file. You can then use the `Import-Clixml` cmdlet to
file. `ConvertTo-XML` returns the XML, so you can continue to process it in Powe
A valuable use of `Export-Clixml` on Windows computers is to export credentials and secure strings securely as XML. For an example, see Example 3.
-## Examples
+## EXAMPLES
### Example 1: Export a string to an XML file
The output of `Get-Content` in this example has been truncate to focus on the cr
in the XML file. Note that the plain text value of the password is stored in the XML file as a Unicode character array as proven by `Format-Hex`. So the value is encoded but not encrypted.
-## Parameters
+## PARAMETERS
### -Depth
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
+## INPUTS
### System.Management.Automation.PSObject You can pipeline any object to `Export-Clixml`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-Clixml` creates a file that contains the XML.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertTo-Html](ConvertTo-Html.md)
Microsoft.PowerShell.Utility Export Csv (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## Synopsis
+## SYNOPSIS
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## Syntax
+## SYNTAX
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Export process properties to a CSV file
can see `ExtraProp` is now a header in the CSV file output.
If an added property has the _same_ name as a key from the hashtable, the key takes precedence and only the key is exported to CSV.
-## Parameters
+## PARAMETERS
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## Outputs
+## OUTPUTS
### System.String The CSV list is sent to the file designated in the Path parameter.
-## Notes
+## NOTES
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Formatdata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Export-FormatData.md
Title: Export-FormatData
--- # Export-FormatData
-## Synopsis
+## SYNOPSIS
Saves formatting data from the current session in a formatting file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Export-FormatData -InputObject <ExtendedTypeDefinition[]> -LiteralPath <String>
[-IncludeScriptBlock] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that
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).
-## Examples
+## EXAMPLES
### Example 1: Export session format data
The third command shows the effects of this change. The command uses the `Get-Pr
get processes that have names that begin with P. The output shows that property values that are calculated by using script blocks are missing from the display.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.Management.Automation.ExtendedTypeDefinition You can pipe **ExtendedTypeDefinition** objects from `Get-FormatData` to `Export-FormatData`.
-## Outputs
+## OUTPUTS
### None `Export-FormatData` does not return any objects. It generates a file and saves it in the specified path.
-## Notes
+## NOTES
- To use any formatting file, including an exported formatting file, the execution policy for the session must allow scripts and configuration files to run. For more information, see [about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md).
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Export Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Export-PSSession.md
Title: Export-PSSession
# Export-PSSession
-## Synopsis
+## SYNOPSIS
Exports commands from another session and saves them in a PowerShell module.
-## Syntax
+## SYNTAX
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## Examples
+## EXAMPLES
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Export-PSSession`.
-## Outputs
+## OUTPUTS
### System.IO.FileInfo `Export-PSSession` returns a list of files that comprise the module that it created.
-## Notes
+## NOTES
`Export-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for remoting. For more information, see
The module that `Export-PSSession` creates might include a formatting file, even
does not import formatting data. If the command does not import formatting data, any formatting files that are created will not contain formatting data.
-## Related links
+## RELATED LINKS
[about_Command_Precedence](../Microsoft.PowerShell.Core/About/about_Command_Precedence.md)
Microsoft.PowerShell.Utility Format Custom (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Format-Custom.md
Title: Format-Custom
--- # Format-Custom
-## Synopsis
+## SYNOPSIS
Uses a customized view to format the output.
-## Syntax
+## SYNTAX
``` Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-View <String>]
Format-Custom [[-Property] <Object[]>] [-Depth <Int32>] [-GroupBy <Object>] [-Vi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Custom` cmdlet formats the output of a command as defined in an alternate view. `Format-Custom` is designed to display views that are not just tables or just lists. You can use the views defined in PowerShell, or you can create your own views in a new `format.ps1xml` file and use the `Update-FormatData` cmdlet to add them to PowerShell.
-## Examples
+## EXAMPLES
### Example 1: Format output with a custom view
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -Depth
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Custom`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Custom` returns the format objects that represent the display.
-## Notes
+## NOTES
`Format-Custom` is designed to display views that are not just tables or just lists. To display an alternate table view, use `Format-Table`. To display an alternate list view, use `Format-List`.
You can also refer to `Format-Custom` by its built-in alias, `fc`. For more info
The **GroupBy** parameter assumes that the objects are sorted. Before using `Format-Custom` to group the objects, use `Sort-Object` to sort them.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Hex (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Format-Hex.md
Title: Format-Hex
# Format-Hex
-## Synopsis
+## SYNOPSIS
Displays a file or other input as hexadecimal.
-## Syntax
+## SYNTAX
### Path
Format-Hex -InputObject <PSObject> [-Encoding <Encoding>] [-Count <Int64>] [-Off
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Hex` cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at
to get file information.
When using `Format-Hex` on a file, the cmdlet ignores newline characters and returns the entire contents of a file in one string with the newline characters preserved.
-## Examples
+## EXAMPLES
### Example 1: Get the hexadecimal representation of a string
data, and the adjacent object is also numeric, it will group them into a single
0000000000000000 01 00 00 00 00 00 00 00 � ```
-## Parameters
+## PARAMETERS
### -Count
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
+## INPUTS
### System.String You can pipe a string to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.ByteCollection
by `Format-Hex`. The output also states they type of bytes being processed. If y
**Path** or **LiteralPath** parameter, the object contains the path of the file that contains each byte. If you pass a string, boolean, integer, etc, it will be labeled appropriately.
-## Notes
+## NOTES
The right-most column of output tries to render the bytes as ASCII characters:
Generally, each byte is interpreted as a Unicode code point, which means that:
- Multi-byte UTF-8 characters never render correctly - UTF-16 characters render correctly only if their high-order byte happens be `NUL`.
-## Related links
+## RELATED LINKS
[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md)
Microsoft.PowerShell.Utility Format List (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Format-List.md
Title: Format-List
--- # Format-List
-## Synopsis
+## SYNOPSIS
Formats the output as a list of properties in which each property appears on a new line.
-## Syntax
+## SYNTAX
``` Format-List [[-Property] <Object[]>] [-GroupBy <Object>] [-View <string>] [-ShowError] [-DisplayError] [-Force] [-Expand <string>] [-InputObject <psobject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-List` cmdlet formats the output of a command as a list of properties in which each property is displayed on a separate line. You can use `Format-List` to format and display all or
selected properties of an object as a list (format-list *).
Because more space is available for each item in a list than in a table, PowerShell displays more properties of the object in the list, and the property values are less likely to be truncated.
-## Examples
+## EXAMPLES
### Example 1: Format computer services
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -DisplayError
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-List`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-List` returns the format objects that represent the list.
-## Notes
+## NOTES
You can also refer to Format-List by its built-in alias, FL. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use the list format, otherwis
fails. If the alternate view is a table, use `Format-Table`. If the alternate view is not a list or a table, use `Format-Custom`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Table (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Format-Table.md
Title: Format-Table
# Format-Table
-## Synopsis
+## SYNOPSIS
Formats the output as a table.
-## Syntax
+## SYNTAX
### All
Format-Table [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] [[-Property
[-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Table` cmdlet formats the output of a command as a table with the selected properties of the object in each column. The object type determines the default layout and properties that are
specify the column headings in the table. To add a calculated property, use the
**GroupBy** parameter. For more information about hash tables, see [about_Hash_Tables](../Microsoft.PowerShell.Core/About/about_Hash_Tables.md).
-## Examples
+## EXAMPLES
### Example 1: Format PowerShell host
Wednesday
InvalidArgument: Failed to evaluate expression " $_ / $null ". ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object down the pipeline to `Format-Table`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Table` returns format objects that represent the table.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Format Wide (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Format-Wide.md
Title: Format-Wide
--- # Format-Wide
-## Synopsis
+## SYNOPSIS
Formats objects as a wide table that displays only one property of each object.
-## Syntax
+## SYNTAX
``` Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object>] [-View <string>]
Format-Wide [[-Property] <Object>] [-AutoSize] [-Column <int>] [-GroupBy <Object
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Format-Wide` cmdlet formats objects as a wide table that displays only one property of each object. You can use the **Property** parameter to determine which property is displayed.
-## Examples
+## EXAMPLES
### Example 1: Format names of files in the current directory
Failed to evaluate expression " $_ / $null ".
+ FullyQualifiedErrorId : PSPropertyExpressionError ```
-## Parameters
+## PARAMETERS
### -AutoSize
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Format-Wide`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.Internal.Format `Format-Wide` returns format objects that represent the table.
-## Notes
+## NOTES
You can also refer to `Format-Wide` by its built-in alias, `fw`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
The alternate view for the **View** parameter must use table format; if it does
fails. If the alternate view is a list, use `Format-List`. If the alternate view is neither a list nor a table, use Format-Custom.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Get Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Alias.md
Title: Get-Alias
--- # Get-Alias
-## Synopsis
+## SYNOPSIS
Gets the aliases for the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Get-Alias [[-Name] <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonP
Get-Alias [-Exclude <String[]>] [-Scope <String>] [-Definition <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Alias` cmdlet gets the aliases in the current session. This includes built-in aliases, aliases that you have set or imported, and aliases that you have added to your PowerShell profile.
parameter, `Get-Alias` takes a command name and returns its aliases.
Beginning in Windows PowerShell 3.0, `Get-Alias` displays non-hyphenated alias names in an `<alias> -> <definition>` format to make it even easier to find the information that you need.
-## Examples
+## EXAMPLES
### Example 1: Get all aliases in the current session
that begin with "e".
The command uses the **Scope** parameter to apply the command in the global scope. This is useful in scripts when you want to get the aliases in the session.
-## Parameters
+## PARAMETERS
### -Definition
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
+## INPUTS
### System.String You can pipe alias names to `Get-Alias`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.AliasInfo
You can pipe alias names to `Get-Alias`.
every alias, but PowerShell uses an arrow-based format to display the names of non-hyphenated aliases.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To delete an alias, use `Remove-Item`. - The arrow-based alias name format is not used for aliases that include a hyphen. These are likely to be preferred substitute names for cmdlets and functions, instead of typical abbreviations or nicknames.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Get Culture (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Culture.md
Title: Get-Culture
# Get-Culture
-## Synopsis
+## SYNOPSIS
Gets the current culture set in the operating system.
-## Syntax
+## SYNTAX
### CurrentCulture (Default)
Get-Culture [-Name <String[]>] [-NoUserOverrides] [<CommonParameters>]
Get-Culture [-ListAvailable] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Culture` cmdlet gets information about the current culture settings. This includes information about the current language settings on the system, such as the keyboard layout, and the
system, and the [Set-Culture](/powershell/module/international/set-culture) cmdl
International module. The user-interface (UI) culture determines which text strings are used for user interface elements, such as menus and messages.
-## Examples
+## EXAMPLES
### Example 1: Get culture settings
LCID Name DisplayName
1036 fr-FR French (France) ```
-## Parameters
+## PARAMETERS
### -ListAvailable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo `Get-Culture` returns an object that represents the current culture.
-## Notes
+## NOTES
You can also use the `$PsCulture` and `$PsUICulture` variables. The `$PsCulture` variable stores the name of the current culture and the `$PsUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
[Set-Culture](/powershell/module/international/set-culture)
Microsoft.PowerShell.Utility Get Date (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Date.md
Title: Get-Date
# Get-Date
-## Synopsis
+## SYNOPSIS
Gets the current date and time.
-## Syntax
+## SYNTAX
### Date (Default)
Get-Date -UnixTimeSeconds <Int64> [-Year <Int32>] [-Month <Int32>] [-Day <Int32>
-UFormat <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Date` cmdlet gets a **DateTime** object that represents the current date or a date that you specify. `Get-Date` can format the date and time in several .NET and UNIX formats. You can use
programs.
`Get-Date` uses the computer's culture settings to determine how the output is formatted. To view your computer's settings, use `(Get-Culture).DateTimeFormat`.
-## Examples
+## EXAMPLES
### Example 1: Get the current date and time
PS> Get-Date -Date "2020-01-01T00:00:00" -AsUTC
Wednesday, January 1, 2020 8:00:00 AM ```
-## Parameters
+## PARAMETERS
### -AsUTC
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Pipeline input `Get-Date` accepts pipeline input. For example, `Get-ChildItem | Get-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime or System.String
The method `(Get-Date).ToString()` converts a **DateTime** object a **String** o
To display an object's properties and methods, send the object down the pipeline to `Get-Member`. For example, `Get-Date | Get-Member`.
-## Notes
+## NOTES
**DateTime** objects are in long-date and long-time formats for the system locale.
The valid **UFormat specifiers** are displayed in the following table:
| `%y` | Year in 2-digit format | 19 | | `%Z` | Time zone offset from Universal Time Coordinate (UTC) | -07 |
-## Related links
+## RELATED LINKS
[ForEach-Object](../Microsoft.PowerShell.Core/ForEach-Object.md)
Microsoft.PowerShell.Utility Get Error (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Error.md
Title: Get-Error
# Get-Error
-## Synopsis
+## SYNOPSIS
Gets and displays the most recent error messages from the current session.
-## Syntax
+## SYNTAX
### Newest (Default)
Get-Error [[-Newest] <Int32>] [<CommonParameters>]
Get-Error [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Error` cmdlet gets a **PSExtendedError** object that represents the current error details from the last error that occurred in the session.
session using the **Newest** parameter.
The `Get-Error` cmdlet also receives error objects from a collection, such as `$Error`, to display multiple errors from the current session.
-## Examples
+## EXAMPLES
### Example 1: Get the most recent error details
messages, similar to the result of Example 1.
$Error | Get-Error ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### PSObject Supports input from any **PSObject**, but results vary unless either an **ErrorRecord** or **Exception** object are supplied.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ErrorRecord#PSExtendedError Output in a **PSExtendedError** object.
-## Notes
+## NOTES
`Get-Error` accepts pipeline input. For example, `$Error | Get-Error`.
-## Related links
+## RELATED LINKS
[about_Try_Catch_Finally](../Microsoft.PowerShell.Core/About/about_Try_Catch_Finally.md)
Microsoft.PowerShell.Utility Get Event (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Event.md
Title: Get-Event
--- # Get-Event
-## Synopsis
+## SYNOPSIS
Gets the events in the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-Event [[-SourceIdentifier] <String>] [<CommonParameters>]
Get-Event [-EventIdentifier] <Int32> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Event` cmdlet gets events in the PowerShell event queue for the current session. You can get all events or use the **EventIdentifier** or **SourceIdentifier** parameter to specify the
PowerShell exits. You can use `Get-Event` or `Wait-Event` to get the events.
This cmdlet does not get events from the Event Viewer logs. To get those events, use `Get-WinEvent` or `Get-EventLog`.
-## Examples
+## EXAMPLES
### Example 1: Get all events
PS C:\> Get-Event -EventIdentifier 2
This command gets the event with an event identifier of 2.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs `Get-Event` returns a **PSEventArgs** object for each event. To see a description of this object, type `Get-Help Get-Event -Full` and see the Notes section of the help topic.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The `Get-Event` cmdlet returns a **PSEventArgs** object
register an event. In the value of the **Action** parameter, the **MessageData** property of the `$Event` automatic variable contains this value.
-## Related links
+## RELATED LINKS
[New-Event](New-Event.md)
Microsoft.PowerShell.Utility Get Eventsubscriber (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-EventSubscriber.md
Title: Get-EventSubscriber
--- # Get-EventSubscriber
-## Synopsis
+## SYNOPSIS
Gets the event subscribers in the current session.
-## Syntax
+## SYNTAX
### BySource (Default)
Get-EventSubscriber [[-SourceIdentifier] <String>] [-Force] [<CommonParameters>]
Get-EventSubscriber [-SubscriptionId] <Int32> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-EventSubscriber` cmdlet gets the event subscribers in the current session.
your Windows PowerShell session, and the events to which you subscribed are adde
queue whenever they are raised. To cancel an event subscription, delete the event subscriber by using the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Get the event subscriber for a timer event
being generated when the Elapsed event occurs.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventSubscriber `Get-EventSubscriber` returns an object that represents each event subscriber.
-## Notes
+## NOTES
The `New-Event` cmdlet, which creates a custom event, does not generate a subscriber. Therefore, the `Get-EventSubscriber` cmdlet will not find a subscriber object for these events. However, if you use
generates.
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Get Filehash (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-FileHash.md
Title: Get-FileHash
--- # Get-FileHash
-## Synopsis
+## SYNOPSIS
Computes the hash value for a file by using a specified hash algorithm.
-## Syntax
+## SYNTAX
### Path (Default)
Get-FileHash [-LiteralPath] <String[]> [[-Algorithm] <String>] [<CommonParameter
Get-FileHash [-InputStream] <Stream> [[-Algorithm] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FileHash` cmdlet computes the hash value for a file by using a specified hash algorithm. A hash value is a unique value that corresponds to the content of the file. Rather than identifying
are also identical.
By default, the `Get-FileHash` cmdlet uses the SHA256 algorithm, although any hash algorithm that is supported by the target operating system can be used.
-## Examples
+## EXAMPLES
### Example 1: Compute the hash value for a file
Hash
64EC88CA00B268E5BA1A35678A1B5316D212F4F366B2477232534A8AECA37F3C ```
-## Parameters
+## PARAMETERS
### -Algorithm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string to the `Get-FileHash` cmdlet that contains a path to one or more files.
-## Outputs
+## OUTPUTS
### Microsoft.Powershell.Utility.FileHash `Get-FileHash` returns an object that represents the path to the specified file, the value of the computed hash, and the algorithm used to compute the hash.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Get Formatdata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-FormatData.md
Title: Get-FormatData
--- # Get-FormatData
-## Synopsis
+## SYNOPSIS
Gets the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-FormatData` cmdlet gets the formatting data in the current session.
cmdlet to serialize the objects, convert them to XML, and save them in `Format.p
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Get all formatting data
TypeNames FormatViewDefinition
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash} ```
-## Parameters
+## PARAMETERS
### -PowerShellVersion
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.ExtendedTypeDefinition
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-FormatData](Export-FormatData.md)
Microsoft.PowerShell.Utility Get Host (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Host.md
Title: Get-Host
--- # Get-Host
-## Synopsis
+## SYNOPSIS
Gets an object that represents the current host program.
-## Syntax
+## SYNTAX
``` Get-Host [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Host` cmdlet gets an object that represents the program that is hosting Windows PowerShell.
including detailed information about the version of Windows PowerShell that is c
the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors.
-## Examples
+## EXAMPLES
### Example 1: Get information about the PowerShell console host
This command uses the **PrivateData** property of `$Host` as its ErrorBackground
see all of the properties of the object in the `$Host`.PrivateData property, type `$host.PrivateData | format-list *`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Internal.Host.InternalHost `Get-Host` returns a **System.Management.Automation.Internal.Host.InternalHost** object.
-## Notes
+## NOTES
The `$Host` automatic variable contains the same object that `Get-Host` returns, and you can use it in the same way. Similarly, the `$PSCulture` and `$PSUICulture` automatic variables contain the same
use these features interchangeably.
For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md).
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Get Markdownoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-MarkdownOption.md
Title: Get-MarkdownOption
# Get-MarkdownOption
-## Synopsis
+## SYNOPSIS
Returns the current colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
``` Get-MarkdownOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Returns the current colors and styles used for rendering Markdown content in the console. The strings displayed in the output of this cmdlet contain the ANSI escape codes used to change the
color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org/) website.
-## Examples
+## EXAMPLES
### Example 1 - Get the current colors and style
EmphasisItalics : [36m
> (`[char]0x1B`) for the ANSI escape sequence. For more information about ANSI escape codes work, > see [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-MarkdownOption](Set-MarkdownOption.md)
Microsoft.PowerShell.Utility Get Member (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Member.md
Title: Get-Member
--- # Get-Member
-## Synopsis
+## SYNOPSIS
Gets the properties and methods of objects.
-## Syntax
+## SYNTAX
``` Get-Member [-InputObject <PSObject>] [[-Name] <String[]>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Member` cmdlet gets the members, the properties and methods, of objects.
information about static members, the members of the class, not of the instance,
parameter. To get only certain types of members, such as **NoteProperties**, use the **MemberType** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get the members of process objects
LastWriteTimeUtc
Attributes ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Get-Member`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MemberDefinition `Get-Member` returns an object for each property or method that its gets.
-## Notes
+## NOTES
You can get information about a collection object either by using the **InputObject** parameter or by piping the object, preceded by a comma, to `Get-Member`.
return information about the `[System.RuntimeType]` type. However, when you use
parameter, `Get-Member` returns the static members of the specific type represented by the `System.RuntimeType` instance.
-## Related links
+## RELATED LINKS
[Add-Member](Add-Member.md)
Microsoft.PowerShell.Utility Get Psbreakpoint (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md
Title: Get-PSBreakpoint
--- # Get-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Gets the breakpoints that are set in the current session.
-## Syntax
+## SYNTAX
### Line (Default)
Get-PSBreakpoint [[-Script] <String[]>] [-Type] <BreakpointType[]> [-Runspace <R
Get-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSBreakPoint` cmdlet gets the breakpoints that are set in the current session. You can use the cmdlet parameters to get particular breakpoints.
examine the instructions. `Get-PSBreakpoint` is one of several cmdlets designed
PowerShell scripts and commands. For more information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Get all breakpoints for all scripts and functions
This command gets all line and variable breakpoints in the `Sample.ps1` script.
Get-PSBreakpoint -Type Line, Variable -Script "Sample.ps1" ```
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Int32
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You can pipe breakpoint IDs and breakpoint types to `Get-PSBreakPoint`.
`Get-PSBreakPoint` returns objects that represent the breakpoints in the session.
-## Notes
+## NOTES
You can use `Get-PSBreakpoint` or its alias, "gbp".
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Pscallstack (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-PSCallStack.md
Title: Get-PSCallStack
--- # Get-PSCallStack
-## Synopsis
+## SYNOPSIS
Displays the current call stack.
-## Syntax
+## SYNTAX
``` Get-PSCallStack [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSCallStack` cmdlet displays the current call stack.
display the call stack in a script or function outside of the debugger.
To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCallStack`.
-## Examples
+## EXAMPLES
### Example 1: Get the call stack for a function
stack.
The final command is a `Step-Out` command (`o`) that exits the debugger and continues executing the script to completion.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CallStackFrame `Get-PSCallStack` returns an object that represents the items in the call stack.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Get Random (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Random.md
Title: Get-Random
--- # Get-Random
-## Synopsis
+## SYNOPSIS
Gets a random number, or selects objects randomly from a collection.
-## Syntax
+## SYNTAX
### RandomNumberParameterSet (Default)
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Count <Int32>] [<Commo
Get-Random [-SetSeed <Int32>] [-InputObject] <Object[]> [-Shuffle] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Random` cmdlet gets a randomly selected number. If you submit a collection of objects to `Get-Random`, it gets one or more randomly selected objects from the collection.
objects returned from a collection, or a seed number.
> the current session until you use **SetSeed** again or close the session. You can't reset the seed > to its default value.
-## Examples
+## EXAMPLES
### Example 1: Get a random integer
Get-Random -InputObject @('a','',$null)
`Get-Random` will return either `a`, empty string, or `$null`. The empty sting displays as a blank line and `$null` returns to a PowerShell prompt.
-## Parameters
+## PARAMETERS
### -Count
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe one or more objects. `Get-Random` selects values randomly from the piped objects.
-## Outputs
+## OUTPUTS
### System.Int32, System.Int64, System.Double `Get-Random` returns an integer or floating-point number, or an object selected randomly from a submitted collection.
-## Notes
+## NOTES
By default, `Get-Random` generates cryptographically secure randomness using the [RandomNumberGenerator](/dotnet/api/system.security.cryptography.randomnumbergenerator) class.
parameter set accepts arrays that contain an empty string or `$null`. In earlier
versions, only the **Maximum** parameter in the **RandomNumberParameterSet** parameter set accepted an empty string or `$null`.
-## Related links
+## RELATED LINKS
[System.Security.Cryptography.RandomNumberGenerator()](/dotnet/api/system.security.cryptography.randomnumbergenerator)
Microsoft.PowerShell.Utility Get Runspace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Runspace.md
Title: Get-Runspace
--- # Get-Runspace
-## Synopsis
+## SYNOPSIS
Gets active runspaces within a PowerShell host process.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Get-Runspace [-Id] <Int32[]> [<CommonParameters>]
Get-Runspace [-InstanceId] <Guid[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Runspace` cmdlet gets active runspaces in a PowerShell host process.
-## Examples
+## EXAMPLES
### Example 1: Get runspaces
Id Name ComputerName Type State Availability
1 Runspace1 localhost Local Opened Busy ```
-## Parameters
+## PARAMETERS
### -Id
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.Runspace You can pipe the results of a `Get-Runspace` command to `Debug-Runspace`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Debug-Runspace](Debug-Runspace.md)
Microsoft.PowerShell.Utility Get Runspacedebug (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-RunspaceDebug.md
Title: Get-RunspaceDebug
--- # Get-RunspaceDebug
-## Synopsis
+## SYNOPSIS
Shows runspace debugging options.
-## Syntax
+## SYNTAX
### RunspaceNameParameterSet (Default)
Get-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
Get-RunspaceDebug [[-ProcessName] <String>] [[-AppDomainName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-RunspaceDebug` cmdlet shows runspace debugging options.
-## Examples
+## EXAMPLES
### 1: Show the state of the default runspace debugger
Get-RunspaceDebug
1 Runspace1 False False ```
-## Parameters
+## PARAMETERS
### -AppDomainName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-RunspaceDebug](Disable-RunspaceDebug.md)
Microsoft.PowerShell.Utility Get Tracesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-TraceSource.md
Title: Get-TraceSource
--- # Get-TraceSource
-## Synopsis
+## SYNOPSIS
Gets PowerShell components that are instrumented for tracing.
-## Syntax
+## SYNTAX
``` Get-TraceSource [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TraceSource` cmdlet gets the trace sources for PowerShell components that are currently in use. You can use the data to determine which PowerShell components you can trace. When tracing, the
trace data to monitor data flow, program execution, and errors.
The tracing cmdlets were designed for PowerShell developers, but they are available to all users.
-## Examples
+## EXAMPLES
### Example 1: Get trace sources by name
Get-TraceSource
This command gets all of the PowerShell components that can be traced.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String You can pipe a string that contains the name of a trace source to `Get-TraceSource`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSTraceSource `Get-TraceSource` returns objects that represent the trace sources.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-TraceSource](Set-TraceSource.md)
Microsoft.PowerShell.Utility Get Typedata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-TypeData.md
Title: Get-TypeData
--- # Get-TypeData
-## Synopsis
+## SYNOPSIS
Gets the extended type data in the current session.
-## Syntax
+## SYNTAX
``` Get-TypeData [[-TypeName] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-TypeData` cmdlet gets the extended type data in the current session. This includes type data that was added to the session by `Types.ps1xml` file and dynamic type data that was added by
about dynamic type data that the `Update-TypeData` cmdlet adds, see `Update-Type
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Get all extended type data
The command gets the **DateTime** key in **Members** and its **GetScriptBlock**
The output shows the script block that creates the value of the **DateTime** property of every **System.DateTime** object in PowerShell.
-## Parameters
+## PARAMETERS
### -TypeName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe type names to `Get-TypeData`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.Runspaces.TypeData
-## Notes
+## NOTES
`Get-TypeData` gets only the extended type data in the current session. It does not get extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Get Uiculture (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-UICulture.md
Title: Get-UICulture
--- # Get-UICulture
-## Synopsis
+## SYNOPSIS
Gets the current UI culture settings in the operating system.
-## Syntax
+## SYNTAX
``` Get-UICulture [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-UICulture` cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such
as menus and messages.
You can also use the `Get-Culture` cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.
-## Examples
+## EXAMPLES
### Example 1: Get the UI culture
This command displays the short date pattern for the current UI culture. To see
subproperties of the **DateTimeFormat** property of the UI culture, type `(Get-UICulture).DateTimeFormat | Get-Member`.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Globalization.CultureInfo, Microsoft.PowerShell.VistaCultureInfo
You cannot pipe input to this cmdlet.
it returns a **CultureInfo** object. In Windows PowerShell 2.0, it returns a **VistaCultureInfo** object.
-## Notes
+## NOTES
You can also use the `$PSCulture` and `$PSUICulture` variables. The `$PSCulture` variable stores the name of the current culture, and the `$PSUICulture` variable stores the name of the current UI culture.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Get Unique (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Unique.md
Title: Get-Unique
--- # Get-Unique
-## Synopsis
+## SYNOPSIS
Returns unique items from a sorted list.
-## Syntax
+## SYNTAX
### AsString (Default)
Get-Unique [-InputObject <PSObject>] [-AsString] [<CommonParameters>]
Get-Unique [-InputObject <PSObject>] [-OnType] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Unique` cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. The list must be sorted for the cmdlet to work properly.
and returns only one instance of each item. The list must be sorted for the cmdl
`Get-Unique` is case-sensitive. As a result, strings that differ only in character casing are considered to be unique.
-## Examples
+## EXAMPLES
### Example 1: Get unique words in a text file
The **AsString** parameter tells `Get-Unique` to treat the **ProcessName** value
Without this parameter, `Get-Unique` treats the **ProcessName** values as objects and returns only one instance of the object, that is, the first process name in the list.
-## Parameters
+## PARAMETERS
### -AsString
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any type of object to `Get-Unique`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject The type of object that `Get-Unique` returns is determined by the input.
-## Notes
+## NOTES
You can also refer to `Get-Unique` by its built-in alias, `gu`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md). To sort a list, use Sort-Object. You can also use the **Unique** parameter of `Sort-Object` to find the unique items in a list.
-## Related links
+## RELATED LINKS
[Select-Object](Select-Object.md)
Microsoft.PowerShell.Utility Get Uptime (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Uptime.md
Title: Get-Uptime
# Get-Uptime
-## Synopsis
+## SYNOPSIS
Get the **TimeSpan** since last boot.
-## Syntax
+## SYNTAX
### Timespan (Default)
Get-Uptime [<CommonParameters>]
Get-Uptime [-Since] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet returns the time elapsed since the last boot of the operating system. The `Get-Uptime` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Show time since last boot
Get-Uptime -Since
Tuesday, June 18, 2019 2:34:56 PM ```
-## Parameters
+## PARAMETERS
### -Since
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
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.TimeSpan
This type is returned when using the **Since** parameter.
> For more information about Windows fast startup, see > [Distinguishing Fast Startup from Wake-from-Hibernation](/windows-hardware/drivers/kernel/distinguishing-fast-startup-from-wake-from-hibernation).
-## Notes
+## NOTES
On Windows, the value returned is the same as the **LastBootUpTime** property of the **Win32_OperatingSystem** class in WMI.
-## Related links
+## RELATED LINKS
[Win32_OperatingSystem](/windows/win32/cimwin32prov/win32-operatingsystem#properties)
Microsoft.PowerShell.Utility Get Variable (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Variable.md
Title: Get-Variable
--- # Get-Variable
-## Synopsis
+## SYNOPSIS
Gets the variables in the current console.
-## Syntax
+## SYNTAX
``` Get-Variable [[-Name] <String[]>] [-ValueOnly] [-Include <String[]>] [-Exclude <String[]>] [-Scope <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Variable` cmdlet gets the PowerShell variables in the current console. You can retrieve just the values of the variables by specifying the **ValueOnly** parameter, and you can filter the variables returned by name.
-## Examples
+## EXAMPLES
### Example 1: Get variables by letter
Get-Variable -Scope 0
Compare-Object (Get-Variable -Scope 0) (Get-Variable -Scope 1) ```
-## Parameters
+## PARAMETERS
### -Exclude
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the variable name to `Get-Variable`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSVariable
When you specify the **ValueOnly** parameter, if the specified variable's value
processing the variable's values one at a time. A workaround to force collection enumeration is to enclose the `Get-Variable` command in parenthesis.
-## Notes
+## NOTES
- This cmdlet does not manage environment variables. To manage environment variables, you can use the environment variable provider.
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Get Verb (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Get-Verb.md
Title: Get-Verb
--- # Get-Verb
-## Synopsis
+## SYNOPSIS
Gets approved PowerShell verbs.
-## Syntax
+## SYNTAX
``` Get-Verb [[-Verb] <String[]>] [[-Group] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Verb` function gets verbs that are approved for use in PowerShell commands.
warning message.
> [Approved Verbs](../../docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md) in > the Microsoft Docs.
-## Examples
+## EXAMPLES
### Example 1 - Get a list of all verbs
Cmdlet Sort-Object 3.1.0.0 Microsoft.PowerShell.Utility
Cmdlet Tee-Object 3.1.0.0 Microsoft.PowerShell.Utility ```
-## Parameters
+## PARAMETERS
### -Group
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### System.Management.Automation.VerbInfo
-## Notes
+## NOTES
PowerShell verbs are assigned to a group based on their most common use. The groups are designed to make the verbs easy to find and compare, not to restrict their use. You can use any approved verb
Some of the cmdlets that are installed with PowerShell, such as `Tee-Object` and
unapproved verbs. These cmdlets are historic exceptions and their verbs are classified as **reserved**.
-## Related links
+## RELATED LINKS
[Import-Module](../microsoft.powershell.core/import-module.md)
Microsoft.PowerShell.Utility Group Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Group-Object.md
Title: Group-Object
# Group-Object
-## Synopsis
+## SYNOPSIS
Groups objects that contain the same value for specified properties.
-## Syntax
+## SYNTAX
### HashTable
Group-Object [-NoElement] [-AsHashTable] [-AsString] [-InputObject <PSObject>]
[[-Property] <Object[]>] [-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Group-Object` cmdlet displays objects in groups based on the value of a specified property. `Group-Object` returns a table with one row for each property value and a column that displays the
Beginning in PowerShell 7, `Group-Object` can combine the **CaseSensitive** and
parameters to create a case-sensitive hash table. The hash table keys use case-sensitive comparisons and output a **System.Collections.Hashtable** object.
-## Examples
+## EXAMPLES
### Example 1: Group files by extension
pipeline. `Group-Object` groups the objects using the **Property** value **Exten
**CaseSensitive** and **AsHashTable** parameters create the hash table and the keys are grouped using the case-sensitive keys `.txt` and `.TXT`.
-## Parameters
+## PARAMETERS
### -AsHashTable
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Group-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GroupInfo or System.Collections.Hashtable When you use the **AsHashTable** parameter, `Group-Object` returns a **Hashtable** object. Otherwise, it returns a **GroupInfo** object.
-## Notes
+## NOTES
You can use the **GroupBy** parameter of the formatting cmdlets, such as `Format-Table` and `Format-List`, to group objects. Unlike `Group-Object`, which creates a single table with a row for
type. When grouping objects of different .NET Core types, `Group-Object` uses th
Objects that don't have a specified property can't be grouped. Objects that aren't grouped appear in the final **GroupInfo** object output in a group named `AutomationNull.Value`.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Import Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-Alias.md
Title: Import-Alias
--- # Import-Alias
-## Synopsis
+## SYNOPSIS
Imports an alias list from a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Alias -LiteralPath <String> [-Scope <String>] [-PassThru] [-Force] [-What
[<CommonParameters>] ```
-## Description
+## 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.
-## Examples
+## EXAMPLES
### Example 1: Import aliases from a file
Import-Alias test.txt
This command imports alias information from a file named test.txt.
-## Parameters
+## PARAMETERS
### -Force
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Alias`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo When you use the **Passthru** parameter, `Import-Alias` returns a **System.Management.Automation.AliasInfo** object that represents the alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility Import Clixml (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-Clixml.md
Title: Import-Clixml
# Import-Clixml
-## Synopsis
+## SYNOPSIS
Imports a CLIXML file and creates corresponding objects in PowerShell.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-Clixml -LiteralPath <String[]> [-IncludeTotalCount] [-Skip <UInt64>] [-Fi
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Clixml` cmdlet imports a Common Language Infrastructure (CLI) XML file with data that represents Microsoft .NET Framework objects and creates the PowerShell objects. For more information
that were exported as secure XML using `Export-Clixml`. For an example, see Exam
`Import-Clixml` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Import a serialized file and recreate an object
To import the credential automatically into your script, run the final two comma
`Import-Clixml` to import the secured credential object into your script. This import eliminates the risk of exposing plain-text passwords in your script.
-## Parameters
+## PARAMETERS
### -First
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
+## INPUTS
### System.String You can pipeline a string that contains a path to `Import-Clixml`.
-## Outputs
+## OUTPUTS
### PSObject `Import-Clixml` returns objects that were deserialized from the stored XML files.
-## Notes
+## NOTES
When specifying multiple values for a parameter, use commas to separate the values. For example, `<parameter-name> <value1>, <value2>`.
-## Related links
+## RELATED LINKS
[Export-Clixml](Export-Clixml.md)
Microsoft.PowerShell.Utility Import Csv (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-Csv.md
Title: Import-Csv
--- # Import-Csv
-## Synopsis
+## SYNOPSIS
Creates table-like custom objects from the items in a comma-separated value (CSV) file.
-## Syntax
+## SYNTAX
### DelimiterPath (Default)
Import-Csv -LiteralPath <String[]> -UseCulture [-Header <String[]>] [-Encoding <
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-Csv` cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property
header row name and displays a warning message.
Starting with PowerShell 6.0, `Import-Csv` now supports the W3C Extended Log File Format.
-## Examples
+## EXAMPLES
### Example 1: Import process objects
The `Get-Content` cmdlet displays the Projects.csv file. The header row is missi
displays a warning message because **H1** is a default header name. The `(Import-Csv -Path .\Projects.csv).H1` command gets the **H1** property values and displays a warning.
-## Parameters
+## PARAMETERS
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a path to `Import-Csv`.
-## Outputs
+## OUTPUTS
### Object This cmdlet returns the objects described by the content in the CSV file.
-## Notes
+## NOTES
Because the imported objects are CSV versions of the object type, they are not recognized and formatted by the PowerShell type formatting entries that format the non-CSV versions of the object
comments and ignored unless the comment starts with `#Fields:` and contains deli
column names. In that case, the cmdlet uses those column names. This is the standard format for Windows IIS and other web server logs. For more information, see [Extended Log File Format](https://www.w3.org/TR/WD-logfile.html).
-## Related links
+## RELATED LINKS
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Import Localizeddata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-LocalizedData.md
Title: Import-LocalizedData
--- # Import-LocalizedData
-## Synopsis
+## SYNOPSIS
Imports language-specific data into scripts and functions based on the UI culture that is selected for the operating system.
-## Syntax
+## SYNTAX
``` Import-LocalizedData [[-BindingVariable] <String>] [[-UICulture] <String>] [-BaseDirectory <String>] [-FileName <String>] [-SupportedCommand <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-LocalizedData` cmdlet dynamically retrieves strings from a subdirectory whose name matches the UI language set for the current user of the operating system. It is designed to enable
it easy for scripts to display user messages in the UI language of the current u
information about this and about the format of the `.psd1` files, see [about_Script_Internationalization](../Microsoft.PowerShell.Core/About/about_Script_Internationalization.md).
-## Examples
+## EXAMPLES
### Example 1: Import text strings
The sample output shows the results of running both scripts when the UI culture
and there are no matching files or directories for that UI culture. `Day1.ps1` displays an error message and English output. `Day2.ps1` just displays the English output.
-## Parameters
+## PARAMETERS
### -BaseDirectory
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable `Import-LocalizedData` saves the hash table in the variable that is specified by the value of the **BindingVariable** parameter.
-## Notes
+## NOTES
- Before using `Import-LocalizedData`, localize your user messages. Format the messages for each locale (UI culture) in a hash table of key-value pairs, and save the hash table in a file with the
You cannot pipe input to this cmdlet.
For more information, see [about_Script_Internationalization](../Microsoft.Powershell.Core/About/about_Script_Internationalization.md).
-## Related links
+## RELATED LINKS
[Write-Host](Write-Host.md)
Microsoft.PowerShell.Utility Import Pssession (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-PSSession.md
Title: Import-PSSession
--- # Import-PSSession
-## Synopsis
+## SYNOPSIS
Imports commands from another session into the current session.
-## Syntax
+## SYNTAX
``` Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <String[]>] [-AllowClobber]
Import-PSSession [-Prefix <String>] [-DisableNameChecking] [[-CommandName] <Stri
[-Certificate <X509Certificate2>] [-Session] <PSSession> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PSSession` cmdlet imports commands , such as cmdlets, functions, and aliases, from a PSSession on a local or remote computer into the current session. You can import any command that
Beginning in Windows PowerShell 3.0, you can use the `Import-Module` cmdlet to i
remote session into the current session. This feature uses implicit remoting. It is equivalent to using `Import-PSSession` to import selected modules from a remote session into the current session.
-## Examples
+## EXAMPLES
### Example 1: Import all commands from a PSSession
which returns the module name.
The `Get-Command` command is the equivalent of `Get-Command $M.Name`".
-## Parameters
+## PARAMETERS
### -AllowClobber
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSModuleInfo
You cannot pipe objects to this cmdlet.
However, the imported module is temporary and exists only in the current session. To create a permanent module on disk, use the `Export-PSSession` cmdlet.
-## Notes
+## NOTES
- `Import-PSSession` relies on the PowerShell remoting infrastructure. To use this cmdlet, the computer must be configured for WS-Management remoting. For more information, see
permanent module on disk, use the `Export-PSSession` cmdlet.
include the prefix that you assign by using the **Prefix** parameter. To get help for an imported command in Windows PowerShell 2.0, use the original (non-prefixed) command name.
-## Related links
+## RELATED LINKS
[Export-PSSession](Export-PSSession.md)
Microsoft.PowerShell.Utility Import Powershelldatafile (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Import-PowerShellDataFile.md
Title: Import-PowerShellDataFile
--- # Import-PowerShellDataFile
-## Synopsis
+## SYNOPSIS
Imports values from a `.PSD1` file without invoking its contents.
-## Syntax
+## SYNTAX
### ByPath (Default)
Import-PowerShellDataFile [-Path] <String[]> [-SkipLimitCheck] [<CommonParameter
Import-PowerShellDataFile [-LiteralPath] <String[]> [-SkipLimitCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PowerShellDataFile` cmdlet safely imports key-value pairs from hashtables defined in a `.PSD1` file. The values could be imported using `Invoke-Expression` on the contents of the file.
However, `Invoke-Expression` runs any code contained in the file. This could pro
results or execute unsafe code. `Import-PowerShellDataFile` imports the data without invoking the code. By default there is a 500 key limit but can be bypassed with the **SkipLimitCheck** switch.
-## Examples
+## EXAMPLES
### Example 1: Retrieve values from PSD1
NodeName DSC-01
NodeName DSC-02 ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Collections.Hashtable
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Expression](Invoke-Expression.md)
Microsoft.PowerShell.Utility Invoke Expression (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Invoke-Expression.md
Title: Invoke-Expression
--- # Invoke-Expression
-## Synopsis
+## SYNOPSIS
Runs commands or expressions on the local computer.
-## Syntax
+## SYNTAX
``` Invoke-Expression [-Command] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-Expression` cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. Without `Invoke-Expression`, a string submitted at the command
Expressions are evaluated and run in the current scope. For more information, se
> before running it. In general, it is best to design your script with predefined input options, > rather than allowing freeform input.
-## Examples
+## EXAMPLES
### Example 1: Evaluate an expression
command fails if the example number is not valid.
> If the example code from the help file has output in the example, PowerShell attempts to run the > output along with the code and an error will be thrown.
-## Parameters
+## PARAMETERS
### -Command
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String or PSObject You can pipe an object that represents the command to `Invoke-Expression`. Use the `$Input` automatic variable to represent the input objects in the command.
-## Outputs
+## OUTPUTS
### PSObject Returns the output that is generated by the invoked command (the value of the **Command** parameter).
-## Notes
+## NOTES
In most cases, you invoke expressions using PowerShell's call operator and achieve the same results. The call operator is a safer method. For more information, see [about_Operators](../microsoft.powershell.core/about/about_operators.md#call-operator-).
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Invoke Restmethod (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
Title: Invoke-RestMethod
# Invoke-RestMethod
-## Synopsis
+## SYNOPSIS
Sends an HTTP or HTTPS request to a RESTful web service.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-RestMethod -CustomMethod <String> [-FollowRelLink] [-MaximumFollowRelLink
[-SkipHeaderValidation] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-RestMethod` cmdlet sends HTTP and HTTPS requests to Representational State Transfer (REST) web services that return richly structured data.
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## Examples
+## EXAMPLES
### Example 1: Get the PowerShell RSS feed
$uri = 'https://api.github.com/repos/microsoftdocs/powershell-docs/issues'
Invoke-RestMethod -Uri $uri -HttpVersion 2.0 -SkipCertificateCheck ```
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## Outputs
+## OUTPUTS
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## Notes
+## NOTES
Some features may not be available on all platforms.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Invoke Webrequest (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Invoke-WebRequest.md
Title: Invoke-WebRequest
# Invoke-WebRequest
-## Synopsis
+## SYNOPSIS
Gets content from a web page on the internet.
-## Syntax
+## SYNTAX
### StandardMethod (Default)
Invoke-WebRequest [-UseBasicParsing] [-Uri] <Uri> [-HttpVersion <Version>] [-Web
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Invoke-WebRequest` cmdlet sends HTTP and HTTPS requests to a web page or web service. It parses the response and returns collections of links, images, and other significant HTML elements.
variables. See the [Notes](#notes) section of this article.
> However, since the `contoso.com` sites do not exist, the examples do not work. Adapt the examples > to hosts in your environment.
-## Examples
+## EXAMPLES
### Example 1: Send a web request
link.
(Invoke-WebRequest -Uri 'https://aka.ms/pscore6-docs' -HttpVersion 2.0).Links.Href ```
-## Parameters
+## PARAMETERS
### -AllowUnencryptedAuthentication
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe the body of a web request to `Invoke-WebRequest`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject
-## Notes
+## NOTES
Beginning with PowerShell 6.0.0 `Invoke-WebRequest` supports basic parsing only.
are:
case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## Related links
+## RELATED LINKS
[Invoke-RestMethod](Invoke-RestMethod.md)
Microsoft.PowerShell.Utility Join String (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Join-String.md
Title: Join-String
# Join-String
-## Synopsis
+## SYNOPSIS
Combines objects from the pipeline into a single string.
-## Syntax
+## SYNTAX
### Default (Default)
Join-String [[-Property] <PSPropertyExpression>] [[-Separator] <String>] [-Outpu
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Join-String` cmdlet joins, or combines, text from pipeline objects into a single string.
or the result of the object that was converted to a string.
This cmdlet was introduced in PowerShell 6.2.
-## Examples
+## EXAMPLES
### Example 1: Join directory names
class {
} ```
-## Parameters
+## PARAMETERS
### -DoubleQuote
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Measure Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Measure-Command.md
Title: Measure-Command
--- # Measure-Command
-## Synopsis
+## SYNOPSIS
Measures the time it takes to run script blocks and cmdlets.
-## Syntax
+## SYNTAX
``` Measure-Command [-InputObject <PSObject>] [-Expression] <ScriptBlock> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Command` cmdlet runs a script block or cmdlet internally, times the execution of the operation, and returns the execution time.
operation, and returns the execution time.
> [!NOTE] > Script blocks run by `Measure-Command` run in the current scope, not a child scope.
-## Examples
+## EXAMPLES
### Example 1: Measure a command
Value 2
For more information about the invocation operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md#call-operator-).
-## Parameters
+## PARAMETERS
### -Expression
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe an object to `Measure-Command`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `Measure-Command` returns a time span object that represents the result.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Invoke-Command](../Microsoft.PowerShell.Core/Invoke-Command.md)
Microsoft.PowerShell.Utility Measure Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Measure-Object.md
Title: Measure-Object
--- # Measure-Object
-## Synopsis
+## SYNOPSIS
Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
-## Syntax
+## SYNTAX
### GenericMeasure (Default)
Measure-Object [[-Property] <PSPropertyExpression[]>] [-InputObject <PSObject>]
[-Character] [-IgnoreWhiteSpace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Measure-Object` cmdlet calculates the property values of certain types of object. `Measure-Object` performs three types of measurements, depending on the parameters in the command.
The `Measure-Object` cmdlet performs calculations on the property values of obje
**Average** of numeric values. For **String** objects, you can also use `Measure-Object` to count the number of lines, words, and characters.
-## Examples
+## EXAMPLES
### Example 1: Count the files and folders in a directory
StandardDeviation :
Property : PeakPagedMemorySize ```
-## Parameters
+## PARAMETERS
### -AllStats
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Measure-Object`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.GenericMeasureInfo
You can pipe objects to `Measure-Object`.
If you use the **Word** parameter, `Measure-Object` returns a **TextMeasureInfo** object. Otherwise, it returns a **GenericMeasureInfo** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility New Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-Alias.md
Title: New-Alias
# New-Alias
-## Synopsis
+## SYNOPSIS
Creates a new alias.
-## Syntax
+## SYNTAX
``` New-Alias [-Name] <String> [-Value] <String> [-Description <String>] [-Option <ScopedItemOptions>] [-PassThru] [-Scope <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Alias` cmdlet creates a new alias in the current PowerShell session. Aliases created by using `New-Alias` are not saved after you exit the session or close PowerShell. You can use the `Export-Alias` cmdlet to save your alias information to a file. You can later use `Import-Alias` to retrieve that saved alias information.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
description, quick wmi alias, for the alias and makes it read-only. The last lin
uses `Get-Alias` to get the new alias and pipes it to Format-List to display all of the information about it.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **Passthru** parameter, `New-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the new alias. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- To create a new alias, use `Set-Alias` or `New-Alias`. To change an alias, use `Set-Alias`. To delete an alias, use `Remove-Item`.
-## Related links
+## RELATED LINKS
[Export-Alias](Export-Alias.md)
Microsoft.PowerShell.Utility New Event (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-Event.md
Title: New-Event
--- # New-Event
-## Synopsis
+## SYNOPSIS
Creates a new event.
-## Syntax
+## SYNTAX
``` New-Event [-SourceIdentifier] <String> [[-Sender] <PSObject>] [[-EventArguments] <PSObject[]>] [[-MessageData] <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Event` cmdlet creates a new custom event.
the event subscription by using the `Unregister-Event` cmdlet, the event subscri
are deleted from the session. If you do not subscribe to the custom event, to delete the event, you must change the program conditions or close the PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Create a new event in the event queue
Instrumentation (WMI) event that is raised when a new process is created. The co
Because the events that `New-Event` raises are automatically added to the PowerShell event queue, you do not need to register for that event.
-## Parameters
+## PARAMETERS
### -EventArguments
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
The new custom event, the event subscription, and the event queue exist only in
If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility New Guid (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-Guid.md
Title: New-Guid
--- # New-Guid
-## Synopsis
+## SYNOPSIS
Creates a GUID.
-## Syntax
+## SYNTAX
``` New-Guid [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Guid` cmdlet creates a random globally unique identifier (GUID). If you need a unique ID in a script, you can create a GUID, as needed.
-## Examples
+## EXAMPLES
### Example 1: Create a GUID
New-Guid
This command creates a random GUID. Alternatively, you could store the output of this cmdlet in a variable to use elsewhere in a script.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.Guid This cmdlet returns a GUID.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-Object.md
Title: New-Object
--- # New-Object
-## Synopsis
+## SYNOPSIS
Creates an instance of a Microsoft .NET Framework or COM object.
-## Syntax
+## SYNTAX
### Net (Default)
New-Object [-TypeName] <String> [[-ArgumentList] <Object[]>] [-Property <IDictio
New-Object [-ComObject] <String> [-Strict] [-Property <IDictionary>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Object` cmdlet creates an instance of a .NET Framework or COM object.
you type the fully qualified name of a .NET Framework class and the cmdlet retur
instance of that class. To create an instance of a COM object, use the **ComObject** parameter and specify the ProgID of the object as its value.
-## Examples
+## EXAMPLES
### Example 1: Create a System.Version object
members of `$array` to parameters of the constructor but the constructor does no
parameter. Wrapping `$array` in another array prevents PowerShell from attempting to bind the three members of `$array` to parameters of the constructor.
-## Parameters
+## PARAMETERS
### -ArgumentList
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
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### Object `New-Object` returns the object that is created.
-## Notes
+## NOTES
- `New-Object` provides the most commonly-used functionality of the VBScript CreateObject function. A statement like `Set objShell = CreateObject("Shell.Application")` in VBScript can be
You cannot pipe input to this cmdlet.
- `New-Object` expands upon the functionality available in the Windows Script Host environment by making it easy to work with .NET Framework objects from the command line and within scripts.
-## Related links
+## RELATED LINKS
[about_Object_Creation](../Microsoft.PowerShell.Core/About/about_Object_Creation.md)
Microsoft.PowerShell.Utility New Temporaryfile (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-TemporaryFile.md
Title: New-TemporaryFile
--- # New-TemporaryFile
-## Synopsis
+## SYNOPSIS
Creates a temporary file.
-## Syntax
+## SYNTAX
``` New-TemporaryFile [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
This cmdlet creates temporary files that you can use in scripts.
order and uses the first path found:
- On non-Windows platforms: Uses the path specified by the TMPDIR environment variable.
-## Examples
+## EXAMPLES
### Example 1: Create a temporary file
$TempFile = New-TemporaryFile
This command generates a `.tmp` file in your temporary folder, and then stores a reference to the file in the `$TempFile` variable. You can use this file later in your script.
-## Parameters
+## PARAMETERS
### -Confirm
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### System.IO.FileInfo This cmdlet returns a **FileInfo** object that represents the temporary file.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility New Timespan (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-TimeSpan.md
Title: New-TimeSpan
--- # New-TimeSpan
-## Synopsis
+## SYNOPSIS
Creates a TimeSpan object.
-## Syntax
+## SYNTAX
### Date (Default)
New-TimeSpan [[-Start] <DateTime>] [[-End] <DateTime>] [<CommonParameters>]
New-TimeSpan [-Days <Int32>] [-Hours <Int32>] [-Minutes <Int32>] [-Seconds <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-TimeSpan` cmdlet creates a **TimeSpan** object that represents a time interval. You can use a **TimeSpan** object to add or subtract time from **DateTime** objects.
You can use a **TimeSpan** object to add or subtract time from **DateTime** obje
Without parameters, a `New-TimeSpan` command returns a **TimeSpan** object that represents a time interval of zero.
-## Examples
+## EXAMPLES
### Example 1: Create a TimeSpan object for a specified duration
TotalSeconds : 27813562.3127728
TotalMilliseconds : 27813562312.7728 ```
-## Parameters
+## PARAMETERS
### -Days
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a **DateTime** object that represents that start time to `New-TimeSpan`.
-## Outputs
+## OUTPUTS
### System.TimeSpan `New-TimeSpan` returns an object that represents the time span.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility New Variable (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/New-Variable.md
Title: New-Variable
# New-Variable
-## Synopsis
+## SYNOPSIS
Creates a new variable.
-## Syntax
+## SYNTAX
``` New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Option <ScopedItemOptions>]
New-Variable [-Name] <String> [[-Value] <Object>] [-Description <String>] [-Opti
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-Variable` cmdlet creates a new variable in Windows PowerShell. You can assign a value to the variable while creating it or assign or change the value after it is created.
a variable, and determine whether variables are public or private.
Typically, you create a new variable by typing the variable name and its value, such as `$Var = 3`, but you can use the `New-Variable` cmdlet to use its parameters.
-## Examples
+## EXAMPLES
### Example 1: Create a variable
abc123xyz
This command demonstrates that variables with spaces can be created. The variables can be accessed using the `Get-Variable` cmdlet or directly by delimiting a variable with braces.
-## Parameters
+## PARAMETERS
### -Description
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).
-## Inputs
+## INPUTS
### System.Object You can pipe a value to `New-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `New-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Out File (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Out-File.md
Title: Out-File
--- # Out-File
-## Synopsis
+## SYNOPSIS
Sends output to a file.
-## Syntax
+## SYNTAX
### ByPath (Default)
Out-File [[-Encoding] <Encoding>] -LiteralPath <string> [-Append] [-Force] [-NoC
[-Width <int>] [-NoNewline] [-InputObject <psobject>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-File` cmdlet sends output to a file. It implicitly uses PowerShell's formatting system to write to the file. The file receives the same display representation as the terminal. This means
that the output may not be ideal for programmatic processing unless all input ob
When you need to specify parameters for the output, use `Out-File` rather than the redirection operator (`>`). For more information about redirection, see [about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md).
-## Examples
+## EXAMPLES
### Example 1: Send output and create a file
DemoDefaultOutFileWidth
For more information about `$PSDefaultParameterValues`, see [about_Preference_Variables](../Microsoft.Powershell.Core/About/about_preference_variables.md#psdefaultparametervalues).
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-File`.
-## Outputs
+## OUTPUTS
### None `Out-File` does not generate any output.
-## Notes
+## NOTES
Input objects are automatically formatted as they would be in the terminal, but you can use a `Format-*` cmdlet to explicitly control the formatting of the output to the file. For example,
cmdlet.
`Out-File` saves data to a file but it does not produce any output objects to the pipeline.
-## Related links
+## RELATED LINKS
[about_Providers](../Microsoft.Powershell.Core/About/about_Providers.md)
Microsoft.PowerShell.Utility Out Gridview (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Out-GridView.md
Title: Out-GridView
--- # Out-GridView
-## Synopsis
+## SYNOPSIS
Sends output to an interactive table in a separate window.
-## Syntax
+## SYNTAX
### PassThru (Default)
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputMod
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
For full instructions, see the [Notes](#notes) section of this article.
> [GraphicalTools](https://www.powershellgallery.com/packages/Microsoft.PowerShell.GraphicalTools) > module in the PowerShell Gallery.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a grid view
This command line can be used in a Windows shortcut. Without the **Wait** parame
would exit as soon as the `Out-GridView` window opened, which would close the `Out-GridView` window almost immediately.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send any object to this cmdlet.
-## Outputs
+## OUTPUTS
### None Normally, `Out-GridView` does not return any objects. When using the **PassThru** parameter, the objects representing the selected rows are returned to the pipeline.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
The criteria only affects the display. It does not delete items from the table.
- To delete selected criteria, click the red X beside each criterion. - To delete all criteria, click the **Clear All** button.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out Printer (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Out-Printer.md
Title: Out-Printer
# Out-Printer
-## Synopsis
+## SYNOPSIS
Sends output to a printer.
-## Syntax
+## SYNTAX
``` Out-Printer [[-Name] <String>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
specified.
> This cmdlet was reintroduced in PowerShell 7. This cmdlet is only available on Windows systems > that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1 - Send a file to be printed on the default printer
Out-Printer -InputObject $H
`Get-Help` gets the full version of the Help topic for `Get-CimInstance` and stores it in the `$H` variable. The **InputObject** parameter passes the value of `$H` to `Out-Printer`.
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Out-Printer`.
-## Outputs
+## OUTPUTS
### None `Out-Printer` does not return any objects.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms.
cmdlet sends it to a formatting cmdlet before rendering it.
you pipe the output of `Out-Printer` to `Get-Member`, `Get-Member` reports that no objects have been specified.
-## Related links
+## RELATED LINKS
[Out-File](Out-File.md)
Microsoft.PowerShell.Utility Out String (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Out-String.md
Title: Out-String
# Out-String
-## Synopsis
+## SYNOPSIS
Outputs input objects as a string.
-## Syntax
+## SYNTAX
### NoNewLineFormatting (Default)
Out-String [-Width <Int32>] [-NoNewline] [-InputObject <PSObject>] [<CommonParam
Out-String [-Stream] [-Width <Int32>] [-InputObject <PSObject>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Out-String` cmdlet converts input objects into strings. By default, `Out-String` accumulates the strings and returns them as a single string, but you can use the **Stream**
parameter to direct `Out-String` to return one line at a time or create an array
cmdlet lets you search and manipulate string output as you would in traditional shells when object manipulation is less convenient.
-## Examples
+## EXAMPLES
### Example 1: Get the current culture and convert the data to strings
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can send objects down the pipeline to `Out-String`.
-## Outputs
+## OUTPUTS
### System.String `Out-String` returns the string that it creates from the input object.
-## Notes
+## NOTES
The cmdlets that contain the `Out` verb don't format objects. The `Out` cmdlets send objects to the formatter for the specified display destination.
-## Related links
+## RELATED LINKS
[about_Formatting](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md)
Microsoft.PowerShell.Utility Read Host (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Read-Host.md
Title: Read-Host
--- # Read-Host
-## Synopsis
+## SYNOPSIS
Reads a line of input from the console.
-## Syntax
+## SYNTAX
### AsString (Default)
Read-Host [[-Prompt] <Object>] [-MaskInput] [<CommonParameters>]
Read-Host [[-Prompt] <Object>] [-AsSecureString] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Read-Host` cmdlet reads a line of input from the console (stdin). You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt
users for secure data, such as passwords.
> [!NOTE] > `Read-Host` has a limit of 1022 characters it can accept as input from a user.
-## Examples
+## EXAMPLES
### Example 1: Save console input to a variable
value is stored as a plaintext **String** object in the `$pwd_string` variable.
$pwd_string = Read-Host "Enter a Password" -MaskInput ```
-## Parameters
+## PARAMETERS
### -AsSecureString
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept input from the PowerShell pipeline.
-## Outputs
+## OUTPUTS
### System.String or System.Security.SecureString If the **AsSecureString** parameter is used, `Read-Host` returns a **SecureString**. Otherwise, it returns a string.
-## Notes
+## NOTES
This cmdlet only reads from the stdin stream of the host process. Usually, the stdin stream is connected to the keyboard of the host console.
-## Related links
+## RELATED LINKS
[Clear-Host](../microsoft.powershell.core/clear-host.md)
Microsoft.PowerShell.Utility Register Engineevent (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Register-EngineEvent.md
Title: Register-EngineEvent
# Register-EngineEvent
-## Synopsis
+## SYNOPSIS
Subscribes to events that are generated by the PowerShell engine and by the `New-Event` cmdlet.
-## Syntax
+## SYNTAX
``` Register-EngineEvent [-SourceIdentifier] <String> [[-Action] <ScriptBlock>] [-MessageData <PSObject>] [-SupportEvent] [-Forward] [-MaxTriggerCount <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-EngineEvent` cmdlet subscribes to events that are generated by the PowerShell engine and the `New-Event` cmdlet. Use the **SourceIdentifier** parameter to specify the event.
the `Unregister-Event` cmdlet, which deletes the event subscriber from the sessi
When the subscribed event is raised, it is added to the event queue in your session. To get events in the event queue, use the `Get-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Register a PowerShell engine event on remote computers
The `Unregister-Event` cmdlet stops the job associated with the event subscripti
Id 19 is still running and creating new events. We use the **Job** cmdlets stop the job and remove the unneeded job objects. `Get-Content` displays the contents of the log file.
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Register-EngineEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob If you use the **Action** parameter, `Register-EngineEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
when PowerShell has been idle for 300 milliseconds (ms).
> 2.2.0-beta4, **OnIdle** behavior changed to signal the event only if there is a `ReadKey()` > timeout and the current editing buffer is empty.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Register Objectevent (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Register-ObjectEvent.md
Title: Register-ObjectEvent
--- # Register-ObjectEvent
-## Synopsis
+## SYNOPSIS
Subscribes to the events that are generated by a Microsoft .NET Framework object.
-## Syntax
+## SYNTAX
``` Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceIdentifier] <String>]
Register-ObjectEvent [-InputObject] <PSObject> [-EventName] <String> [[-SourceId
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-ObjectEvent` cmdlet subscribes to events that are generated by .NET objects on the local computer or on a remote computer.
When you subscribe to an event, an event subscriber is added to your session. To
subscribers in the session, use the `Get-EventSubscriber` cmdlet. To cancel the subscription, use the `Unregister-Event` cmdlet, which deletes the event subscriber from the session.
-## Examples
+## EXAMPLES
### Example 1: Subscribe to events when a new process starts
value of the `$Random` variable.
For more information about modules, see [about_Modules](../Microsoft.PowerShell.Core/About/about_Modules.md).
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None You cannot pipe objects to `Register-ObjectEvent`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSEventJob When you use the **Action** parameter, `Register-ObjectEvent` returns a **System.Management.Automation.PSEventJob** object. Otherwise, it does not generate any output.
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Remove-Alias.md
Title: Remove-Alias
# Remove-Alias
-## Synopsis
+## SYNOPSIS
Remove an alias from the current session.
-## Syntax
+## SYNTAX
### Default (Default)
Remove an alias from the current session.
Remove-Alias [-Name] <String[]> [-Scope <String>] [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Alias` cmdlet removes an alias from the current PowerShell session. To remove an alias with the **Option** property set to **ReadOnly**, use the **Force** parameter. The `Remove-Alias` cmdlet was introduced in PowerShell 6.0.
-## Examples
+## EXAMPLES
### Example 1 - Remove an alias
represent the current pipeline object. The parameter **NE** (not equal), selects
have an **Options** value set to **Constant**. `Remove-Alias` uses the **Force** parameter to remove aliases, including read-only aliases, from the PowerShell session.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### System.String[] You can pipe an alias object to `Remove-Alias`.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't return any output.
-## Notes
+## NOTES
Changes only affect the current scope. To remove an alias from all sessions, add a `Remove-Alias` command to your PowerShell profile. For more information, see [about_Aliases](../microsoft.powershell.core/about/about_aliases.md).
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Remove Event (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Remove-Event.md
Title: Remove-Event
# Remove-Event
-## Synopsis
+## SYNOPSIS
Deletes events from the event queue.
-## Syntax
+## SYNTAX
### BySource (Default)
Remove-Event [-SourceIdentifier] <String> [-WhatIf] [-Confirm] [<CommonParameter
Remove-Event [-EventIdentifier] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Event` cmdlet deletes events from the event queue in the current session. This cmdlet deletes only the events currently in the queue. To cancel event registrations or unsubscribe, use the `Unregister-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Remove an event by source identifier
PS C:\> Get-Event | Remove-Event
This command deletes all events from the event queue.
-## Parameters
+## PARAMETERS
### -EventIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventArgs You can pipe events from `Get-Event` to `Remove-Event`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms. Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Remove Psbreakpoint (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Remove-PSBreakpoint.md
Title: Remove-PSBreakpoint
# Remove-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Deletes breakpoints from the current console.
-## Syntax
+## SYNTAX
### Breakpoint (Default)
Remove-PSBreakpoint [-Breakpoint] <Breakpoint[]> [-WhatIf] [-Confirm] [<CommonPa
Remove-PSBreakpoint [-Id] <Int32[]> [-Runspace <Runspace>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSBreakpoint` cmdlet deletes a breakpoint. Enter a breakpoint object or a breakpoint ID.
not function.
information about the PowerShell debugger, see [about_Debuggers](../microsoft.powershell.core/about/about_debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Remove all breakpoints
function del-psb { Get-PSBreakpoint | Remove-PSBreakpoint }
It uses the `Get-PSBreakpoint` cmdlet to get the breakpoints. Then, it uses a pipeline operator (`|`) to send the breakpoints to the `Remove-PSBreakpoint` cmdlet, which deletes them.
-## Parameters
+## PARAMETERS
### -Breakpoint
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Breakpoint[]
You can pipe breakpoint objects to `Remove-PSBreakpoint`.
### System.Management.Automation.Runspaces.Runspace
-## Outputs
+## OUTPUTS
### None The cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Remove Typedata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Remove-TypeData.md
Title: Remove-TypeData
# Remove-TypeData
-## Synopsis
+## SYNOPSIS
Deletes extended types from the current session.
-## Syntax
+## SYNTAX
### RemoveTypeDataSet (Default)
Remove-TypeData [-TypeName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-TypeData -Path <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-TypeData` cmdlet deletes extended type data from the current session. This cmdlet affects only the current session and sessions that are created in the current session.
files, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/about/about_Types.p
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Remove type data for a specified type
cmdlet to remove extended type data for all CIM types in the sessions in the `$S
Invoke-Command -Session $S {Get-TypeData -TypeName *CIM* | Remove-TypeData} ```
-## Parameters
+## PARAMETERS
### -Path
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.Runspaces.TypeData
You can pipe **TypeData** object, such as the ones that the `Get-TypeData` cmdle
You can pipe the type names to `Remove-TypeData`. When you pipe an object to `Remove-TypeData`, `Remove-TypeData` gets the type name of the object and removes all type data for the object type.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
`Remove-TypeData` can remove only the extended type data in the current session. It cannot remove extended type data that is on the computer, but has not been added to the current session, such as extended types that are defined in modules that have not been imported into the current session.
-## Related links
+## RELATED LINKS
[Get-TypeData](Get-TypeData.md)
Microsoft.PowerShell.Utility Remove Variable (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Remove-Variable.md
Title: Remove-Variable
--- # Remove-Variable
-## Synopsis
+## SYNOPSIS
Deletes a variable and its value.
-## Syntax
+## SYNTAX
``` Remove-Variable [-Name] <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Force] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-Variable` cmdlet deletes a variable and its value from the scope in which it is defined, such as the current session. You cannot use this cmdlet to delete variables that are set as constants or those that are owned by the system.
-## Examples
+## EXAMPLES
### Example 1: Remove a variable
Remove-Variable Smp
This command deletes the `$Smp` variable.
-## Parameters
+## PARAMETERS
### -Exclude
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
+## INPUTS
### System.Management.Automation.PSVariable You can pipe a variable object to `Remove-Variable`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- Changes affect only the current scope, such as a session. To delete a variable from all sessions, add a `Remove-Variable` command to your PowerShell profile.
This cmdlet does not return any output.
- You can also refer to `Remove-Variable` by its built-in alias, `rv`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Select Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Select-Object.md
Title: Select-Object
--- # Select-Object
-## Synopsis
+## SYNOPSIS
Selects objects or object properties.
-## Syntax
+## SYNTAX
### DefaultParameter (Default)
Select-Object [-InputObject <PSObject>] [-Unique] [-Wait] [-Index <Int32[]>] [<C
Select-Object [-InputObject <PSObject>] [-Unique] [-SkipIndex <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Object` cmdlet selects specified properties of an object or set of objects. It can also select unique objects, a specified number of objects, or objects in a specified position in an
objects is generated, even when the command that generates the objects appears b
`Select-Object` command in the pipeline. To turn off this optimizing behavior, use the **Wait** parameter.
-## Examples
+## EXAMPLES
### Example 1: Select objects by property
Diagnostics.Format.ps1xml 4.955078125 223
DotNetTypes.format.ps1xml 134.9833984375 223 ```
-## Parameters
+## PARAMETERS
### -ExcludeProperty
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object to `Select-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject
-## Notes
+## NOTES
- You can also refer to the `Select-Object` cmdlet by its built-in alias, `select`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
You can pipe any object to `Select-Object`.
information, see _Write Single Records to the Pipeline_ in [Strongly Encouraged Development Guidelines](/powershell/scripting/developer/windows-powershell).
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Select String (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Select-String.md
Title: Select-String
# Select-String
-## Synopsis
+## SYNOPSIS
Finds text in strings and files.
-## Syntax
+## SYNTAX
### File (Default)
Select-String [-Culture <String>] [-Pattern] <String[]> -LiteralPath <String[]>
[-NotMatch] [-AllMatches] [-Encoding <Encoding>] [-Context <Int32[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-String` cmdlet uses regular expression matching to search for text patterns in input strings and files. You can use `Select-String` similar to `grep` in UNIX or `findstr.exe` in
You can also specify that `Select-String` should expect a particular character e
when you're searching files of Unicode text. `Select-String` uses the byte-order-mark (BOM) to detect the encoding format of the file. If the file has no BOM, it assumes the encoding is UTF8.
-## Examples
+## EXAMPLES
### Example 1: Find a case-sensitive match
Name foo
Piping to `Out-String -Stream` converts the formatted output into a multiple single-line string objects. This means that when `Select-String` finds a match it outputs only the matching line.
-## Parameters
+## PARAMETERS
### -AllMatches
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe any object that has a `ToString()` method to `Select-String`.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.MatchInfo, System.Boolean, System.String
By default, the output is a set of **MatchInfo** objects with one for each match
the **Quiet** parameter, the output is a **Boolean** value indicating whether the pattern was found. If you use the **Raw** parameter, the output is a set of **String** objects that match the pattern.
-## Notes
+## NOTES
`Select-String` is similar to `grep` in UNIX or `findstr.exe` in Windows.
To find the properties of a **MatchInfo** object, type the following command:
`Select-String -Path test.txt -Pattern 'test' | Get-Member | Format-List -Property *`
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md)
Microsoft.PowerShell.Utility Select Xml (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Select-Xml.md
Title: Select-Xml
--- # Select-Xml
-## Synopsis
+## SYNOPSIS
Finds text in an XML string or document.
-## Syntax
+## SYNTAX
### Xml (Default)
Select-Xml [-XPath] <string> -LiteralPath <string[]> [-Namespace <hashtable>] [<
Select-Xml [-XPath] <string> -Content <string[]> [-Namespace <hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Select-Xml` cmdlet lets you use XPath queries to search for text in XML strings and documents. Enter an XPath query, and use the **Content**, **Path**, or **Xml** parameter to specify the XML to be searched.
-## Examples
+## EXAMPLES
### Example 1: Select AliasProperty nodes
Select-Xml -Path $Home\Documents\WindowsPowerShell\Snippets -Namespace $SnippetN
ForEach-Object {$_.Node.Innerxml} ```
-## Parameters
+## PARAMETERS
### -Content
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String or System.Xml.XmlNode You can pipe a path or XML node to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.SelectXmlInfo
-## Notes
+## NOTES
XPath is a standard language that is designed to identify parts of an XML document. For more information about the XPath language, see [XPath Reference](/dotnet/standard/data/xml/select-nodes-using-xpath-navigation) and the Selection Filters section of [Event Selection](/previous-versions//aa385231(v=vs.85)).
-## Related links
+## RELATED LINKS
[ConvertTo-Xml](ConvertTo-Xml.md)
Microsoft.PowerShell.Utility Send Mailmessage (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Send-MailMessage.md
Title: Send-MailMessage
--- # Send-MailMessage
-## Synopsis
+## SYNOPSIS
Sends an email message.
-## Syntax
+## SYNTAX
### All
Send-MailMessage [-Attachments <String[]>] [-Bcc <String[]>] [[-Body] <String>]
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Send-MailMessage` cmdlet sends an email message from within PowerShell.
information, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About
> not use `Send-MailMessage`. For more information, see > [Platform Compatibility note DE0005](https://aka.ms/SendMailMessage).
-## Examples
+## EXAMPLES
### Example 1: Send an email from one person to another person
The **Credential** parameter specifies a domain administrator's credentials are
message. The **UseSsl** parameter specifies that Secure Socket Layer (SSL) creates a secure connection.
-## Parameters
+## PARAMETERS
### -Attachments
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
+## INPUTS
### System.String You can pipe the path and file names of attachments to `Send-MailMessage`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
Microsoft.PowerShell.Utility Set Alias (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-Alias.md
Title: Set-Alias
# Set-Alias
-## Synopsis
+## SYNOPSIS
Creates or changes an alias for a cmdlet or other command in the current PowerShell session.
-## Syntax
+## SYNTAX
### Default (Default)
Set-Alias [-Name] <string> [-Value] <string> [-Description <string>] [-Option <S
[-PassThru] [-Scope <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Alias` cmdlet creates or changes an alias for a cmdlet or a command, such as a function, script, file, or other executable. An alias is an alternate name that refers to a cmdlet or command.
as the description.
An alias that is created or changed by `Set-Alias` is not permanent and is only available during the current PowerShell session. When the PowerShell session is closed, the alias is removed.
-## Examples
+## EXAMPLES
### Example 1: Create an alias for a cmdlet
Set-Alias -Name Go -Option ReadOnly, Private
The alias `Go` should already exist. After running the command above, the alias is not be able to be changed without using the **Force** parameter and is only available in the current scope.
-## Parameters
+## PARAMETERS
### -Description
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
+## INPUTS
### None `Set-Alias` does not accept input from the pipeline.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.AliasInfo
When you use the **PassThru** parameter, `Set-Alias` generates a
**System.Management.Automation.AliasInfo** object representing the alias. Otherwise, `Set-Alias` does not generate any output.
-## Notes
+## NOTES
PowerShell includes built-in aliases that are available in each PowerShell session. The `Get-Alias` cmdlet displays the aliases available in a PowerShell session.
An alias can be saved and reused in another PowerShell session by doing an expor
save an alias to a file, use `Export-Alias`. To add a saved alias to a new PowerShell session, use `Import-Alias`.
-## Related links
+## RELATED LINKS
[about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md)
Microsoft.PowerShell.Utility Set Date (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-Date.md
Title: Set-Date
--- # Set-Date
-## Synopsis
+## SYNOPSIS
Changes the system time on the computer to a time that you specify.
-## Syntax
+## SYNTAX
### Date (Default)
Set-Date [-Date] <DateTime> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm
Set-Date [-Adjust] <TimeSpan> [-DisplayHint <DisplayHintType>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Date` cmdlet changes the system date and time on the computer to a date and time that you specify.
You can specify a new date and/or time by typing a string or by passing a **Date
**TimeSpan** object to `Set-Date`. To specify a new date or time, use the **Date** parameter. To specify a change interval, use the **Adjust** parameter.
-## Examples
+## EXAMPLES
### Example 1: Add three days to the system date
$90mins = New-TimeSpan -Minutes 90
Set-Date -Adjust $90mins ```
-## Parameters
+## PARAMETERS
### -Adjust
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.DateTime You can pipe a date to `Set-Date`.
-## Outputs
+## OUTPUTS
### System.DateTime `Set-Date` returns an object that represents the date that it set.
-## Notes
+## NOTES
- Use this cmdlet cautiously when changing the date and time on the computer. The change might prevent the computer from receiving system-wide events and updates that are triggered by a date or
You can pipe a date to `Set-Date`.
[TimeSpan Methods](/dotnet/api/system.timespan) in the .NET SDK.
-## Related links
+## RELATED LINKS
[Get-Date](Get-Date.md)
Microsoft.PowerShell.Utility Set Markdownoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-MarkdownOption.md
Title: Set-MarkdownOption
--- # Set-MarkdownOption
-## Synopsis
+## SYNOPSIS
Sets the colors and styles used for rendering Markdown content in the console.
-## Syntax
+## SYNTAX
### IndividualSetting (Default)
Set-MarkdownOption [-PassThru] -Theme <String> [<CommonParameters>]
Set-MarkdownOption [-PassThru] [-InputObject] <PSObject> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Sets the colors and styles used for rendering Markdown content in the console. These styles are defined using ANSI escape codes that change the color and style of the Markdown text being rendered.
For more information about Markdown, see the [CommonMark](https://commonmark.org
> string. For more information about ANSI escape codes work, see > [ANSI_escape_code](https://en.wikipedia.org/wiki/ANSI_escape_code).
-## Examples
+## EXAMPLES
### Example 1 - Switch to the Light Theme
EmphasisBold : [1m
EmphasisItalics : [36m ```
-## Parameters
+## PARAMETERS
### -BoldForegroundColor
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.MarkdownRender.PSMarkdownOptionInfo
-## Notes
+## NOTES
The string values used to define the color and style must match the regular expression `^\[*[0-9;]*?m{1}`.
-## Related links
+## RELATED LINKS
[Get-MarkdownOption](Get-MarkdownOption.md)
Microsoft.PowerShell.Utility Set Psbreakpoint (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-PSBreakpoint.md
Title: Set-PSBreakpoint
--- # Set-PSBreakpoint
-## Synopsis
+## SYNOPSIS
Sets a breakpoint on a line, command, or variable.
-## Syntax
+## SYNTAX
### Line (Default)
Set-PSBreakpoint [-Action <ScriptBlock>] [[-Script] <String[]>] -Variable <Strin
[-Mode <VariableAccessMode>] [-Runspace <Runspace>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSBreakpoint` cmdlet sets a breakpoint in a script or in any command run in the current session. You can use `Set-PSBreakpoint` to set a breakpoint before executing a script or running a
The `Set-PSBreakpoint` cmdlet is one of several cmdlets designed for debugging P
For more information about the PowerShell debugger, see [about_Debuggers](../Microsoft.PowerShell.Core/About/about_Debuggers.md).
-## Examples
+## EXAMPLES
### Example 1: Set a breakpoint on a line
Script : C:\ps-test\sample.ps1
ScriptName : C:\ps-test\sample.ps1 ```
-## Parameters
+## PARAMETERS
### -Action
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe input to `Set-PSBreakpoint`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.CommandBreakpoint
You cannot pipe input to `Set-PSBreakpoint`.
`Set-PSBreakpoint` returns an object that represents each breakpoint that it sets.
-## Notes
+## NOTES
- `Set-PSBreakpoint` cannot set a breakpoint on a remote computer. To debug a script on a remote computer, copy the script to the local computer and then debug it locally.
You cannot pipe input to `Set-PSBreakpoint`.
- When setting a breakpoint on a function or variable at the command prompt, you can set the breakpoint before or after you create the function or variable.
-## Related links
+## RELATED LINKS
[Disable-PSBreakpoint](Disable-PSBreakpoint.md)
Microsoft.PowerShell.Utility Set Tracesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-TraceSource.md
Title: Set-TraceSource
--- # Set-TraceSource
-## Synopsis
+## SYNOPSIS
Configures, starts, and stops a trace of PowerShell components.
-## Syntax
+## SYNTAX
### optionsSet (Default)
Set-TraceSource [-Name] <String[]> [-RemoveListener <String[]>] [<CommonParamete
Set-TraceSource [-Name] <String[]> [-RemoveFileListener <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-TraceSource` cmdlet configures, starts, and stops a trace of a PowerShell component. You can use it to specify which components will be traced and where the tracing output is sent.
-## Examples
+## EXAMPLES
### Example 1: Trace the ParameterBinding component
This command stops the trace of the **ParameterBinding** component of PowerShell
**Name** parameter to identify the component that was being traced and the **RemoveListener** parameter to identify the trace listener.
-## Parameters
+## PARAMETERS
### -Debugger
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).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a name to `Set-TraceSource`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSTraceSource
When you use the **PassThru** parameter, `Set-TraceSource` generates a
**System.Management.Automation.PSTraceSource** object representing the trace session. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
this cmdlet does not generate any output.
module are loaded automatically when the component is in use, and they appear in the output of `Get-TraceSource`.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Set Variable (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Set-Variable.md
Title: Set-Variable
--- # Set-Variable
-## Synopsis
+## SYNOPSIS
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## Syntax
+## SYNTAX
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## Examples
+## EXAMPLES
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## Parameters
+## PARAMETERS
### -Description
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## Outputs
+## OUTPUTS
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Show Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Show-Command.md
Title: Show-Command
# Show-Command
-## Synopsis
+## SYNOPSIS
Displays PowerShell command information in a graphical window.
-## Syntax
+## SYNTAX
``` Show-Command [[-Name] <String>] [-Height <Double>] [-Width <Double>] [-NoCommonParameter] [-ErrorPopup] [-PassThru] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet was reintroduced in PowerShell 7.
Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. This cmdlet is only available on Windows systems that support the Windows Desktop.
-## Examples
+## EXAMPLES
### Example 1: Open the Commands window
command, instead of creating a new command. When you run this command, the `Show
opens. You can use the window features to set parameter values. To run the command, click the **Run** button in the `Show-Command` window.
-## Parameters
+## PARAMETERS
### -ErrorPopup
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
+## INPUTS
### None You cannot pipe input to `Show-Command`.
-## Outputs
+## OUTPUTS
### None, System.String, System.Object
When you use the **PassThru** parameter, `Show-Command` returns a command string
**ErrorPopup** parameter, `Show-Command` returns the command output (any object). Otherwise, `Show-Command` does not generate any output.
-## Notes
+## NOTES
This cmdlet is only available on Windows platforms. `Show-Command` does not work in remote sessions.
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Show Markdown (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Show-Markdown.md
Title: Show-Markdown
# Show-Markdown
-## Synopsis
+## SYNOPSIS
Shows a Markdown file or string in the console in a friendly way using VT100 escape sequences or in a browser using HTML.
-## Syntax
+## SYNTAX
### Path (Default)
Show-Markdown -InputObject <PSObject> [-UseBrowser] [<CommonParameters>]
Show-Markdown -LiteralPath <String[]> [-UseBrowser] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Show-Markdown` cmdlet is used to render Markdown in a human readable format either in a terminal or in a browser.
You can change how `Show-Markdown` renders Markdown in a terminal by using `Set-
This cmdlet was introduced in PowerShell 6.1.
-## Examples
+## EXAMPLES
### Example 1: Simple example specifying a path
__underlines__
Show-Markdown -Path ./README.md -UseBrowser ```
-## Parameters
+## PARAMETERS
### -InputObject
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
+## INPUTS
### System.Management.Automation.PSObject ### System.String[]
-## Outputs
+## OUTPUTS
### System.String
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[ConvertFrom-Markdown](ConvertFrom-Markdown.md)
Microsoft.PowerShell.Utility Sort Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Sort-Object.md
Title: Sort-Object
# Sort-Object
-## Synopsis
+## SYNOPSIS
Sorts objects by property values.
-## Syntax
+## SYNTAX
### Default (Default)
Sort-Object [-Descending] [-Unique] -Bottom <Int32> [-InputObject <PSObject>] [[
[-Culture <String>] [-CaseSensitive] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Sort-Object` cmdlet sorts objects in ascending or descending order based on object property values. If sort properties are not included in a command, PowerShell uses default sort properties
tables to sort in ascending order, descending order, or a combination of sort or
sorted as case-sensitive or case-insensitive. Use the **Unique** parameter to eliminate duplicates from the output.
-## Examples
+## EXAMPLES
### Example 1: Sort the current directory by name
The `Get-ChildItem` cmdlet gets the files from the directory specified by the **
down the pipeline to the `Sort-Object` cmdlet. `Sort-Object` uses the **Length** and **Name** parameter to sort the files by length in ascending order. Since `File01.txt` and `File03.txt` have the same length, they are further sorted by their property **Name**.
-## Parameters
+## PARAMETERS
### -Bottom
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be sorted to `Sort-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Sort-Object` returns the sorted objects.
-## Notes
+## NOTES
The `Sort-Object` cmdlet sorts objects based on properties specified in the command or the default sort properties for the object type. Default sort properties are defined using the `PropertySet`
see [ServiceControllerStatus](/dotnet/api/system.serviceprocess.servicecontrolle
The performance of the sorting algorithm is slower when doing a stable sort.
-## Related links
+## RELATED LINKS
[about_Calculated_Properties](../Microsoft.PowerShell.Core/About/about_Calculated_Properties.md)
Microsoft.PowerShell.Utility Start Sleep (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Start-Sleep.md
Title: Start-Sleep
--- # Start-Sleep
-## Synopsis
+## SYNOPSIS
Suspends the activity in a script or session for the specified period of time.
-## Syntax
+## SYNTAX
### Seconds (Default)
Start-Sleep -Milliseconds <Int32> [<CommonParameters>]
Start-Sleep -Duration <TimeSpan> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Start-Sleep` cmdlet suspends the activity in a script or session for the specified period of time. You can use it for many tasks, such as waiting for an operation to complete or pausing before repeating an operation.
-## Examples
+## EXAMPLES
### Example 1: Sleep all commands for 15 seconds
This example makes all the commands in the session sleep for 30 seconds.
Start-Sleep -Duration (New-TimeSpan -Seconds 30) ```
-## Parameters
+## PARAMETERS
### -Duration
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.Int32 You can pipe the number of seconds to `Start-Sleep`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
- You can also refer to `Start-Sleep` by its built-in alias, `sleep`. For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
This cmdlet does not return any output.
- `Ctrl+C` does not break out of `[Threading.Thread]::Sleep`. For more information, see [Thread.Sleep Method](/dotnet/api/system.threading.thread.sleep).
-## Related links
+## RELATED LINKS
Microsoft.PowerShell.Utility Tee Object (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Tee-Object.md
Title: Tee-Object
--- # Tee-Object
-## Synopsis
+## SYNOPSIS
Saves command output in a file or variable and also sends it down the pipeline.
-## Syntax
+## SYNTAX
### File (Default)
Tee-Object [-InputObject <PSObject>] -LiteralPath <String> [[-Encoding] <Encodin
Tee-Object [-InputObject <PSObject>] -Variable <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Tee-Object` cmdlet redirects output, that is, it sends the output of a command in two directions (like the letter T). It stores the output in a file or variable and also sends it down the pipeline. If `Tee-Object` is the last command in the pipeline, the command output is displayed at the prompt.
-## Examples
+## EXAMPLES
### Example 1: Output processes to a file and to the console
drive. A pipeline operator (`|`) sends the list to `Tee-Object`, which appends t
AllSystemFiles.txt file and passes the list down the pipeline to the `Out-File` cmdlet, which saves the list in the `NewSystemFiles.txt file`.
-## Parameters
+## PARAMETERS
### -Append
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Tee-Object`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Tee-Object` returns the object that it redirects.
-## Notes
+## NOTES
You can also use the `Out-File` cmdlet or the redirection operator, both of which save the output in a file but do not send it down the pipeline.
a file but do not send it down the pipeline.
Beginning in PowerShell 6, `Tee-Object` uses BOM-less UTF-8 encoding when it writes to files. If you need a different encoding, use the `Out-File` cmdlet with the **Encoding** parameter.
-## Related links
+## RELATED LINKS
[Compare-Object](Compare-Object.md)
Microsoft.PowerShell.Utility Test Json (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Test-Json.md
Title: Test-Json
# Test-Json
-## Synopsis
+## SYNOPSIS
Tests whether a string is a valid JSON document
-## Syntax
+## SYNTAX
### __AllParameterSets (Default) ```
Test-Json [-Json] <String> [[-Schema] <String>] [<CommonParameters>]
Test-Json [-Json] <String> [-SchemaFile <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-Json` cmdlet tests whether a string is a valid JavaScript Object Notation (JSON) document and can optionally verify that JSON document against a provided schema.
web-based apps.
This cmdlet was introduced in PowerShell 6.1
-## Examples
+## EXAMPLES
### Example 1: Test if an object is valid JSON
True
For more information, see [Structuring a complex schema](https://json-schema.org/understanding-json-schema/structuring.html).
-## Parameters
+## PARAMETERS
### -Json
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a JSON string to `Test-Json`.
-## Outputs
+## OUTPUTS
### Boolean
-## Notes
+## NOTES
The `Test-Json` cmdlet is implemented by using the [NJsonSchema Class](https://github.com/RSuter/NJsonSchema).
Newtonsoft's implementation includes several extensions to the JSON standard, su
comments and use of single quotes. For a full list of features, see the Newtonsoft documentation at [https://www.newtonsoft.com/json](https://www.newtonsoft.com/json).
-## Related links
+## RELATED LINKS
[An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET](/previous-versions/dotnet/articles/bb299886(v=msdn.10))
Microsoft.PowerShell.Utility Trace Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Trace-Command.md
Title: Trace-Command
# Trace-Command
-## Synopsis
+## SYNOPSIS
Configures and starts a trace of the specified expression or command.
-## Syntax
+## SYNTAX
### expressionSet (Default)
Trace-Command [-InputObject <PSObject>] [-Name] <String[]> [[-Option] <PSTraceSo
[-Debugger] [-PSHost] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Trace-Command` cmdlet configures and starts a trace of the specified expression or command. It works like Set-TraceSource, except that it applies only to the specified command.
-## Examples
+## EXAMPLES
### Example 1: Trace metadata processing, parameter binding, and an expression
the **InputObject** parameter. The **InputObject** parameter passes the variable
expression. In effect, the command being processed during the trace is `Get-Alias -InputObject $A" or "$A | Get-Alias`.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects that represent input to the expression to `Trace-Command`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject Returns the command trace in the debug stream.
-## Notes
+## NOTES
- Tracing is a method that developers use to debug and refine programs. When tracing, the program generates detailed messages about each step in its internal processing.
Returns the command trace in the debug stream.
**Expression**, **Option** or **Name**, **Command**, **Option**. If you include the parameter names, the parameters can appear in any order.
-## Related links
+## RELATED LINKS
[Get-TraceSource](Get-TraceSource.md)
Microsoft.PowerShell.Utility Unblock File (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Unblock-File.md
Title: Unblock-File
--- # Unblock-File
-## Synopsis
+## SYNOPSIS
Unblocks files that were downloaded from the Internet.
-## Syntax
+## SYNTAX
### ByPath (Default)
Unblock-File [-Path] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]
Unblock-File -LiteralPath <String[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet only works on the Windows and macOS platforms.**
For more information about PowerShell execution policies, see
This cmdlet was introduced in Windows PowerShell 3.0.
-## Examples
+## EXAMPLES
### Example 1: Unblock a file
At line:1 char:1
PS C:\> Get-Item C:\ps-test\Start-ActivityTracker.ps1 | Unblock-File ```
-## Parameters
+## PARAMETERS
### -LiteralPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a file path to `Unblock-File`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- Support for macOS was added in PowerShell 7. - The `Unblock-File` cmdlet works only in file system drives.
This cmdlet does not generate any output.
- If you use the `Unblock-File` cmdlet on a file that is not blocked, the command has no effect on the unblocked file and the cmdlet does not generate errors.
-## Related links
+## RELATED LINKS
[about_Execution_Policies](../Microsoft.PowerShell.Core/About/about_Execution_Policies.md)
Microsoft.PowerShell.Utility Unregister Event (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Unregister-Event.md
Title: Unregister-Event
# Unregister-Event
-## Synopsis
+## SYNOPSIS
Cancels an event subscription.
-## Syntax
+## SYNTAX
### BySource (Default)
Unregister-Event [-SourceIdentifier] <String> [-Force] [-WhatIf] [-Confirm] [<Co
Unregister-Event [-SubscriptionId] <Int32> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-Event` cmdlet cancels an event subscription that was created by using the `Register-EngineEvent`, `Register-ObjectEvent`, or `Register-WmiEvent` cmdlet.
created by using the `New-Event` cmdlet, the new event is also deleted from the
`Unregister-Event` does not delete events from the event queue. To delete events, use the `Remove-Event` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Cancel an event subscription by source identifier
It uses a pipeline operator (`|`) to send the subscriber objects to `Unregister-
deletes them from the session. To complete the task, the **Force** parameter is also required on `Unregister-Event`.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSEventSubscriber You can pipe the output from `Get-EventSubscriber` to `Unregister-Event`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
No event sources available on the Linux or macOS platforms.
current session, the event queue is discarded and the event subscription is canc
subscribed to the event by using the `Register-EngineEvent` cmdlet. To delete a custom event from the session, you must remove it programmatically or close the session.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Update Formatdata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Update-FormatData.md
Title: Update-FormatData
# Update-FormatData
-## Synopsis
+## SYNOPSIS
Updates the formatting data in the current session.
-## Syntax
+## SYNTAX
``` Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-FormatData` cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell.
interrupt the session.
For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Reload previously loaded formatting files
The second command uses the `Update-FormatData` cmdlet to reload the formatting
NewFiles.format.ps1xml file was previously loaded, `Update-FormatData` automatically reloads it without using parameters.
-## Parameters
+## PARAMETERS
### -AppendPath
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
+## INPUTS
### System.String You can pipe a string that contains the append path to `Update-FormatData`.
-## Outputs
+## OUTPUTS
### None The cmdlet does not return any output.
-## Notes
+## NOTES
- `Update-FormatData` also updates the formatting data for commands in the session that were imported from modules. If the formatting file for a module changes, you can run an `Update-FormatData` command to update the formatting data for imported commands. You do not need to import the module again.
-## Related links
+## RELATED LINKS
[Get-FormatData](Get-FormatData.md)
Microsoft.PowerShell.Utility Update List (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Update-List.md
Title: Update-List
# Update-List
-## Synopsis
+## SYNOPSIS
Adds items to and removes items from a property value that contains a collection of objects.
-## Syntax
+## SYNTAX
### AddRemoveSet (Default)
Update-List [-Add <Object[]>] [-Remove <Object[]>] [-InputObject <PSObject>] [[-
Update-List -Replace <Object[]> [-InputObject <PSObject>] [[-Property] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-List` cmdlet adds, removes, or replaces items in a property value of an object and returns the updated object. This cmdlet is designed for properties that contain collections of
determine whether a cmdlet supports `Update-List`, see the cmdlet Help topic.
This cmdlet was reintroduced in PowerShell 7.
-## Examples
+## EXAMPLES
### Example 1: Add items to a property value
Deck : 2ΓÖú KΓÖÑ 4ΓÖá 10ΓÖÑ 8ΓÖá 10ΓÖª 9ΓÖá 6ΓÖá KΓÖª 7ΓÖú 3ΓÖú QΓÖú AΓÖÑ
8ΓÖÑ ```
-## Parameters
+## PARAMETERS
### -Add
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
+## INPUTS
### System.Management.Automation.PSObject You can pipe the objects to be updated to `Update-List`.
-## Outputs
+## OUTPUTS
### Objects or System.Management.Automation.PSListModifier `Update-List` returns the updated object, or it returns an object that represents the update action.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Format-List](Format-List.md)
Microsoft.PowerShell.Utility Update Typedata (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Update-TypeData.md
Title: Update-TypeData
# Update-TypeData
-## Synopsis
+## SYNOPSIS
Updates the extended type data in the session.
-## Syntax
+## SYNTAX
### FileSet (Default)
Update-TypeData [-MemberType <PSMemberTypes>] [-MemberName <String>] [-Value <Ob
Update-TypeData [-Force] [-TypeData] <TypeData[]> [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-TypeData` cmdlet updates the extended type data in the session by reloading the `Types.ps1xml` files into memory and adding new extended type data.
the `Update-TypeData` cmdlet cannot use method syntax.
For more information about the `Types.ps1xml` files in PowerShell, see [about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md).
-## Examples
+## EXAMPLES
### Example 1: Update extended types
modules. The value of the **Value** parameter is a script that returns `$True` i
The second command pipes the module objects from `Get-Module` to the `Format-Table` cmdlet, which displays the **Name** and **SupportsUpdatableHelp** properties of all modules in a list.
-## Parameters
+## PARAMETERS
### -AppendPath
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the values of the **AppendPath**, **TypeName**, or **TypeData** parameters to `Update-TypeData`.
-## Outputs
+## OUTPUTS
### None This cmdlet does not return any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Types.ps1xml](../Microsoft.PowerShell.Core/About/about_Types.ps1xml.md)
Microsoft.PowerShell.Utility Wait Debugger (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Wait-Debugger.md
Title: Wait-Debugger
--- # Wait-Debugger
-## Synopsis
+## SYNOPSIS
Stops a script in the debugger before running the next statement in the script.
-## Syntax
+## SYNTAX
``` Wait-Debugger [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Stops the PowerShell script execution engine at the point immediately after the `Wait-Debugger` cmdlet and waits for a debugger to be attached. This is similar to using
cmdlet and waits for a debugger to be attached. This is similar to using
> Make sure you remove the `Wait-Debugger` lines after you are done. A running script appears to be > hung when it is stopped at a `Wait-Debugger`.
-## Examples
+## EXAMPLES
### Example 1: Insert breakpoint for debugging
class FileResource
} ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Enable-DscDebug](/powershell/module/PSDesiredStateConfiguration/Enable-DscDebug)
Microsoft.PowerShell.Utility Wait Event (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Wait-Event.md
Title: Wait-Event
# Wait-Event
-## Synopsis
+## SYNOPSIS
Waits until a particular event is raised before continuing to run.
-## Syntax
+## SYNTAX
``` Wait-Event [[-SourceIdentifier] <String>] [-Timeout <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Wait-Event` cmdlet suspends execution of a script or function until a particular event is raised. Execution resumes when the event is detected. To cancel the wait, press
response to an event in two different ways:
- using the **Action** parameter of the event subscription - waiting for an event to return and then respond with an action
-## Examples
+## EXAMPLES
### Example 1: Wait for the next event
identifier of **ProcessStarted**. If the specified time expires, the wait ends.
Wait-Event -SourceIdentifier "ProcessStarted" -Timeout 90 ```
-## Parameters
+## PARAMETERS
### -SourceIdentifier
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSEventArgs
-## Notes
+## NOTES
Events, event subscriptions, and the event queue exist only in the current session. If you close the current session, the event queue is discarded and the event subscription is canceled.
-## Related links
+## RELATED LINKS
[Get-Event](Get-Event.md)
Microsoft.PowerShell.Utility Write Debug (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Debug.md
Title: Write-Debug
--- # Write-Debug
-## Synopsis
+## SYNOPSIS
Writes a debug message to the console.
-## Syntax
+## SYNTAX
``` Write-Debug [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Debug` cmdlet writes debug messages to the host from a script or command. By default, debug messages are not displayed in the console, but you can display them by using the **Debug** parameter or the `$DebugPreference` variable.
-## Examples
+## EXAMPLES
### Example 1: Understand $DebugPreference
change only affects the scope of the function. The value is not affected outside
For more information about the **Debug** common parameter, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains a debug message to `Write-Debug`.
-## Outputs
+## OUTPUTS
### None `Write-Debug` only writes to the debug stream. It does not write any objects to the pipeline.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Error (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Error.md
Title: Write-Error
# Write-Error
-## Synopsis
+## SYNOPSIS
Writes an object to the error stream.
-## Syntax
+## SYNTAX
### NoException (Default)
Write-Error [-ErrorRecord] <ErrorRecord> [-RecommendedAction <String>] [-Categor
[-CategoryReason <String>] [-CategoryTargetName <String>] [-CategoryTargetType <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Error` cmdlet declares a non-terminating error. By default, errors are sent in the error stream to the host program to be displayed, along with output.
continues to process the other items in the collection.
To declare a terminating error, use the `Throw` keyword. For more information, see [about_Throw](../Microsoft.PowerShell.Core/About/about_Throw.md).
-## Examples
+## EXAMPLES
### Example 1: Write an error for RegistryKey object
has a null constructor.
The second command uses the `Write-Error` cmdlet to declare a non-terminating error. The value of the **Exception** parameter is the **Exception** object in the `$E` variable.
-## Parameters
+## PARAMETERS
### -Category
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains an error message to `Write-Error`.
-## Outputs
+## OUTPUTS
### Error object `Write-Error` writes only to the error stream. It does not return any objects.
-## Notes
+## NOTES
`Write-Error` does not change the value of the `$?` automatic variable, therefore it does not signal a terminating error condition. To signal a terminating error, use the [$PSCmdlet.WriteError()](/dotnet/api/system.management.automation.cmdlet.writeerror) method.
-## Related links
+## RELATED LINKS
[about_Automatic_Variables](../microsoft.powershell.core/about/about_automatic_variables.md)
Microsoft.PowerShell.Utility Write Host (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Host.md
Title: Write-Host
# Write-Host
-## Synopsis
+## SYNOPSIS
Writes customized output to a host.
-## Syntax
+## SYNTAX
``` Write-Host [[-Object] <Object>] [-NoNewline] [-Separator <Object>] [-ForegroundColor <ConsoleColor>] [-BackgroundColor <ConsoleColor>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Host` cmdlet's primary purpose is to produce for-(host)-display-only output, such as printing colored text like when prompting the user for input in conjunction with [Read-Host](Read-Host.md).
hosting PowerShell.
> affect `Write-Host` messages. The exception to this rule is `-InformationAction Ignore`, which > effectively suppresses `Write-Host` output. (see "Example 5")
-## Examples
+## EXAMPLES
### Example 1: Write to the console without adding a new line
These commands effectively suppress output of the `Write-Host` cmdlet. The first
The second example redirects the information stream of the command to the `$null` variable and thereby suppresses it.
-## Parameters
+## PARAMETERS
### -BackgroundColor
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).
-## Inputs
+## INPUTS
### System.Object You can pipe objects to be written to the host.
-## Outputs
+## OUTPUTS
### None `Write-Host` sends the objects to the host. It does not return any objects. However, the host displays the objects that `Write-Host` sends to it.
-## Notes
+## NOTES
- When writing a collection to the host, elements of the collection are printed on the same line separated by a single space. This can be overridden with the **Separator** parameter.
displays the objects that `Write-Host` sends to it.
provide meaningful output. For example, `Write-Host @{a = 1; b = 2}` will print `System.Collections.DictionaryEntry System.Collections.DictionaryEntry` to the host.
-## Related links
+## RELATED LINKS
[Clear-Host](../Microsoft.PowerShell.Core/Clear-Host.md)
Microsoft.PowerShell.Utility Write Information (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Information.md
Title: Write-Information
# Write-Information
-## Synopsis
+## SYNOPSIS
Specifies how PowerShell handles information stream data for a command.
-## Syntax
+## SYNTAX
``` Write-Information [-MessageData] <Object> [[-Tags] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Information` cmdlet specifies how PowerShell handles information stream data for a command.
the `InformationAction` common parameter to your command. For more information,
`Write-Information` is also a supported workflow activity in PowerShell 5.x.
-## Examples
+## EXAMPLES
### Example 1: Write information for Get- results
Get-Process | Sort-Object CPU -Descending |
@{Id=9044; ProcessName=explorer; CPU=2358.765625} ```
-## Parameters
+## PARAMETERS
### -MessageData
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Object `Write-Information` accepts piped objects to pass to the information stream.
-## Outputs
+## OUTPUTS
### System.Management.Automation.InformationRecord
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Output (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Output.md
Title: Write-Output
--- # Write-Output
-## Synopsis
+## SYNOPSIS
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
-## Syntax
+## SYNTAX
``` Write-Output [-InputObject] <PSObject[]> [-NoEnumerate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
Writes the specified objects to the pipeline. If `Write-Output` is the last command in the pipeline, the objects are displayed in the console.
be written, `"Home directory: $HOME"`.
By default, `Write-Output` enumerates through collection objects. However, `Write-Output` can also be used to pass collections down the pipeline as a single object with the **NoEnumerate** parameter.
-## Examples
+## EXAMPLES
### Example 1: Get objects and write them to the console
Count : 1
... ```
-## Parameters
+## PARAMETERS
### -InputObject
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject You can pipe objects to `Write-Output`.
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSObject `Write-Output` returns the objects that are submitted as input.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Progress (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Progress.md
Title: Write-Progress
--- # Write-Progress
-## Synopsis
+## SYNOPSIS
Displays a progress bar within a PowerShell command window.
-## Syntax
+## SYNTAX
``` Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-PercentComplete <Int32>]
Write-Progress [-Activity] <String> [[-Status] <String>] [[-Id] <Int32>] [-Perce
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Progress` cmdlet displays a progress bar in a PowerShell command window that depicts the status of a running command or script. You can select the indicators that the bar reflects and the
you to control progress view bar rendering.
> If the host doesn't support Virtual Terminal, `$PSStyle.Progress.View` is automatically set to > `Classic`.
-## Examples
+## EXAMPLES
### Example 1: Display the progress of a For loop
Step 1
In this example you can use the **ParentId** parameter to have indented output to show parent/child relationships in the progress of each step.
-## Parameters
+## PARAMETERS
### -Activity
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None You cannot pipe input to this cmdlet.
-## Outputs
+## OUTPUTS
### None `Write-Progress` does not generate any output.
-## Notes
+## NOTES
If the progress bar does not appear, check the value of the `$ProgressPreference` variable. If the value is set to SilentlyContinue, the progress bar is not displayed. For more information about
The parameters of the cmdlet correspond to the properties of the
**System.Management.Automation.ProgressRecord** class. For more information, see [ProgressRecord Class](/dotnet/api/system.management.automation.progressrecord).
-## Related links
+## RELATED LINKS
[Write-Debug](Write-Debug.md)
Microsoft.PowerShell.Utility Write Verbose (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Verbose.md
Title: Write-Verbose
--- # Write-Verbose
-## Synopsis
+## SYNOPSIS
Writes text to the verbose message stream.
-## Syntax
+## SYNTAX
``` Write-Verbose [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Verbose` cmdlet writes text to the verbose message stream in PowerShell. Typically, the verbose message stream is used to deliver more in depth information about command processing.
By default, the verbose message stream is not displayed, but you can display it
value of the `$VerbosePreference` variable or using the **Verbose** common parameter in any command.
-## Examples
+## EXAMPLES
### Example 1: Write a status message
The first command assigns a value of Continue to the `$VerbosePreference` prefer
default value, `SilentlyContinue`, suppresses verbose messages. The second command writes a verbose message.
-## Parameters
+## PARAMETERS
### -Message
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the message to `Write-Verbose`.
-## Outputs
+## OUTPUTS
### None `Write-Verbose` writes only to the verbose message stream.
-## Notes
+## NOTES
- Verbose messages are returned only when the command uses the **Verbose** common parameter. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
You can pipe a string that contains the message to `Write-Verbose`.
For more information about the `$VerbosePreference` variable, see [about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md).
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.PowerShell.Utility Write Warning (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.PowerShell.Utility/Write-Warning.md
Title: Write-Warning
# Write-Warning
-## Synopsis
+## SYNOPSIS
Writes a warning message.
-## Syntax
+## SYNTAX
``` Write-Warning [-Message] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Write-Warning` cmdlet writes a warning message to the PowerShell host. The response to the warning depends on the value of the user's `$WarningPreference` variable and the use of the **WarningAction** common parameter.
-## Examples
+## EXAMPLES
### Example 1: Write a warning message
warning.
For more information about the **WarningAction** common parameter, see [about_CommonParameters](../Microsoft.Powershell.Core/About/about_CommonParameters.md).
-## Parameters
+## PARAMETERS
### -Message Specifies the warning message.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String You can pipe a string that contains the warning to `Write-Warning`.
-## Outputs
+## OUTPUTS
### None `Write-Warning` writes only to the warning stream. It does not generate any other output.
-## Notes
+## NOTES
The default value for the `$WarningPreference` variable is `Continue`, which displays the warning and then continues executing the command. To determine valid values for a preference variable such as `$WarningPreference`, set it to a string of random characters, such as "abc". The resulting error message lists the valid values.
-## Related links
+## RELATED LINKS
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
Microsoft.WSMan.Management Connect Wsman (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Connect-WSMan.md
Title: Connect-WSMan
# Connect-WSMan
-## Synopsis
+## SYNOPSIS
Connects to the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Connect-WSMan [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-Port <Int32>] [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
workgroups.
For information about how to disconnect from the WinRM service on a remote computer, see the `Disconnect-WSMan` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Connect to a remote computer
The second command uses the **SessionOption** parameter to pass the credentials
the `$a` variable to `Connect-WSMan`. Then, `Connect-WSMan` connects to the remote server01 computer by using the specified session options.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
You can run management commands or query management data on a remote computer without creating a WS-Management session. You can do this by using the **ComputerName** parameters of
WS-Management session. You can do this by using the **ComputerName** parameters
PowerShell creates a temporary connection that is used for the single command. After the command runs, the connection is closed.
-## Related links
+## RELATED LINKS
[Disable-WSManCredSSP](Disable-WSManCredSSP.md)
Microsoft.WSMan.Management Disable Wsmancredssp (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Disable-WSManCredSSP.md
Title: Disable-WSManCredSSP
# Disable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Disables CredSSP authentication on a computer.
-## Syntax
+## SYNTAX
``` Disable-WSManCredSSP [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
performs the following action:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Disable CredSSP on a client
Disable-WSManCredSSP -Role Server
This command disables CredSSP on the server, which prevents delegation from clients.
-## Parameters
+## PARAMETERS
### -Role
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
- To enable CredSSP authentication, use the Enable-WSManCredSSP cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Disconnect Wsman (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Disconnect-WSMan.md
Title: Disconnect-WSMan
# Disconnect-WSMan
-## Synopsis
+## SYNOPSIS
Disconnects the client from the WinRM service on a remote computer.
-## Syntax
+## SYNTAX
``` Disconnect-WSMan [[-ComputerName] <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
change to the WSMan provider.
For more information about how to connect to the WinRM service on a remote computer, see `Connect-WSMan`.
-## Examples
+## EXAMPLES
### Example 1: Delete a connection to a remote computer
computer, in this case the server01 computer. However, you can also use `Disconn
connections to remote computers before you change to the WSMan provider. Those connections do not appear in the ComputerName list.
-## Parameters
+## PARAMETERS
### -ComputerName
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Enable Wsmancredssp (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Enable-WSManCredSSP.md
Title: Enable-WSManCredSSP
# Enable-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Enables Credential Security Support Provider (CredSSP) authentication on a computer.
-## Syntax
+## SYNTAX
### All
Enables Credential Security Support Provider (CredSSP) authentication on a compu
Enable-WSManCredSSP [[-DelegateComputer] <String[]>] [-Force] [-Role] <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the Parameters section.
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Delegate client credentials
Set-Item -Path "WSMan:\server02\service\auth\credSSP" -Value $True
parameter to specify the **WSMan** provider's location. The **Value** parameter sets the **Service** setting to true.
-## Parameters
+## PARAMETERS
### -DelegateComputer
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement If CredSSP authentication is successfully enabled, this cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmancredssp (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Get-WSManCredSSP.md
Title: Get-WSManCredSSP
--- # Get-WSManCredSSP
-## Synopsis
+## SYNOPSIS
Gets the Credential Security Support Provider-related configuration for the client.
-## Syntax
+## SYNTAX
``` Get-WSManCredSSP [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
The cmdlet performs the following actions:
> computer is compromised, when credentials are passed to it, the credentials can be used to control > the network session.
-## Examples
+## EXAMPLES
### Example 1: Display CredSSP configuration
If the computer is not configured for CredSSP, this is the output:
`The machine is not configured to allow delegating fresh credentials.`
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
To disable CredSSP authentication, use the `Disable-WSManCredSSP` cmdlet. To enable CredSSP authentication, use the `Enable-WSManCredSSP` cmdlet.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Get Wsmaninstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Get-WSManInstance.md
Title: Get-WSManInstance
# Get-WSManInstance
-## Synopsis
+## SYNOPSIS
Displays management information for a resource instance specified by a Resource URI.
-## Syntax
+## SYNTAX
### GetInstance (Default)
Get-WSManInstance [-ApplicationName <String>] [-BasePropertiesOnly] [-ComputerNa
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-WSManInstance` cmdlet retrieves an instance of a management resource that is specified by a resource Uniform Resource Identifier (URI). The information that is retrieved can be a complex XML
standard Web Services for Management (WS-Management) **Get** command.
This cmdlet uses the WS-Management connection/transport layer to retrieve information.
-## Examples
+## EXAMPLES
### Example 1: Get all information from WMI
returns association instances, not associated instances.
You must enclose the filter in quotation marks, as shown in the example.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This command does not accept any input.
-## Outputs
+## OUTPUTS
### System.Xml.XmlElement This cmdlet generates an **XMLElement** object.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Invoke Wsmanaction (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Invoke-WSManAction.md
Title: Invoke-WSManAction
--- # Invoke-WSManAction
-## Synopsis
+## SYNOPSIS
Invokes an action on the object that is specified by the Resource URI and by the selectors.
-## Syntax
+## SYNTAX
### URI (Default)
Invoke-WSManAction [-Action] <String> [-ApplicationName <String>] [-ComputerName
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
parameters are specified by key value pairs.
This cmdlet uses the WSMan connection/transport layer to run the action.
-## Examples
+## EXAMPLES
### Example 1: Invoke a method
the remote server01 computer.
The return value indicates whether the action was successful. In this case, a return value of 0 indicates success. A return value of 5 indicates that the service is already started.
-## Parameters
+## PARAMETERS
### -Action
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
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmaninstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/New-WSManInstance.md
Title: New-WSManInstance
--- # New-WSManInstance
-## Synopsis
+## SYNOPSIS
Creates a new instance of a management resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
New-WSManInstance [-ConnectionURI <Uri>] [-FilePath <String>] [-OptionSet <Hasht
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
URI and a value set or input file to create the new instance of the management r
This cmdlet uses the WinRM connection/transport layer to create the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Create a HTTPS listener
This command creates an instance of a WS-Management HTTPS listener on all IP add
New-WSManInstance winrm/config/Listener -SelectorSet @{Transport='HTTPS'; Address='*'} -ValueSet @{Hostname="HOST";CertificateThumbprint="XXXXXXXXXX"} ```
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The `Set-WmiInstance` cmdlet, a Windows Management Instrumentation (WMI) cmdlet, is similar. `Set-WmiInstance` uses the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management New Wsmansessionoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/New-WSManSessionOption.md
Title: New-WSManSessionOption
# New-WSManSessionOption
-## Synopsis
+## SYNOPSIS
Creates session option hash table to use as input parameters for WS-Management cmdlets.
-## Syntax
+## SYNTAX
``` New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthentication <ProxyAuthentication>]
New-WSManSessionOption [-ProxyAccessType <ProxyAccessType>] [-ProxyAuthenticatio
[-OperationTimeout <Int32>] [-NoEncryption] [-UseUTF16] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
WSMan cmdlets:
- `Invoke-WSManAction` - `Connect-WSMan`
-## Examples
+## EXAMPLES
### Example 1: Create a connection that uses connection options
computer, in this case the server01 computer. However, you can use the cmdlet to
connections to remote computers before you change to the WSMan provider. Those connections appear in the **ComputerName** list.
-## Parameters
+## PARAMETERS
### -NoEncryption
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SessionOption
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Remove Wsmaninstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Remove-WSManInstance.md
Title: Remove-WSManInstance
--- # Remove-WSManInstance
-## Synopsis
+## SYNOPSIS
Deletes a management resource instance.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Remove-WSManInstance [-ConnectionURI <Uri>] [-OptionSet <Hashtable>] [-ResourceU
[-Authentication <AuthenticationMechanism>] [-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
the **ResourceURI** and **SelectorSet** parameters.
This cmdlet uses the WinRM connection/transport layer to delete the management resource instance.
-## Examples
+## EXAMPLES
### Example 1: Delete a listener
Remove-WSManInstance -ResourceUri winrm/config/Listener -SelectorSet Address=tes
This command deletes the WS-Management HTTP listener on a computer.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
The cmdlets in the CimCmdlets module are similar. They use the DCOM connection/transport layer to create or update WMI instances.
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmaninstance (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Set-WSManInstance.md
Title: Set-WSManInstance
--- # Set-WSManInstance
-## Synopsis
+## SYNOPSIS
Modifies the management information that is related to a resource.
-## Syntax
+## SYNTAX
### ComputerName (Default)
Set-WSManInstance [-ConnectionURI <Uri>] [-Dialect <Uri>] [-FilePath <String>] [
[-CertificateThumbprint <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The Set-WSManInstance cmdlet modifies the management information that is related to a resource. This cmdlet uses the WinRM connection/transport layer to modify the information.
-## Examples
+## EXAMPLES
### Example 1: Disable a listener on the local computer
This fails: -ValueSet @{enabled="False"}
This succeeds: -ValueSet @{Enabled="False"}
-## Parameters
+## PARAMETERS
### -ApplicationName
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).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Set Wsmanquickconfig (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Set-WSManQuickConfig.md
Title: Set-WSManQuickConfig
# Set-WSManQuickConfig
-## Synopsis
+## SYNOPSIS
Configures the local computer for remote management.
-## Syntax
+## SYNTAX
### All
Configures the local computer for remote management.
Set-WSManQuickConfig [-UseSSL] [-Force] [-SkipNetworkProfileCheck] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
are sent by using the Web Services for Management (WS-Management) technology.
To run `Set-WSManQuickConfig`, start PowerShell with the **Run as Administrator** option.
-## Examples
+## EXAMPLES
### Example 1: Enable remote management of the local computer over HTTP
Set-WSManQuickConfig -UseSSL
> **HTTPS** requires manual configuration. For more information, see the **UseSSL** parameter's > description.
-## Parameters
+## PARAMETERS
### -Force
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
+## INPUTS
### None This cmdlet doesn't accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet doesn't generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
Microsoft.WSMan.Management Test Wsman (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/Microsoft.WSMan.Management/Test-WSMan.md
Title: Test-WSMan
--- # Test-WSMan
-## Synopsis
+## SYNOPSIS
Tests whether the WinRM service is running on a local or remote computer.
-## Syntax
+## SYNTAX
``` Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>] [-Port <Int32>] [-UseSSL]
Test-WSMan [[-ComputerName] <String>] [-Authentication <AuthenticationMechanism>
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
is running on a local or remote computer. If the tested computer is running the
displays the WS-Management identity schema, the protocol version, the product vendor, and the product version of the tested service.
-## Examples
+## EXAMPLES
### Example 1: Determine the status of the WinRM service
server01 using the authentication parameter.
Using the authentication parameter enables `Test-WSMan` to return the operating system version.
-## Parameters
+## PARAMETERS
### -ApplicationName
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None This cmdlet does not accept any input.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output object.
-## Notes
+## NOTES
By default, the `Test-WSMan` cmdlet queries the WinRM service without using authentication, and it returns no information that is specific to the operating-system version. Instead, it displays null values for the operating system version and service pack level (OS: 0.0.0 SP: 0.0).
-## Related links
+## RELATED LINKS
[Connect-WSMan](Connect-WSMan.md)
PSDiagnostics Disable Pstrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Disable-PSTrace.md
Title: Disable-PSTrace
--- # Disable-PSTrace
-## Synopsis
+## SYNOPSIS
Disables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Disable-PSTrace [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the Analytic event log for PowerShell
provider.
Disable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Disable Pswsmancombinedtrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Disable-PSWSManCombinedTrace.md
Title: Disable-PSWSManCombinedTrace
--- # Disable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Stop the logging session started by Enable-PSWSManCombinedTrace.
-## Syntax
+## SYNTAX
``` Disable-PSWSManCombinedTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Disable the combined logging session
You must run this cmdlet from an elevated PowerShell session.
Disable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Disable Wsmantrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Disable-WSManTrace.md
Title: Disable-WSManTrace
--- # Disable-WSManTrace
-## Synopsis
+## SYNOPSIS
Stop the WSMan logging session started by Enable-WSManTrace.
-## Syntax
+## SYNTAX
``` Disable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Stop-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan trace
You must run this cmdlet from an elevated PowerShell session.
Disable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Pstrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Enable-PSTrace.md
Title: Enable-PSTrace
--- # Enable-PSTrace
-## Synopsis
+## SYNOPSIS
Enables the Microsoft-Windows-PowerShell event provider logs.
-## Syntax
+## SYNTAX
``` Enable-PSTrace [-Force] [-AnalyticOnly] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
event provider.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Enable the Analytic event log for PowerShell
provider.
Enable-PSTrace -AnalyticOnly ```
-## Parameters
+## PARAMETERS
### -AnalyticOnly
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).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
This cmdlet uses the `Get-LogProperties` and `Set-LogProperties` cmdlets. You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Enable Pswsmancombinedtrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Enable-PSWSManCombinedTrace.md
Title: Enable-PSWSManCombinedTrace
--- # Enable-PSWSManCombinedTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan and PowerShell providers enabled.
-## Syntax
+## SYNTAX
``` Enable-PSWSManCombinedTrace [-DoNotOverwriteExistingTrace] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a combined logging session
You must run this cmdlet from an elevated PowerShell session.
Enable-PSWSManCombinedTrace ```
-## Parameters
+## PARAMETERS
### -DoNotOverwriteExistingTrace
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Enable Wsmantrace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Enable-WSManTrace.md
Title: Enable-WSManTrace
--- # Enable-WSManTrace
-## Synopsis
+## SYNOPSIS
Start a logging session with the WSMan providers enabled.
-## Syntax
+## SYNTAX
``` Enable-WSManTrace [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet uses the `Start-Trace` cmdlet.
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan logging session.
You must run this cmdlet from an elevated PowerShell session.
Enable-WSManTrace ```
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Get Logproperties (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Get-LogProperties.md
Title: Get-LogProperties
--- # Get-LogProperties
-## Synopsis
+## SYNOPSIS
Retrieves the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Get-LogProperties [-Name] <Object> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.** This cmdlet gets the configuration settings of a Windows event log. This cmdlet is used by the `Enable-PSTrace` and `Disable-PSTrace` cmdlets.
-## Examples
+## EXAMPLES
### Example 1: Get the configuration settings of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Name
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails The **PSDiagnostics** module adds the **LogDetails** class to the `Microsoft.PowerShell.Diagnostics` namespace.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Set-LogProperties](Set-LogProperties.md)
PSDiagnostics Set Logproperties (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Set-LogProperties.md
Title: Set-LogProperties
--- # Set-LogProperties
-## Synopsis
+## SYNOPSIS
Changes the properties of a Windows event log.
-## Syntax
+## SYNTAX
``` Set-LogProperties [-LogDetails] <LogDetails> [-Force] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet changes the configuration settings of a Windows event log. This cmdl
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Change the retention setting of the Windows PowerShell event log
AutoBackup : False
MaxLogSize : 15728640 ```
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PowerShell.Diagnostics.LogDetails
You must pass a fully configured **LogDetails** object to the `Set-LogProperties
Therefore, to change one setting, you should use `Get-LogProperties` to retrieve the current configuration.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
You must run this cmdlet from an elevated PowerShell session.
-## Related links
+## RELATED LINKS
[Get-LogProperties](Get-LogProperties.md)
PSDiagnostics Start Trace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Start-Trace.md
Title: Start-Trace
# Start-Trace
-## Synopsis
+## SYNOPSIS
Start an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFilePath] <String>]
Start-Trace [-SessionName] <String> [[-OutputFilePath] <String>] [[-ProviderFile
[-BufferSizeInKB <Int32>] [-MaxLogFileSizeInMB <Int32>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Start a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Start-Trace -SessionName 'wsmlog' -ETS -OutputFilePath "$env:windir\system32\wsmtraces.log" -Format 'bincirc' -MinBuffers 16 -MaxBuffers 256 -BufferSizeInKb 64 -MaxLogFileSizeInMB 256 -ProviderFilePath "$env:windir\system32\wsmtraceproviders.txt" ```
-## Parameters
+## PARAMETERS
### -BufferSizeInKB Event Trace Session buffer size in kilobytes (KB).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSDiagnostics Stop Trace (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSDiagnostics/Stop-Trace.md
Title: Stop-Trace
--- # Stop-Trace
-## Synopsis
+## SYNOPSIS
Stop an Event Trace logging session.
-## Syntax
+## SYNTAX
``` Stop-Trace [-SessionName] <Object> [-ETS] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
> **This cmdlet is only available on the Windows platform.**
This cmdlet is used by the following cmdlets:
You must run this cmdlet from an elevated PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Stop a WSMan Trace logging session
You must run this cmdlet from an elevated PowerShell session.
Stop-Trace -SessionName 'wsmlog' ```
-## Parameters
+## PARAMETERS
### -ETS Send commands to Event Trace Sessions directly without saving or scheduling.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Event Tracing](/windows/desktop/ETW/event-tracing-portal)
PSReadLine Get Psreadlinekeyhandler (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSReadLine/Get-PSReadLineKeyHandler.md
Title: Get-PSReadLineKeyHandler
# Get-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Gets the key bindings for the PSReadLine module.
-## Syntax
+## SYNTAX
### FullListing (default)
Get-PSReadLineKeyHandler [-Bound] [-Unbound] [<CommonParameters>]
Get-PSReadLineKeyHandler [-Chord] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
If no parameter is specified, returns the currently bound key functions for the PSReadLine module. If **Chord** parameter is specified, the cmdlet returns the specific bound keys.
-## Examples
+## EXAMPLES
### Example 1: Get all key mappings
Shift+Enter AddLine Move the cursor to the next line without attempting to ex
... ```
-## Parameters
+## PARAMETERS
### -Bound
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.KeyHandler
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Get Psreadlineoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSReadLine/Get-PSReadLineOption.md
Title: Get-PSReadLineOption
--- # Get-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Gets values for the options that can be configured.
-## Syntax
+## SYNTAX
``` Get-PSReadLineOption [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSReadLineOption` cmdlet returns the current state of the settings that can be configured by using the `Set-PSReadLineOption` cmdlet. You can use the returned object to change **PSReadLine** options. This provides a slightly simpler way to set syntax coloring options for multiple kinds of tokens.
-## Examples
+## EXAMPLES
### Example 1: Get options and their values
VariableColor : "`e[92m"
This command returns the list of available PSReadLine options and their current values.
-## Parameters
+## PARAMETERS
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.PSConsoleReadLineOptions An instance of the current options. Changing the property values of this object updates the settings in PSReadLine directly without invoking `Set-PSReadLineOption`.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Remove-PSReadLineKeyHandler](Remove-PSReadLineKeyHandler.md)
PSReadLine Remove Psreadlinekeyhandler (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSReadLine/Remove-PSReadLineKeyHandler.md
Title: Remove-PSReadLineKeyHandler
# Remove-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Removes a key binding.
-## Syntax
+## SYNTAX
``` Remove-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Remove-PSReadLineKeyHandler` cmdlet removes a specified key binding.
-## Examples
+## EXAMPLES
### Example 1: Remove a binding
Remove-PSReadLineKeyHandler -Chord Ctrl+B
This command removes the binding from the key combination, or chord, `Ctrl+B`. The `Ctrl+B` chord is created in the `Set-PSReadLineKeyHandler` article.
-## Parameters
+## PARAMETERS
### -Chord
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlinekeyhandler (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSReadLine/Set-PSReadLineKeyHandler.md
Title: Set-PSReadLineKeyHandler
--- # Set-PSReadLineKeyHandler
-## Synopsis
+## SYNOPSIS
Binds keys to user-defined or PSReadLine key handler functions.
-## Syntax
+## SYNTAX
### ScriptBlock
Set-PSReadLineKeyHandler [-Chord] <String[]> [-ViMode <ViMode>] [-Function] <Str
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineKeyHandler` cmdlet customizes the result when a key or sequence of keys is pressed. With user-defined key bindings, you can do almost anything that is possible from within a PowerShell script.
-## Examples
+## EXAMPLES
### Example 1: Bind the arrow key to a function
Set-PSReadLineKeyHandler -Chord Ctrl+B -ScriptBlock {
} ```
-## Parameters
+## PARAMETERS
### -BriefDescription
This cmdlet supports the common parameters: -Debug, -ErrorAction,
For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to this cmdlet.
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSReadLineKeyHandler](Get-PSReadLineKeyHandler.md)
PSReadLine Set Psreadlineoption (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PSReadLine/Set-PSReadLineOption.md
Title: Set-PSReadLineOption
--- # Set-PSReadLineOption
-## Synopsis
+## SYNOPSIS
Customizes the behavior of command line editing in **PSReadLine**.
-## Syntax
+## SYNTAX
``` Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-HistoryNoDuplicates]
Set-PSReadLineOption [-EditMode <EditMode>] [-ContinuationPrompt <String>] [-His
[-PredictionViewStyle <PredictionViewStyle>] [-Colors <Hashtable>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSReadLineOption` cmdlet customizes the behavior of the **PSReadLine** module when you're editing the command line. To view the **PSReadLine** settings, use `Get-PSReadLineOption`.
-## Examples
+## EXAMPLES
### Example 1: Set foreground and background colors
block object.
For more information, see [about_Providers](/powershell/module/microsoft.powershell.core/about/about_providers).
-## Parameters
+## PARAMETERS
### -AddToHistoryHandler
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### None You cannot pipe objects to `Set-PSReadLineOption.`
-## Outputs
+## OUTPUTS
### None This cmdlet does not generate any output.
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_PSReadLine](./About/about_PSReadLine.md)
PackageManagement Find Package (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Find-Package.md
Title: Find-Package
--- # Find-Package
-## Synopsis
+## SYNOPSIS
Finds software packages in available package sources.
-## Syntax
+## SYNTAX
### NuGet
Find-Package [-IncludeDependencies] [-AllVersions] [-Source <String[]>] [-Creden
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Find-Package` finds software packages that are available in package sources. `Get-PackageProvider` and `Get-PackageSource` display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Find all available packages from a package provider
Microsoft.Web.Xdt 3.0.0 C:\LocalPkg\ Microsoft Xml Document Transfor
NuGet.Core 2.14.0 C:\LocalPkg\ NuGet.Core is the core framework assembly... ```
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### None `Find-Package` doesn't accept input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentify[] `Find-Package` outputs a **SoftwareIdentity** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Find Packageprovider (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Find-PackageProvider.md
Title: Find-PackageProvider
--- # Find-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of Package Management package providers available for installation.
-## Syntax
+## SYNTAX
``` Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-IncludeDependencies]
Find-PackageProvider [[-Name] <String[]>] [-AllVersions] [-Source <String[]>] [-
[-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-PackageProvider` cmdlet finds matching PackageManagement providers that are available in package sources registered with PowerShellGet. These are package providers available for
the PowerShell Gallery with the **PackageManagement** and **Provider** tags.
`Find-PackageProvider` also finds matching Package Management providers that are available in the Package Management Azure Blob store. Use the bootstrapper provider to find and install them.
-## Examples
+## EXAMPLES
### Example 1: Find all available package providers
Find-PackageProvider -Name "Gistprovider" -Source "PSGallery"
This command finds a package provider available by using a specified package source.
-## Parameters
+## PARAMETERS
### -AllVersions
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
+## INPUTS
-## Outputs
+## OUTPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object can be piped into `Install-PackageProvider` to install the results of `Find-PackageProvider`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet returns a **SoftwareIdentity** object. A **SoftwareIdentity** object
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Package (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Get-Package.md
Title: Get-Package
# Get-Package
-## Synopsis
+## SYNOPSIS
Returns a list of all software packages that were installed with **PackageManagement**.
-## Syntax
+## SYNTAX
### NuGet
Get-Package [[-Name] <String[]>] [-RequiredVersion <String>] [-MinimumVersion <S
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-Package` cmdlet returns a list of all software packages on the local computer that were installed with **PackageManagement**. You can run `Get-Package` on remote computers by running it as part of an `Invoke-Command` or `Enter-PSSession` command or script.
-## Examples
+## EXAMPLES
### Example 1: Get all installed packages
Get-Package -Name posh-git -RequiredVersion 0.7.3 | Uninstall-Package
**RequiredVersion** parameter is a specific version of the package. The object is sent down the pipeline to the `Uninstall-Package` cmdlet. `Uninstall-Package` removes the package.
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packageprovider (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Get-PackageProvider.md
Title: Get-PackageProvider
--- # Get-PackageProvider
-## Synopsis
+## SYNOPSIS
Returns a list of package providers that are connected to Package Management.
-## Syntax
+## SYNTAX
``` Get-PackageProvider [[-Name] <String[]>] [-ListAvailable] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageProvider` cmdlet returns a list of package providers that are connected to Package Management. Examples of these providers include PSModule, NuGet, and Chocolatey. You can filter the results based on all or part of one or more provider names.
-## Examples
+## EXAMPLES
### Example 1: Get all currently loaded package providers
Get-PackageProvider -Name "Chocolatey" -ForceBootstrap
This command automatically installs the Chocolatey provider if your computer does not have the Chocolatey provider installed.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageProvider[]
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Get Packagesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Get-PackageSource.md
Title: Get-PackageSource
--- # Get-PackageSource
-## Synopsis
+## SYNOPSIS
Gets a list of package sources that are registered for a package provider.
-## Syntax
+## SYNTAX
### NuGet
Get-PackageSource [[-Name] <String>] [-Location <String>] [-Force] [-ForceBootst
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PackageSource` cmdlet gets a list of package sources that are registered with **PackageManagement** on the local computer. If you specify a package provider, `Get-PackageSource` gets only those sources that are associated with the specified provider. Otherwise, the command returns all package sources that are registered with **PackageManagement**.
-## Examples
+## EXAMPLES
### Example 1: Get all package sources
MyNuget NuGet False https://www.nuget.org/api/v2
`Get-PackageProvider` uses the **Name** parameter specify the provider name, **NuGet**. The object is sent down the pipeline to `Get-PackageSource`.
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PackageSource[] Specifies one or more package sources.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
Specifies one or more package sources.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Import Packageprovider (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Import-PackageProvider.md
Title: Import-PackageProvider
--- # Import-PackageProvider
-## Synopsis
+## SYNOPSIS
Adds Package Management package providers to the current session.
-## Syntax
+## SYNTAX
``` Import-PackageProvider [-Name] <String[]> [-RequiredVersion <String>] [-MinimumVersion <String>] [-MaximumVersion <String>] [-Force] [-ForceBootstrap] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Import-PackageProvider` cmdlet adds one or more package providers to the current session. The provider that you import must be installed on the local computer.
Due to security reasons, **PackageManagement** requires C#-based providers to co
injected, see the `.csproj` project files on [https://github.com/oneget/oneget](https://github.com/oneget/oneget).
-## Examples
+## EXAMPLES
### Example 1: Import a package provider from the local computer
Import-PackageProvider -Name "Nuget" -RequiredVersion "2.8.5.201" -Verbose
This command finds, installs, and imports a specific version of the Nuget package provider.
-## Parameters
+## PARAMETERS
### -Force
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Implementation.PackageProvider You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into `Import-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **PackageProvider** object returned by `Get-PackageProvider` into
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Package (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Install-Package.md
Title: Install-Package
# Install-Package
-## Synopsis
+## SYNOPSIS
Installs one or more software packages.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-Package [-Credential <PSCredential>] [-Proxy <Uri>] [-ProxyCredential <P
[-SkipPublisherCheck] [-InstallUpdate] [-NoPathUpdate] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Package` cmdlet installs one or more software packages on the local computer. If you have multiple software sources, use `Get-PackageProvider` and `Get-PackageSource` to display details about your providers.
-## Examples
+## EXAMPLES
### Example 1: Install a package by package name
PS> Install-Package -Name NuGet.Core -Source MyNuGet -MinimumVersion 2.8.0 -Maxi
**MinimumVersion** and **MaximumVersion** parameters specify a range of software versions. The highest version in the range is installed.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Install-Package` accepts input from the pipeline.
-## Outputs
+## OUTPUTS
### SoftwareIdentity[]
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherC
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Install Packageprovider (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Install-PackageProvider.md
Title: Install-PackageProvider
--- # Install-PackageProvider
-## Synopsis
+## SYNOPSIS
Installs one or more Package Management package providers.
-## Syntax
+## SYNTAX
### PackageBySearch (Default)
Install-PackageProvider [-Scope <String>] [-InputObject] <SoftwareIdentity[]> [-
[<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-PackageProvider` cmdlet installs matching Package Management providers that are available in package sources registered with **PowerShellGet**. By default, this includes modules
them to your target computer. Use the following steps to do this:
Then use `Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201` to import the provider to the current Windows PowerShell session.
-## Examples
+## EXAMPLES
### Example 1: Install a package provider from the PowerShell Gallery
so that only the current user can use it.
Install-PackageProvider -Name GistProvider -Verbose -Scope CurrentUser ```
-## Parameters
+## PARAMETERS
### -AllVersions
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### Microsoft.PackageManagement.Packaging.SoftwareIdentity You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProvider` to get a **SoftwareIdentity** object that can be piped into `Install-PackageProvider`.
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
You can pipe a **SoftwareIdentity** object to this cmdlet. Use `Find-PackageProv
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-PackageProvider](Find-PackageProvider.md)
PackageManagement Register Packagesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Register-PackageSource.md
Title: Register-PackageSource
--- # Register-PackageSource
-## Synopsis
+## SYNOPSIS
Adds a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch
Register-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [[-Name]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PackageSource` cmdlet adds a package source for a specified package provider. Package sources are always managed by a package provider. If the package provider cannot add or replace a package source, the provider generates an error message.
-## Examples
+## EXAMPLES
### Example 1: Register a package source for the NuGet provider
Name ProviderName IsTrusted Location
MyNuGet NuGet False https://www.nuget.org/api/v2 ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
-## Outputs
+## OUTPUTS
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Save Package (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Save-Package.md
Title: Save-Package
--- # Save-Package
-## Synopsis
+## SYNOPSIS
Saves packages to the local computer without installing them.
-## Syntax
+## SYNTAX
### PackageBySearch
Save-Package [-Path <String>] [-LiteralPath <String>] [-Credential <PSCredential
[-RoleCapability <String[]>] [-Command <String[]>] [-AcceptLicense] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Package` cmdlet saves packages to the local computer but doesn't install the packages. This cmdlet saves the newest version of a package unless you specify a **RequiredVerion**. The **Path** and **LiteralPath** parameters are mutually exclusive, and cannot be added to the same command.
-## Examples
+## EXAMPLES
### Example 1: Save a package to the local computer
PS> Install-Package C:\LocalPkg\NuGet.Core.2.14.0.nupkg
`Save-Package` downloads the package file and its dependencies to the local computer. `Install-Package` installs the package and dependencies from the specified directory.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### `Save-Package` accepts objects from the pipeline.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Set Packagesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Set-PackageSource.md
Title: Set-PackageSource
--- # Set-PackageSource
-## Synopsis
+## SYNOPSIS
Replaces a package source for a specified package provider.
-## Syntax
+## SYNTAX
### SourceBySearch (Default)
Set-PackageSource [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Credential
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PackageSource` replaces a package source for a specified package provider. Package sources are always managed by a package provider.
-## Examples
+## EXAMPLES
### Example 1: Change a package source
eliminates prompts to verify the source when packages are installed.
PS C:\> Set-PackageSource -Name MyNuget -NewName NewNuGet -Trusted -ProviderName NuGet ```
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Set-PackageSource` doesn't accept pipeline input.
-## Outputs
+## OUTPUTS
### This cmdlet does not generate any output.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Uninstall Package (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Uninstall-Package.md
Title: Uninstall-Package
# Uninstall-Package
-## Synopsis
+## SYNOPSIS
Uninstalls one or more software packages.
-## Syntax
+## SYNTAX
### PackageByInputObject
Uninstall-Package [-AllVersions] [-Force] [-ForceBootstrap] [-WhatIf] [-Confirm]
[-InstallUpdate] [-NoPathUpdate] [-AllowPrereleaseVersions] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Package` cmdlet uninstalls one or more software packages from the local computer. To find installed packages, use the `Get-Package` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a package
parameter:
`Uninstall-Package -InputObject ( Get-Package -Name NuGet.Core -RequiredVersion 2.14.0 )`
-## Parameters
+## PARAMETERS
### -AllowClobber
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
+## INPUTS
### SoftwareIdentity `Uninstall-Package` accepts **SoftwareIdentity** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### SoftwareIdentity `Uninstall-Package` returns a **SoftwareIdentity** object for each package uninstalled.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets
and includes the provider's parameter set. For example, `Uninstall-Package` has
**PowerShellGet** parameter set that includes `-NoPathUpdate`, `AllowClobber`, and `SkipPublisherCheck`.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PackageManagement Unregister Packagesource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PackageManagement/Unregister-PackageSource.md
Title: Unregister-PackageSource
# Unregister-PackageSource
-## Synopsis
+## SYNOPSIS
Removes a registered package source.
-## Syntax
+## SYNTAX
### SourceBySearch
Unregister-PackageSource [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-ScriptSourceLocation <String>] [-ScriptPublishLocation <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PackageSource` cmdlet removes a registered package source. Package sources are always managed by a package provider. To find package sources, use the `Get-PackageSource` cmdlet.
-## Examples
+## EXAMPLES
### Example 1: Unregister a package source for the Nuget provider
parameter:
`Unregister-PackageSource -InputObject ( Get-PackageSource -Name MyNuGet )`
-## Parameters
+## PARAMETERS
### -ConfigFile
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
+## INPUTS
### `Unregister-PackageSource` accepts **PackageSource** objects from the pipeline as input.
-## Outputs
+## OUTPUTS
### `Unregister-PackageSource` doesn't generate any output.
-## Notes
+## NOTES
Including a package provider in a command can make dynamic parameters available to a cmdlet. Dynamic parameters are specific to a package provider. The `Get-Help` cmdlet lists a cmdlet's parameter sets and includes the provider's parameter set.
-## Related links
+## RELATED LINKS
[about_PackageManagement](../Microsoft.PowerShell.Core/About/about_PackageManagement.md)
PowerShellGet Find Command (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Find-Command.md
Title: Find-Command
# Find-Command
-## Synopsis
+## SYNOPSIS
Finds PowerShell commands in modules.
-## Syntax
+## SYNTAX
### All
Find-Command [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <Strin
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Command` cmdlet finds PowerShell commands such as cmdlets, aliases, functions, and workflows. `Find-Command` searches modules in registered repositories.
For each command found by `Find-Command`, a **PSGetCommandInfo** object is retur
**PSGetCommandInfo** object can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module that contains the command.
-## Examples
+## EXAMPLES
### Example 1: Find all commands in a specified repository
VERBOSE: Module 'PSScriptAnalyzer' was saved successfully to path 'C:\Test\Modul
optional parameter, but displays status output in the PowerShell console. The verbose output is beneficial for troubleshooting.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetCommandInfo `Find-Command` outputs a **PSGetCommandInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Dscresource (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Find-DscResource.md
Title: Find-DscResource
# Find-DscResource
-## Synopsis
+## SYNOPSIS
Finds Desired State Configuration (DSC) resources.
-## Syntax
+## SYNTAX
### All
Find-DscResource [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion <S
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-DscResource` cmdlet searches registered repositories to find DSC resources contained in modules. By default `Find-DscResource` searches all registered repositories.
For each module found by `Find-DscResource`, a **PSGetDscResourceInfo** object i
**PSGetDscResourceInfo** objects can be sent down the pipeline to the `Install-Module` cmdlet. `Install-Module` installs the module.
-## Examples
+## EXAMPLES
### Example 1: Find all DSC resources
xDSCFirewall 1.6.21 xDSCFirewall PSGallery
dmAwsTagInstance 1.0.1 domainAwsDSCResources PSGallery ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
-## Outputs
+## OUTPUTS
### PSGetDscResourceInfo `Find-DscResource` returns a **PSGetDscResourceInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-InstalledModule](Get-InstalledModule.md)
PowerShellGet Find Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Find-Module.md
Title: Find-Module
--- # Find-Module
-## Synopsis
+## SYNOPSIS
Finds modules in a repository that match specified criteria.
-## Syntax
+## SYNTAX
### All
Find-Module [[-Name] <string[]>] [-MinimumVersion <string>] [-MaximumVersion <st
[-Credential <pscredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Module` cmdlet finds modules in a repository that match the specified criteria. `Find-Module` returns a **PSRepositoryItemInfo** object for each module it finds. The objects can be
The following examples use the [PowerShell Gallery](https://www.powershellgaller
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find a module by name
Version Name Repository Description
The `Find-Module` cmdlet uses the **Filter** parameter to search the repository for **AppDomain**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo `Find-Module` creates **PSRepositoryItemInfo** objects that can be sent down the pipeline to cmdlets such as `Install-Module`.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
such as `Install-Module`.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Find Rolecapability (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Find-RoleCapability.md
Title: Find-RoleCapability
# Find-RoleCapability
-## Synopsis
+## SYNOPSIS
Finds role capabilities in modules.
-## Syntax
+## SYNTAX
### All
Find-RoleCapability [[-Name] <String[]>] [-ModuleName <String>] [-MinimumVersion
[-Repository <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-RoleCapability` cmdlet searches registered repositories to find PowerShell role capabilities and modules.
PowerShell role capabilities define which commands and applications are availabl
Just Enough Administration (JEA) endpoint. Role capabilities are defined by files with a `.psrc` extension.
-## Examples
+## EXAMPLES
### Example 1: Find role capabilities
The object is sent down the pipeline. `Install-Module` uses the **Verbose** para
status messages during the installation. After the install is finished, the `Get-InstalledModule` output confirms that the **JeaExamples** module was installed.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.Uri ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSGetRoleCapabilityInfo The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
The `Find-RoleCapability` cmdlet returns a **PSGetRoleCapabilityInfo** object.
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-ChildItem](../Microsoft.PowerShell.Management/Get-ChildItem.md)
PowerShellGet Find Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Find-Script.md
Title: Find-Script
--- # Find-Script
-## Synopsis
+## SYNOPSIS
Finds a script.
-## Syntax
+## SYNTAX
``` Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <String>]
Find-Script [[-Name] <String[]>] [-MinimumVersion <String>] [-MaximumVersion <St
[-Repository <String[]>] [-Credential <PSCredential>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Find-Script` cmdlet finds a specified script in registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Find all available scripts
Version Name Type Repository D
This command uses the wildcard character (`*`) to find scripts that begin with Required-Script.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### PSRepositoryItemInfo
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Installedmodule (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Get-InstalledModule.md
Title: Get-InstalledModule
--- # Get-InstalledModule
-## Synopsis
+## SYNOPSIS
Gets a list of modules on the computer that were installed by PowerShellGet.
-## Syntax
+## SYNTAX
``` Get-InstalledModule [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllVersions] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledModule` cmdlet gets PowerShell modules that are installed on a computer using PowerShellGet. To see all modules installed on the system, use the `Get-Module -ListAvailable` command.
-## Examples
+## EXAMPLES
### Example 1: Get all installed modules
Version Name Type Repository Descrip
This command gets versions of the AzureRM.Automation module from version 1.0 through version 2.0.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
-## Inputs
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Management.Automation.PSCustomObject
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
PowerShellGet Get Installedscript (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Get-InstalledScript.md
Title: Get-InstalledScript
--- # Get-InstalledScript
-## Synopsis
+## SYNOPSIS
Gets an installed script.
-## Syntax
+## SYNTAX
``` Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-InstalledScript` cmdlet gets installed scripts for **CurrentUser** and **AllUsers** scopes.
-## Examples
+## EXAMPLES
### Example 1: Get all installed scripts
Version Name Type Repository D
This command gets scripts where the name begins with **Required-Scri**.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[] ### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Install-Script](Install-Script.md)
PowerShellGet Get Psrepository (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Get-PSRepository.md
Title: Get-PSRepository
--- # Get-PSRepository
-## Synopsis
+## SYNOPSIS
Gets PowerShell repositories.
-## Syntax
+## SYNTAX
``` Get-PSRepository [[-Name] <String[]>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Get-PSRepository` cmdlet gets PowerShell module repositories that are registered for the current user.
-## Examples
+## EXAMPLES
### Example 1: Get all module repositories
ProviderOptions : {}
This command gets the repository named Local01 and uses the pipeline operator to pass that object to the Format-List cmdlet.
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Register-PSRepository](Register-PSRepository.md)
PowerShellGet Install Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Install-Module.md
Title: Install-Module
--- # Install-Module
-## Synopsis
+## SYNOPSIS
Downloads one or more modules from a repository, and installs them on the local computer.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Module [-InputObject] <PSObject[]> [-Credential <PSCredential>] [-Scope
[-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Module` cmdlet gets one or more modules that meet specified criteria from an online repository. The cmdlet verifies that search results are valid modules and copies the module folders
These examples use the [PowerShell Gallery](https://www.powershellgallery.com/)
registered repository. `Get-PSRepository` displays the registered repositories. If you have multiple registered repositories, use the `-Repository` parameter to specify the repository's name.
-## Examples
+## EXAMPLES
### Example 1: Find and install a module
The `Install-Module` uses the **Name** parameter to specify the **PowerShellGet*
`Install-Module` downloads and installs the newest version of **PowerShellGet** into the current user's directory, `$home\Documents\PowerShell\Modules`.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### PSRepositoryItemInfo
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### Microsoft.PowerShell.Commands.PSRepositoryItemInfo When using the **PassThru** parameter, `Install-Module` outputs a **PSRepositoryItemInfo** object for the module. This is the same information that you get from the `Find-Module` cmdlet.
-## Notes
+## NOTES
`Install-Module` runs on PowerShell 5.0 or later releases, on Windows 7 or Windows 2008 R2 and later releases of Windows.
the **RequiredVersion** value.
A module installation will also install any dependent modules specified as required by the module publisher. The publisher will specify the required modules and their versions in the module manifest.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Install Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Install-Script.md
Title: Install-Script
--- # Install-Script
-## Synopsis
+## SYNOPSIS
Installs a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Install-Script [-InputObject] <PSObject[]> [-Scope <String>] [-NoPathUpdate] [-P
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Install-Script` cmdlet acquires a script payload from a repository, verifies that the payload is a valid PowerShell script, and copies the script file to a specified installation
cmdlets. When operating against multiple repositories, `Install-Script` installs
that matches the specified search criteria (**Name**, **MinimumVersion**, or **MaximumVersion**) from the first repository without any error.
-## Examples
+## EXAMPLES
### Example 1: Find a script and install it
repository.
The final command gets installed scripts and displays the results.
-## Parameters
+## PARAMETERS
### -AcceptLicense
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet New Scriptfileinfo (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/New-ScriptFileInfo.md
Title: New-ScriptFileInfo
# New-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Creates a script file with metadata.
-## Syntax
+## SYNTAX
### All
New-ScriptFileInfo [[-Path] <String>] [-Version <String>] [-Author <String>] -De
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `New-ScriptFileInfo` cmdlet creates a PowerShell script file, including metadata about the script.
script.
The examples use splatting to pass parameters to the `New-ScriptFileInfo` cmdlet. For more information, see [about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md).
-## Examples
+## EXAMPLES
### Example 1: Create a script file and specify its version, author, and description
Feature 5
Param() ```
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[about_Splatting](../Microsoft.Powershell.Core/About/about_splatting.md)
PowerShellGet Publish Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Publish-Module.md
Title: Publish-Module
# Publish-Module
-## Synopsis
+## SYNOPSIS
Publishes a specified module from the local computer to an online gallery.
-## Syntax
+## SYNTAX
### ModuleNameParameterSet (Default)
Publish-Module -Path <String> [-NuGetApiKey <String>] [-Repository <String>]
[-SkipAutomaticTags] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Module` cmdlet publishes a module to an online NuGet-based gallery by using an API key, stored as part of a user's profile in the gallery. You can specify the module to publish either by
from the module manifest, some metadata must be specified in `Publish-Module` pa
**Tag**, **ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**, because these parameters match fields in a NuGet-based gallery.
-## Examples
+## EXAMPLES
### Example 1: Publish a module
specifies a name, version, description, and author, an error occurs.
Publish-Module -Name "MyDscModule" -NuGetApiKey "11e4b435-6cb4-4bf7-8611-5162ed75eb73" -LicenseUri "http://contoso.com/license" -Tag "Active Directory","DSC" -ReleaseNote "Updated the ActiveDirectory DSC Resources to support adding users." ```
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
`Publish-Module` runs on PowerShell 3.0 or later releases of PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.
module manifest, but some metadata can be specified in `Publish-Module` paramete
**ReleaseNote**, **IconUri**, **ProjectUri**, and **LicenseUri**. For more information, see [Package manifest values that impact the PowerShell Gallery UI](/powershell/scripting/gallery/concepts/package-manifest-affecting-ui).
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Publish Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Publish-Script.md
Title: Publish-Script
--- # Publish-Script
-## Synopsis
+## SYNOPSIS
Publishes a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Publish-Script -LiteralPath <String> [-NuGetApiKey <String>] [-Repository <Strin
[-Credential <PSCredential>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Publish-Script` cmdlet publishes the specified script to the online gallery.
-## Examples
+## EXAMPLES
### Example 1: Create a script file, add content to it, and publish it
The `Test-ScriptFileInfo` cmdlet validates `Demo-Script.ps1`. The `Publish-Scrip
the script to the **LocalRepo1** repository. Finally. `Find-Script` is used to search for `Demo-Script.ps1` in the **LocalRepo1** repository.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String ### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Register Psrepository (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Register-PSRepository.md
Title: Register-PSRepository
--- # Register-PSRepository
-## Synopsis
+## SYNOPSIS
Registers a PowerShell repository.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Register-PSRepository [-Default] [-InstallationPolicy <String>] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Register-PSRepository` cmdlet registers the default repository for PowerShell modules. After a repository is registered, you can reference it from the `Find-Module`, `Install-Module`, and
specific type of repository. For example, the NuGet provider is designed to inte
NuGet-based repositories. If a OneGet provider is not specified during registration, PowerShellGet attempts to find a OneGet provider that can handle the specified source location.
-## Examples
+## EXAMPLES
### Example 1: Register a repository
PowerShellGet polls available package providers and associates it with the NuGet
The second command gets registered repositories and displays the results.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSCredential ### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Save Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Save-Module.md
Title: Save-Module
# Save-Module
-## Synopsis
+## SYNOPSIS
Saves a module and its dependencies on the local computer but doesn't install the module.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Module [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Module` cmdlet downloads a module and any dependencies from a registered repository. `Save-Module` downloads and saves the most current version of a module. The files are saved to a
inspection by an administrator. The saved module can then be copied into the app
`Get-PSRepository` displays the local computer's registered repositories. You can use the `Find-Module` cmdlet to search registered repositories.
-## Examples
+## EXAMPLES
### Example 1: Save a module
The object is sent down the pipeline to `Save-Module`. The **Path** parameter sp
store the downloaded module. After the download is finished, `Get-ChildItem` displays the contents of **Path** where the files are stored.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Save Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Save-Script.md
Title: Save-Script
# Save-Script
-## Synopsis
+## SYNOPSIS
Saves a script.
-## Syntax
+## SYNTAX
### NameAndPathParameterSet (Default)
Save-Script [-InputObject] <PSObject[]> [-Path] <String> [-Proxy <Uri>]
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Save-Script` cmdlet saves the specified script.
-## Examples
+## EXAMPLES
### Example 1: Save a script and validate the script's metadata
Version Name Author Description
specifies where to find the script. The script is saved in the location specified by the **Path** parameter. `Test-ScriptFileInfo` specifies the **Path** and validates the script's metadata.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Set Psrepository (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Set-PSRepository.md
Title: Set-PSRepository
--- # Set-PSRepository
-## Synopsis
+## SYNOPSIS
Sets values for a registered repository.
-## Syntax
+## SYNTAX
``` Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <Uri>]
Set-PSRepository [-Name] <String> [[-SourceLocation] <Uri>] [-PublishLocation <U
[-PackageManagementProvider <String>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Set-PSRepository` cmdlet sets values for a registered module repository. The settings are persistent for the current user and apply to all versions of PowerShell installed for that user.
-## Examples
+## EXAMPLES
### Example 1: Set the installation policy for a repository
Set-PSRepository -Name "myInternalSource" -SourceLocation 'https://someNuGetUrl.
This command sets the source location and publish location for **myInternalSource** to the specified URIs.
-## Parameters
+## PARAMETERS
### -Credential
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.String
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Test Scriptfileinfo (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Test-ScriptFileInfo.md
Title: Test-ScriptFileInfo
--- # Test-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Validates a comment block for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Test-ScriptFileInfo [-Path] <String> [<CommonParameters>]
Test-ScriptFileInfo -LiteralPath <String> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Test-ScriptFileInfo` cmdlet validates the comment block at the beginning of a script that will be published with the Publish-Script cmdlet. If the comment block has an error, this cmdlet returns information about where the error is located or how to correct it.
-## Examples
+## EXAMPLES
### Example 1: Test a script file
At line:1 char:1
This command tests the script file Hello-World.ps1, which has no metadata associated with it.
-## Parameters
+## PARAMETERS
### -LiteralPath
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
PowerShellGet Uninstall Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Uninstall-Module.md
Title: Uninstall-Module
# Uninstall-Module
-## Synopsis
+## SYNOPSIS
Uninstalls a module.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Module [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Module [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Module` cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a module
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
`Get-InstalledModule` uses the **Name** parameter to specify the module. The object is sent down the pipeline to `Uninstall-Module` and is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Uninstall Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Uninstall-Script.md
Title: Uninstall-Script
# Uninstall-Script
-## Synopsis
+## SYNOPSIS
Uninstalls a script.
-## Syntax
+## SYNTAX
### NameParameterSet (Default)
Uninstall-Script [-Name] <String[]> [-MinimumVersion <String>] [-RequiredVersion
Uninstall-Script [-InputObject] <PSObject[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Uninstall-Script` cmdlet uninstalls a specified script from the local computer.
-## Examples
+## EXAMPLES
### Example 1: Uninstall a script
Get-InstalledScript -Name UpdateManagement-Template | Uninstall-Script
`Get-InstalledScript` uses the **Name** parameter to specify the script. The object is sent down the pipeline to `Uninstall-Script` and the script is uninstalled.
-## Parameters
+## PARAMETERS
### -AllowPrerelease
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Unregister Psrepository (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Unregister-PSRepository.md
Title: Unregister-PSRepository
--- # Unregister-PSRepository
-## Synopsis
+## SYNOPSIS
Unregisters a repository.
-## Syntax
+## SYNTAX
``` Unregister-PSRepository [-Name] <String[]> [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Unregister-PSRepository` cmdlet unregisters a repository for the current user.
-## Examples
+## EXAMPLES
### Example 1: Unregister a repository
This example uses `Get-PSRepository` to get all registered repositories, and use
Get-PSRepository | Unregister-PSRepository ```
-## Parameters
+## PARAMETERS
### -Name
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
+## INPUTS
### System.String[]
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Get-PSRepository](Get-PSRepository.md)
PowerShellGet Update Module (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Update-Module.md
Title: Update-Module
# Update-Module
-## Synopsis
+## SYNOPSIS
Downloads and installs the newest version of specified modules from an online gallery to the local computer.
-## Syntax
+## SYNTAX
### All
Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Module` cmdlet installs a module's newest version from an online gallery. You're prompted to confirm the update before it's installed. Updates are installed only for modules that
found in `$env:PSModulePath`, an error is displayed.
To display the installed modules, use `Get-InstalledModule`.
-## Examples
+## EXAMPLES
### Example 1: Update all modules
Update-Module -Name SpeculationControl -Force
`Update-Module` uses the **Name** parameter to specify the module, **SpeculationControl**. The **Force** parameter updates the module without requesting user confirmation.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Uri
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
For PowerShell version 6.0 and above, the default installation scope is always **CurrentUser**. Module updates for **CurrentUser**, `$home\Documents\PowerShell\Modules`, don't need elevated
If `Update-Module` attempts to update binaries that are in use, `Update-Module`
that identifies the problem processes. The user is informed to retry `Update-Module` after the processes are stopped.
-## Related links
+## RELATED LINKS
[Find-Module](Find-Module.md)
PowerShellGet Update Modulemanifest (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Update-ModuleManifest.md
Title: Update-ModuleManifest
# Update-ModuleManifest
-## Synopsis
+## SYNOPSIS
Updates a module manifest file.
-## Syntax
+## SYNTAX
### All
Update-ModuleManifest [-Path] <String> [-NestedModules <Object[]>] [-Guid <Guid>
[-RequireLicenseAcceptance] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ModuleManifest` cmdlet updates a module manifest (`.psd1`) file.
-## Examples
+## EXAMPLES
### Example 1: Update a module manifest
Update-ModuleManifest @Parms
**Copyright**. `Update-ModuleManifest` gets the parameter values from `@Parms` and updates the module manifest, **TestManifest.psd1**.
-## Parameters
+## PARAMETERS
### -AliasesToExport
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
PowerShellGet Update Script (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Update-Script.md
Title: Update-Script
# Update-Script
-## Synopsis
+## SYNOPSIS
Updates a script.
-## Syntax
+## SYNTAX
### All
Update-Script [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion
[-AllowPrerelease] [-AcceptLicense] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-Script` cmdlet updates a script that is installed on the local computer. The updated script is downloaded from the same repository as the installed version.
-## Examples
+## EXAMPLES
### Example 1: Update the specified script
Version Name Repository Description
parameter specifies the script version. `Get-InstalledScript` displays the updated version of the script.
-## Parameters
+## PARAMETERS
### -AcceptLicense
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
+## INPUTS
### System.String[]
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.Management.Automation.PSCredential
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
> [!IMPORTANT] > As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS)
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
> [announcement](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/) in the > PowerShell blog.
-## Related links
+## RELATED LINKS
[Find-Script](Find-Script.md)
PowerShellGet Update Scriptfileinfo (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/PowerShellGet/Update-ScriptFileInfo.md
Title: Update-ScriptFileInfo
# Update-ScriptFileInfo
-## Synopsis
+## SYNOPSIS
Updates information for a script.
-## Syntax
+## SYNTAX
### PathParameterSet (Default)
Update-ScriptFileInfo [-LiteralPath] <String> [-Version <String>] [-Author <Stri
[-Confirm] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
The `Update-ScriptFileInfo` cmdlet updates a script's property values. For example, the values for version, author, or description.
-## Examples
+## EXAMPLES
### Example 1: Update the version of a script file
Param()
**Description**. `Update-ScriptFileInfo` gets the parameter values from `@Parms` and updates the script. The **PassThru** parameter displays the script's contents in the PowerShell console.
-## Parameters
+## PARAMETERS
### -Author
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
+## INPUTS
### System.String
-## Outputs
+## OUTPUTS
### System.Object
-## Notes
+## NOTES
Use the `Test-ScriptFileInfo` cmdlet to validate a script's metadata. Scripts must include values for version, GUID, description, and author.
-## Related links
+## RELATED LINKS
[New-ScriptFileInfo](New-ScriptFileInfo.md)
ThreadJob Start Threadjob (7.3) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.3/ThreadJob/Start-ThreadJob.md
Title: Start-ThreadJob
--- # Start-ThreadJob
-## Synopsis
+## SYNOPSIS
Creates background jobs similar to the `Start-Job` cmdlet.
-## Syntax
+## SYNTAX
### ScriptBlock
Start-ThreadJob [-FilePath] <String> [-Name <String>] [-InitializationScript <Sc
[-StreamingHost <PSHost>] [<CommonParameters>] ```
-## Description
+## DESCRIPTION
`Start-ThreadJob` creates background jobs similar to the `Start-Job` cmdlet. The main difference is that the jobs which are created run in separate threads within the local process. By default, the
The cmdlet also supports a **ThrottleLimit** parameter to limit the number of jo
time. As more jobs are started, they are queued and wait until the current number of jobs drops below the throttle limit.
-## Examples
+## EXAMPLES
### Example 1 - Create background jobs with a thread limit of 2
Notice that the prompt from `Read-Host` is displayed and you are able to type in
message from `Write-Warning` is displayed. The `Receive-Job` cmdlet returns all the output from the job.
-## Parameters
+## PARAMETERS
### -ArgumentList
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## Inputs
+## INPUTS
### System.Management.Automation.PSObject
-## Outputs
+## OUTPUTS
### ThreadJob.ThreadJob
-## Notes
+## NOTES
-## Related links
+## RELATED LINKS
[Start-Job](../Microsoft.PowerShell.Core/Start-Job.md)