AWS Tutorial for beginners – Learn Amazon Web Services in 7 min.
https://dzone.com/articles/learn-how-to-setup-a-cicd-pipeline-from-scratch
Import-ModuleActiveDirectory
Get-ADUser-LDAPFilter'(employeeID=1200547)'| Disable-ADAccount
Disable Bulk AD Users from CSV by User’s EmployeeID
Import-ModuleActiveDirectory
Import-Csv"C:\Users.csv"| ForEach-Object{
$employeeID= $_."EmployeeID"
Get-ADUser-LDAPFilter"(employeeID=$employeeID)"| Disable-ADAccount
Write-Host"User $employeeID disabled"
}
Refer : https://morgantechspace.com/2017/02/disable-ad-user-by-specific-attribute.html
$Name = "kevin"
$User = $(try {Get-ADUser $Name} catch {$null})
If ($User -ne $Null) {
"User exists in AD"
} Else {
"User not found in AD"}
$users = Get-ADUser -Filter * -SearchBase "OU=TestOU,DC=TestDomain,DC=com"
$group = "Domain Admins"
$members = Get-ADGroupMember -Identity $group -Recursive | Select -ExpandProperty Name
$users | ForEach-Object {
$user = $_.Name
If ($members -contains $user) {
Write-Host "$user exists in the group"
} Else {
Write-Host "$user not exists in the group"
}}