Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPO question #65

Closed
killmasta93 opened this issue Jun 6, 2022 · 2 comments
Closed

GPO question #65

killmasta93 opened this issue Jun 6, 2022 · 2 comments

Comments

@killmasta93
Copy link

killmasta93 commented Jun 6, 2022

Hi
I was wondering how would i put the script in a GPO environment?
Would i need to edit the bat file ex: the compression part change the default from 1 to 9
and adding the categories?

Thank you

@ScriptTiger
Copy link
Owner

ScriptTiger commented Jun 6, 2022

You don't need to change the script at all. You can create scheduled tasks with group policies that work exactly the same way that the standard scheduled tasks work. I always recommend that you just create a regular local scheduled task using the script, and then just open your task scheduler (taskschd.msc) and look at the "Unified Hosts AutoUpdate" task and use that as a model. The script location will just be that of a shared network location (\\Share), instead of a location on the local machine. And the arguments/parameters are where you put the URL and compression level, and whatever other preferences you want, like logging, etc.

CHANGE THE VERSION FILE!!!
As taken from the README:

If you are deploying the update script across an organization via a shared network location and group policies, edit the "VERSION" file by adding an X to the end of the version number like this:
1.10X
This will disable the script from checking for script updates and attempting to update itself. This does not affect updates to the hosts file or whatever scheduled tasks you may have in place, this strictly disables the Hosts_Update.cmd from updating itself within the shared network location which remote system accounts running the scheduled tasks may not have write access to.

I actually get this question a lot via e-mail, so I'll pin this for future reference. Thanks for asking.

@ScriptTiger ScriptTiger pinned this issue Jun 6, 2022
@ScriptTiger
Copy link
Owner

Haven't heard any follow-up, so going to assume this one is resolved. If not, feel free to let me know. Again, thanks for the question!

Repository owner locked as resolved and limited conversation to collaborators Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants