Don't make me run PowerShell in unrestricted mode
Today in order to set up a cluster or deploy code to my cluster I need to run PowerShell in unrestricted mode:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope CurrentUser
Not only does this make me nervous from a security standpoint, but it also appears to interfere with other things that are running PowerShell scripts. (For example, Application Insights starts throwing errors when attempting to run scripts when starting up a Cloud Service.)
Is there any way we can get around that requirement? I'd be OK enabling unrestricted mode for setting up the cluster if I could then turn it back to normal mode and still deploy my code.
Ray Min commented
The installation script has too many limitations
1. Need in Unrestricted mode
2. Service Fabric SDK cannot be installed on the machine running the installation script, even the machine is NOT part of new cluster
3. The installation script cannot run on the machine which has Service Fabric service installed but not part of new cluster.
It seems the installation script was not in a correct design.