Alans Wiki

IT tips and tricks

Set Ad Users password never expires from list or CSV

Posted by alambert on August 6, 2021
Posted in: Active Directory, Powershell.

One column with samccountname

ForEach ($user in (import-csv -path "C:\temp\PassExpiresRevised.csv"))
{
  Get-AdUser -Identity $user.samaccountname | set-aduser -PasswordNeverExpires:$false
} 

Posts navigation

← add DNS a records with reverse PRT with powershell
Find total mailbox size for one user →
  • Recent Posts

    • Change the RDS “Work Resources”
    • Create SG for folders
    • Enable inheritance on all AD user
    • MSGraph Powershell module
    • Folder Permissions Groups
  • Categories

    • Active Directory
    • Apps
    • Azure
    • Azure Active Directory
    • Backup Exec
    • Command Line
    • Data Center
    • DHCP
    • DNS
    • DNS
    • Exchange
    • Hyperv
    • Networking
    • Offfice 365
    • OneNote
    • Patching
    • PowerCLI
    • Powershell
    • RemoteApps
    • Shortcuts
    • Single
    • Splunk
    • Uncategorized
    • Veeam
    • VMware
    • Windows
    • Workstation
  • Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
Proudly powered by WordPress Theme: Parament by Automattic.