Hi I have a strange issue with new Win 10 computers and elevating explorer.exe with my administrative account. I created a powershell app that serves as a menu system to launch other powershell apps with my admin id. So for example I set the admin credential with the following:
$global:cred = Get-Credential -Credential ‘Domain1’
Then start another app from the menu with the following example:
Start-Process “C:\Program Files\DesktopPowershellAPPS\Computer Support.exe” -Credential $cred
The Computer Support.exe then runs as my admin account. Everything works except when I try to do an admin share to the c: drive of a remote computer. It starts explorer.exe as my regular id that I’m logged into the computer with not my admin account. Here’s the simple code for the admin share:
$computername = $textboxCN.text.Trim()
$files = “\” + $computername + “\c$”
Start-Process explorer.exe $files
This is working on some of the Win 10 computers but not others. I’m stumped. Any ideas to get it to run as intended with the admin id?
Thanks for any help in advance.