Get-AppLockerFileInformation
업데이트 날짜: 2015년 7월
적용 대상: Windows 10, Windows 10 Technical Preview
Get-AppLockerFileInformation
Gets the file information necessary to create AppLocker rules from a list of files or an event log.
구문
Parameter Set: ByFilePath
Get-AppLockerFileInformation [[-Path] <List<String>> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [ <CommonParameters>]
Parameter Set: ByAppx
Get-AppLockerFileInformation [[-Packages] <List<AppxPackage>> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [ <CommonParameters>]
Parameter Set: ByDirectory
Get-AppLockerFileInformation -Directory <String> [-FileType List<{Exe | Dll | WindowsInstaller | Script | Appx}> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-Recurse] [ <CommonParameters>]
Parameter Set: ByEventLog
Get-AppLockerFileInformation -EventLog [-EventType <List<AppLockerEventType>> ] [-InformationAction <System.Management.Automation.ActionPreference> {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend} ] [-InformationVariable <System.String> ] [-LogPath <String> ] [-Statistics] [ <CommonParameters>]
자세한 설명
The Get-AppLockerFileInformation cmdlet gets the AppLocker file information from a list of files or an event log. File information includes the publisher information, file hash, and file path.
The file information from an event log may not contain all of the publisher information, file hash, and file path fields. Files that are not signed will not have any publisher information.
매개 변수
-Directory<String>
Specifies the directory that contains the files for which to get the file information. If all subfolders and files in the specified directory are to be searched, then include the Recurse parameter
별칭 |
none |
필수 여부 |
true |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-EventLog
Specifies that the file information is retrieved from the event log.
별칭 |
none |
필수 여부 |
true |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-EventType<List<AppLockerEventType>>
Specifies the event type by which to filter the events. 이 매개 변수에 허용되는 값은 다음과 같습니다. Allowed, Denied, or Audited. The event types correspond to the Informational, Error, and Warning level events in the AppLocker event logs.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-FileType<List<AppLockerFileType>>
Specifies the generic file type for which to search. All files having the appropriate file name extension will be included.
이 매개 변수에 허용되는 값은 다음과 같습니다.
-- Exe
-- Dll
-- WindowsInstaller
-- Script
-- Appx.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-InformationAction<System.Management.Automation.ActionPreference>
Specifies how this cmdlet responds to an information event. 이 매개 변수에 허용되는 값은 다음과 같습니다.
-- SilentlyContinue
-- Stop
-- Continue
-- Inquire
-- Ignore
-- Suspend
별칭 |
infa |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-InformationVariable<System.String>
Specifies a variable in which to store an information event message.
별칭 |
iv |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-LogPath<String>
Specifies the log name or file path of the event log where the AppLocker events are located. By default, if this parameter is not specified, the local Microsoft-Windows-AppLocker/EXE and DLL channel is used.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Packages<List<AppxPackage>>
Specifies a list of installed packaged applications, from which the file information is retrieved.
별칭 |
none |
필수 여부 |
false |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
true (ByValue, ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Path<List<String>>
Specifies a list of paths to the files from which the file information is retrieved. Supports regular expressions.
별칭 |
none |
필수 여부 |
false |
위치 |
1 |
기본값 |
none |
파이프라인 입력 허용 여부 |
true (ByValue, ByPropertyName) |
와일드카드 문자 허용 여부 |
false |
-Recurse
Specifies that all files and folders in the specified directory will be searched.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
-Statistics
Specifies the statistics to retrieve on the files included in the event log. Calculates a simple sum of the number of times a file is included in the event log based on specified parameters.
별칭 |
none |
필수 여부 |
false |
위치 |
named |
기본값 |
none |
파이프라인 입력 허용 여부 |
false |
와일드카드 문자 허용 여부 |
false |
<CommonParameters>
이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216)
입력
입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.
- None
출력
출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.
- Microsoft.Security.ApplicationId.PolicyManagement.PolicyModel.FileInformation
- System.String
예
EXAMPLE 1
This example gets the file information for all the .exe files and scripts under %windir%\system32.
PS C:\> Get-AppLockerFileInformation -Directory C:\Windows\system32\ -Recurse -FileType exe, script
EXAMPLE 2
This example gets the file information for the file specified by the path.
PS C:\> Get-AppLockerFileInformation -Path "C:\Program Files (x86)\Internet Explorer\iexplore.exe" | Format-List
PS C:\> Get-AppLockerFileInformation -Path "C:\Program Files\Internet Explorer\iexplore.exe" | Format-List
EXAMPLE 3
This example outputs the file information for all the packaged applications installed on this computer for all users.
PS C:\> Get-AppXPackage –AllUsers | Get-AppLockerFileInformation
EXAMPLE 4
This example outputs the file information for all the Audited events in the local event log. Audited events correspond to the Warning event in the AppLocker audit log.
PS C:\> Get-AppLockerFileInformation -EventLog -EventType Audited
EXAMPLE 5
This example displays statistics for all the Allowed events in the local event log. For each file in the event log, the cmdlet will sum the number of times the event type occurred.
PS C:\> Get-AppLockerFileInformation -EventLog -EventType Allow -Statistics
EXAMPLE 6
This example creates a new AppLocker policy from the warning events in the local event log and sets the policy of a test Group Policy Object (GPO).
PS C:\> Get-AppLockerFileInformation -EventLog -EventType Audited | New-AppLockerPolicy -RuleType Publisher, Hash, Path -User Everyone -Optimize | Set-AppLockerPolicy -LDAP LDAP://TestGPO