Quest AD management shell command & VB .NET 2005
I have been exhaustively looking for this & hope i'll get a solution here...
Is there any way i can run a Quest AD management shell command (not a plain powershell command) from Vb 2005 ? i mean do i need to register a snap-in within vb or register a dll or something ?
for eg. i need to create a simple script to add multiple users to multiple groups then i can quickly design the front end in VB with 1 textbox for users & 1 for groups & then in background can i run a quest ad management shell command to actually add the groups (using add-qadgroupmember in this case)
i knw this is possible because a co-worker of mine had done it in the past but he's left the firm now & we do not have the source code.
This is very important for me....i would truly & sincierly appreciate the reply !
Re: Quest AD management shell command & VB .NET 2005
So how would you normally run these commands?
Re: Quest AD management shell command & VB .NET 2005
normally i create a batch file via by VB .net code (based on the given input on my form & run the batch file in background. The batch file would contain powershell commands for eg:
Code:
powershell - command " &{get-ACL <path> | format-list}"
above code runs because it is core powershell command, but when it comes to "Quest AD management shell" there are some additional commands which core powershell does not support, for eg :
Code:
Connect-QADService -Service <myarsserver> -proxy
i tried registering the the snap-in using :
Add-PSSnapIn Quest.ActiveRoles.ADManagement
but i dnt think it runs my rest of the commands from the specified ARS server
Pls help...
Re: Quest AD management shell command & VB .NET 2005
Cant help with whatever this Quest AD Management Shell but if you just want to add users to groups it's pretty easy to do with just VB.NET code. I'll dig out my source code for an app I wrote a while ago that adds and removes users from AD groups and post the solution file here later tonight. EDIT: Oh actually I already uploaded the project files when I made it - see post #27 in this thread: http://www.vbforums.com/showthread.php?t=535054 . Just bear in mind I did write it 2 years ago so it could probably be improved quite a bit...