windows的VM或主機可以下
net use 或是 Get-SmbConnection
看有沒有關於連線到NAS storage的資訊.
================================================
對於linux VM或主機可以下
netstat -an | grep 2049 # NFS
netstat -an | grep 445 # CIFS (SMB)
================================================
PS C:\>Get-SmbConnection
ServerName ShareName UserName Credential Dialect NumOpens
---------- --------- -------- ---------- ------- --------
Contoso-FS1 VMS5 Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00 1
Contoso-FS1 VMS5 NT VIRTUAL MACHI... Contoso\Contoso-HV1$ 3.00 3
Contoso-FS VMS1 Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00 1
Contoso-FS VMS1 NT VIRTUAL MACHI... Contoso\Contoso-HV1$ 3.00 5
Contoso-SO VMS3 Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00 1
Contoso-SO VMS3 NT VIRTUAL MACHI... Contoso\Contoso-HV1$ 3.00 1
Contoso-SO VMS3 NT VIRTUAL MACHI... Contoso\Contoso-HV1$ 3.00 2
資料來源:
https://learn.microsoft.com/en-us/powershell/module/smbshare/get-smbconnection?view=windowsserver2025-ps
==================
PS C:\>Get-SmbConnection -ServerName Contoso-FS | Select-Object -Property *
ContinuouslyAvailable : True
Credential : Contoso\Contoso-HV1$
Dialect : 3.00
Encrypted : False
NumOpens : 1
ServerName : Contoso-FS
ShareName : VMS1
UserName : Contoso\Contoso-HV1$
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbConnection
CimInstanceProperties : {ContinuouslyAvailable, Credential, Dialect, Encrypted...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
ContinuouslyAvailable : True
Credential : Contoso\Contoso-HV1$
Dialect : 3.00
Encrypted : False
NumOpens : 5
ServerName : Contoso-FS
ShareName : VMS1
UserName : NT VIRTUAL MACHINE\F357A523-592B-4CA5-B61E-C06D5627E1C9
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbConnection
CimInstanceProperties : {ContinuouslyAvailable, Credential, Dialect, Encrypted...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
沒有留言:
張貼留言