If you don't have execution policy set for your company via group policy or if you did not specify the execution policy when you launched PowerShell from the command line, then the script will set the execution policy. It is there to catch those scenarios where people don't know or forget to set the execution policy when they launch PowerShell of if they simply prefer to have the call made in the script. Also, it will not cause any problems if you set the execution policy at multiple points of the process.
↧