# Run from elevated powershell as SC.EXE requires administrative privileges) # Remove printer named Laserfich Snapshot (Shared) If ($Printer = Get-Printer -Name "Laserfiche Snapshot (Shared)") { Remove-Printer -Name $Printer.Name } # Remove windows service named LFSnapshot # Note: Microsoft Service Control SC.exe requires administrator privileges $ServiceName = 'LFSnapshot' if (Get-Service $ServiceName -ErrorAction SilentlyContinue) { sc.exe delete $ServiceName }