Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Mar 2010
    pittsburgh, PA
    Thanked 0 Times in 0 Posts

    location-aware printing settings in Windows 10 missing?

    Windows 7 and 8/8.1 had what was known as location-aware printing settings. This was far superior to the Windows 10 "remember my last printer" setting. It apparently looks at the MAC address and set whatever default printer one had set when connected at that address as the default whenever connected to that address.

    This is driving my crazy with my SurfacePro4 when I move back and forth between the office and home. Is that a workaround to get this functionality back in Windows 10??

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Manning, South Carolina
    Thanked 1,551 Times in 1,405 Posts
    If you don't find another simpler solution here's a PowerShell script that will do the trick. Just setup a Scheduled task to run the script at startup and it will change the printer based on your IP address.

    Note: The IP address pattern should be for your home network and you may need to change it based on your DHCP setup.

      To get the info on all printers for use in $MyPrinters below
      $Printers = Get-WmiObject -Class Win32_Printer
    # --------------    Home Printer Name  -----   Work Printer Name   ---
    $MyPrinters = @("Brother HL-5450DN series","Foxit Reader PDF Printer")
    $ErrorActionPreference = "SilentlyContinue"
    Remove-Variable ip
    $ip = get-netipaddress | 
     Where-object {$_.IPAddress.ToString() -Like '192.168.*'} 
    If ($ip -eq $Null) {
      "At Work"
      $PrinterName = $MyPrinters[1]
    Else {
      "At Home"
      $PrinterName = $MyPrinters[0]
    $Printers = Get-WmiObject -Class Win32_Printer
            Write-Verbose "Get the specified printer info."
            $Printer = $Printers | Where{$_.Name -eq "$PrinterName"}
                Write-Verbose "Setting the default printer."
                $Printer.SetDefaultPrinter() | Out-Null
                Write-Host -BackgroundColor Green `
                 "Successfully set the default printer to $PrinterName."
                Write-Warning -BackgroundColor Red `
                   "Cannot find a printer called $PrinterName."
            $ErrorMsg = $_.Exception.Message
            Write-Host $ErrorMsg -BackgroundColor Red
        Read-Host -Prompt "Press Enter to continue..."
    Sample run when IP pattern is home pattern (192.168.)
    At Home
    Successfully set the default printer to Brother HL-5450DN series.
    Press Enter to continue...:
    Error if Printer name not found at current location:
    At Home
    WARNING: Cannot find a printer called OOOrother HL-5450DN series.
    Press Enter to continue...:
    May the Forces of good computing be with you!


    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. The Following User Says Thank You to RetiredGeek For This Useful Post:

    PhilI (2016-05-06)

  4. #3
    Join Date
    May 2011
    Vancouver, WA
    Thanked 4 Times in 3 Posts

    Fully Automated Version Posted...

    RG's post spurred me on to develop this idea into an automated solution. I missed the functionality in Win 10 and this gave me the seed to work with. I have posted my version "Set-DefaultPrinterfromSSID.ps1" here . It sets up the defaults by SSID and schedules a task to run when the network changes. Barely sufficient documentation for a moderately experienced PowerShell user. Designed for the SysAdmin to install and then let it work for the users. It turned out to be much more PowerShell learning. Thanks RG for your post!

    Edit 08/31/16: Updated version of script posted. Minor change to fix getting correct SSID even if access point gets updated or changed.
    Last edited by PhilI; 2016-08-31 at 13:42. Reason: Updated version posted

  5. #4
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    A cultural area in SW England
    Thanked 203 Times in 182 Posts
    I haven't needed to use it recently, but the venerable CON2PRT.EXE (from the NT4 ZeroAdmin Kit of 1999) still worked beautifully on Windows 7.
    CON2PRT: Lets the user disconnect all existing connections to Windows NT
    	 printers and connect to newly specified Windows NT printers.
    Usage: CON2PRT [ /? | /h | /f |
    		   [/c \\printserver\share | /cd \\printserver\share]+]
           /?  - displays usage.
           /h  - displays usage.
           /f  - deletes all existing printer connections.
           /c  - connects to \\printserver\share printer.
           /cd - connects to \\printserver\share printer and sets it as the default
           NOTE: /?, /h can only be the first parameter and if specified further
    	     interpretation of the command line is stopped.  /f can also only
    	     be the first parameter, however it doesn't stop further
    	     interpretation of the command line.  Any number of /c and /cd
    	     parameters can be specified however only the first /cd sets the
    	     printer specified as the default.
    Hint: Use --Net View \\printserver-- to determine available print shares.
    Here is something more about it.

    "The trouble with quotes on the internet is that you can never know if they are genuine."
    Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts