Created
April 21, 2015 11:22
-
-
Save chipitsine/b9e7061d27afe0007d60 to your computer and use it in GitHub Desktop.
allm1.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cls | |
import-module ActiveDirectory | |
$users = ('n.bokova', 'musenkonn', 'nitfa', 'kalashnikovav', 'chalov', 'install', 'avpetrov', 'pifagorsoft', 'nit2', 'giacint', 'fpike0', 'trio', 'safonovr', 'dmitry1', 'alexa79', 'vasilev', 'silkhab', 'vika07', 'lvs-kontur', 'intercom', 'integ', 'chureev', 'zaichenko', 'stepan', 'serg_73', 'pvk', 'p_denis', 'ilin', 'sorokona','smart5','mikhach','barnaul1', 'stolyarov', 'n.o.abramova','nigmatullin','natalia85','kuzmini','hakimova','baturina','avks309' ) | |
$users | % { | |
[String] $user = $_ | |
(Get-ADPrincipalGroupMembership $user) | % { | |
if($_.name -eq 'allm1'){ | |
Write-Host ("user {0} is a member of allm1" -f $user) | |
}else{ | |
Write-Host ("user {0} is not a member of allm1" -f $user) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment