Windows 10: How to apply the GPO settings by using PowerShell scripts.

Discus and support How to apply the GPO settings by using PowerShell scripts. in Windows 10 Software and Apps to solve the problem; Hello Team,We required your help to create the GPO settings via PowerShell script. example : I would like to apply the GPO settings to turn of the... Discussion in 'Windows 10 Software and Apps' started by Vinodh KumarSivaji, Dec 4, 2022.

  1. How to apply the GPO settings by using PowerShell scripts.


    Hello Team,We required your help to create the GPO settings via PowerShell script. example : I would like to apply the GPO settings to turn of the handwriting recognition error reporting via from PowerShell.I know how to apply the settings by manually to navigate the path location, but I would like to know the steps from using PowerShell.Appreciate your help! Thanks

    :)
     
    Vinodh KumarSivaji, Dec 4, 2022
    #1

  2. GPOs not running logon scripts

    Greetings,

    we have an environment of 2 DCs running WS 2008R2 and applying several GPOs. The GPOs that have a user logon script (vbs or ps1) can not run. At the same time, if we run the vbs scripts from a pc on the domain they run successfully. Any suggestions would
    be appreciated!

    Thanking you in advance.
     
    Eleftheria Siachalou, Dec 4, 2022
    #2
  3. Powershell GPO Startup Script not working

    Hello,

    I wrote a Powershell Script to delete Microsoft Store Apps which works fine when run manually. However I want to run it as a Startup script via GPO on all computers (Windows 10 Pro) in our domain. For that, I created a group policy and added the script under
    Computer configuration>Policies>Windows settings>Scripts. There I added the powershell script on the Powershell scripts tab. I also activated Powershell scripts via Computer configuration>Administrative Templates>Windows components>Windows Powershell>Turn
    on Script Execution>Allow all scripts

    I need the script to be run as a startup script (with system privileges) instead of a logon script as not all users have local admin rights. However the startup script doesn't work. A gpresult shows that the GPO is loaded. Is there anything I'm missing?
    Any help would be appreciated.

    The script:

    Get-AppxPackage -AllUsers *3dbuilder* | Remove-AppxPackage # 3D Builder

    Get-AppxPackage -AllUsers *zunemusic* | Remove-AppxPackage # Groove Music

    Get-AppxPackage -AllUsers *solitairecollection* | Remove-AppxPackage # Microsoft Solitaire Collection

    Get-AppxPackage -AllUsers *messaging* | Remove-AppxPackage # Microsoft Nachrichten

    Get-AppxPackage -AllUsers *stickynotes* | Remove-AppxPackage # Microsoft Sticky Notes

    Get-AppxPackage -AllUsers *bingfinance* | Remove-AppxPackage # Money

    Get-AppxPackage -AllUsers *zunevideo* | Remove-AppxPackage # Movies & TV

    Get-AppxPackage -AllUsers *bingnews* | Remove-AppxPackage # News

    Get-AppxPackage -AllUsers *onenote* | Remove-AppxPackage # OneNote

    Get-AppxPackage -AllUsers *feedback* | Remove-AppxPackage # WindowsFeedbackHub

    Get-AppxPackage -AllUsers *3dviewer* | Remove-AppxPackage # Microsoft3DViewer

    Get-AppxPackage -AllUsers *whiteboard* | Remove-AppxPackage # Whiteboard

    Get-AppxPackage -AllUsers *windowsphone* | Remove-AppxPackage # Phone Companion

    Get-AppxPackage -AllUsers *photoshop* | Remove-AppxPackage # Photoshop Express

    Get-AppxPackage -AllUsers *sway* | Remove-AppxPackage # Sway

    Get-AppxPackage -AllUsers *bingsports* | Remove-AppxPackage # Sports

    Get-AppxPackage -AllUsers *soundrecorder* | Remove-AppxPackage # Voice Recorder

    Get-AppxPackage -AllUsers *bingweather* | Remove-AppxPackage # Weather

    Get-AppxPackage -AllUsers *xboxapp* | Remove-AppxPackage # Xbox

    Get-AppxPackage -AllUsers *xing* | Remove-AppxPackage # XING

    Get-AppxPackage -AllUsers *sketchbook* | Remove-AppxPackage # Sketch Book

    Get-AppxPackage -AllUsers *minecraft* | Remove-AppxPackage # Minecraft

    Get-AppxPackage -AllUsers *candycrush* | Remove-AppxPackage # Candy Crush

    Get-AppxPackage -AllUsers *bubble* | Remove-AppxPackage # Bubble Witch

    Get-AppxPackage -AllUsers *empires* | Remove-AppxPackage # War of Lords
     
    pro_hdemirocak, Dec 4, 2022
    #3
  4. DwayneD1 Win User

    How to apply the GPO settings by using PowerShell scripts.

    Deploying Powershell Script via GPO on Win Server 2008 R2

    Hi Everyone,

    I'm trying to deploy a PS script via GPO.

    I've tried to deploy it as a logon script and separately as a startup script.

    It does not seem to execute the script.

    When I try to run the script on my own machine I receive the following message:

    Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by

    a policy defined at a more specific scope. Due to the override, your shell will retain its current effective

    execution policy of RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more

    information please see "Get-Help Set-ExecutionPolicy".

    At line:1 char:46

    + ... -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '\ ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : PermissionDenied: How to apply the GPO settings by using PowerShell scripts. :)) [Set-ExecutionPolicy], SecurityException

    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

    When I elevate the permissions to admin, it works and I can run the script manually on the machine.

    Is there any way in which I can deploy this so that it runs with elevated admin permissions?

    Or is there something I need to change or add in order for this to run?

    Thanks
     
    DwayneD1, Dec 4, 2022
    #4
