79211984

Date: 2024-11-21 16:02:44
Score: 1
Natty:
Report link

To update the UsageLocation of an Active Directory (AD) user using PowerShell, you typically need to use the Set-MsolUser cmdlet from the Microsoft Online Services Module for PowerShell (MSOnline) or the Set-AzureADUser cmdlet from the AzureAD module or AzureAD.Standard.Preview module if you're working with Azure AD.

Here’s how you can do it with both methods:

Method 1: Using the MSOnline module (Set-MsolUser) Install and Import the MSOnline module (if not already installed): Install-Module -Name MSOnline Import-Module MSOnline

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Rishikesh Boppa