Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

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

Reply
 
Old 03-27-2007   #1 (permalink)
RichS


 
 

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
Old 03-27-2007   #2 (permalink)
Jen Taylor


 
 

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
Old 03-27-2007   #3 (permalink)
Brandon Shell


 
 

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
Old 03-28-2007   #4 (permalink)
Jen Taylor


 
 

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
Old 03-28-2007   #5 (permalink)
Brandon Shell


 
 

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
Old 03-28-2007   #6 (permalink)
Neil Chambers


 
 

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
Reply

Thread Tools


Similar Threads
Thread Forum
PowerShell Group Policy Cmdlets - module missing? PowerShell
Set Group Policy different for each user group? System Security
Powershell scripts not working with Vista powershell PowerShell
Group Policy with startup scripts Vista General
Group Policy Logon scripts Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46