header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
General Scripting Question
Last Post 07 Sep 2010 06:00 AM by Nick. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
NickUser is Offline
New Member
New Member
Posts:3
Avatar

--
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)User is Offline
    Veteran Member
    Veteran Member
    Posts:1641
    Avatar

    --
    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
    NickUser is Offline
    New Member
    New Member
    Posts:3
    Avatar

    --
    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
    NickUser is Offline
    New Member
    New Member
    Posts:3
    Avatar

    --
    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.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer