Solved

Powershell If InGroup and OU

Posted on 2011-02-14
3
1,083 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
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)

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now