After installing build 7487 I noticed that HKLM\SOFTWARE\Microsoft\MSH\1\ShellIds\Microsoft.Management.Automation.msh\ExecutionPolicy was reset from RemoteSigned to Restricted. Since it appears the whole MSH key is deleted during uninstall, I first tried uninstalling again and manually setting the value to RemoteSigned to see if it is preserved. The value isn't preserved; it is always overwritten. Is the intent that MSH will always delete the key contents and always overwrite ExecutionPolicy while installing? It's not a significant issue during beta, and I can even see why it may be a valuable possible choice during upgrades/reinstalls, but automatically working this way will cause potentially significant inconveniences to people using it in the field, particularly in WAN support scenarios. Any thoughts on this? Also, are there any workarounds that will allow overriding this behavior with a custom commandline for the installer? If the intent IS to make this default behavior, a simple workaround to force custom upgrade would probably mitigate most problems.
Hi Alex, We have discussed allowing configuring ExcutionPolicy during setup but we have not had lot of feedback around this. Can you post a bug on it and can folks vote on it? Abhishek Agrawal [MSFT] MSH Team Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights.
Will do, as soon as I figure out how to use the new bugging system. Yes, I'm lazy. The more I look at this, however, the more I focus on the issue of overwriting pre-existing settings. Has that had any separate discussion? It looks to me like we have some weird potential issues that are due to the nature of typical Windows Installer behavior. This may be worth a separate post completely to outline some things after I've looked though the Windows Installer documentation some more.
Done; I focused on the issue of ExecutionPolicy reset/loss rather than the need for a custom setting. MSH Registry Customizations Removed/Overwritten during Uninstall/Reinstall https://connect.microsoft.com/feedback/ViewFeedback.aspx?SiteID=99&FeedbackID=60862
I think I would go for the customizing of the setup, as I suppose that V2 does have an Upgrade possibility that reserves settings (uninstall not needed) ;-) as I do an uninstall I would expect all settings gone. but if I deploy MSH, I would might like to customize it, would be a stopper if my scripts could not run (to set it) untill this was set. Gr /\/\o\/\/
Perhaps the ExecutionPolicy should be per user instead of machine wide. Then it would make more sense to keep the user's current settings. Voted.
That is exactly the scenario I had in mind. Today if you deploying Msh on a new machine, you cannot use it to run scripts till you ran a secondary thing to set ExecutionPolicy. We essentially force a post-install step and the installer itself seems like a good place to put it. Abhishek Agrawal [MSFT] MSH Team Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights.