Get Application Definitions from Files

Command: Get-DefendpointFileInformation

Description

Use Get-DefendpointFileInformation to return properties Endpoint Privilege Management for Windows can use as matching criteria for files and applications such as Publisher, ProductName, and FileName.

This cmdlet supports Common Parameters. For more information, see about_CommonParameters.

Syntax

Get-DefendpointFileInformation [-Path '/path/to/file'] [-Directory '/path/to/directory' [-Recurse]] [-FileType 'ApplicationType.$FileType'] [-COM]

Parameters

Parameter Type Description Required
Path String Define the path of the file to investigate. This parameter supports regular expressions (regex). This parameter can be piped. Yes, if Directory is not set.
Directory String

Define the directory containing multiple files to investigate.

To search all subfolders and files in the directories, include the -Recurse parameter.

Yes, if Path is not set.
Recurse Boolean Search all subfolders and files in the directories set in the -Directory parameter.
COM Boolean Returns registered COM objects stored on the local machine.
EncodeUnicodeChars Boolean Encode any unicode characters in strings within the object.
FileType String Define which file type to search for. Only one file type can be supplied for each command. See below for a list of possible file types.

File Types

Input String File Type
ActiveXControl Active X
BatchFile Batch File
COMClass COM Class
Content File Resource
ControlPanelApplet Control Panel
Executable Executable
InstallerPackage Installer Package
ManagementConsoleSnapin MMC Snap In
PowerShellScript PowerShell Script
RegistrySettings

Registry Settings

RemotePowerShellCommand Remote PowerShell Command
RemotePowerShellScript Remote PowerShell Script
Service Service
Unistaller Uninstaller
Url URL
WindowsScript Windows Script
WindowsStoreApplication AppX Package

Return Values

The command Get-DefendpointFileInformation returns a list of application definitions.

Get All Executables in a Specified Path and Reference the FileName of the First
$Executables = Get-DefendpointFileInformation –Path "C:\Program Files\Internet Explorer\*.exe"
$Executables.Item(0).FileName
Get All Application Files in a Specified Directory and Return Unique Publishers
$Files = Get-DefendpointFileInformation –Directory "C:\Program Files\Internet Explorer\"
$Files.Publisher
Get All Registered COM Objects
Get-DefendpointFileInformation –COM

Recursively Search for All Batch Files within a Directory

Get-DefendpointFileInformation -Directory "C:/Users/admin/Desktop" -FileType "BatchFile" -Recurse