Browsed by
Tag: admin

Detect elevated privileges

Detect elevated privileges

Sometimes you get a requirement to start a Powershell script from an elevated prompt. Here is a quick function to check that :

 

function Test-ElevatedPrompt {                      
 [Security.Principal.WindowsPrincipal] $Identity = [Security.Principal.WindowsIdentity]::GetCurrent()            
 $Identity.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)            
}

This will return a simple boolean so you can use it this way :

 

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site