?
Solved

Powershell If InGroup and OU

Posted on 2011-02-14
3
Medium Priority
?
1,208 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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 …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

771 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