Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Powershell If InGroup and OU

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

792 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