I want to finish up this module by talking about some options that you have for modifying the execution
of group policy based scripts.
So there are actually some settings within admin templates that allow you to configure script behavior.
These are both per computer and per user, and they're not the same options in both.
But some of them are similar that the user configuration options have fewer settings available.
So under computer configuration, what you're seeing here and on the screen is a set of options to specify
different script behavior.
And I'm going to point out just three settings that probably are the most commonly used and the most
useful.
Just so you know what they do and how you might be able to use them.
So the first one is specify maximum wait time for group policy scripts.
And this is a way remember I mentioned that scripts by default take 10 minutes before they actually
time out.
So if a script is still running 10 minutes after it started, it's eventually it's going to basically
go away.
It will be killed by the system.
What this policy lets you do is change the default ten minute time to something greater or less than
10 minutes.
And I've seen this used in a lot of situations to reduce that possible timeout.
So if you do get a script that hangs for some reason and you're not handling it in your script code,
you can at the very least you can see that the script will kill itself in a shorter period of time.
You know, in most cases, if a script is taking even as much as a minute to run, you're probably doing
too much in that script because this is obviously impacting the user's ability to get their job done,
get the machine available to them.
So I highly recommend modifying this down to some value that you think is reasonable for your script
environment.
The other policy that I think is useful to use is the run log on script synchronously.
This is so let me just describe how scripts run normally.
If you have multiple scripts running in your environment, they will run asynchronously, which means
that they're not going to necessarily run one after the other.
They're going to run at the same time.
If you have multiple scripts.
They're going to kick off one after the other without waiting for the first one to finish.
If for some reason you need scripts to wait for the first one to finish, then you can set this run,
log on script synchronously for those log on scripts and also start up scripts.
There's an option for that below.
You can set those to run synchronously or in the case of startup scripts asynchronously.
So start up scripts are a little bit different.
Startup scripts run synchronously by default, and you can set them to run asynchronously.
So a little different behavior.
Two different policies for controlling them.
So if you want log on scripts to run synchronously, you enable that policy.
If you want startup scripts to run asynchronously, you enable that policy.
And these are just a couple of different options for controlling the order of script processing or controlling
the behavior of script processing.
You'll notice there are scripts around PowerShell execution order.
Instead of setting it in the GPO, you can set it at the group policy level and it will essentially
set it for all scripts in that order.
And this is just a little bit of control that you have over script execution that you might want to
consider using.
If, for example, in the timeout case here, your timeouts are too long.
So now let's summarize what we learned in this module.
And in the next module, we're going to talk a little bit about a special kind of configuration called
Loopback Processing.