1. Overview removeprintersatlogoff is a machine-level Windows policy setting (Registry Key or Group Policy Object) that controls the lifecycle of network printers mapped by a user during their session. When enabled, it forces the operating system to delete all network printer connections at user logoff , before the user’s profile unloads.

Computer Configuration → Administrative Templates → Printers When enabled, it sets the above registry key to 1 . | Phase | Action (RemovePrintersAtLogoff = 1) | |-------|--------------------------------------| | User logs on | Normal printer mapping (manual, script, GPO, etc.) occurs. | | During session | Printers remain fully functional. | | User logs off | Before profile unload, Windows enumerates all network printer connections owned by that user. | | Deletion | Each network printer is removed via DeletePrinterConnection API. | | Result | Next user logs into a “clean” printer list. |

Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers" -Name "RemovePrintersAtLogoff" -ErrorAction SilentlyContinue