How to run a AD query to detect what users are using a network share? Trying to decommission an old NAS.


how run ad query detect users using network share?   trying decommission old nas.

dsk

unfortunately cannot query ad know if user uses network shares. there many ways map network drives (login script, gpp, manual map & homedirectory in user profile, etc ...)

you query ad homedirectory, or try query gpo, not return manual mapped drive or login script mapped drive.

anyway, there many way answer problem. use
1) psexec,
2) login script "net use >> \\server\share\%username%-map.txt" create text file, in share folder, , list network drives used users

3) powershell solution:

$computer = "computer1","computer2","computer3" $computer | % { 	if (test-connection $_) { get-wmiobject -class "win32_share" -namespace "root\cimv2" -computername $_ } else {write-host "$($_) not accessible" } }

hope helps


cyreli





Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2