Get Application Definitions from Files: Get-DefendpointFileInformation

Get-DefendpointFileInformation gets properties of one or more applications or files. The properties returned include those Privilege Management for Windows can use as matching criteria for files and applications, such as Publisher, ProductName, and FileName. This information can be used to construct Privilege Management for Windows settings.

Overview

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

The Get-DefendpointFileInformation cmdlet retrieves properties of a file or list of files. This information can then be used to construct Privilege Management settings.

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

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 specified by 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
Get-DefendpointFileInformation returns a list of application definitions.
Get All Executables in a Specified Eath 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