Updates from: 04/07/2021 03:12:55
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Utility Export Pssession (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-PSSession.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/08/2020 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Export-PSSession
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
Exports only the specified types of command objects. Use **CommandType** or its
The acceptable values for this parameter are as follows: -- Alias. All PowerShell aliases in the current session.-- All. All command types. It is the equivalent of `Get-Command -Name *`.-- Application. All files other than PowerShell files in paths listed in the Path environment
+- `Alias`: All PowerShell aliases in the current session.
+- `All`: All command types. It is the equivalent of `Get-Command -Name *`.
+- `Application`: All files other than PowerShell files in paths listed in the Path environment
variable (`$env:path`), including .txt, .exe, and .dll files.-- Cmdlet. The cmdlets in the current session. Cmdlet is the default.-- Configuration. A PowerShell configuration. For more information, see
+- `Cmdlet`: The cmdlets in the current session. Cmdlet is the default.
+- `Configuration`: A PowerShell configuration. For more information, see
[about_Session_Configurations](../Microsoft.PowerShell.Core/About/about_Session_Configurations.md).-- ExternalScript. All .ps1 files in the paths listed in the Path environment variable
+- `ExternalScript`: All .ps1 files in the paths listed in the Path environment variable
(`$env:path`).-- Filter and Function. All PowerShell functions.-- Script. Script blocks in the current session.-- Workflow. A PowerShell workflow. For more information, see [about_Workflows](../PSWorkflow/About/about_Workflows.md).
+- `Filter` and `Function`: All PowerShell functions.
+- `Script` Script blocks in the current session.
+- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](../PSWorkflow/About/about_Workflows.md).
+
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **CommandType** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values.
```yaml Type: System.Management.Automation.CommandTypes
Specifies the type of encoding for the target file. The default value is `UTF8`.
The acceptable values for this parameter are as follows: -- `ASCII` Uses ASCII (7-bit) character set.-- `BigEndianUnicode` Uses UTF-16 with the big-endian byte order.-- `Default` Uses the encoding that corresponds to the system's active code page.-- `OEM` Uses the encoding that corresponds to the system's current OEM code page.-- `Unicode` Uses UTF-16 with the little-endian byte order.-- `UTF7` Uses UTF-7.-- `UTF8` Uses UTF-8.-- `UTF32` Uses UTF-32 with the little-endian byte order.
+- `ASCII`: Uses ASCII (7-bit) character set.
+- `BigEndianUnicode`: Uses UTF-16 with the big-endian byte order.
+- `Default`; Uses the encoding that corresponds to the system's active code page.
+- `OEM`: Uses the encoding that corresponds to the system's current OEM code page.
+- `Unicode`: Uses UTF-16 with the little-endian byte order.
+- `UTF7`: Uses UTF-7.
+- `UTF8`: Uses UTF-8.
+- `UTF32`: Uses UTF-32 with the little-endian byte order.
```yaml Type: System.String
This cmdlet supports the 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 Invoke Restmethod (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 12/13/2018 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Invoke-RestMethod ---+ # Invoke-RestMethod ## Synopsis
Accept wildcard characters: False
Specifies the method used for the web request. The acceptable values for this parameter are: -- Default-- Delete-- Get-- Head-- Merge-- Options-- Patch-- Post-- Put-- Trace
+- `Default`
+- `Delete`
+- `Get`
+- `Head`
+- `Merge`
+- `Options`
+- `Patch`
+- `Post`
+- `Put`
+- `Trace`
```yaml Type: Microsoft.PowerShell.Commands.WebRequestMethod
Accept wildcard characters: False
Specifies a value for the transfer-encoding HTTP response header. The acceptable values for this parameter are: -- Chunked-- Compress-- Deflate-- GZip-- Identity
+- `Chunked`
+- `Compress`
+- `Deflate`
+- `GZip`
+- `Identity`
```yaml Type: System.String
Microsoft.PowerShell.Utility Set Variable (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Set-Variable.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 04/06/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-variable?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-Variable --- # Set-Variable
-## SYNOPSIS
+## Synopsis
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## SYNTAX
+## Syntax
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## EXAMPLES
+## Examples
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## PARAMETERS
+## Parameters
### -Description
Specifies the value of the **Options** property of the variable.
Valid values are: -- `None`: Sets no options. ("None" is the default.)
+- `None`: Sets no options. (`None` is the default.)
- `ReadOnly`: Can be deleted. Cannot be changed, except by using the Force parameter. - `Constant`: Cannot be deleted or changed. `Constant` is valid only when you are creating a variable. You cannot change the options of an existing variable to `Constant`. - `Private`: The variable is available only in the current scope. - `AllScope`: The variable is copied to any new scopes that are created.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **Option** parameter as an
+array of values or as a comma-separated string of those values. The cmdlet will combine the values
+using a binary-OR operation. Passing values as an array is the simplest option and also allows you
+to use tab-completion on the values.
+ ```yaml Type: System.Management.Automation.ScopedItemOptions Parameter Sets: (All)
Accept wildcard characters: False
Specifies the scope of the variable.The acceptable values for this parameter are: -- Global-- Local-- Script-- Private
+- `Global`
+- `Local`
+- `Script`
+- `Private`
- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent).
-Local is the default.
+`Local` is the default.
For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_scopes.md).
parameter is designed for use in scripts and commands that will be delivered to
Valid values are: -- Public: The variable is visible. ("Public" is the default.)-- Private: The variable is not visible.
+- `Public`: The variable is visible. (`Public` is the default.)
+- `Private`: The variable is not visible.
When a variable is private, it does not appear in lists of variables, such as those returned by `Get-Variable`, or in displays of the **Variable:** drive. Commands to read or change the value of a
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related Links
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Export Pssession (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-PSSession.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/08/2020 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Export-PSSession
Title: Export-PSSession
# Export-PSSession
-## SYNOPSIS
+## Synopsis
Exports commands from another session and saves them in a PowerShell module.
-## SYNTAX
+## Syntax
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## EXAMPLES
+## Examples
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## PARAMETERS
+## Parameters
### -AllowClobber
Exports only the specified types of command objects. Use **CommandType** or its
The acceptable values for this parameter are as follows: -- Alias. All PowerShell aliases in the current session.-- All. All command types. It is the equivalent of `Get-Command -Name *`.-- Application. All files other than PowerShell files in paths listed in the Path environment
+- `Alias`: All PowerShell aliases in the current session.
+- `All`: All command types. It is the equivalent of `Get-Command -Name *`.
+- `Application`: All files other than PowerShell files in paths listed in the Path environment
variable (`$env:path`), including .txt, .exe, and .dll files.-- Cmdlet. The cmdlets in the current session. Cmdlet is the default.-- Configuration. A PowerShell configuration. For more information, see
+- `Cmdlet`: The cmdlets in the current session. Cmdlet is the default.
+- `Configuration`: A PowerShell configuration. For more information, see
[about_Session_Configurations](../Microsoft.PowerShell.Core/About/about_Session_Configurations.md).-- ExternalScript. All .ps1 files in the paths listed in the Path environment variable
+- `ExternalScript`: All .ps1 files in the paths listed in the Path environment variable
(`$env:path`).-- Filter and Function. All PowerShell functions.-- Script. Script blocks in the current session.-- Workflow. A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+- `Filter` and `Function`: All PowerShell functions.
+- `Script` Script blocks in the current session.
+- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **CommandType** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values.
```yaml Type: System.Management.Automation.CommandTypes
This cmdlet supports the 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 Invoke Restmethod (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/25/2020 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Invoke-RestMethod
Title: Invoke-RestMethod
# Invoke-RestMethod
-## SYNOPSIS
+## Synopsis
Sends an HTTP or HTTPS request to a RESTful web service.
-## SYNTAX
+## Syntax
### StandardMethod (Default)
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## EXAMPLES
+## Examples
### Example 1: Get the PowerShell RSS feed
Specifies the explicit authentication type to use for the request. The default i
Available Authentication Options: -- **None**: This is the default option when **Authentication** is not supplied. No explicit
+- `None`: This is the default option when **Authentication** is not supplied. No explicit
authentication will be used.-- **Basic**: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
+- `Basic`: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
Authentication `Authorization: Basic` header in the format of `base64(user:password)`.-- **Bearer**: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
+- `Bearer`: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **OAuth**-- **OAuth**: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
+- `OAuth`: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **Bearer** Supplying **Authentication** will override any `Authorization` headers supplied to **Headers** or
Accept wildcard characters: False
Specifies the method used for the web request. The acceptable values for this parameter are: -- Default-- Delete-- Get-- Head-- Merge-- Options-- Patch-- Post-- Put-- Trace
+- `Default`
+- `Delete`
+- `Get`
+- `Head`
+- `Merge`
+- `Options`
+- `Patch`
+- `Post`
+- `Put`
+- `Trace`
The **CustomMethod** parameter can be used for Request Methods not listed above.
Sets the SSL/TLS protocols that are permissible for the web request. By default
protocols supported by the system are allowed. **SslProtocol** allows for limiting to specific protocols for compliance purposes.
-**SslProtocol** uses the `WebSslProtocol` Flag Enum. It is possible to supply more than one protocol
-using flag notation or combining multiple `WebSslProtocol` options with `-bor`, however supplying
-multiple protocols is not supported on all platforms.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **SslProtocol** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values. You may not be able to supply multiple values on all
+platforms.
> [!NOTE] > On non-Windows platforms it may not be possible to supply `'Tls, Tls12'` as an option.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## OUTPUTS
+## Outputs
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## NOTES
+## Notes
Some features may not be available on all platforms.
The value of this property is determined by your platform:
The environment variables used for `DefaultProxy` initialization on Windows and Unix-based platforms are: -- ` HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
+- `HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
- `HTTPS_PROXY`: the hostname or IP address of the proxy server used on HTTPS requests. - `ALL_PROXY`: the hostname or IP address of the proxy server used on HTTP and HTTPS requests in case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## RELATED LINKS
+## Related Links
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Set Variable (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Set-Variable.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 04/06/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-variable?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-Variable --- # Set-Variable
-## SYNOPSIS
+## Synopsis
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## SYNTAX
+## Syntax
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## EXAMPLES
+## Examples
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## PARAMETERS
+## Parameters
### -Description
Specifies the value of the **Options** property of the variable.
Valid values are: -- `None`: Sets no options. ("None" is the default.)
+- `None`: Sets no options. (`None` is the default.)
- `ReadOnly`: Can be deleted. Cannot be changed, except by using the Force parameter. - `Constant`: Cannot be deleted or changed. `Constant` is valid only when you are creating a variable. You cannot change the options of an existing variable to `Constant`. - `Private`: The variable is available only in the current scope. - `AllScope`: The variable is copied to any new scopes that are created.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **Option** parameter as an
+array of values or as a comma-separated string of those values. The cmdlet will combine the values
+using a binary-OR operation. Passing values as an array is the simplest option and also allows you
+to use tab-completion on the values.
+ ```yaml Type: System.Management.Automation.ScopedItemOptions Parameter Sets: (All)
Accept wildcard characters: False
Specifies the scope of the variable.The acceptable values for this parameter are: -- Global-- Local-- Script-- Private
+- `Global`
+- `Local`
+- `Script`
+- `Private`
- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent).
-Local is the default.
+`Local` is the default.
For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_scopes.md).
parameter is designed for use in scripts and commands that will be delivered to
Valid values are: -- Public: The variable is visible. ("Public" is the default.)-- Private: The variable is not visible.
+- `Public`: The variable is visible. (`Public` is the default.)
+- `Private`: The variable is not visible.
When a variable is private, it does not appear in lists of variables, such as those returned by `Get-Variable`, or in displays of the **Variable:** drive. Commands to read or change the value of a
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related Links
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Export Pssession (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-PSSession.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/23/2019 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Export-PSSession
Title: Export-PSSession
# Export-PSSession
-## SYNOPSIS
+## Synopsis
Exports commands from another session and saves them in a PowerShell module.
-## SYNTAX
+## Syntax
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## EXAMPLES
+## Examples
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## PARAMETERS
+## Parameters
### -AllowClobber
Exports only the specified types of command objects. Use **CommandType** or its
The acceptable values for this parameter are as follows: -- Alias. All PowerShell aliases in the current session.-- All. All command types. It is the equivalent of `Get-Command -Name *`.-- Application. All files other than PowerShell files in paths listed in the Path environment
+- `Alias`: All PowerShell aliases in the current session.
+- `All`: All command types. It is the equivalent of `Get-Command -Name *`.
+- `Application`: All files other than PowerShell files in paths listed in the Path environment
variable (`$env:path`), including .txt, .exe, and .dll files.-- Cmdlet. The cmdlets in the current session. Cmdlet is the default.-- Configuration. A PowerShell configuration. For more information, see
+- `Cmdlet`: The cmdlets in the current session. Cmdlet is the default.
+- `Configuration`: A PowerShell configuration. For more information, see
[about_Session_Configurations](../Microsoft.PowerShell.Core/About/about_Session_Configurations.md).-- ExternalScript. All .ps1 files in the paths listed in the Path environment variable
+- `ExternalScript`: All .ps1 files in the paths listed in the Path environment variable
(`$env:path`).-- Filter and Function. All PowerShell functions.-- Script. Script blocks in the current session.-- Workflow. A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+- `Filter` and `Function`: All PowerShell functions.
+- `Script` Script blocks in the current session.
+- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **CommandType** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values.
```yaml Type: System.Management.Automation.CommandTypes
This cmdlet supports the 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 Invoke Restmethod (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 09/03/2020 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Invoke-RestMethod
Title: Invoke-RestMethod
# Invoke-RestMethod
-## SYNOPSIS
+## Synopsis
Sends an HTTP or HTTPS request to a RESTful web service.
-## SYNTAX
+## Syntax
### StandardMethod (Default)
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## EXAMPLES
+## Examples
### Example 1: Get the PowerShell RSS feed
Specifies the explicit authentication type to use for the request. The default i
Available Authentication Options: -- **None**: This is the default option when **Authentication** is not supplied. No explicit
+- `None`: This is the default option when **Authentication** is not supplied. No explicit
authentication will be used.-- **Basic**: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
+- `Basic`: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
Authentication `Authorization: Basic` header in the format of `base64(user:password)`.-- **Bearer**: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
+- `Bearer`: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **OAuth**-- **OAuth**: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
+- `OAuth`: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **Bearer** Supplying **Authentication** will override any `Authorization` headers supplied to **Headers** or
Accept wildcard characters: False
Specifies the method used for the web request. The acceptable values for this parameter are: -- Default-- Delete-- Get-- Head-- Merge-- Options-- Patch-- Post-- Put-- Trace
+- `Default`
+- `Delete`
+- `Get`
+- `Head`
+- `Merge`
+- `Options`
+- `Patch`
+- `Post`
+- `Put`
+- `Trace`
The **CustomMethod** parameter can be used for Request Methods not listed above.
Sets the SSL/TLS protocols that are permissible for the web request. By default
protocols supported by the system are allowed. **SslProtocol** allows for limiting to specific protocols for compliance purposes.
-**SslProtocol** uses the `WebSslProtocol` Flag Enum. It is possible to supply more than one protocol
-using flag notation or combining multiple `WebSslProtocol` options with `-bor`, however supplying
-multiple protocols is not supported on all platforms.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **SslProtocol** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values. You may not be able to supply multiple values on all
+platforms.
> [!NOTE] > On non-Windows platforms it may not be possible to supply `Tls` or `Tls12` as an option. Support
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## OUTPUTS
+## Outputs
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## NOTES
+## Notes
Some features may not be available on all platforms.
The value of this property is different rules depending on your platform:
The environment variables used for `DefaultProxy` initialization on Windows and Unix-based platforms are: -- ` HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
+- `HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
- `HTTPS_PROXY`: the hostname or IP address of the proxy server used on HTTPS requests. - `ALL_PROXY`: the hostname or IP address of the proxy server used on HTTP and HTTPS requests in case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## RELATED LINKS
+## Related Links
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Set Variable (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Set-Variable.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
keywords: powershell,cmdlet Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 04/06/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-variable?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-Variable --- # Set-Variable
-## SYNOPSIS
+## Synopsis
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## SYNTAX
+## Syntax
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## EXAMPLES
+## Examples
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## PARAMETERS
+## Parameters
### -Description
Specifies the value of the **Options** property of the variable.
Valid values are: -- `None`: Sets no options. ("None" is the default.)
+- `None`: Sets no options. (`None` is the default.)
- `ReadOnly`: Can be deleted. Cannot be changed, except by using the Force parameter. - `Constant`: Cannot be deleted or changed. `Constant` is valid only when you are creating a variable. You cannot change the options of an existing variable to `Constant`. - `Private`: The variable is available only in the current scope. - `AllScope`: The variable is copied to any new scopes that are created.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **Option** parameter as an
+array of values or as a comma-separated string of those values. The cmdlet will combine the values
+using a binary-OR operation. Passing values as an array is the simplest option and also allows you
+to use tab-completion on the values.
+ ```yaml Type: System.Management.Automation.ScopedItemOptions Parameter Sets: (All)
Accept wildcard characters: False
Specifies the scope of the variable.The acceptable values for this parameter are: -- Global-- Local-- Script-- Private
+- `Global`
+- `Local`
+- `Script`
+- `Private`
- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent).
-Local is the default.
+`Local` is the default.
For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_scopes.md).
parameter is designed for use in scripts and commands that will be delivered to
Valid values are: -- Public: The variable is visible. ("Public" is the default.)-- Private: The variable is not visible.
+- `Public`: The variable is visible. (`Public` is the default.)
+- `Private`: The variable is not visible.
When a variable is private, it does not appear in lists of variables, such as those returned by `Get-Variable`, or in displays of the **Variable:** drive. Commands to read or change the value of a
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related Links
[Clear-Variable](Clear-Variable.md)
Microsoft.PowerShell.Utility Export Pssession (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-PSSession.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 04/23/2019 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/export-pssession?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Export-PSSession
Title: Export-PSSession
# Export-PSSession
-## SYNOPSIS
+## Synopsis
Exports commands from another session and saves them in a PowerShell module.
-## SYNTAX
+## Syntax
### All
Export-PSSession [-OutputModule] <String> [-Force] [-Encoding <Encoding>]
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-PSSession` cmdlet gets cmdlets, functions, aliases, and other command types from another PowerShell session (PSSession) on a local or remote computer and saves them in a PowerShell
The `Export-PSSession` cmdlet uses the implicit remoting feature of PowerShell.
commands into the current session, they run implicitly in the original session or in a similar session on the originating computer.
-## EXAMPLES
+## Examples
### Example 1: Export commands from a PSSession
The `New-PSSession` cmdlet creates a new PSSession that connects to the Server01
imports the commands from the Server01 module. The commands in the module are run in the PSSession on the Server01 computer.
-## PARAMETERS
+## Parameters
### -AllowClobber
Exports only the specified types of command objects. Use **CommandType** or its
The acceptable values for this parameter are as follows: -- Alias. All PowerShell aliases in the current session.-- All. All command types. It is the equivalent of `Get-Command -Name *`.-- Application. All files other than PowerShell files in paths listed in the Path environment
+- `Alias`: All PowerShell aliases in the current session.
+- `All`: All command types. It is the equivalent of `Get-Command -Name *`.
+- `Application`: All files other than PowerShell files in paths listed in the Path environment
variable (`$env:path`), including .txt, .exe, and .dll files.-- Cmdlet. The cmdlets in the current session. Cmdlet is the default.-- Configuration. A PowerShell configuration. For more information, see
+- `Cmdlet`: The cmdlets in the current session. Cmdlet is the default.
+- `Configuration`: A PowerShell configuration. For more information, see
[about_Session_Configurations](../Microsoft.PowerShell.Core/About/about_Session_Configurations.md).-- ExternalScript. All .ps1 files in the paths listed in the Path environment variable
+- `ExternalScript`: All .ps1 files in the paths listed in the Path environment variable
(`$env:path`).-- Filter and Function. All PowerShell functions.-- Script. Script blocks in the current session.-- Workflow. A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+- `Filter` and `Function`: All PowerShell functions.
+- `Script` Script blocks in the current session.
+- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows).
+
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **CommandType** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values.
```yaml Type: System.Management.Automation.CommandTypes
This cmdlet supports the 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 Invoke Restmethod (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Invoke-RestMethod.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 09/03/2020 Last updated : 04/05/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Invoke-RestMethod
Title: Invoke-RestMethod
# Invoke-RestMethod
-## SYNOPSIS
+## Synopsis
Sends an HTTP or HTTPS request to a RESTful web service.
-## SYNTAX
+## Syntax
### StandardMethod (Default)
This cmdlet is introduced in Windows PowerShell 3.0.
Beginning in PowerShell 7.0, `Invoke-RestMethod` supports proxy configuration defined by environment variables. See the [Notes](#notes) section of this article.
-## EXAMPLES
+## Examples
### Example 1: Get the PowerShell RSS feed
Specifies the explicit authentication type to use for the request. The default i
Available Authentication Options: -- **None**: This is the default option when **Authentication** is not supplied. No explicit
+- `None`: This is the default option when **Authentication** is not supplied. No explicit
authentication will be used.-- **Basic**: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
+- `Basic`: Requires **Credential**. The credentials will be used to send an RFC 7617 Basic
Authentication `Authorization: Basic` header in the format of `base64(user:password)`.-- **Bearer**: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
+- `Bearer`: Requires **Token**. Will send and RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **OAuth**-- **OAuth**: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
+- `OAuth`: Requires **Token**. Will send an RFC 6750 `Authorization: Bearer` header with the
supplied token. This is an alias for **Bearer** Supplying **Authentication** will override any `Authorization` headers supplied to **Headers** or
Accept wildcard characters: False
Specifies the method used for the web request. The acceptable values for this parameter are: -- Default-- Delete-- Get-- Head-- Merge-- Options-- Patch-- Post-- Put-- Trace
+- `Default`
+- `Delete`
+- `Get`
+- `Head`
+- `Merge`
+- `Options`
+- `Patch`
+- `Post`
+- `Put`
+- `Trace`
The **CustomMethod** parameter can be used for Request Methods not listed above.
Sets the SSL/TLS protocols that are permissible for the web request. By default
protocols supported by the system are allowed. **SslProtocol** allows for limiting to specific protocols for compliance purposes.
-**SslProtocol** uses the `WebSslProtocol` Flag Enum. It is possible to supply more than one protocol
-using flag notation or combining multiple `WebSslProtocol` options with `-bor`, however supplying
-multiple protocols is not supported on all platforms.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **SslProtocol** parameter
+as an array of values or as a comma-separated string of those values. The cmdlet will combine the
+values using a binary-OR operation. Passing values as an array is the simplest option and also
+allows you to use tab-completion on the values. You may not be able to supply multiple values on all
+platforms.
> [!NOTE] > On non-Windows platforms it may not be possible to supply `Tls` or `Tls12` as an option. Support
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe the body of a web request to `Invoke-RestMethod`.
-## OUTPUTS
+## Outputs
### System.Int64, System.String, System.Xml.XmlDocument
The output of the cmdlet depends upon the format of the content that is retrieve
If the request returns JSON strings, `Invoke-RestMethod` returns a **PSObject** that represents the strings.
-## NOTES
+## Notes
Some features may not be available on all platforms. Because of changes in .NET Core 3.1, PowerShell 7.0 and higher use the [HttpClient.DefaultProxy](/dotnet/api/system.net.http.httpclient.defaultproxy?view=netcore-3.1)
-Property to determine the proxy configuration.
+property to determine the proxy configuration.
The value of this property is different rules depending on your platform:
The value of this property is different rules depending on your platform:
The environment variables used for `DefaultProxy` initialization on Windows and Unix-based platforms are: -- ` HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
+- `HTTP_PROXY`: the hostname or IP address of the proxy server used on HTTP requests.
- `HTTPS_PROXY`: the hostname or IP address of the proxy server used on HTTPS requests. - `ALL_PROXY`: the hostname or IP address of the proxy server used on HTTP and HTTPS requests in case `HTTP_PROXY` or `HTTPS_PROXY` are not defined. - `NO_PROXY`: a comma-separated list of hostnames that should be excluded from proxying.
-## RELATED LINKS
+## Related Links
[ConvertTo-Json](ConvertTo-Json.md)
Microsoft.PowerShell.Utility Set Variable (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Set-Variable.md
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility Previously updated : 06/09/2017 Last updated : 04/06/2021 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/set-variable?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 Title: Set-Variable --- # Set-Variable
-## SYNOPSIS
+## Synopsis
Sets the value of a variable. Creates the variable if one with the requested name does not exist.
-## SYNTAX
+## Syntax
``` Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Exclude <String[]>]
Set-Variable [-Name] <String[]> [[-Value] <Object>] [-Include <String[]>] [-Excl
[-PassThru] [-Scope <String>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Set-Variable` cmdlet assigns a value to a specified variable or changes the current value. If the variable does not exist, the cmdlet creates it.
-## EXAMPLES
+## Examples
### Example 1: Set a variable and get its value
This command shows how to change the visibility of a variable to Private. This v
can be read and changed by scripts with the required permissions, but it is not visible to the user.
-## PARAMETERS
+## Parameters
### -Description
Specifies the value of the **Options** property of the variable.
Valid values are: -- `None`: Sets no options. ("None" is the default.)
+- `None`: Sets no options. (`None` is the default.)
- `ReadOnly`: Can be deleted. Cannot be changed, except by using the Force parameter. - `Constant`: Cannot be deleted or changed. `Constant` is valid only when you are creating a variable. You cannot change the options of an existing variable to `Constant`. - `Private`: The variable is available only in the current scope. - `AllScope`: The variable is copied to any new scopes that are created.
+These values are defined as a flag-based enumeration. You can combine multiple values together to
+set multiple flags using this parameter. The values can be passed to the **Option** parameter as an
+array of values or as a comma-separated string of those values. The cmdlet will combine the values
+using a binary-OR operation. Passing values as an array is the simplest option and also allows you
+to use tab-completion on the values.
+ ```yaml Type: System.Management.Automation.ScopedItemOptions Parameter Sets: (All)
Accept wildcard characters: False
Specifies the scope of the variable.The acceptable values for this parameter are: -- Global-- Local-- Script-- Private
+- `Global`
+- `Local`
+- `Script`
+- `Private`
- A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent).
-Local is the default.
+`Local` is the default.
For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_scopes.md).
parameter is designed for use in scripts and commands that will be delivered to
Valid values are: -- Public: The variable is visible. ("Public" is the default.)-- Private: The variable is not visible.
+- `Public`: The variable is visible. (`Public` is the default.)
+- `Private`: The variable is not visible.
When a variable is private, it does not appear in lists of variables, such as those returned by `Get-Variable`, or in displays of the **Variable:** drive. Commands to read or change the value of a
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Object You can pipe an object that represents the value of the variable to `Set-Variable`.
-## OUTPUTS
+## Outputs
### None or System.Management.Automation.PSVariable
When you use the **PassThru** parameter, `Set-Variable` generates a
**System.Management.Automation.PSVariable** object representing the new or changed variable. Otherwise, this cmdlet does not generate any output.
-## NOTES
+## Notes
-## RELATED LINKS
+## Related Links
[Clear-Variable](Clear-Variable.md)