Find Source of Windows Mapped Drives
-
Any idea if this will work via ScreenConnect CMD?
-
@gjacobse said in Find Source of Windows Mapped Drives:
Any idea if this will work via ScreenConnect CMD?
Does not.
-
@scottalanmiller said in Find Source of Windows Mapped Drives:
@gjacobse said in Find Source of Windows Mapped Drives:
Any idea if this will work via ScreenConnect CMD?
Does not.
does, but you won't see user data as the SC session is run under an admin account.
-
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller said in Find Source of Windows Mapped Drives:
@gjacobse said in Find Source of Windows Mapped Drives:
Any idea if this will work via ScreenConnect CMD?
Does not.
does, but you won't see user data as the SC session is run under an admin account.
It didn't run for me at all, threw an error. Did you wrap it in something?
-
@scottalanmiller said in Find Source of Windows Mapped Drives:
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller said in Find Source of Windows Mapped Drives:
@gjacobse said in Find Source of Windows Mapped Drives:
Any idea if this will work via ScreenConnect CMD?
Does not.
does, but you won't see user data as the SC session is run under an admin account.
It didn't run for me at all, threw an error. Did you wrap it in something?
-
@scottalanmiller Again, this does you likely no good, as the admin session likely has nothing mapped in the first place. but it does run as it should.
-
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller Again, this does you likely no good, as the admin session likely has nothing mapped in the first place. but it does run as it should.
I don't see where you ran this..
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }
-
@scottalanmiller said in Find Source of Windows Mapped Drives:
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller Again, this does you likely no good, as the admin session likely has nothing mapped in the first place. but it does run as it should.
I don't see where you ran this..
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }
bottom of the second screen shot..
I copied it right from this thread and ran it.
First without the foreach and then the full command.
-
sequence:
net use
to show nothing mapped.net use s: \\fsldc02\software
to map an S drivenet use
to show mapping.Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4"
with the approriate #!ps prefix for ScreenConnectGet-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }
with the approriate #!ps prefix.
-
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller Again, this does you likely no good, as the admin session likely has nothing mapped in the first place. but it does run as it should.
@JaredBusch and @scottalanmiller and this is where my original comment came in about admin account. Most RMM tools run under elevated privileges and, therefore, return no data as they're not running under the user context. One could, however, likely do a "Start-Process powershell.exe -Credential "domain\user"" before the wmic command but it gets awfully complicated at that point.
-
@manxam said in Find Source of Windows Mapped Drives:
@jaredbusch said in Find Source of Windows Mapped Drives:
@scottalanmiller Again, this does you likely no good, as the admin session likely has nothing mapped in the first place. but it does run as it should.
@JaredBusch and @scottalanmiller and this is where my original comment came in about admin account. Most RMM tools run under elevated privileges and, therefore, return no data as they're not running under the user context. One could, however, likely do a "Start-Process powershell.exe -Credential "domain\user"" before the wmic command but it gets awfully complicated at that point.
Yes, you are right, but I was just correcting the statement that it would not run from ScreenConnect.
-
@jaredbusch, totally understood. I wasn't claiming otherwise. I just wanted to vocalize it for others who jump into the thread.
Thanks for the verification. -
@jaredbusch said in Find Source of Windows Mapped Drives:
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }
with the approriate #!ps prefix.
I've not used that before. I use @powershell and that normally works but did not work here.
-
@scottalanmiller said in Find Source of Windows Mapped Drives:
@jaredbusch said in Find Source of Windows Mapped Drives:
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }
with the approriate #!ps prefix.
I've not used that before. I use @powershell and that normally works but did not work here.
That is the proper way to run powershell from ScreenConnect.
So what you were doing was launch powershell from a command prompt session.
Doing
@powershell
, you probably need to handle escaping quotes or something is all. -
@jaredbusch said in Find Source of Windows Mapped Drives:
Doing
@powershell
, you probably need to handle escaping quotes or something is all.Likely
-
@scottalanmiller said in Find Source of Windows Mapped Drives:
@jaredbusch said in Find Source of Windows Mapped Drives:
Doing
@powershell
, you probably need to handle escaping quotes or something is all.Likely