Try our new Certificate Revocation List Check Tool
CRLcheck.exe is a tool developed to verify digital signatures of executable files. It collects files from known paths on your client, checks their signature, and checks Certificate Revocation Lists (CRL) and OCSP download. This helps avoid delays in launching files.
Category published:  Scripting W10   Click on the Category button to get more articles regarding that product.

Powershell: Add users to Active Directory Group membership from file, list all NON Expire accounts

Posted by admin on 08.10.2013

How to add user accounts to a membership of an Active Directory Group.

Users in File: C:\edv\bbuser.csv

Active Directory Group: SG_Blackberry_User_2010

Users: m.butsch and assistant

(First LINE has to be UserName an not a user)

Import-module ActiveDirectory

Import-CSV “C:\edv\bbUser.csv” | % { Add-ADGroupMember -Identity SG_Blackberry_User_2010 -Member $_.UserName }

 

——————————————————————————

List all NON Expire accounts in a certian OU:

 

Import-Module ActiveDirectory

Get-ADUser -SearchScope Subtree -SearchBase “OU=Active,OU=Users_W7,OU=GZF,DC=customer,DC=ch” -Filter  {PasswordNeverExpires -eq $true} -Properties PasswordNeverExpires | Select-Object Name,ObjectClass, UserPrincipalName | Sort-Object Objectclass


 Category published:  Scripting W10   Click on the Category button to get more articles regarding that product.