Articles tagged with: Windows tricks

Using the Set-ExecutionPolicy Cmdlet

Changing the Windows PowerShell Script Execution Policy
The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies:

  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run.

To assign a particular policy simply call Set-ExecutionPolicy followed by the appropriate policy name. For example, this command sets the execution policy to RemoteSigned:

Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned

Loading

Change product key in windows server 2012

• Open an elevated command prompt and type the following commands:
• slmgr -upk
• slmgr -ipk abcde-abcde-abcde-abcde-abcde
This will add your key. Of course replace the abcde-abcde with your own real key.
• Activate Windows (you will probably have popups already during this process)

Loading