Add Startup and shutdown scripts to Local Group Policy using PowershellAm I missing something about pushing a...

“I had a flat in the centre of town, but I didn’t like living there, so …”

Naming Characters after Friends/Family

Named nets not connected in Eagle board design

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

ESPP--any reason not to go all in?

The need of reserving one's ability in job interviews

Replacing tantalum capacitor with ceramic capacitor for Op Amps

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

Can a Mexican citizen living in US under DACA drive to Canada?

How do we objectively assess if a dialogue sounds unnatural or cringy?

What is better: yes / no radio, or simple checkbox?

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

Giving a talk in my old university, how prominently should I tell students my salary?

Problems with rounding giving too many digits

An Undercover Army

Why can't we use freedom of speech and expression to incite people to rebel against government in India?

Is being socially reclusive okay for a graduate student?

Computing the volume of a simplex-like object with constraints

Did Amazon pay $0 in taxes last year?

Why is there an extra space when I type "ls" on the Desktop?

What is "desert glass" and what does it do to the PCs?

PTIJ: Aliyot for the deceased

Should I use HTTPS on a domain that will only be used for redirection?



Add Startup and shutdown scripts to Local Group Policy using Powershell


Am I missing something about pushing a PS script via domain GPOAdd Group Policy by ScriptLocal Group Policy not updating. RSOP and GPResult show stale dataUse Script To Edit Local Group Policy Windows Server 2012Getting Group Policy identifier in PowerShellRemotely change local group policy server 2008R2Unable to Set local group policy using powershellHow can I locate Registry key for Group policy settings?Server 2008R2, startup/shutdown powershell scripts in gpedit.msc not working and not appearing in registry. Script works manually. No domain involvedGroup policy batch script not running on startup













2















I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in http://ccm.net/faq/3358-execute-a-script-a-startup-and-shutdown. I'm looking for a way to do it via powershell script using the GroupPolicy module. I want to know if this is possible/anyone has succeeded in doing this?



UPDATE: After reading through msdn articles, I figured out that we can access domain group policy objects but the local group policy object (which contains the startup and shutdown scripts) is stored in registry. I am trying to find a way to access and edit this local GPO through powershell.










share|improve this question
















bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

    – BlueCompute
    Jan 5 '16 at 11:16













  • not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

    – semantic_c0d3r
    Jan 5 '16 at 23:15






  • 1





    What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

    – BlueCompute
    Jan 6 '16 at 10:47
















2















I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in http://ccm.net/faq/3358-execute-a-script-a-startup-and-shutdown. I'm looking for a way to do it via powershell script using the GroupPolicy module. I want to know if this is possible/anyone has succeeded in doing this?



UPDATE: After reading through msdn articles, I figured out that we can access domain group policy objects but the local group policy object (which contains the startup and shutdown scripts) is stored in registry. I am trying to find a way to access and edit this local GPO through powershell.










share|improve this question
















bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

    – BlueCompute
    Jan 5 '16 at 11:16













  • not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

    – semantic_c0d3r
    Jan 5 '16 at 23:15






  • 1





    What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

    – BlueCompute
    Jan 6 '16 at 10:47














2












2








2








I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in http://ccm.net/faq/3358-execute-a-script-a-startup-and-shutdown. I'm looking for a way to do it via powershell script using the GroupPolicy module. I want to know if this is possible/anyone has succeeded in doing this?



UPDATE: After reading through msdn articles, I figured out that we can access domain group policy objects but the local group policy object (which contains the startup and shutdown scripts) is stored in registry. I am trying to find a way to access and edit this local GPO through powershell.










share|improve this question
















I am trying to automate adding startup and shutdown scripts to Local Group Policy (gpedit.msc). One solution is to write to registry directly as pointed out in http://ccm.net/faq/3358-execute-a-script-a-startup-and-shutdown. I'm looking for a way to do it via powershell script using the GroupPolicy module. I want to know if this is possible/anyone has succeeded in doing this?



