Solved

Powershell If InGroup and OU

Posted on 2011-02-14
3
1,137 Views
Last Modified: 2012-05-11
I want to write a Powershell script that is conditional on group and or  Active Directory OU.   Has any one written a function that will return group member ship then run a command, say map a network drive based on a current users's group memebership.  

If you have every run Kix scripts.   I want a replacement for InGroup function.  I would like to perform the same operation for OUs if possible.
0
Comment
Question by:longshot_tw2
3 Comments
 
LVL 6

Accepted Solution

by:
Bxoz earned 500 total points
ID: 34901944
The Active Directory (AD) module may be installed as part of the RSAT feature on a Windows 7/Server 2008 R2 server (or by default, with the AD DS or AD LDS server roles on Windows 2008 R2.) Once installed, load the Active Directory module withImport-Module ActiveDirectory or click Start, Administrative Tools, Active Directory Module for Windows PowerShell.
http://ss64.com/ps/ad.html

There are this 2 functions
get-adgroup and Get-ADGroupMember

http://technet.microsoft.com/en-us/library/ee617196.aspx
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35321679
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question