Power Shell in a TCMD window

Jul 12, 2008
270
0
Las Vegas, NV
If I run TCMD as Administrator (option on shortcut) do the tabs that I then open -- such as PowerShell -- inherit those Admin properties?

Regards,
Chuck Billow
 
May 20, 2008
9,145
58
Syracuse, NY, USA
You can ask PowerShell (of course it isn't easy). Here's a simplification of some code I Googled up.

Code:
$wid=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$prp=new-object System.Security.Principal.WindowsPrincipal($wid)
$adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator
$IsAdmin=$prp.IsInRole($adm)
if ($IsAdmin) { echo yes }