Skip to content

Instantly share code, notes, and snippets.

@rafabarzotto
Created June 20, 2018 22:23
Show Gist options
  • Save rafabarzotto/ac79e0a80b35b432c78b86376490fc3a to your computer and use it in GitHub Desktop.
Save rafabarzotto/ac79e0a80b35b432c78b86376490fc3a to your computer and use it in GitHub Desktop.
Remappint net use printers and drivers
@echo off
for /f "tokens=1,2,3 delims= " %%a in ('net use ^| find "dispon"') do (
echo Remapping %%c to \\localhost\GenericText
net use %%c \\localhost\GenericText /persistent:yes
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment