다음을 통해 공유


Set-AzureVMMicrosoftAntimalwareExtension

가상 머신에 대한 Microsoft 맬웨어 방지 확장을 구성합니다.

참고

이 설명서에서 참조하는 cmdlet은 Service Management API를 사용하는 레거시 Azure 리소스를 관리하기 위한 것입니다. Azure Resource Manager 리소스를 관리하는 cmdlet은 Az PowerShell 모듈을 참조하세요.

Syntax

Set-AzureVMMicrosoftAntimalwareExtension
   [-AntimalwareConfigFile] <String>
   [[-Version] <String>]
   [[-Monitoring] <String>]
   [[-StorageContext] <AzureStorageContext>]
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureVMMicrosoftAntimalwareExtension
   [-AntimalwareConfiguration] <String>
   [[-Version] <String>]
   [[-Monitoring] <String>]
   [[-StorageContext] <AzureStorageContext>]
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureVMMicrosoftAntimalwareExtension
   [[-Version] <String>]
   [-Disable]
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureVMMicrosoftAntimalwareExtension
   [-Uninstall]
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]
Set-AzureVMMicrosoftAntimalwareExtension
   [-Monitoring] <String>
   [[-StorageContext] <AzureStorageContext>]
   [-NoConfig]
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

Set-AzureVMMicrosoftAntimalwareExtension cmdlet은 가상 머신에 대한 Microsoft 맬웨어 방지 확장을 구성합니다. 확장을 사용하거나 사용하지 않도록 설정하거나 제거할 수 있습니다.

예제

예제 1: 구성 파일을 사용하여 확장 사용

PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile 'C:\configuration\contosoVM.json' | Update-AzureVM

이 명령은 구성 파일을 사용하여 Microsoft 맬웨어 방지 확장을 사용하도록 설정합니다. 이 명령은 Get-AzureVM cmdlet을 사용하여 지정된 가상 머신 개체를 가져온 다음 파이프라인 연산자를 사용하여 개체를 현재 cmdlet에 전달합니다.

예제 2: 확장을 사용하도록 설정하고 모니터링 사용

PS C:\> $StorageContext = New-AzureStorageContext -StorageAccountName "contosostoragemain" -StorageAccountKey (Get-AzureStorageKey -StorageAccountName "Contosostoragemain").PrimaryP
S C:\> Get-AzureVM -ServiceName "ContosoService03" -Name"ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfigFile 'C:\configuration\contosoVM.json" -Monitoring ON -StorageContext $StorageContext | Update-AzureVM

첫 번째 명령은 New-AzureStorageContext cmdlet을 사용하여 AzureStorageContext 개체를 만든 다음 $StorageContext 변수에 저장합니다.

예제 3: 구성 개체를 지정하여 확장 사용

PS C:\> $Config_String = [IO.File]::ReadAllText('C:\configuration\contosoVM.json')
PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -AntimalwareConfiguration $Config_String | Update-AzureVM

첫 번째 명령은 Microsoft 맬웨어 방지 확장에 대한 JSON 구성을 읽은 다음 $config_string 변수에 저장하여 문자열 개체를 만듭니다.

예제 4: 확장 사용 안 함

PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name "ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -Disable | Update-AzureVM

이 명령은 확장을 제거하지 않고 사용하지 않도록 설정합니다. 이 명령은 Get-AzureVM을 사용하여 지정된 가상 머신 개체를 가져온 다음 개체를 현재 cmdlet에 전달합니다.

예제 5: 확장 제거

PS C:\> Get-AzureVM -ServiceName "ContosoService03" -Name"ContosoVM22" | Set-AzureVMMicrosoftAntimalwareExtension -Uninstall | Update-AzureVM

이 명령은 가상 머신에서 Microsoft 맬웨어 방지 확장을 제거합니다. 이 명령은 Get-AzureVM을 사용하여 지정된 가상 머신 개체를 가져온 다음 개체를 현재 cmdlet에 전달합니다.

매개 변수

-AntimalwareConfigFile

Microsoft 맬웨어 방지 구성 파일의 절대 경로를 지정합니다. AntimalwareConfiguration 매개 변수를 지정하는 경우 이 매개 변수를 지정하지 마세요. 구성 파일에는 Microsoft 맬웨어 방지 확장을 사용하도록 설정하려면 최소한 다음 콘텐츠가 포함되어야 합니다.

