Solved

Powershell If InGroup and OU

Posted on 2011-02-14
3
1,188 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
[X]
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
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

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

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

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…
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

690 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