Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Help with If statements

$
0
0

I’ve done a bit of searching on google/reddit and can’t seem to find exactly what I need.

I am writing a scrip to add users to an OU (I know there are pre-written scripts out there but I would like to learn PS myself). In my script once a user is created I have PS asking if the user is part of a group. How would I get PS to move to the next command (Rerun) if the answer to if the user is a member of a group is no? (Code below)

http://pastebin.com/YH4pReQk

submitted by /u/drbeats101
[link] [comments]

The post Help with If statements appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles