Blog LogoBlog Logo

Tag: PowerShell

All tags

How to: Tell if a PowerShell script is running as the Administrator

$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) if (-not...

— 10 Aug 2019

Setting file permissions on a remote machine with PowerShell

Recently I needed to set some file permissions on a remote machine. Previously I'd done this relatively easily through a share as the user account I was using...

— 28 Feb 2018