Status report of Defender – Powershell

Status report of Defender – Powershell

Today, I will present you with a script that will retrieve a list of servers from a specified OU in AD and display the status of individual protection options in Defender for them.

In the first step, we need to fetch the list of computers or servers. If we have this list in a file, we can use that list. However, I am retrieving the list of machines from AD.

The variable $ComputerList will contain all the hosts to be checked.

Now, I will present the code that checks each host from the list and queries for the AV status. I’ve also implemented a safeguard to ensure that inaccessible hosts are not visible in the final report.

Depending on the format in which we want to display the report, we can use the following command:

After executing the command, the result will be displayed in a separate window.

Komentarze

Nie ma jeszcze komentarzy. Może zaczniesz dyskusję?

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są oznaczone *