Category filter

Script to find a File on Windows devices

Searching for specific files on a device can be tedious and time consuming for users. If searching for and finding files are made easy, managing data becomes easier. Hexnode lets admins find files on devices with specific extensions using scripts .

Note:


Supported Versions:

The scripts given below will be supported on the following versions:

  • Windows 10 v1607+ (Pro, Enterprise, Education)
  • Windows 11 (Pro, Enterprise, Education)


Disclaimer:

The sample scripts provided below are adapted from third-party open-source sites.

Find files using Batch script

Batch script to find files on a Windows device executed successfully from Hexnode.

Provide the filename with extension and the directory path where you want to search for the file in the placeholders “set FileName” and “set SearchDir”.

Find files using PowerShell script

PowerShell script to find files on a Windows device executed successfully from Hexnode.

Provide the filename with extension and the directory path where you want to search for the file in the placeholders “$FileName” and “$SearchDir”.

How to View Script Output in Hexnode

To review the execution results, navigate to the Action History tab of the specific device in your Hexnode UEM portal. Locate the script entry in the Subject column and click the Show Output button next to the status field to view the returned data.

Notes:

  • The latest version of the Hexnode Agent app should be installed on the device.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

Sample Script Repository