lordx
-
Posts
3 -
Joined
-
Last visited
Posts posted by lordx
-
-
When I try to set a proxy in Configuration manager 2012r2 on the Site system properties. The console freezes. I have to kill the console from task manager to continue using it. And the proxy does not get set
Anyone else having this problem? I can not find any logs that says anything.
-
Removing all network printers is not that difficult with Powershell on the win7 machines. This one liner will remove all network printer connections:
Get-WMIObject Win32_Printer | where{$_.Network -eq ‘true’} | foreach{$_.delete()}
But this will only remove the connections If you want to remove the drivers also you need to use prnmgr.vbs see: http://technet.microsoft.com/en-us/library/cc725868(WS.10).aspx
The script i used earlier this year to achieve almost the exact same thing as you was this script.:
#Delete_printers.ps1
Write-Host ‘Tar bort alle Nettverksskrivere fra “Enheter og skrivere”‘ -ForegroundColor Green
Get-WMIObject Win32_Printer | where{$_.Network -eq ‘true’} | foreach{$_.delete()}
Write-Host ‘Restart Print Spooler’ -ForegroundColor Green
(get-wmiobject -Class win32_service -filter “Name=’Spooler’”).stopservice()
sleep 5
(get-wmiobject -Class win32_service -filter “Name=’Spooler’”).startservice()
sleep 10Write-Host ‘Sletter Driverne’ -ForegroundColor Green
Invoke-Expression “cscript C:\Windows\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs -x”After this is run use GPOs or a login script to set the new printers.
Currently logged in users
in scripting
Posted
I have used:
To get this information a few times. you can probably use this as a basis to make a script do what you want.