편집

다음을 통해 공유


Enable-AzureRmAlias

Enables AzureRm prefix aliases for Az modules.

Syntax

Enable-AzureRmAlias
      [-Scope <String>]
      [-Module <String[]>]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Enables AzureRm prefix aliases for Az modules. If -Module is specified, only modules listed will have aliases enabled. Otherwise all AzureRm aliases are enabled.

Examples

Example 1

Enable-AzureRmAlias

Enables all AzureRm prefixes for the current PowerShell session.

Example 2

Enable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser

Enables AzureRm aliases for the Az.Accounts module for both the current process and for the current user.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Module

Indicates which modules to enable aliases for. If none are specified, default is all modules.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

If specified, cmdlet will return all aliases enabled

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Scope

Indicates what scope aliases should be enabled for. Default is 'Local'

Type:String
Accepted values:Local, Process, CurrentUser, LocalMachine
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

String