Ved at bruge denne side, du accepterer Privatlivspolitik.
Acceptere
EnterineEnterineEnterine
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
    • Azurblå
    • Configmgr/SCCM
    • DPM
    • Orkester
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kontor 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Hold
  • Windows
    • Windows Admin Center
    • Windows klient
    • Windows Server
  • SCCM-forespørgselsindsamlingsliste
Læsning: Azure AD Set password to never expire
Font ResizerAa
EnterineEnterine
Font ResizerAa
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
  • Windows
  • SCCM-forespørgselsindsamlingsliste
Søge
  • HJEM
  • Det pro
  • Teknik
  • Microsoft
    • Azurblå
    • Configmgr/SCCM
    • DPM
    • Orkester
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kontor 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Hold
  • Windows
    • Windows Admin Center
    • Windows klient
    • Windows Server
  • SCCM-forespørgselsindsamlingsliste
Azurblå

Azure AD Set password to never expire

Offentliggjort: februar 18, 2024
2 Min læst
DELE

Azure AD Set password to never expire. Check & set a password to never expire on single or multiple Azure Active Directory users’ accounts.

Indhold
CheckSingle UserMultiple UsersSetSingle UserMultiple Users

NOTE: This applies only to cloud-based accounts, if you are synching accounts from the local Active Directory to Azure AD, you need to set passwords to never expire on the local Active Directory account.

Check

Single User

Check expiration policies for a single user’s password:

Get-AzureADUser -ObjectId UPN | Select-Object UserPrincipalName, @{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}
}
PowerShell

Example:

Get-AzureADUser -ObjectId user@enterinit.com | Select-Object UserPrincipalName, @{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}
}
PowerShell

Multiple Users

Check expiration policies for multiple user’s passwords using a CSV input file:

Import-CSV azureadusers.csv | ForEach {
Get-AzureADUser -ObjectId $_.AzureADUPN | Select-Object UserPrincipalName,@{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}
}
}
PowerShell

NOTE: The CSV file must contain the User Principal Name (UPN) of the Azure AD users:

AzureAD
user1@enterinit.com
user2@enterinit.com
user3@enterinit.com
PowerShell

Set

Single User

Set a password to never expire for a single user’s password:

Set-AzureADUser -ObjectId UPN -PasswordPolicies DisablePasswordExpiration
PowerShell

Example:

Set-AzureADUser -ObjectId user@enterinit.com -PasswordPolicies DisablePasswordExpiration
PowerShell

Multiple Users

Set a password to never expire for multiple user’s passwords using a CSV input file:

Import-CSV azureadusers.csv | ForEach {
Set-AzureADUser -ObjectId $_.AzureADUPN -PasswordPolicies DisablePasswordExpiration
}
PowerShell

NOTE: Check the expiry has been set correctly by running Get-AzureADUser:

Import-CSV azureadusers.csv | ForEach { Get-AzureADUser -ObjectId $_.AzureADUPN | Select-Object UserPrincipalName, ` @{N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}
}
}
PowerShell
TAGGET:Azure Active DirectoryCloudMicrosoft AzurePowerShell
Forrige artikel Office Insider 1911 til Windows
Næste artikel PowerShell 7 Preview
1 Kommentar 1 Kommentar
  • Rob siger:
    June 3, 2024 på 2:52 kl

    very helpful . thank you.

    Svar

Efterlad et svar Annuller svar

Din e-mailadresse vil ikke blive offentliggjort. Påkrævede felter er markeret *

Denne side bruger Akismet til at reducere spam. Lær, hvordan dine kommentardata behandles.

Oversættelse

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
ved Transposh - translation plugin for wordpress

Populære indlæg

Systemkrav til Windows Server 2016
Windows Server
Configuration Manager Forespørgselsindsamlingsliste
Configuration Manager Forespørgselsindsamlingsliste
Configmgr
Struktureret/administreret navigation aktiveret på moderne sider i klassiske teamwebsteder
Teknik
SCCM Kunne ikke hente DP-placeringer som den forventede version fra MP
Configmgr

Seneste indlæg

Installation og konfiguration af Fail2ban til SSH-beskyttelse på Ubuntu 24.04
Linux
How to Check Timezone in Linux
Linux
Aktivering og konfiguration af FirewallD på AlmaLinux
Linux
Brugeroprettelse og SSH-nøgleopsætning i AlmaLinux
Linux

© 2023 Enterine

Gå til mobil version
Velkommen tilbage!

Log ind på din konto

Brugernavn eller e-mail-adresse
Adgangskode

Mistet din adgangskode?