Home
Resume
PowerShell
Tutorial Videos
Home
Resume
PowerShell
Tutorial Videos
More
  • Home
  • Resume
  • PowerShell
  • Tutorial Videos
  • Sign In
  • Create Account

  • Orders
  • My Account
  • Signed in as:

  • filler@godaddy.com


  • Orders
  • My Account
  • Sign out

Signed in as:

filler@godaddy.com

  • Home
  • Resume
  • PowerShell
  • Tutorial Videos

Account

  • Orders
  • My Account
  • Sign out

  • Sign In
  • Orders
  • My Account

Downloads

PowerShell scripts to help the community to work to initiate the automation.

 PowerShell connect to azure AD and subscription and services 

 Connecting to Azure AD, Azure subscriptions, and Azure services using PowerShell involves different modules and commands.

1. Connecting to Azure Active Directory (Azure AD):Install the Azure AD PowerShell module. 

  Install-Module -Name AzureAD -AllowClobber

 Connect to Azure AD.
  Connect-AzureAD

 This command will typically open a pop-up window for authentication. 

2. Connecting to Azure Subscriptions and Services (Azure Resource Manager):Install the Azure Az PowerShell module. 

    Install-Module -Name Az -AllowClobber

 Similar to Connect-AzureAD, this will prompt for authentication.

  • Select a specific Azure subscription (if you have multiple):   Set-AzContext -SubscriptionId "YourSubscriptionID"

 3. Interacting with Azure Services:Once connected, you can use cmdlets from the respective Az modules to manage various Azure services. For example:

  • Virtual Machines: Get-AzVM, New-AzVM, Remove-AzVM
  • Storage Accounts: Get-AzStorageAccount, New-AzStorageAccount
  • Resource Groups: Get-AzResourceGroup, New-AzResourceGroup

Important Notes:

  • Run PowerShell as Administrator:When installing modules or if encountering permission issues, run PowerShell with elevated privileges.
  • Authentication Methods:Besides interactive login, you can also use service principals, certificates, or managed identities for automated or secure connections in scripts.
  • Disconnecting:Use Disconnect-AzureAD to sign out from Azure AD and Disconnect-AzAccount to sign out from your Azure account.

Files coming soon.
  • PowerShell
  • Tutorial Videos

Rehan Ahmad

(214) 892-0914

Copyright © 2025 Rehan Ahmad - All Rights Reserved.

Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept