Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

If/Then statement based on group membership

$
0
0

I'm using a powershell script to automate signature creation from a word template.

Currently the script finds all the ad info, like name, cell phone, address, etc and adds it all to the signature.

I am looking to create some AD groups to add select people to to hide portions of the signature.

For example:  I created a nocellphone group.  I want to create an if/then statement in powershell that will check if the user is a member of "nocellphone".  If they are, hide that portion of the signature, otherwise it will include the cell phone.

Unfortunately I can't just delete the cell phone from AD, as we want this information in the directory, just not going out with all emails.

Any insight on how to do this?

Thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>