$sUser = "mmedina" $sPass = "Mike&Karri10" $sDomain = "MedinaManor" $sCMD = "C:\Windows\System32\spool\tools\Printbrm.exe /b /f C:\temp\Printers\backup.printerExport" $sCalc = "C:\Windows\System32\cacls C:\temp\Printers /t /e /g Everyone:f" DirCreate ("C:\Temp\Printers") RunAsWait ($sUser, $sDomain, $sPass, 0, "cmd /c " & $sCalc) RunAsWait ($sUser, $sDomain, $sPass, 0, "cmd /c " & $sCMD) ;Grant permissions to the Printer Export File ;_RunDos "cacls c:\test /t /e /g Everyone:f" ;$user = "Administrator" ;$pass = "" ;RunAs($sUser, @ComputerName, $pass,0,@ComSpec & "/c " & "cacls C:\Users\marek\Desktop\lol.txt /grant marek:r") ;$sCMD = "C:\Windows\System32\cacls c:\temp\Printers /t /e /g Everyone:f"