title: How to Run script with admin rights to change execution policy
body: <p>See below script:
  I need to  launch this script with admin rights embedded inside of the script to set execution policy to unrestricted and then at the end of the script set it back. From what I've found so far this is either not possible or very difficult to do. I'm hoping there is an easier way to do this. The users that will be running this script do not have admin rights on their PC's so they will not be able to elevate and manually run from inside of powershell.</p>
  
  <pre><code>Stop-process -Name OUTLOOK -ErrorAction SilentlyContinue -Force
  Stop-process -Name communicator -ErrorAction SilentlyContinue -Force
  Stop-process -Name lync -ErrorAction SilentlyContinue -Force
  Stop-Process -Name UcMapi -ErrorAction SilentlyContinue -Force
  Stop-Process -Name skypehost -ErrorAction SilentlyContinue -Force
  Stop-Process -Name searchprotocolhost -ErrorAction SilentlyContinue -Force
  
  $OstPath = "c:\users\$([environment]::username)"+ "\AppData" + "\local" + "\Microsoft" + "\Outlook" 
  $ost = get-ChildItem $OstPath | where { $_.Extension -eq ".ost"}  
  $ost | remove-Item -force
  
  Start-Process Outlook
  
  
  if (Test-Path 'C:\Program Files (x86)\Microsoft Office\office15\lync.exe')
  {
      Start-Process 'C:\Program Files (x86)\Microsoft Office\office15\lync.exe'
  }
  Else
  {
     write-host "Lync is not installed"
     if (Test-Path 'C:\Program Files (x86)\Microsoft Office Communicator')
     {
          Start-Process 'C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe'
     }
     Else 
     {
             write-host "Communicator is not installed"
     }
  }
  </code></pre>