With criterion insert user in groups

Hello there,

I’m trying to deal with powershell for the first time.
I want to create a “skript” which insert user in multiple groups, except only user with a phone number…
I really don’t now how to start or how the skript should look like, i have alredy looked the video2brain tutorials but no video shows clearly how i can insert user to groups whit a criterium. I didn’t find anything about google either.

Can someone help me? I would be very grateful.


Okan Koc

Since you say you are new. It is vital you get ramped up first. There are a bunch of no-cost ways to do this. See this post / discussion.


Secondly, you can use tool that are already built for this sort of thing, like the downloads from powershellgallery.com or the MS scriptingguys blog.

You can let Windows Server write the code for you. Using the ‘ADAC - Active Directory Administrative Center’. See these articles.

Active Directory Administrative Center: Getting Started 'technet.microsoft.com/en-us/library/dd560651(v=ws.10).aspx'
Active Directory Administrative Center 'docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/adac/active-directory-administrative-center'
Step-By-Step: Utilizing PowerShell History Viewer in Windows Server 2012 R2 '/blogs.technet.microsoft.com/canitpro/2015/03/04/step-by-step-utilizing-powershell-history-viewer-in-windows-server-2012-r2'