{ "AntimalwareEnabled": true }

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-AntimalwareConfiguration

Microsoft 맬웨어 방지 구성을 포함하는 문자열 개체를 지정합니다. 이 개체는 $Null 비어 있지 않아야 합니다. AntimalwareConfigFile 매개 변수를 지정하는 경우 이 매개 변수를 지정하지 마세요. Microsoft 맬웨어 방지 확장을 사용하도록 설정하려면 구성 개체에 최소한 다음 콘텐츠가 포함되어야 합니다. ****{ "AntimalwareEnabled": true }

Microsoft 맬웨어 방지 JSON 구성 샘플:

{ "AntimalwareEnabled": true, "RealtimeProtectionEnabled": true, "ScheduledScanSettings": { "isEnabled": true, "day": 1, "time": 120, "scanType": "Full" },

"제외": { "Extensions": ".ext1;. ext2", "Paths": "c:\excluded-path-1;c:\excluded-path-2", "Processes": "excludedproc1.exe;excludedproc2.exe" }

}

참고: AntimalwareEnabled는 필수 매개 변수입니다. 값: true= 사용. false= false로 오류가 발생해도 지원되는 값이 아닙니다.

RealtimeProtectionEnabled: true/false입니다. true = 사용. false = 사용 안 함 기본값은 true입니다.

ScheduledScanSettings:
isEnabled=true/false day=0-8(0-daily, 1-Sunday, 2-Monday, ...., 7-Saturday, 8-Disabled) time=0-1440(자정 이후 분 단위로 측정 - 60-1AM>, 120 -> 2AM, ... ) scanType="Quick" 또는 "Full"(기본값은 빠른) 참고: isEnabled=true가 제공된 유일한 설정인 경우 다음 기본값은 day=7(토요일), time=120(오전 2시), scanType="빠른 제외입니다. 세미콜론 구분 기호를 사용하여 동일한 목록의 여러 제외를 지정합니다.

제외를 지정하지 않으면 기존 제외(있는 경우)가 시스템에서 공백으로 덮어씁니다.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Disable

cmdlet이 Microsoft 맬웨어 방지 확장을 사용하지 않도록 설정함을 나타냅니다. 동일한 가상 머신에서 확장을 다시 사용하도록 설정하려면 Disable 매개 변수 없이 Set-AzureVMMicrosoftAntimalwareExtension을 실행합니다.

Type:SwitchParameter
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-InformationAction

이 cmdlet이 정보 이벤트에 응답하는 방법을 지정합니다.

이 매개 변수에 허용되는 값은 다음과 같습니다.

  • 계속
  • 무시
  • 문의
  • SilentlyContinue
  • Stop
  • 일시 중단
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

정보 변수를 지정합니다.

Type:String
Aliases:iv
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Monitoring

Microsoft 맬웨어 방지 이벤트를 수집할지 여부를 지정합니다.

이 매개 변수에 허용되는 값은 다음과 같습니다.

  • 에. 스토리지 컨텍스트에 Microsoft 맬웨어 방지 이벤트를 수집합니다.
  • 꺼져 있습니다. Microsoft 맬웨어 방지 이벤트를 수집하지 마세요.
Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NoConfig

이 cmdlet이 NoConfig 옵션을 지정한다는 것을 나타냅니다.

Type:SwitchParameter
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Profile

이 cmdlet이 읽는 Azure 프로필을 지정합니다. 프로필을 지정하지 않으면 이 cmdlet은 로컬 기본 프로필에서 읽습니다.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageContext

Microsoft 맬웨어 방지 모니터링에 대한 Azure Storage 컨텍스트를 지정합니다.

Type:AzureStorageContext
Position:4
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Uninstall

이 cmdlet이 가상 머신에서 Microsoft 맬웨어 방지 확장을 제거했음을 나타냅니다. 모니터링이 켜져 있으면 cmdlet은 Microsoft 맬웨어 방지 이벤트 컬렉션도 제거합니다.

Type:SwitchParameter
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Version

확장 버전을 문자열로 지정합니다. 참고: 지원되는 버전은 1.5입니다. 이전 버전은 Microsoft에서 지원되지 않습니다.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VM

가상 머신을 IPersistentVM 개체로 지정합니다.

Type:IPersistentVM
Aliases:InputObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False