UPDATE: After reading through msdn articles, I figured out that we can access domain group policy objects but the local group policy object (which contains the startup and shutdown scripts) is stored in registry. I am trying to find a way to access and edit this local GPO through powershell.







windows-server-2008 powershell group-policy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 5 '16 at 23:18







semantic_c0d3r

















asked Jan 4 '16 at 22:03









semantic_c0d3rsemantic_c0d3r

113




113





bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

    – BlueCompute
    Jan 5 '16 at 11:16













  • not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

    – semantic_c0d3r
    Jan 5 '16 at 23:15






  • 1





    What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

    – BlueCompute
    Jan 6 '16 at 10:47



















  • Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

    – BlueCompute
    Jan 5 '16 at 11:16













  • not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

    – semantic_c0d3r
    Jan 5 '16 at 23:15






  • 1





    What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

    – BlueCompute
    Jan 6 '16 at 10:47

















Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

– BlueCompute
Jan 5 '16 at 11:16







Homework question? What's wrong with doing it by registry? What's the actual problem you are trying to solve?

– BlueCompute
Jan 5 '16 at 11:16















not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

– semantic_c0d3r
Jan 5 '16 at 23:15





not homework. I am looking to automate it using powershell. It would be deployed with a bunch of other scripts. I'm trying to run an exe with arguments during startup and shutdown. Kindly see edit.

– semantic_c0d3r
Jan 5 '16 at 23:15




1




1





What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

– BlueCompute
Jan 6 '16 at 10:47





What's wrong with doing it by editing the registry? That's the easy, obvious, low-hanging fruit, and it works. You can script registry editing in powershell you know. "one solution is 'X', but I want to do it a different way that I don;t know how to do..."

– BlueCompute
Jan 6 '16 at 10:47










1 Answer
1






active

oldest

votes


















0














If you're trying to do this on a workgroup machines, configure it manually. If they are part of a domain, do it via GPO. All the same options are avail in GPO that are avail in local policy.



enter image description here






share|improve this answer


























  • Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

    – Nick Young
    Jan 12 '16 at 3:29













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f746705%2fadd-startup-and-shutdown-scripts-to-local-group-policy-using-powershell%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









0














If you're trying to do this on a workgroup machines, configure it manually. If they are part of a domain, do it via GPO. All the same options are avail in GPO that are avail in local policy.



enter image description here






share|improve this answer


























  • Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

    – Nick Young
    Jan 12 '16 at 3:29


















0














If you're trying to do this on a workgroup machines, configure it manually. If they are part of a domain, do it via GPO. All the same options are avail in GPO that are avail in local policy.



enter image description here






share|improve this answer


























  • Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

    – Nick Young
    Jan 12 '16 at 3:29
















0












0








0







If you're trying to do this on a workgroup machines, configure it manually. If they are part of a domain, do it via GPO. All the same options are avail in GPO that are avail in local policy.



enter image description here






share|improve this answer















If you're trying to do this on a workgroup machines, configure it manually. If they are part of a domain, do it via GPO. All the same options are avail in GPO that are avail in local policy.



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 12 '16 at 14:17

























answered Jan 7 '16 at 15:59









ClaytonClayton

4,1781120




4,1781120













  • Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

    – Nick Young
    Jan 12 '16 at 3:29





















  • Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

    – Nick Young
    Jan 12 '16 at 3:29



















Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

– Nick Young
Jan 12 '16 at 3:29







Just an opinion so I will keep it short. I prefer always using GPOs as splitting it can lead to confusion later. It might not be possible but it's something I have found to be a best practice.

– Nick Young
Jan 12 '16 at 3:29




















draft saved

draft discarded




















































Thanks for contributing an answer to Server Fault!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f746705%2fadd-startup-and-shutdown-scripts-to-local-group-policy-using-powershell%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

Список ссавців Італії Природоохоронні статуси | Список |...

Українські прізвища Зміст Історичні відомості |...