We are running virtual machines via Windows Multipoint Server and have spun up a new one, trying to resolve some issues. The printers are installed on the Hyper-V machine and I assign printers for each user (group policy created a printer nightmare, hence the reason for the new wms).
I've written a batch file that works with the administrator logged in & the rdp session open. It's been simplified down to just 2 lines that I'm having issues with:
rem default printer
cscript %windir%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -g >> "c:\Users\vradmin\Documents\SchedBatch\Results.log"
rem change default printer
cscript %windir%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -t -p \\VRSERVER\Printer020 >> "c:\Users\vradmin\Documents\SchedBatch\Results.log"
All I'm trying to do is find out what the current default printer is & change it to Printer020.
From Task Scheduler, I have a task built to run only when the user is logged on and with the highest privileges. Works just fine, as long as the .rdp to the wms stays open. If I schedule the task and close the .rdp (not logging off, just closing), it will write the default to the log, but will not change it to Printer020.
I've searched all over the internet and cannot find any similar issues. Any help or direction would be greatly appreciated!
Thanks!