Thema:

How to apply the GPO settings by using PowerShell scripts.

Loading...
  1. How to apply the GPO settings by using PowerShell scripts. - Similar Threads - apply GPO settings

  2. Security Center, GPO is not applying

    in Windows 10 Gaming
    Security Center, GPO is not applying: The security center has recommendations to implement, and we completed a few on some test laptops before putting in production. The security score didn't go up for a setting after a few days, so we dove into it. An example would be the GPO named "Security Improvements, with a...
  3. Security Center, GPO is not applying

    in Windows 10 Software and Apps
    Security Center, GPO is not applying: The security center has recommendations to implement, and we completed a few on some test laptops before putting in production. The security score didn't go up for a setting after a few days, so we dove into it. An example would be the GPO named "Security Improvements, with a...
  4. Windows 11 GPO is not applied

    in Windows 10 Gaming
    Windows 11 GPO is not applied: Hello We have GPO applied on our computers, and we have one computer that is windows 11, and the GPO is not applying to this computer same as the others,Can you advise what can I do?the setting I'm trying to set is in the picture...
  5. Windows 11 GPO is not applied

    in Windows 10 Software and Apps
    Windows 11 GPO is not applied: Hello We have GPO applied on our computers, and we have one computer that is windows 11, and the GPO is not applying to this computer same as the others,Can you advise what can I do?the setting I'm trying to set is in the picture...
  6. How to apply the GPO settings by using PowerShell scripts.

    in Windows 10 Gaming
    How to apply the GPO settings by using PowerShell scripts.: Hello Team,We required your help to create the GPO settings via PowerShell script. example : I would like to apply the GPO settings to turn of the handwriting recognition error reporting via from PowerShell.I know how to apply the settings by manually to navigate the path...
  7. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  8. Tweaking Performance Using PowerShell Scripts

    in Windows 10 Performance & Maintenance
    Tweaking Performance Using PowerShell Scripts: Hi, Regarding the many scripts that I saw online e.g. Sophia scripts...etc, does it remove the associated registry key files of the apps/services it uninstalls? 171269
  9. Powershell GPO Startup Script not working

    in AntiVirus, Firewalls and System Security
    Powershell GPO Startup Script not working: Hello, I wrote a Powershell Script to delete Microsoft Store Apps which works fine when run manually. However I want to run it as a Startup script via GPO on all computers Windows 10 Pro in our domain. For that, I created a group policy and added the script under Computer...
  10. Get backups by script using GPO

    in Windows 10 Network and Sharing
    Get backups by script using GPO: How to get backup from a user that exist In a domain by setting up a group policy and using a script for example when a user log off from his computer this script run and get backup and send to server....