Add-NetworkLocation -networkLocationPath "$env:APPDATA\Microsoft\Windows\Network Shortcuts" -networkLocationName "Network Location" -networkLocationTarget "\\server\share" -Verbose
 Creates a network location shortcut using the specified path, name and target.

Replicates the behaviour of the 'Add Network Location' wizard, creating a folder with the 'System' attribute set and populating the 'desktop.ini' and 'target.lnk' correctly. This causes it to appear in 'Save' or 'Open' dialogues in the same way a mapped drive does, except of course without assigning a letter.

Might be useful if want to script the creation of Network Locations instead of using mapped drives, for example.