Вики IT-KB

Пошаговые руководства, шпаргалки, полезные ссылки...

Инструменты пользователя

Инструменты сайта


symantec:symantec-endpoint-protection-manager-14-how-to-find-groups-policy-inheritance-false

Это старая версия документа!


Symantec Endpoint Protection Manager - Как получить список групп с отключенным наследованием политик

Чтобы быстро получить перечень всех групп, на которых отключено наследование политик, можно выполнить запрос к RestAPI с помощью Powershell:

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $True }
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$restAPI = 'https://Server-SEPM.holding.com:8446/sepm/api/v1'
 
$cred= @{
    username = "login"
    password = "pass"
    domain = ""
}
 
#converts $cred array to json to send to the SEPM
$auth = $cred | ConvertTo-Json
 
$Authent = Invoke-RestMethod -Uri "$restAPI/identity/authenticate" `
                             -Method Post -Body $auth `
                             -ContentType 'application/json'
 
$access_token = $Authent.Token
$groups=Invoke-RestMethod -Method get -Uri "$restAPI/groups?pageSize=10000" `
                          -ContentType "application/json" `
                          -Headers @{Authorization='Bearer ' + $access_token}
 
$groups.content | Where-Object { $_.policyInheritanceEnabled -ne $true }| `
                  Select fullPathName,policyInheritanceEnabled

Для корректной работы скрипта требуется Powershell 5 или старше.


Проверено на следующих конфигурациях:

Версия SEPM
Symantec Endpoint Protection Manager 14.3 RU1 (14.3.3385.1000)

Автор первичной редакции:
Виталий Якоб
Время публикации: 03.03.2021 13:45

Обсуждение

Ваш комментарий:
 
symantec/symantec-endpoint-protection-manager-14-how-to-find-groups-policy-inheritance-false.1614769081.txt.gz · Последнее изменение: 03.03.2021 13:58 — Виталий Якоб

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki