Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct parameter position for WScript.MapNetworkDrive

Status
Not open for further replies.

DTracy

Programmer
Feb 20, 2002
844
US
I'm looking for the correct parameter positions for this call. Especially the persistent, username, and password positions.

$( New-Object -ComObject WScript.Network).MapNetworkDrive( "K:", "\\server\share", $True, "username", "passwword" )

Using the above syntax the drive will map but requests a username and password when accessed. I'm thinking the parameter positions are wrong, can't find it on the net.

Thanks,

David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top