TCMD PowerShell Tab elevated

Jul 12, 2008
286
0
Las Vegas, NV
I am trying to get a tab set up for PowerShell with elevated rights. I cannot seem to get there. If I just start PowerShell from a shortcut that is set to run as Administrator, it works. I can tell this by the command

[bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")

That returns "True " when run.

But my TCMD tab that is set to run as Admin does not, and returns a "False" to the same string.

What am I doing wrong here? The one thing I see is that if I go to "Options / Take Command Tabs" and look at the PowerShell tab, the "Run As" fields are always empty. I enter the info, get no error, but the tab does not load as Admin, and then the fields are empty upon review.

What do I need to change here?
 
May 20, 2008
11,388
99
Syracuse, NY, USA
I don't think it's possible to run anything elevated in a tab in a non-elevated TCMD ... a Windows restriction.
 
Code:
ver
TCC  24.00.29 x64   Windows 7 [Version 6.1.7601]

From an elevated TCMD session, if I do;
Code:
runas.exe /trustlevel:0x20000 powershell.exe
and then from PowerShell, if I do a
Code:
(New-Object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
it returns false.

From an elevated TCMD session, if I do;
Code:
Powershell.exe -Command Start-Process PowerShell -Verb RunAs
and then from PowerShell, if I do a
Code:
New-Object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
it returns true.

@CWBillow is this a solution for you? That is, run TCMD elevated, but you have the ability to run PowerShell as Admin or not as Admin.

Joe
 
May 26, 2008
537
4
I don't think it's possible to run anything elevated in a tab in a non-elevated TCMD ... a Windows restriction.
I know TCMD doesn't support it, but ConEmu can do it. I run a mix of elevated and non-elevated console apps within a single ConEmu window. So it isn't a Windows restriction per se, but some tricks need to be done to get it to work.
 
Similar threads
Thread starter Title Forum Replies Date
CWBillow Powershell tab in TCMD? Support 2
CWBillow TCC and TCMD in Powershell Support 6
CWBillow PowerShell Tabs in TCMD Support 11
D TCMD /X option Support 1
vefatica TCMD hides itself! Support 3
vefatica Tray min'd TCMD and ACTIVATE Support 6
C How to? starting TCC/TCMD v25 Support 2
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
CWBillow TCMD Colors Support 8
Jay Sage Issues With TCMD File Explorer Support 0
C Last TCMD that supports win 7? Support 5
gentzel TCMD background color confusion Support 6
R Upgrade TCMD 19 to TCC 26 Support 1
Alpengreis Remaining TCMD background process (v26) ... Support 19
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
G TCMD crash when copy Support 3
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
nikbackm TCMD 25 - Unregister older TCMD version Support 2
G Documentation on TCMD.INI Support 9
R New Clear Buffer in TCMD Home Menu Support 2
CWBillow Back up TCMD tabs Support 2
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
DrusTheAxe TCMD 24.02.49 x64 crashed due to DivideByZero :-( Support 4
A After update to 24.02.49, helpfile tcmd.chm hangs when opened Support 0
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
vefatica What's TCMD's problem with ^e[0m? Support 13
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
vefatica TCMD output invisible on Win10 Support 22
J Moving from TCC v22 to TCMD v24 issues Support 3
RChrismon How to? Copy TCMD.INI to New Version Support 7
rps TCMD OPTIONS dialog Support 2
rps TCMD Tabs priority option setting Support 0
D Can we fix the scaling for TCmd? Support 14
CWBillow TCMD Tab Defs Support 4
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
A TCMD - Dir Command puts out blank lines? Support 16
P Symantec Endpoint Protection trapped TCMD.EXE and said it contained WS.Reputation.1 (Virus?) Support 3
Emilio III TCMD Tab titles on Insider Windows Support 2
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
D Tcmd 22.00.42 - annoying desktop refresh Support 47
CWBillow Context menu extensions for TCC/TCMD v18? Support 1
vefatica Pasting into TCMD via right-click menu? Support 2
M Please explain TCMD's ANSI x3.64 support Support 4
D Custom ini-file is not read, by tcmd.exe cli Support 6

Similar threads