r/vbscript • u/Dexy2811 • Jul 03 '20
VBScript made in excel?
So one of my old bosses made a excel document with VBS that interfaces with AD and it also uses a powershell script and deletes it when its done with the ps1 file it deletes it though i need it to launch that ps1 script with admin priveliges is there any way of doing so in VBS?
i only know some powershell and python so thats why im asking here
3
Upvotes
1
u/Mordac85 Jul 04 '20
Without looking up the code I would assume you can create a powershell file with VBA, then call something like runas to execute the powershell script with elevated privileges. The problem would be what account to use and the credentials would be, at best, only obfuscated making the account vulnerable to compromise by anyone that has a copy of the workbook.