

If you do not have SCCM and need a report, you can use the -OutputFile to have it write the results to a text file at the specified location defined in the $TextFileLocation parameter. If a system had mapped drives, then there will be a mapped drives field, otherwise it does not exist.Right-click on a machine in the Assets and Compliance->Devices.In order to view the data in SCCM, you can do the following using the Resource Explorer: I have also included a hardware inventory within the script so the data will be reported back to SCCM right after the script is executed.
LIST MAPPED DRIVES COMMAND LINE HOW TO
Example in the documentation portion of the script, you will see two examples on how to execute the script. More users are online at that time here than any of the other days. I have the package setup to re-run once a week at 12:00 pm on Wednesdays so that I can get the most users to report back. To get the systems to report the data back to SCCM, you will need to setup a package, not an application, in SCCM to deploy out to the systems. Try typing net use U: and see what info it gives you. You have now added the WMI class to SCCM for it to grab the data from the PCs and report it back to SCCM. You need to make sure that the drive is mapped under the user which is running the command prompt. Run it using the following command line: powershell.exe -file MappedDriveReport.ps1 -SCCMReporting The first thing is to execute the script locally on any PC.

This script will use WMI to report that data to SCCM. any suggestions C:Documents and Settingsuser>psexec c:computers.txt -u domainadministrator net use > c:results. My psexec command is working only for my local machine. First, SCCM needs to know what to look for in order to report on it. Use PSEXEC to Get Users Mapped Drives I would like to use PSEXEC to get the already mapped drives from a list of computers in my domain. If you are wanting this to write the results to SCCM, here is what you need to do. That just leaves the $OutputFile and $SCCMReporting left to specify at the command line. I recommend pre-populating the values of the $TextFileLocation and $UNCPathExclusionsFile parameters within the script. It contains a list of UNC paths that you do not want the script to report. I have also included a UNCPathExclusionsFile parameter that allows you to create a text file that resides in the same directory as the script. It has been written so that you can either have the script write the report to a text file if you do not have SCCM and/or it can write it to WMI so that SCCM can read the results. This is done by parsing through the HKU registries. (where ***computer name**** denotes the actual name of your computer and ***folder location***denotes the location after the C:\ found in Step 1 above, such as Users\Your_Name\Dropbox\LandFX\).ĭon't know your computer name? Here's how to find it.This script will scan all user profiles on a machine and report users with mapped drives.
LIST MAPPED DRIVES COMMAND LINE WINDOWS
Follow our steps to open the Windows Command Prompt.ģ. If you followed Step 3 above, you'll be mapping the LandFX folder in your shared online location on Dropbox, SugarSync, Carbonite, etc.įor example, If your LandFX folder is in a folder on Dropbox named C:\Users\Your_Name\Dropbox\LandFX\, you would use that location.Ģ. Locate the folder you want to assign to a letter drive. In most cases, you can just follow our simpler steps to map a letter drive.ġ. To get mapped network drives on a remote computer using the CIM method, use the below command Get-CimInstance -ClassName Win32MappedLogicalDisk ComputerName RemoteComputer Select SystemName, DeviceID, ProviderName In the above command, it gets mapped network drive on the remote computer specified by the ComputerName parameter. These steps will show you how to map a letter drive to your office's LandFX folder using the alternative Command Line function.
