The Next Generation of Azure PowerShell
Microsoft is rebuilding Azure PowerShell. Not a new major version of the Az modules you know - a new code base. It lives in the open on GitHub: Azure/azclips.
It’s a public preview. The current release is 0.1.8 from 15 November 2026. Commands, behavior and packaging can still change.
Requirements
- PowerShell 7.6 or later. The binary cmdlets are built against
System.Management.Automation7.6. PowerShell 7.5 and Windows PowerShell 5.1 can’t load them. The ISE isn’t supported either. taron thePATH- the installer extracts a.tar.gz.- Any OS that PowerShell 7.6 runs on.
Installing next to classic Az
The preview ships through GitHub Releases, not the PowerShell Gallery. To install the Az rollup and all its dependencies for the current user:
1
2
3
4
5
$requestParams = @{
Uri = 'https://raw.githubusercontent.com/Azure/azclips/main/install/azps-install.ps1'
ErrorAction = 'Stop'
}
Invoke-RestMethod @requestParams | Invoke-Expression
If you want to pass parameters:
1
2
3
4
5
6
7
8
9
10
11
$downloadParams = @{
Uri = 'https://raw.githubusercontent.com/Azure/azclips/main/install/azps-install.ps1'
OutFile = './azps-install.ps1'
}
Invoke-WebRequest @downloadParams
$installParams = @{
ModuleName = 'Az.Resources'
Scope = 'CurrentUser'
}
./azps-install.ps1 @installParams
| Parameter | Default | Purpose |
|---|---|---|
-ModuleName | Az | Install one module instead of the rollup |
-RequiredVersion | highest packaged version | Pin a version |
-Scope | CurrentUser | AllUsers for a machine-wide install (elevated) |
-RepositoryName | AzclipsInstall-... | Name of the temporary local repository |
One session, one version
This is the most important thing to understand before you start. The preview uses the same module names as classic Az. Az, Az.Accounts, Az.Resources and so on. Only the version differs: 0.1.* for the preview, 15.x for classic.
An unversioned Import-Module Az loads the highest version. That’s classic. So is autoloading - run a cmdlet without importing first and PowerShell picks classic. Import the preview explicitly, before anything else:
1
2
3
4
5
6
7
$importParams = @{
Name = 'Az'
MinimumVersion = '0.1.0'
MaximumVersion = '0.1.9999'
}
Import-Module @importParams
Get-Module Az, Az.Accounts | Select-Object Name, Version, ModuleBase
The modules load .NET assemblies. Once they’re loaded, PowerShell can’t replace them. Remove-Module doesn’t help. To switch between classic and preview, start a new pwsh process. You can add them to your PowerShell profile for convenience:
1
2
function az-preview { pwsh -NoExit -Command 'Import-Module Az -MinimumVersion 0.1.0 -MaximumVersion 0.1.9999' }
function az-classic { pwsh -NoExit -Command 'Import-Module Az' }
The Az rollup (0.1.8) pulls in nine modules.
| Module | Version | Cmdlets | Purpose |
|---|---|---|---|
Az.Accounts | 0.1.5 | 7 | Sign-in, profiles, access tokens |
Az.Config | 0.1.6 | 5 | Settings in ~/.azclips/config.json |
Az.Resources | 0.1.6 | 38 | Resource groups, ARM deployments at every scope, RBAC, raw REST |
Az.Compute | 0.1.6 | 5 | Virtual machine lifecycle |
Az.Network | 0.1.4 | 12 | VNets, NSGs, public IPs, NICs |
Az.Storage | 0.1.2 | 24 | Storage accounts, Blob and Azure Files data plane |
Az.KeyVault | 0.1.3 | 12 | Key Vault secrets and certificates |
Az.ManagedServiceIdentity | 0.1.4 | 8 | User-assigned identities, federated credentials |
Az.MsGraph | 0.1.6 | 6 | Entra ID users, groups, app registrations |
At the time of writing the total number of cmdlets across all modules is 117.
Az.Accounts - sign-in and profiles
| Cmdlet | Purpose |
|---|---|
Connect-AzAccount | Sign in and save or refresh a profile |
Disconnect-AzAccount | Sign out of the active profile and clear its cached credentials |
Get-AzProfile | List profiles, show one, or show the active one |
Set-AzProfile | Switch the active profile |
Remove-AzProfile | Delete a profile |
Get-AzAccessToken | Get an Entra ID token for ARM, Graph, a resource URL or explicit scopes |
Open-AzSurvey | Open the feedback survey |
Get-AzContext, Set-AzContext, Select-AzSubscription and Get-AzSubscription don’t exist in the preview. Profiles replace them.
Get-AzAccessToken accepts -ResourceUrl, -ResourceTypeName, -Scope and -TenantId. It returns the token as SecureString unless you add -AsPlainText.
Supported sign-in methods:
| Method | Parameters |
|---|---|
| Interactive (browser) | -SubscriptionId, optionally -TenantId |
| Device code | add -UseDeviceCode |
| Managed identity | -Identity, plus -ClientId, -ObjectId or -ResourceId for a user-assigned identity. Needs -SubscriptionId. |
| Service principal + secret | -ClientId, -ClientSecret (SecureString), -TenantId, -SubscriptionId - or -ServicePrincipal -Credential |
| Service principal + OIDC | -ServicePrincipal, -FederatedToken, -ClientId, -TenantId, -SubscriptionId |
Certificate-based service principal sign-in isn’t there.
Az.Config - settings
| Cmdlet | Purpose |
|---|---|
Get-AzConfig | Read one key, a section (-Key core) or all effective values. -ConfiguredOnly hides defaults. |
Set-AzConfig | Write a key. Unknown keys need -Force. |
Remove-AzConfig | Delete a key |
Get-AzConfigInfo | Show the schema: all valid keys, types and defaults |
Get-AzConfigList | List all values. Still exported in 0.1.8; the main branch has folded it into Get-AzConfig. |
The configuration is a JSON file: ~/.azclips/config.json. Precedence is command arguments > environment variables > config file > defaults. Every result object has a Source property, so you see where a value comes from:
1
2
Get-AzConfig -Key core | Format-Table Key, Value, Source
Set-AzConfig -Key core.logging.level -Value debug
Useful keys: core.logging.level, core.http.maxRetries, core.http.maxRetriesFor429, telemetry.enabled, defaults.group, defaults.location.
Az.Resources - groups, deployments, RBAC, REST
The biggest module. It covers four areas.
Resource groups: New-AzResourceGroup, Get-AzResourceGroup, Set-AzResourceGroup, Remove-AzResourceGroup.
ARM/Bicep deployments - at all four scopes:
| Scope | Cmdlets |
|---|---|
| Resource group | New-AzResourceGroupDeployment, New-AzResourceGroupDeploymentWhatIf, Test-AzResourceGroupDeployment, Get-AzResourceGroupDeployment, Stop-AzResourceGroupDeployment, Remove-AzResourceGroupDeployment, Save-AzResourceGroupDeploymentTemplate, Get-AzResourceGroupDeploymentOperation |
| Subscription | New-AzSubDeployment, Test-AzSubDeployment, Get-AzSubDeploymentWhatIfResult, Get-AzSubDeployment, Stop-AzSubDeployment, Remove-AzSubDeployment, Save-AzSubDeploymentTemplate, Get-AzDeploymentOperation |
| Management group | New-AzManagementGroupDeployment, Test-AzManagementGroupDeployment, Get-AzManagementGroupDeployment, Stop-AzManagementGroupDeployment, Remove-AzManagementGroupDeployment, Get-AzManagementGroupDeploymentOperation |
| Tenant | New-AzTenantDeployment, Test-AzTenantDeployment, Get-AzTenantDeploymentWhatIfResult, Get-AzTenantDeployment, Stop-AzTenantDeployment, Remove-AzTenantDeployment, Save-AzTenantDeploymentTemplate, Get-AzTenantDeploymentOperation |
Note the new names at subscription scope: *-AzSubDeployment instead of *-AzSubscriptionDeployment. The old names still work as aliases.
Some behavior differs from classic:
New-AzSubDeploymentandNew-AzTenantDeploymentvalidate before they deploy. A failed validation throwsDeployment validation failed.and creates no deployment.- A failed subscription deployment reports the ARM error, up to three failed operations and the correlation ID.
-NoWaitreturns the submitted deployment. It doesn’t create a PowerShell job.- Without
-Name, the deployment is named after the template file instead of a GUID.
RBAC: Get-AzRoleAssignment, New-AzRoleAssignment, Remove-AzRoleAssignment. Get-AzRoleAssignment lists the exact scope by default. -IncludeInherited, -ExpandPrincipalGroups and -IncludeNestedScopes widen it. New-AzRoleAssignment returns the existing assignment instead of failing when it already exists.
REST: Invoke-AzRestMethod - for everything the preview doesn’t cover yet. It takes the token from the active profile, or from the one you name with -Profile.
Az.Compute - virtual machines
| Cmdlet | Purpose |
|---|---|
New-AzVM | Create a VM. Takes the VNet, subnet, NSG and public IP by name, or an existing NIC |
Get-AzVM | Get or list VMs. |
Start-AzVM | Start a VM |
Stop-AzVM | Stop or deallocate a VM |
Remove-AzVM | Delete. -ForceDeletion for forced deletion |
New-AzVM is one cmdlet with many parameters, not the classic New-AzVMConfig / Set-AzVMOperatingSystem / Add-AzVMNetworkInterface chain. It supports marketplace URNs, security type with Secure Boot and vTPM, SSH keys, zones (-Zone), tags, -StorageSku and -OSDiskDeleteOption.
Az.Network - the VM building blocks
| Resource | Cmdlets |
|---|---|
| Virtual network | New-AzVirtualNetwork, Get-AzVirtualNetwork, Remove-AzVirtualNetwork |
| Network security group | New-AzNetworkSecurityGroup, Get-AzNetworkSecurityGroup, Remove-AzNetworkSecurityGroup |
| Public IP | New-AzPublicIpAddress, Get-AzPublicIpAddress, Remove-AzPublicIpAddress |
| Network interface | New-AzNetworkInterface, Get-AzNetworkInterface, Remove-AzNetworkInterface |
Subnets are hashtables on New-AzVirtualNetwork -Subnet. There’s no New-AzVirtualNetworkSubnetConfig. Outputs expose properties directly ($vnet.Subnets), not under .Properties. Get-AzNetworkSecurityGroup, Get-AzNetworkInterface and Get-AzPublicIpAddress without -ResourceGroupName list the whole subscription.
Az.Storage - management and data plane
| Area | Cmdlets |
|---|---|
| Storage account | New-AzStorageAccount, Get-AzStorageAccount, Remove-AzStorageAccount |
| Blob container | New-AzStorageContainer, Remove-AzStorageContainer |
| Blob | Get-AzStorageBlob, Set-AzStorageBlobContent, Get-AzStorageBlobContent, Copy-AzStorageBlob, Start-AzStorageBlobCopy, Remove-AzStorageBlob |
| File share | New-AzStorageShare, Get-AzStorageShare, Update-AzStorageShare, Remove-AzStorageShare |
| Directory | New-AzStorageDirectory, Get-AzStorageDirectory, Remove-AzStorageDirectory |
| File | New-AzStorageFile, Get-AzStorageFile, Set-AzStorageFileContent, Get-AzStorageFileContent, Start-AzStorageFileCopy, Remove-AzStorageFile |
No New-AzStorageContext. The data plane cmdlets take -StorageAccountName with -StorageAccountKey, or -SasToken.
Az.KeyVault - secrets and certificates
| Area | Cmdlets |
|---|---|
| Secrets | Set-AzKeyVaultSecret, Get-AzKeyVaultSecret, Update-AzKeyVaultSecret, Remove-AzKeyVaultSecret, Undo-AzKeyVaultSecretRemoval |
| Certificates | Add-AzKeyVaultCertificate, Import-AzKeyVaultCertificate, Get-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Export-AzKeyVaultCertificate, Remove-AzKeyVaultCertificate, Undo-AzKeyVaultCertificateRemoval |
Get-AzKeyVaultSecret returns metadata only by default. The value comes with -AsPlainText. Certificate import handles encrypted PFX and PEM. Export is public part only (DER or PEM).
Az.ManagedServiceIdentity - identities for workloads
| Area | Cmdlets |
|---|---|
| User-assigned identity | New-AzUserAssignedIdentity, Get-AzUserAssignedIdentity, Update-AzUserAssignedIdentity, Remove-AzUserAssignedIdentity |
| Federated credential | New-AzFederatedIdentityCredential, Get-AzFederatedIdentityCredential, Update-AzFederatedIdentityCredential, Remove-AzFederatedIdentityCredential |
The federated credentials are the interesting part. A user-assigned identity plus a federated credential is how GitHub Actions or Kubernetes workloads sign in without a secret.
Az.MsGraph - Entra ID
| Cmdlet | Purpose |
|---|---|
Get-AzMsGraphUser | Get or list users |
Get-AzMsGraphGroup | Get or list groups |
Get-AzMsGraphGroupMember | List members of a group |
New-AzMsGraphApplication | Create an app registration |
Get-AzMsGraphApplication | Get or list app registrations |
Remove-AzMsGraphApplication | Delete an app registration |
The nouns changed: AzMsGraphUser instead of classic AzADUser, AzMsGraphApplication instead of AzADApplication. There are no service principal cmdlets yet. Get-AzMsGraphApplication returns single objects and follows all pages, not a raw response envelope.
Profiles: the new piece
Everything above is a smaller version of something you know. Profiles are new. They change how you manage where your commands run.
What classic Az does
Classic Az.Accounts has contexts. Connect-AzAccount creates one. Set-AzContext or Select-AzSubscription changes the subscription of the current one. Get-AzContext -ListAvailable shows all of them. With context autosave, they land in AzureRmContext.json.
That works. But contexts get long auto-generated names built from the subscription name, IDs and the account. And the “current” context is global. One Set-AzContext in a helper script changes the target of every command that follows.
What a profile is
A profile is a named sign-in context. You give it the name. Connect-AzAccount saves it. It stores:
| Field | Meaning |
|---|---|
Name | Your name for it, e.g. prod |
TenantId | The Entra ID tenant |
SubscriptionId | The subscription |
CloudName | AzureCloud by default |
AuthMethod | Browser, DeviceCode, ManagedIdentity, ServicePrincipalSecret or Federated |
UserPrincipalName | The signed-in account (for service principals: the application ID) |
ClientId, ManagedIdentityId | For service principals and user-assigned identities |
DefaultLocation, DefaultResourceGroup | Fields for profile defaults |
A profile doesn’t contain a token or a secret. It says which connection to use, not how to prove it. Credentials live separately (see below).
Where it’s stored
Everything lives under ~/.azclips ($HOME\.azclips on Windows):
| File | Content |
|---|---|
profiles.json | All profiles, one JSON object keyed by name |
active-profile | Plain text: the name of the active profile - or no file at all |
config.json | The configuration from Az.Config |
| MSAL token cache | Protected with DPAPI on Windows, Keychain on macOS, libsecret on Linux |
AZCLIPS_HOME overrides the root. That’s useful for CI runners or to keep test profiles apart.
profiles.json looks like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"prod": {
"Name": "prod",
"TenantId": "<tenant-id>",
"SubscriptionId": "<subscription-id>",
"CloudName": "AzureCloud",
"AuthMethod": "Browser",
"DefaultLocation": null,
"DefaultResourceGroup": null,
"UserPrincipalName": "constantin@contoso.com",
"ClientId": null,
"ManagedIdentityId": null
}
}
Creating profiles
-OutProfile names the profile. The first sign-in needs -SubscriptionId - the preview doesn’t guess a subscription for you:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$homeParams = @{
TenantId = '<your-tenant-id>'
SubscriptionId = '<your-subscription-id>'
OutProfile = 'home'
}
Connect-AzAccount @homeParams
$customerParams = @{
TenantId = '<your-customer-tenant-id>'
SubscriptionId = '<your-customer-subscription-id>'
OutProfile = 'customer-prod'
UseDeviceCode = $true
}
Connect-AzAccount @customerParams
The last sign-in becomes the active profile.
Without -OutProfile, Connect-AzAccount writes to the reserved profile default. That keeps old scripts working. But every bare sign-in overwrites default. For anything you want to keep, name it.
Naming rules: 1-100 characters, letters, digits, -, _ and .. default is reserved.
There’s no New-AzProfile. A profile only comes into existence through a successful sign-in. So every profile has worked at least once.
Listing, showing, switching
1
2
3
4
5
6
Get-AzProfile # all profiles, IsActive marks the active one
Get-AzProfile -Name customer-prod # one profile
Get-AzProfile -Active # the active one
Set-AzProfile -Name home # switch
Get-AzResourceGroup # runs against home
Set-AzProfile only moves the pointer in active-profile. It doesn’t sign in again and doesn’t call Azure. It checks that the profile exists, that’s all. Switching is instant.
The per-command override
This is the feature I like most. Most cmdlets have a -Profile parameter. It runs that one command against another profile. The active profile doesn’t change:
1
2
3
4
5
6
7
8
9
Get-AzProfile -Active | Select-Object Name # home
# Compare the home with a customer tenant
$home = Get-AzResourceGroup
$customer = Get-AzResourceGroup -Profile prod
Compare-Object $home.Name $customer.Name
Get-AzProfile -Active | Select-Object Name # still home
That’s the end of Set-AzContext ping-pong in scripts. A script can work with two tenants side by side and leave the session exactly as it found it.
The rules:
- An explicit
-Profilewith a name that doesn’t exist fails. No silent fallback to the active profile. - Without
-Profile, the active profile is used. - Without an active profile, the command runs without a profile and fails at the first call to Azure. Not every cmdlet has
-Profileyet. In the current source,Az.MsGraphand the Key Vault certificate cmdlets have none. InAz.Storageonly the storage account cmdlets have it - the data plane uses a key or SAS anyway. Check before you rely on it:
1
(Get-Command Get-AzVM).Parameters.ContainsKey('Profile')
There’s also a narrower override: commands with -SubscriptionId run against another subscription with the identity of the active profile.
Re-authenticating
Tokens expire. -Profile on Connect-AzAccount refreshes an existing profile in place:
1
Connect-AzAccount -Profile customer-prod
Tenant, subscription and identity come from the profile. You can’t change them during re-authentication: -Profile doesn’t accept -SubscriptionId, -TenantId or another sign-in method. A profile always stays the identity it was created with. To change it, create it again with -OutProfile.
-Profile and -OutProfile together are rejected. One refreshes, the other creates.
One profile store for PowerShell and CLI
The PowerShell modules and the new az share the same ~/.azclips. A profile created in one surface works in the other:
1
az login --tenant-id $tenantId --subscription-id $subId --out-profile lab
1
2
Set-AzProfile -Name lab
Get-AzResourceGroup
Signing out and removing
1
2
Disconnect-AzAccount # sign out of the active profile, keep its definition
Remove-AzProfile -Name lab # delete the definition
Conclusion
The next generation of Azure PowerShell is a rebuild, not a refresh. One .NET 10 engine for PowerShell and CLI and PowerShell 7.6 as the minimum.
With 117 cmdlets in nine modules, it’s not a replacement for classic Az yet. It covers sign-in, deployments at every scope, VMs and their network, storage, Key Vault secrets and certificates, managed identities and the basics of Entra ID. For the rest there’s Invoke-AzRestMethod.
The part I’d try today is profiles. Named contexts you choose yourself, one store for PowerShell and CLI, and -Profile on a single command without touching the session. For someone who jumps between multiple tenants all day, that’s a very useful feature.
If you find any bugs or missing features, open an issue on the repository. Your feedback helps shape the next generation of Azure PowerShell.
That’s it for this blog post.