Run Windows PowerShell via GPO

Hi all,

I have a problem with running one PS script, via GPO. The script is named Hide-WUUpdate, and can be downloaded from 

When imported and run it is used to hide a specific Windows Update. Now if I log to computer, open PS and run it via command it is going to hide Skype from list of updates..or any other updated.
PS C:\WINDOWS\system32> Hide-WUUpdate -Title "Skype*" -KBArticleID "KB2876229" -MicrosoftUpdate -Confirm:$false

Now I have a problem when I run it via gpo. Can some1 post how to run it, specially how to enter this commands, eg. parameters to run?
LVL 18
IvanSystem EngineerAsked:
Who is Participating?
This is how you configure a domain startup script:
So check whether you already have a startup script running inside a policy by starting rsop.msc at one client. If not, create one.
If there is one, like I wrote, just add one line:
powershell yourscript.ps1

Open in new window

This will start yourscript.ps1
"Now I have a problem when I run it via gpo" - fine, what problem?
To deploy a script, save the commands to a .ps1 file (power shell script file) and run that script from your domain startup batchscript like
powershell yourscript.ps1

You need to make sure, that script execution is turned on, this can be done by GPO, see
(set to enabled+allow local and remote signed scripts)
IvanSystem EngineerAuthor Commented:

can you explain that a bit more? This script has hundreds of line of code, and I cannot put additional lines of commands that need to be done in it, because I don't know where to put them. I only know how to run it when I enter commands in shell, like I wrote before.
So I need a step by step guide for dummies.. I have tried like in the picture and it does not work.
How would I reconfigure script, or create a batch that will run this script with additional commands?

If it is to complicated, then nvm :)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.