While the suggestions at How To: Run a PowerShell Script with a Custom Action work for basic functions, I need to disable the SMBv1 setting on servers and that requires the PowerShell to run in an elevated version. I haven't been able to find anything that starts the PS session that way. Suggestions?
When executing deployments, everything is run as the local System account, which should have all the rights associated with an elevated prompt. In fact, virtually everything the deployment process does requires the same execution level. Are you seeing some sort of error when executing your script indicating insufficient rights for the PS session?