NET USE 命令用法

net use 列出本機網絡鏈接 
 net use \\IP\ipc$ "密碼" /user:"賬號" 創建與指定IP的IPC$(空鏈接) 
net use z: \\IP\c$ "密碼" /user:"賬號" 將對方的c盤映射爲本身的z盤 
net use \\IP\ipc$ /del 刪除與指定IP的IPC$鏈接 
net use z: /del 刪除本機映射的z盤 
net use * /del 刪除本機全部映射和IPC$鏈接 
如提示:提供的憑據與已存在的憑據衝突, net use * /del 便可 

Net use 
將計算機鏈接到某個共享資源或與其斷開鏈接,或者顯示有關計算機鏈接的信息。該命令還控制永久性網絡鏈接。在沒有參數的狀況下使用,net use 能夠檢索網絡鏈接列表。 

語法 
net use [{DeviceName | *}] [{\\ComputerName[\ShareName[\Volume]]] |[ [url]http://ComputerName/ShareName[/url][/Folder]}] [{Password | *}]] [/userscreen.width-300)this.width=screen.width-300'>DomainName\]UserName] [/userscreen.width-300)this.width=screen.width-300'>DottedDomainName\]UserName] [/userscreen.width-300)this.width=screen.width-300'>UserName@DottedDomainName] [/savecred] [/smartcard] [{/delete | /persistent:{yes | no}}] 

net use [DeviceName [/home[{Password | *}] [/delete:{yes | no}]] 

net use [/persistent:{yes | no}] 

參數 
DeviceName 

指派名稱以鏈接到資源,或指定要斷開鏈接的設備。有兩種類型的設備名稱:磁盤驅動器(即 D: 到 Z:)和打印機(即 LPT1: 到 LPT3:)。鍵入星號 (*) 代替指定的設備名稱來指派下一個可用的設備名稱。 

\\ComputerName\ShareName 

指定服務器和共享資源的名稱。若是 ComputerName 包含空格,請使用引號將整個計算機名引發來,從 \\ 開始到計算機名的末尾(如 "\\Computer Name\Share Name")。計算機名能夠有 1 到 15 個字符。若是省略了 \ShareName,便會嘗試鏈接到 ipc$ 共享。 
\Volume 

指定服務器上的 NetWare 卷。必須安裝並運行「NetWare 客戶端服務」以鏈接到 NetWare 服務器。 

[url]http://ComputerName/ShareName[/url][/Volume] 

指定 WebDAV 服務器和共享資源的名稱。若是 ComputerName 包含空格,請使用引號將整個計算機名引發,即從 http 前綴 ( http://) 到計算機名的末尾。 

Password 

指定訪問共享資源所需的密碼。鍵入星號 (*) 將給出密碼的提示。在密碼提示符下鍵入密碼時不顯示密碼。 

/user 

指定用其創建鏈接的其餘用戶名。該參數不可與 /savecred 配合使用。 

DomainName 

指定其餘的域。若是忽略 DomainName,則 net use 將使用當前登陸到的域。 

UserName 

指定登陸時使用的用戶名。 

DottedDomainName 

爲用戶賬戶所在的域指定徹底合格的域名。
/savecred 

若是系統提示用戶輸入密碼,請存儲提供的憑據以便再使用。該參數不可與 /smartcard 或 /user 配合使用。 

/smartcard 

指定網絡鏈接要使用智能卡上的憑據。若是多個智能卡可用,則將要求您指定憑據。該參數不可與 /savecred 配合使用。 

/delete 

取消指定的網絡鏈接。若是用星號 (*) 指定鏈接,則將取消全部網絡鏈接。 

/persistent:{yes | no} 

控制永久性網絡鏈接的使用。默認值是最近一次所用的設置。無設備的鏈接不是永久性鏈接。Yes 將在鏈接完成後保存全部鏈接,並在下一次登陸時恢復這些鏈接。No 不保存正在進行的鏈接或後續鏈接。現有的鏈接將在下次登陸時恢復。使用 /delete 能夠刪除永久性鏈接。 

/home 

將用戶鏈接到主目錄。 

net helpCommand 

顯示指定 net 命令的幫助。 

註釋 
? 使用 net use 能夠鏈接到網絡資源以及從中斷開鏈接,並查看當前與網絡資源的鏈接。若是將共享目錄用做當前驅動器,或者某個活動進程正在使用共享目錄,則沒法從共享目錄中斷開鏈接。 

? 要查看關於某個鏈接的信息,能夠執行下列任何一種操做: 

? 鍵入 net useDeviceName 以得到有關某個特定鏈接的信息。 

? 鍵入 net use 以得到全部計算機鏈接的列表。 


? 無設備的鏈接不是永久性鏈接。 

? 在安裝並運行「Netware 客戶服務」後,則能夠鏈接到 Novell 網絡上的 Netware 服務器。使用鏈接到 Windows Networking 服務器時所用的相同語法,可是必須包括要鏈接的卷。 

? 若是提供的 ServerName 包含空格,請在文本兩邊使用引號(即 "Server Name")。若是忽略引號,將出現錯誤消息。 


示例 
要將磁盤驅動器設備名 E: 分配到\\Financial 服務器上的 Letters 共享的目錄,請鍵入: 

net use e:\\financial\letters 

要將磁盤驅動器設備名稱 M: 分配到(映射到)\\Financial NetWare 服務器上 Letters 卷內的目錄 Mike,請鍵入: 

net use m:\\financial\letters\mike 

要鏈接用戶標識符 Dan,並使該鏈接看似從「Accounts」域中完成,請鍵入: 

net use d:\\server\share /user:Accounts\Dan 

要使用 Passport 賬戶 [email]UserName@passport.com[/email] 將磁盤驅動器設備名 F: 分配到名爲 TargetName 的 MSN Internet 訪問社區中的文件包,請鍵入: 

net use f: [url]http://www.msnusers.com/TargetName[/url] /user:UserName@passport.com 

要從 \\Financial\Public 目錄斷開鏈接,請鍵入: 

net use f:\\financial\public /delete 

要鏈接到在 \\Financial 2 服務器上共享的資源備忘錄,請鍵入: 

net use k:"\\financial 2" \memos 

要在每次登陸時恢復當前鏈接而不考慮之後的變化,請鍵入: 

net use /persistent:yes 

 

命令net use用法 (二)

net use

與一個網絡共享鏈接或斷開鏈接.不加參數則顯示當前網絡映射.

語法:

net use <device name> or * \\<computer name>\<share name>[password or *] [/user:[domain\user] /delete or [persistent:[yes or no]]
net use <device name> /home /delete or /persistent:[yes or no]

選項:

<device name> 要映射的設備名.用 * 表明下一個可用的設備名
\\computer name 控制資源的計算機名
\sharename 共享名
\volume NetWare server上的卷名
password 映射的密碼
* 輸入密碼的提示
/user:<domain>\<user> 指定用戶以何種身份登陸
/home 鏈接進入用戶主目錄
/delete 關閉連線
/persistent:[yes or no> 設置用戶下一次登陸是時是否從新連入
dffd /user:<domain>\<user> 指定用戶以何種身份登陸  /home 鏈接進入用戶主目錄  /delete 關閉連線  /persistent:[yes or no> 設置用戶下一次登陸是時是否從新連入
相關文章
相關標籤/搜索