Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
General PowerShell
General Scripting Question
Last Post 07 Sep 2010 06:00 AM by
Nick
. 3 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Nick
New Member
Posts:3
06 Sep 2010 07:15 PM
Hello everyone
I have a general question which i think is a little silly, but have not found a solution. I wrote a script that uses the set-qaduser command to set a number of AD attributes and I have it all working but need to be able to call it from another application. Basically, I have a scheduled task that kicks off to do some work and I need to have it send the data to the script I wrote and the script run the qaduser script I wrote. So, I have been trying to find a way to call the script I wrote and have it run in the activeroles environment or in any powershell environment. Does anyone know of a way to run the qaduser from a batch or the normal powershell prompt? Any help or methods you can give would be appreciated.
Thanks
Nick
Marco Shaw (MVP)
Veteran Member
Posts:1641
06 Sep 2010 07:26 PM
Is the "master" script in PowerShell or something else?
If all PowerShell, normally, you might only need to add this as the first line of your script to load the Quest cmdlets:
Add-PsSnapin Quest.ActiveRoles.ADManagement
Marco
*Microsoft MVP - Windows PowerShell
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
*Blog - http://marcoshaw.blogspot.com
Nick
New Member
Posts:3
07 Sep 2010 05:55 AM
The master script is in vbscript which is called by a scheduled task and runs a number of things (including the powershell script and some other ldif style scripts). I can call a normal powershell script using the powershell.exe [script removed] Nick
Nick
New Member
Posts:3
07 Sep 2010 06:00 AM
Marco
Adding the snapin in the script did it for me...thanks for the help in getting this done. I appreciate the quick response on this and the help.
Thanks
Nick
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
General PowerShell
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2