If you need to create a new network drive and need to include credentials:
$cred = Get-Credential -Credential USERNAME
New-PSDrive -Name "J" -Root "\\10.8.0.6\custom" -Persist -PSProvider "FileSystem" -Credential $cred
If you need to remove a mapped network drive:
#Get a list of all the mapped drives (verify)
Get-PSDrive -PSProvider "FileSystem"
#Remove mapped drive by drive letter:
Remove-PSDrive -Name J
#Remove multiple mapped drives by drive letters:
Get-PSDrive J, K | Remove-PSDrive
As I web site possessor I believe the content matter here is rattling magnificent , appreciate it for your hard work. You should keep it up forever! Good Luck.