Windows Vista Forums

RE: Can you push out PowerShell scripts through Group Policy?

  1. #1


    RichS Guest

    RE: Can you push out PowerShell scripts through Group Policy?

    you can't directly push powershell scripts through GPO. you can tell it to
    run powershell and use -command to specify the script

    other products with powershell

    SC Operations Manager
    SC Virtual Server Manager
    SC Data Protection Manager
    Microsoft Transporter Suite for Lotus Domino

    plus can manage products that have .NET management objects e.g.
    SQL server 2005
    IIS 7
    Sharepoint

    plus you have 3rd party tools
    Quest - releasing AD management cmdlets
    FullArmor - demo'd GPO scripting at IT Forum last year

    plus the keynote at IT Forum said that PowerShell will be built into
    everything. I think it will last.

    Issue with VBScript is that its unlikely to be updated much if at all and
    that can't access .NET thru it. I would think about introducing PowerShell
    with a view to migrating across to using it when people are up to speed and
    the particular products have powershell cmdlets

    If you are UK based there will be some Powershell events put on by Microsoft
    in May & June
    --
    Richard Siddaway
    Please note that all scripts are supplied "as is" and with no warranty
    Blog: http://richardsiddaway.spaces.live.com/
    PowerShell User Group: http://www.get-psuguk.org.uk


    "Jen Taylor" wrote:

    > Can you push out PowerShell scripts through Group Policy (login/logoff,
    > startup/shutdown) if PowerShell and .NET have already been previously
    > installed on the target machines? Any issues or restrictions?
    >
    > Also, besides Exchange 2007, what other products are being PowerShell-ized
    > right now? What else will convince my managers that Microsoft is committed
    > to PowerShell for many years to come? (Management thinks we should all
    > standardize our admin work on VBScript.)
    >
    > Thanks!!!
    >
    >
    >
    >
    >


      My System SpecsSystem Spec

  2.   


  3. #2


    Jen Taylor Guest

    Re: Can you push out PowerShell scripts through Group Policy?

    Thank you for the detailed response! And I see on the PS blog
    (http://blogs.msdn.com/powershell/) that PS will be included in Windows
    Longhorn Server by default too!

    > you can't directly push powershell scripts through GPO. you can tell it
    > to
    > run powershell and use -command to specify the script


    You mean run a batch script via the GPO that runs "powershell.exe -command
    \\server\share\script.ps1"? Or maybe run a batch script that downloads the
    PS script to a local temp folder, runs the script from there, then deletes
    the script? Not sure I understand what you mean.

    Thanks!







      My System SpecsSystem Spec

  4. #3


    Brandon Shell Guest

    Re: Can you push out PowerShell scripts through Group Policy?

    You could use either option you mention or you could use VBScript to launch
    Powershell as well if you like. I think the moral of the story is that
    powershell scripts do not run like .cmd and .vbs do. With powershell the
    scripts have to be called directly from either inside a powershell prompt or
    by passing as a command to Powershell.exe.

    So... where does that leave us... if you want to use powershell scripts in
    an automated fashion... you still have to rely on .cmd or .vbs to launch
    although this is trivial on both accounts.

    Does that help?

    "Jen Taylor" <jtaylor23@aol.com> wrote in message
    news:e8ThAcOcHHA.3648@TK2MSFTNGP02.phx.gbl...
    > Thank you for the detailed response! And I see on the PS blog
    > (http://blogs.msdn.com/powershell/) that PS will be included in Windows
    > Longhorn Server by default too!
    >
    >> you can't directly push powershell scripts through GPO. you can tell it
    >> to
    >> run powershell and use -command to specify the script

    >
    > You mean run a batch script via the GPO that runs "powershell.exe -command
    > \\server\share\script.ps1"? Or maybe run a batch script that downloads
    > the PS script to a local temp folder, runs the script from there, then
    > deletes the script? Not sure I understand what you mean.
    >
    > Thanks!
    >
    >
    >
    >
    >
    >



      My System SpecsSystem Spec

  5. #4


    Jen Taylor Guest

    Re: Can you push out PowerShell scripts through Group Policy?

    > Does that help?

    Yes, but a bit disappointing. Using GPO-assigned scripts to manage servers
    is one of our favorite features of GPOs, but, like you said, it can still be
    rigged up to work correctly. Hopefully this'll be fixed in a SP or in
    Longhorn.

    Thanks!





      My System SpecsSystem Spec

  6. #5


    Brandon Shell Guest

    Re: Can you push out PowerShell scripts through Group Policy?

    I wouldn't count on fix as they don't think its broken... They consider it a
    security measure.

    Maybe that can add something to Group Policy Client Side Extentions to
    provide this, but I think that unlikely and I do not see any other way. It
    would be very nice though.

    "Jen Taylor" <jtaylor23@aol.com> wrote in message
    news:uG6vzAPcHHA.2088@TK2MSFTNGP05.phx.gbl...
    >> Does that help?

    >
    > Yes, but a bit disappointing. Using GPO-assigned scripts to manage
    > servers is one of our favorite features of GPOs, but, like you said, it
    > can still be rigged up to work correctly. Hopefully this'll be fixed in a
    > SP or in Longhorn.
    >
    > Thanks!
    >
    >
    >
    >



      My System SpecsSystem Spec

  7. #6


    Neil Chambers Guest

    Re: Can you push out PowerShell scripts through Group Policy?

    I think it's worth mentioning that you could still place your powershell
    scripts inside the GPO. The calling script can make a reference to the ps1
    file(s) within it's path.

    n

    "Jen Taylor" <jtaylor23@aol.com> wrote in message
    news:e8ThAcOcHHA.3648@TK2MSFTNGP02.phx.gbl...
    > Thank you for the detailed response! And I see on the PS blog
    > (http://blogs.msdn.com/powershell/) that PS will be included in Windows
    > Longhorn Server by default too!
    >
    >> you can't directly push powershell scripts through GPO. you can tell it
    >> to
    >> run powershell and use -command to specify the script

    >
    > You mean run a batch script via the GPO that runs "powershell.exe -command
    > \\server\share\script.ps1"? Or maybe run a batch script that downloads
    > the PS script to a local temp folder, runs the script from there, then
    > deletes the script? Not sure I understand what you mean.
    >
    > Thanks!
    >
    >
    >
    >
    >
    >



      My System SpecsSystem Spec


RE: Can you push out PowerShell scripts through Group Policy?
Similar Threads
Thread Forum
local policy exception to group policy SBS Server
PowerShell Group Policy Cmdlets - module missing? PowerShell
Powershell scripts not working with Vista powershell PowerShell
Group Policy with startup scripts Vista General
Group Policy Logon scripts Vista networking & sharing