< Back

Use-AzureRmProfile

Sat Jan 11, 2020 10:34 am

NAME Use-AzureRmProfile



SYNOPSIS

Load the modules associated with a particular profile in the current PowerShell session. This should always be

executed in a new PowerShell session.





SYNTAX

Use-AzureRmProfile [-Profile] {2017-03-09-profile | 2017-03-09-profile | <others>} [[-Module] <Array>] [-Force]

[-Scope {CurrentUser | AllUsers}] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Load the modules associated with a particular profile in the current PowerShell session. This should always be

executed in a new PowerShell session.





PARAMETERS

-Force [<SwitchParameter>]

Automatically install modules for the given profile if they are not already installed.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Module <Array>

The module name to be used.



Required? false

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Profile <String>

The profile version to load in the current PowerShell session.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Scope <String>

Specifies the installation scope of the modules. The acceptable values for this parameter are: AllUsers and

CurrentUser. The AllUsers scope lets modules be installed in a location that is accessible to all users of the

computer. The CurrentUser scope lets modules be installed in a location that is available only to the current

user.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Request confrimation for any change made by the cmdlet



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Print the changes that would be made in executing the cmdlets, but do not make any changes.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

None







NOTES









Example 1



PS C:\\> Use-AzureRmProfile -Profile '2017-03-09-profile'



Load the modules associated with profile version '2017-03-09-profile' in the current session. This should be

executed after opening a new PowerShell session.

Example 2



PS C:\\> Use-AzureRmProfile -Profile 'Latest' -Module 'AzureRM' -Scope 'CurrentUser' -Force



Load the module 'AzureRM' associated with profile version 'Latest' in the current session. It downloads and

installs from online gallery in the 'CurrentUser' scope if not already installed. This should be executed after

opening a new PowerShell session.



RELATED LINKS