September 4th, 2016 by Charlie Russel and tagged $Profile, Map Drives, PowerShell
On my laptops, I have a different set of drive maps when I’m at home, or on the road. At home, I map to various local domain resources, but when I’m on the road, those resources aren’t available and I need to create “local” maps to versions that I can sync up to those domain […]
Posted in $Profile, PowerShell, Survival Guide | Comments Off on Testing for Location on a Laptop
September 4th, 2016 by Charlie Russel and tagged $Profile, Map Drives, net use, PowerShell v5, PSDrive
In my old drive mapping post, I was forced to do some fairly ugly stuff because I had to call the old net use command. Yech. Eventually, we got New-PSDrive, and that helped, but in PowerShell v5 (Windows 10’s version), we get New-SmbMapping and it actually works. (New-SmbMapping was added earlier, but there were issues. Those […]
Posted in $Profile, net commands, PowerShell, Survival Guide | 4 Comments »
January 3rd, 2012 by Charlie Russel and tagged $Profile, Map Drives, PowerShell
My standard environment expects to have several drive mappings wherever I’m logged in to my network. Even when I’m running on a computer that isn’t joined to the domain. To facilitate that, I have a simple “mapdrives.cmd” file that has the necessary net use commands in it to map them. Then my default PowerShell $profile […]
Posted in PowerShell | Comments Off on Mapping Drives