public/Get-ExecutionPol.ps1
<#
.Synopsis This powershell cmdlet sets the powershell execution policy to Remote Signed. .Description Sets the execution policy. .Example Set-O365ExecutionPol #> Function Set-O365ExecutionPol{ $ExecPolicy = Get-ExecutionPolicy if ($ExecPolicy -ne "RemoteSigned"){Set-ExecutionPolicy RemoteSigned -Force} else{ Write-Host "Execution Policy already set correctly"} } |