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
--- #