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

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL

Como saber quien entro a mi PC por la Red