Is there a way to batch or script the adjustment of Windows settings?
I've been prepping machines for deployment but each computer has 10-15 adjustments that have to be made before installing software. Items such as, changing the power consumption, turning off UAC, disabling System Restore, setting existing registry items to a different value.
Can this be done cleanly with a batch file, PS script or something else that would save me time when deploying 15 computers? I've looked at other programs but I have computers that aren't going to be onsite.
windows command-line powershell batch cmd.exe
add a comment |
I've been prepping machines for deployment but each computer has 10-15 adjustments that have to be made before installing software. Items such as, changing the power consumption, turning off UAC, disabling System Restore, setting existing registry items to a different value.
Can this be done cleanly with a batch file, PS script or something else that would save me time when deploying 15 computers? I've looked at other programs but I have computers that aren't going to be onsite.
windows command-line powershell batch cmd.exe
1
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53
add a comment |
I've been prepping machines for deployment but each computer has 10-15 adjustments that have to be made before installing software. Items such as, changing the power consumption, turning off UAC, disabling System Restore, setting existing registry items to a different value.
Can this be done cleanly with a batch file, PS script or something else that would save me time when deploying 15 computers? I've looked at other programs but I have computers that aren't going to be onsite.
windows command-line powershell batch cmd.exe
I've been prepping machines for deployment but each computer has 10-15 adjustments that have to be made before installing software. Items such as, changing the power consumption, turning off UAC, disabling System Restore, setting existing registry items to a different value.
Can this be done cleanly with a batch file, PS script or something else that would save me time when deploying 15 computers? I've looked at other programs but I have computers that aren't going to be onsite.
windows command-line powershell batch cmd.exe
windows command-line powershell batch cmd.exe
asked Jan 24 at 15:44
MadTitanMadTitan
1
1
1
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53
add a comment |
1
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53
1
1
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53
add a comment |
1 Answer
1
active
oldest
votes
Powershell is incredibly powerful and will allow you automate most if not all of your your configuration. How much you can automate depends on how complicated a powershell script your prepared to write / copy-n-paste from stack overflow ;-)
I agree with Hans that the "proper" way to handle this is to create a "golden image" - then deploy that image to each machine - but there is a learning curve to it, and it sounds like your after something a little more quick 'n' dirty?
If i were you id open up ISE/VSCode, and create a new .ps1 PowerShell script then hit google...
Most "standard" tweaks have been done before - so for example google "powershell turning off UAC" dumped me this page Disable-ComputerRestore, and it includes a simple example:
Disable-ComputerRestore -Drive "C:"
Searching for "powershell disable UAC" got me this script. Assuming your only interested in Windows 10, so just copy the line for Windows 10 from the sample script:
Set-ItemProperty "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem" -Name "ConsentPromptBehaviorAdmin" -Value "0"
The above also demonstrates writing to the registry which is pretty trivial. Also, theres nothing wrong with for example using powershell to run regedit.exe and import a .reg file - if thats easier (and assuming you can get the .reg file onto the remote system).
I'd suggest putting Start-Transcription -path c:somelogfile.txt on the first line so it will record any output/errors to a log file. You'll probably want to end your script Restart-Computer. If you get stuck performing a specific change ask a question on stackoverflow - if its not already been answered.
So, writing a script to automate specific tasks is pretty easy. If you have the machines locally grabbing the script from a share or a USB stick and running it will be quicker than using control panels and the registry editor etc. If you have remote machines, its no different so long as you have RDP access or some other remoting software. It is possible to run powershell on remote systems, but that requires some setup so not sure if thats relevant?
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397959%2fis-there-a-way-to-batch-or-script-the-adjustment-of-windows-settings%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Powershell is incredibly powerful and will allow you automate most if not all of your your configuration. How much you can automate depends on how complicated a powershell script your prepared to write / copy-n-paste from stack overflow ;-)
I agree with Hans that the "proper" way to handle this is to create a "golden image" - then deploy that image to each machine - but there is a learning curve to it, and it sounds like your after something a little more quick 'n' dirty?
If i were you id open up ISE/VSCode, and create a new .ps1 PowerShell script then hit google...
Most "standard" tweaks have been done before - so for example google "powershell turning off UAC" dumped me this page Disable-ComputerRestore, and it includes a simple example:
Disable-ComputerRestore -Drive "C:"
Searching for "powershell disable UAC" got me this script. Assuming your only interested in Windows 10, so just copy the line for Windows 10 from the sample script:
Set-ItemProperty "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem" -Name "ConsentPromptBehaviorAdmin" -Value "0"
The above also demonstrates writing to the registry which is pretty trivial. Also, theres nothing wrong with for example using powershell to run regedit.exe and import a .reg file - if thats easier (and assuming you can get the .reg file onto the remote system).
I'd suggest putting Start-Transcription -path c:somelogfile.txt on the first line so it will record any output/errors to a log file. You'll probably want to end your script Restart-Computer. If you get stuck performing a specific change ask a question on stackoverflow - if its not already been answered.
So, writing a script to automate specific tasks is pretty easy. If you have the machines locally grabbing the script from a share or a USB stick and running it will be quicker than using control panels and the registry editor etc. If you have remote machines, its no different so long as you have RDP access or some other remoting software. It is possible to run powershell on remote systems, but that requires some setup so not sure if thats relevant?
add a comment |
Powershell is incredibly powerful and will allow you automate most if not all of your your configuration. How much you can automate depends on how complicated a powershell script your prepared to write / copy-n-paste from stack overflow ;-)
I agree with Hans that the "proper" way to handle this is to create a "golden image" - then deploy that image to each machine - but there is a learning curve to it, and it sounds like your after something a little more quick 'n' dirty?
If i were you id open up ISE/VSCode, and create a new .ps1 PowerShell script then hit google...
Most "standard" tweaks have been done before - so for example google "powershell turning off UAC" dumped me this page Disable-ComputerRestore, and it includes a simple example:
Disable-ComputerRestore -Drive "C:"
Searching for "powershell disable UAC" got me this script. Assuming your only interested in Windows 10, so just copy the line for Windows 10 from the sample script:
Set-ItemProperty "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem" -Name "ConsentPromptBehaviorAdmin" -Value "0"
The above also demonstrates writing to the registry which is pretty trivial. Also, theres nothing wrong with for example using powershell to run regedit.exe and import a .reg file - if thats easier (and assuming you can get the .reg file onto the remote system).
I'd suggest putting Start-Transcription -path c:somelogfile.txt on the first line so it will record any output/errors to a log file. You'll probably want to end your script Restart-Computer. If you get stuck performing a specific change ask a question on stackoverflow - if its not already been answered.
So, writing a script to automate specific tasks is pretty easy. If you have the machines locally grabbing the script from a share or a USB stick and running it will be quicker than using control panels and the registry editor etc. If you have remote machines, its no different so long as you have RDP access or some other remoting software. It is possible to run powershell on remote systems, but that requires some setup so not sure if thats relevant?
add a comment |
Powershell is incredibly powerful and will allow you automate most if not all of your your configuration. How much you can automate depends on how complicated a powershell script your prepared to write / copy-n-paste from stack overflow ;-)
I agree with Hans that the "proper" way to handle this is to create a "golden image" - then deploy that image to each machine - but there is a learning curve to it, and it sounds like your after something a little more quick 'n' dirty?
If i were you id open up ISE/VSCode, and create a new .ps1 PowerShell script then hit google...
Most "standard" tweaks have been done before - so for example google "powershell turning off UAC" dumped me this page Disable-ComputerRestore, and it includes a simple example:
Disable-ComputerRestore -Drive "C:"
Searching for "powershell disable UAC" got me this script. Assuming your only interested in Windows 10, so just copy the line for Windows 10 from the sample script:
Set-ItemProperty "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem" -Name "ConsentPromptBehaviorAdmin" -Value "0"
The above also demonstrates writing to the registry which is pretty trivial. Also, theres nothing wrong with for example using powershell to run regedit.exe and import a .reg file - if thats easier (and assuming you can get the .reg file onto the remote system).
I'd suggest putting Start-Transcription -path c:somelogfile.txt on the first line so it will record any output/errors to a log file. You'll probably want to end your script Restart-Computer. If you get stuck performing a specific change ask a question on stackoverflow - if its not already been answered.
So, writing a script to automate specific tasks is pretty easy. If you have the machines locally grabbing the script from a share or a USB stick and running it will be quicker than using control panels and the registry editor etc. If you have remote machines, its no different so long as you have RDP access or some other remoting software. It is possible to run powershell on remote systems, but that requires some setup so not sure if thats relevant?
Powershell is incredibly powerful and will allow you automate most if not all of your your configuration. How much you can automate depends on how complicated a powershell script your prepared to write / copy-n-paste from stack overflow ;-)
I agree with Hans that the "proper" way to handle this is to create a "golden image" - then deploy that image to each machine - but there is a learning curve to it, and it sounds like your after something a little more quick 'n' dirty?
If i were you id open up ISE/VSCode, and create a new .ps1 PowerShell script then hit google...
Most "standard" tweaks have been done before - so for example google "powershell turning off UAC" dumped me this page Disable-ComputerRestore, and it includes a simple example:
Disable-ComputerRestore -Drive "C:"
Searching for "powershell disable UAC" got me this script. Assuming your only interested in Windows 10, so just copy the line for Windows 10 from the sample script:
Set-ItemProperty "HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem" -Name "ConsentPromptBehaviorAdmin" -Value "0"
The above also demonstrates writing to the registry which is pretty trivial. Also, theres nothing wrong with for example using powershell to run regedit.exe and import a .reg file - if thats easier (and assuming you can get the .reg file onto the remote system).
I'd suggest putting Start-Transcription -path c:somelogfile.txt on the first line so it will record any output/errors to a log file. You'll probably want to end your script Restart-Computer. If you get stuck performing a specific change ask a question on stackoverflow - if its not already been answered.
So, writing a script to automate specific tasks is pretty easy. If you have the machines locally grabbing the script from a share or a USB stick and running it will be quicker than using control panels and the registry editor etc. If you have remote machines, its no different so long as you have RDP access or some other remoting software. It is possible to run powershell on remote systems, but that requires some setup so not sure if thats relevant?
answered Jan 24 at 20:38
MisterSmithMisterSmith
2945
2945
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1397959%2fis-there-a-way-to-batch-or-script-the-adjustment-of-windows-settings%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The usual way to deploy machines with identical configuration is to create a image from a master computer. This can be done with Sysprep. superuser.com/a/493646/471143
– Hans Hubert Vogts
Jan 24 at 17:53