Spankwire
Youporn
Tube8
Youpron
Megarotic
Redtube
Pornhub
Pornhub
Youporn
Skip to content

Using PowerShell, PowerGUI and Quest cmdlets to manage AD

Although PowerShell has no native cmdlets to work with Active Directory you can still perform many actions using PowerShell’s ADSI support. You can find some more info about that here. Although ADSI support is great, it is better to have some real cmdlets to do Active Directory stuff. Quest have released a Management Shell for Active Directory that adds a bunch of cmdlets to work with Active Directory either through their ActiveRoles product or with Active Directory natively. You can download the management shell from their website for free.

Below you can find some more basic information about how to get started.

Working with the management shell

After installing the downloaded package (I installed version 1.03) you will get a new Start menu item to start the ActiveRoles Management Shell for Active Directory. As I mentioned above, the cmdlets can work with ActiveRoles or with Active Directory natively. If you have started PowerShell in another way, be sure that the Quest.ActiveRoles.ADManagement PowerShell snapin is loaded. You can use get-pssnapin to see if it is loaded and add-pssnapin to load it yourself. You can also add the add-pssnapin cmdlet to your profile so that the cmdlets are always available to you. If you want to know more about working with profiles, check this post.

After you start the management shell, you can start playing with the cmdlets. Quest have provided a good adminstrator’s guide so you should check that to see what you can do. All the cmdlets have qad in their name so you can get a list of commands with get-help qad.

When you are just beginning with PowerShell or you don’t like command lines that much, you can work with these cmdlets (in fact any cmdlet) from PowerGUI.

PowerGUI

PowerGUI is what its name says: a GUI for PowerShell. You can download it from http://www.powergui.org. When you start the tool, it looks like (click to enlarge):

image

PowerGUI is great to create your own administrative interface to perform daily tasks or query data with PowerShell cmdlets and scripts. Using it is very simple. Just make a selection from the tree on the left, for example select Local System \ Processes. This will actually execute the get-process cmdlet, get the output and display the output in the GUI. You can now click any process and perform actions on it. The actions are on the right. You can stop/start/restart and so on. There are also common actions for exporting cmdlet results to XML, CSV and HTML. The tree on the left and links, actions and common actions on the right are fully extensible.

Let’s extend PowerGUI with an AD command from the Management Shell for Active Directory. Before you start, make sure that the Quest.ActiveRoles.ADManagement snapin is loaded. Use the File \ PowerShell libraries… menu item to do so. Now right click PowerGUI (Beta) at the top in the left window pane and create a new folder called AD.

image

Then right click the AD folder and add a new node. Configure the node as in the screenshot below (click to enlarge):

image

You should already see all the domain admins in the domain after clicking OK. Of course, you cannot do much with the displayed members of the group because there are no defined actions. You can add actions if you wish to build your management interface but there is a much better method: use a PowerPack to extend PowerGUI. On the PowerGUI website you can find such a PowerPack for the management shell for AD. Download the PowerPack from here and http://pornhubs-x.com/

After the PowerPack is installed you will get a new folder called Active Directory. Check out the nodes you get under that folder, execute a few and check the actions you can perform on the results.

It is always a good idea to check if there is a PowerPack for the actions you want to perform. You can then build on that to add your own actions.

One Trackback/Pingback

  1. […] Using PowerShell, PowerGUI and Quest cmdlets to manage AD […]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*