Delete Terminal Server user profile

<#********************************************************************** * a script to delete user profile data from terminal server                                                    * * this script will:                                                                       

495 times
Add to favorites
E-mail Twitter Digg Facebook
  • script execution;
    2 Posts | Last post March 03, 2019
      Dear Tsvi Keren
      thanks for your contribution will be of great value to me this script;
      my knowledge in powershell are low, due to this I have doubts refetente to its execulção.
      it will only work in a GPO or I can execute it locally via admin powershell.
      executes locally you hear the following error
      File C: \ Users \ user \ Downloads \ del_TS_user_profile.ps1 can not be loaded because the execution of scripts is disa
      bled on this system. Please see "get-help about_signing" for more details.
      At line: 1 char: 26
      +. \ del_TS_user_profile.ps1 <<<<
           + CategoryInfo: NotSpecified: (:) [], PSSecurityException
           + FullyQualifiedErrorId: RuntimeException
    • As a matter of fact I only used it via powershell ise and powershell window.
      the warning you have there is because you have not allowed running script on your system.
      open powershell window as admin and execute
      Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
      Set-ExecutionPolicy -ExecutionPolicy unrestricted
      Do some reading before you decide which execution policy suites you best.
      here is a link
      after you set execution policy you should be able to run scripts.
      espero que te ajudei