{"id":388710,"date":"2024-12-06T11:51:13","date_gmt":"2024-12-06T11:51:13","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=388710"},"modified":"2024-12-06T11:51:13","modified_gmt":"2024-12-06T11:51:13","slug":"ermittlung-der-installierten-antiviren-software","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/de\/script-hub\/ermittlung-der-installierten-antiviren-software\/","title":{"rendered":"Wie man das installierte Antivirusprogramm unter Windows mit PowerShell entdeckt"},"content":{"rendered":"<p>F\u00fcr die Aufrechterhaltung einer sicheren IT-Umgebung ist es von entscheidender Bedeutung, dass die <strong>Antiviren-Software<\/strong> ordnungsgem\u00e4\u00df installiert und auf dem neuesten Stand ist. Au\u00dferdem sollte sie aktiv ausgef\u00fchrt werden. IT-Experten und <a href=\"https:\/\/www.ninjaone.com\/de\/was-ist-ein-msp\" target=\"_blank\" rel=\"noopener\">Managed Service Provider (MSPs)<\/a> ben\u00f6tigen h\u00e4ufig zuverl\u00e4ssige Tools, um den Status von Antivirenl\u00f6sungen auf mehreren Systemen zu \u00fcberpr\u00fcfen. Dieses PowerShell-Skript bietet eine leistungsstarke, automatisierte L\u00f6sung zur Ermittlung der installierten Antiviren-Software, zum \u00dcberpr\u00fcfen ihrer Definitionen und ihres Status sowie zum Exportieren der Ergebnisse in benutzerdefinierte Felder zur weiteren Analyse.<\/p>\n<h2>Kontext<\/h2>\n<p>In der heutigen digitalen Welt erfordert die Verbreitung von <a href=\"https:\/\/www.ninjaone.com\/de\/blog\/haeufigste-arten-von-cyber-attacken\/\" target=\"_blank\" rel=\"noopener\">Cyber-Bedrohungen<\/a> einen robusten Virenschutz. IT-Abteilungen und MSPs m\u00fcssen den Status von Antivirenl\u00f6sungen st\u00e4ndig \u00fcberwachen und \u00fcberpr\u00fcfen, um sicherzustellen, dass sie einen angemessenen Schutz bieten. Dieses Skript befasst sich mit einer h\u00e4ufigen Herausforderung, und zwar mit der effizienten Ermittlung der auf einem System installierten Antiviren-Software, ihrer Version, des Alters ihrer Definitionen und der Frage, ob sie derzeit ausgef\u00fchrt wird. Durch die Automatisierung dieser Pr\u00fcfungen spart das Skript wertvolle Zeit und <a href=\"https:\/\/www.ninjaone.com\/de\/blog\/wie-menschliches-versagen-mit-cybersecurity-risiken-zusammenhaengt\" target=\"_blank\" rel=\"noopener\">verringert das Risiko menschlichen Versagens<\/a>.<\/p>\n<h2>Das Skript zur Ermittlung der installierten Antiviren-Software<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">#Requires -Version 4.0\r\n\r\n&lt;#\r\n.SYNOPSIS\r\n    This script will attempt to detect the installed antivirus (currently supports 11) and get the age of its definitions, version, and whether or not the antivirus is currently running. It can export the results to one or more custom fields. This script is a best effort and should be treated as such; we do recommend verifying any results.\r\n.DESCRIPTION\r\n    This script will attempt to detect the installed antivirus (currently supports 11) and get the age of its definitions, version, and whether or not the antivirus is currently running. \r\n    It can export the results to one or more custom fields. \r\n    This script is a best effort and should be treated as such; we do recommend verifying any results.\r\n    \r\n    AV List: BitDefender,Carbon Black,Crowdstrike,Cylance,ESET,Huntress,MalwareBytes,MDE,SentinelOne,Sophos,Vipre,Webroot\r\n\r\n.EXAMPLE\r\n    (No Parameters)\r\n    Desktop Windows Detected, Switching to WMI Method....\r\n\r\n    [Alert] The AV definitions are out of date!\r\n\r\n    Name             Installed Definitions UpToDate Running Service  Version    \r\n    ----             --------- ----------- -------- ------- -------  -------    \r\n    Sentinel Agent   Yes       2023\/05\/10      True Yes     Active   21.7.1219  \r\n    Windows Defender Yes       2023\/03\/31     False No      Inactive 4.18.2302.7\r\n\r\nPARAMETER: -ExcludeAV \"BitDefender\"\r\n    A comma separated list of AVs to exclude.\r\n.EXAMPLE\r\n    -ExcludeAV \"BitDefender\"\r\n\r\n    Name        Installed Version   Definitions UpToDate CurrentlyRunning HasRunningService\r\n    ----        --------- -------   ----------- -------- ---------------- -----------------\r\n    SentinelOne Yes       21.7.1219 2023\/04\/27      True Yes              Yes\r\n\r\nPARAMETER: -ExclusionsFromCustomField \"ReplaceWithTextCustomField\"\r\n    The name of a text custom field that contains your desired ExcludeAV comma separated list.\r\n    ex. \"ExcludedAVs\" where you have entered in your desired ExcludeAV list in the \"ExcludedAVs\" custom field rather than in a parameter.\r\n.EXAMPLE\r\n    -ExclusionsFromCustomField \"ExcludeAVs\"\r\n\r\n    Name        Installed Version   Definitions UpToDate CurrentlyRunning HasRunningService\r\n    ----        --------- -------   ----------- -------- ---------------- -----------------\r\n    SentinelOne Yes       21.7.1219 2023\/04\/27      True Yes              Yes\r\n\r\nPARAMETER: -OutOfDate \"7\"\r\n    Script will consider the AV to be out of date if the definitions are older than x days.\r\n.EXAMPLE\r\n    -OutOfDate \"1\"\r\n\r\n    Desktop Windows Detected, Switching to WMI Method....\r\n\r\n    [Alert] The AV definitions are out of date!\r\n\r\n    Name             Installed Definitions UpToDate Running Service  Version    \r\n    ----             --------- ----------- -------- ------- -------  -------    \r\n    Sentinel Agent   Yes       2023\/05\/10     False Yes     Active   21.7.1219  \r\n    Windows Defender Yes       2023\/03\/31     False No      Inactive 4.18.2302.7\r\n\r\n\r\nPARAMETER: -ShowNotFound\r\n    Script will show AV's it checked for but didn't find.\r\n.EXAMPLE\r\n    -ShowNotFound\r\n\r\n    Name             Installed Definitions UpToDate Running Service  Version    \r\n    ----             --------- ----------- -------- ------- -------  -------    \r\n    BitDefender      No                       False No      Inactive     \r\n    CarbonBlack      No                       False No      Inactive \r\n    ...\r\n\r\nPARAMETER: -ExportAll \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the resulting table into.\r\n.EXAMPLE\r\n    -ExportAll \"ReplaceWithNameOfAMultiLineCustomField\"\r\n\r\n    Name        Installed Version   Definitions UpToDate CurrentlyRunning HasRunningService\r\n    ----        --------- -------   ----------- -------- ---------------- -----------------\r\n    SentinelOne Yes       21.7.1219 2023\/04\/27      True Yes              Yes\r\n\r\nPARAMETER: -ExportDef \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the definitions column into.\r\n\r\nPARAMETER: -ExportDefStatus \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the UpToDate column into.\r\n\r\nPARAMETER: -ExportName \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the Name column into.\r\n\r\nPARAMETER: -ExportStatus \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the Running column into.\r\n\r\nPARAMETER: -ExportVersion \"ReplaceWithNameOfAMultiLineCustomField\"\r\n    The name of a multiline customfield you'd like to export the Version column into.\r\n.EXAMPLE\r\n    ExportOptions: -ExportAll, -ExportDef, -ExportDefStatus (Whether or not definitions are up to date), \r\n    -ExportName, -ExportStatus (Whether or not its running), -ExportVersion\r\n\r\n    -ExportAll \"ReplaceWithNameOfAMultiLineCustomField\" -DateFormat \"yyyy\/MM\/dd\"\r\n\r\n    [Alert] The AV definitions are out of date!\r\n\r\n    Name   Installed Definitions UpToDate Running Service Version                  \r\n    ----   --------- ----------- -------- ------- ------- -------                  \r\n    MDE    Yes       2023\/03\/02     False Yes     Active  4.18.2303.8              \r\n    Sophos Yes       2023\/04\/26      True Yes     Active  {2022.4.3.1 Legacy,      \r\n                                                      2.4.274.0}               \r\n\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10, Server 2012 R2\r\n    Release Notes: Initial Release\r\nBy using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at https:\/\/www.ninjaone.com\/terms-of-use.\r\n    Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. \r\n    Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. \r\n    Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. \r\n    Warranty Disclaimer: The script is provided \u201cas is\u201d and \u201cas available\u201d, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. \r\n    Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. \r\n    Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. \r\n    EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).\r\n#&gt;\r\n\r\n[CmdletBinding()]\r\nparam (\r\n    [Parameter()]\r\n    [String]$ExcludeAV,\r\n    [Parameter()]\r\n    [String]$ExclusionsFromCustomField,\r\n    [Parameter()]\r\n    [String]$ExportAll,\r\n    [Parameter()]\r\n    [String]$ExportDef,\r\n    [Parameter()]\r\n    [String]$ExportDefStatus,\r\n    [Parameter()]\r\n    [String]$ExportName,\r\n    [Parameter()]\r\n    [String]$ExportStatus,\r\n    [Parameter()]\r\n    [String]$ExportVersion,\r\n    [Parameter()]\r\n    [String]$OutOfDate = \"7\",\r\n    [Parameter()]\r\n    [Switch]$ShowNotFound = [System.Convert]::ToBoolean($env:showNotFound)\r\n)\r\nbegin {\r\n    Write-Host \"Supported AVs: BitDefender, Carbon Black, Crowdstrike, Cylance, ESET, Huntress, MalwareBytes, Windows Defender, SentinelOne, Sophos, Vipre and Webroot.\"\r\n\r\n    # Grabbing the script variables\r\n    if ($env:definitionsAgeLimitInDays -and $env:definitionsAgeLimitInDays -notlike \"null\") { $OutOfDate = $env:definitionsAgeLimitInDays }\r\n    if ($env:excludeAntivirusProduct -and $env:excludeAntivirusProduct -notlike \"null\") { $ExcludeAV = $env:excludeAntivirusProduct }\r\n    if ($env:retrieveExclusionFromCustomField -and $env:retrieveExclusionFromCustomField -notlike \"null\") { $ExclusionsFromCustomField = $env:retrieveExclusionFromCustomField }\r\n    if ($env:allResultsCustomFieldName -and $env:allResultsCustomFieldName -notlike \"null\") { $ExportAll = $env:allResultsCustomFieldName }\r\n    if ($env:definitionsDateCustomFieldName -and $env:definitionsDateCustomFieldName -notlike \"null\") { $ExportDef = $env:definitionsDateCustomFieldName }\r\n    if ($env:definitionStatusCustomFieldName -and $env:definitionStatusCustomFieldName -notlike \"null\" ) { $ExportDefStatus = $env:definitionStatusCustomFieldName }\r\n    if ($env:statusCustomFieldName -and $env:statusCustomFieldName -notlike \"null\") { $ExportStatus = $env:statusCustomFieldName }\r\n    if ($env:antivirusNameCustomFieldName -and $env:antivirusNameCustomFieldName -notlike \"null\") { $ExportName = $env:antivirusNameCustomFieldName }\r\n    if ($env:statusCustomFieldName -and $env:statusCustomFieldName -notlike \"null\") { $ExportStatus = $env:statusCustomFieldName }\r\n    if ($env:antivirusVersionCustomFieldName -and $env:antivirusVersionCustomFieldName -notlike \"null\") { $ExportVersion = $env:antivirusVersionCustomFieldName }\r\n\r\n    # This script should run with administrator or system permissions. \r\n    # Technically it'll work without these permissions, however some directories would be inaccessible which could lead to false negatives.\r\n    function Test-IsElevated {\r\n        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()\r\n        $p = New-Object System.Security.Principal.WindowsPrincipal($id)\r\n        $p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)\r\n    }\r\n\r\n    if (!(Test-IsElevated)) {\r\n        Write-Host \"[Error] Access Denied. Please run with Administrator privileges.\"\r\n        exit 1\r\n    }\r\n\r\n    function Test-IsWorkstation {\r\n        $OS = if ($PSVersionTable.PSVersion.Major -ge 5) {\r\n            Get-CimInstance -Class Win32_OperatingSystem\r\n        }\r\n        else {\r\n            Get-WmiObject -Class Win32_OperatingSystem\r\n        }\r\n\r\n        if ($OS.ProductType -eq \"1\") {\r\n            return $True\r\n        }\r\n    }\r\n\r\n    # This will go through the uninstall registry keys and look for the AV. On occasion, we don't want all the information so we have switch options for those cases.\r\n    function Find-UninstallKey {\r\n        [CmdletBinding()]\r\n        param (\r\n            [Parameter(ValueFromPipeline)]\r\n            [String]$DisplayName,\r\n            [Parameter()]\r\n            [Switch]$Version,\r\n            [Parameter()]\r\n            [Switch]$UninstallString,\r\n            [Parameter()]\r\n            [Switch]$InstallPath\r\n        )\r\n        process {\r\n            $UninstallList = New-Object System.Collections.Generic.List[Object]\r\n\r\n            $Result = Get-ChildItem HKLM:\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | Get-ItemProperty | \r\n                Where-Object { $_.DisplayName -like \"*$DisplayName*\" }\r\n\r\n            if ($Result) { $UninstallList.Add($Result) }\r\n\r\n            $Result = Get-ChildItem HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | Get-ItemProperty | \r\n                Where-Object { $_.DisplayName -like \"*$DisplayName*\" }\r\n\r\n            if ($Result) { $UninstallList.Add($Result) }\r\n\r\n            # Programs don't always have an uninstall string listed here, so to account for that, I made this optional.\r\n            if ($UninstallString) {\r\n                $UninstallList | ForEach-Object { $_ | Select-Object -ExpandProperty UninstallString -ErrorAction SilentlyContinue }\r\n            }\r\n\r\n            if ($Version) {\r\n                $UninstallList | ForEach-Object { ($_ | Select-Object -ExpandProperty DisplayVersion -ErrorAction SilentlyContinue) -replace '[^\\u0020-\\u007E\\u00A0-\\u00FF]', '' }\r\n            }\r\n\r\n            if ($InstallPath) {\r\n                $UninstallList | ForEach-Object { $_ | Select-Object -ExpandProperty InstallLocation -ErrorAction SilentlyContinue }\r\n            }\r\n\r\n            if (!$Version -and !$UninstallString -and !$InstallPath) {\r\n                $UninstallList\r\n            }\r\n        }\r\n    }\r\n\r\n    # This will find the last write time for a particular file. I made it a function in case I wanted to do something similar as the Uninstall-Key function.\r\n    function Find-Definitions {\r\n        [CmdletBinding()]\r\n        param(\r\n            [Parameter(ValueFromPipeline)]\r\n            [String]$Path\r\n        )\r\n        process {\r\n            Get-Item $Path -ErrorAction SilentlyContinue | Sort-Object LastWriteTime | Select-Object LastWriteTime -Last 1 | Get-Date\r\n        }\r\n    }\r\n\r\n    # This will search the typical directories programs are installed in.\r\n    function Find-Executable {\r\n        [CmdletBinding()]\r\n        param(\r\n            [Parameter(ValueFromPipeline)]\r\n            [String]$Path,\r\n            [Parameter()]\r\n            [Switch]$Special\r\n        )\r\n        process {\r\n            if (!$Special) {\r\n                if (Test-Path \"$env:ProgramFiles\\$Path\") {\r\n                    \"$env:ProgramFiles\\$Path\"\r\n                }\r\n        \r\n                if (Test-Path \"${Env:ProgramFiles(x86)}\\$Path\") {\r\n                    \"${Env:ProgramFiles(x86)}\\$Path\"\r\n                }\r\n    \r\n                if (Test-Path \"$env:ProgramData\\$Path\") {\r\n                    \"$env:ProgramData\\$Path\"\r\n                }\r\n            }\r\n            else {\r\n                if (Test-Path $Path) {\r\n                    $Path\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    # This will check the running processes for our AV.\r\n    function Find-Process {\r\n        [CmdletBinding()]\r\n        param(\r\n            [Parameter(ValueFromPipeline)]\r\n            [String]$Name\r\n        )\r\n        process {\r\n            Get-Process | Where-Object { $_.ProcessName -like \"*$Name*\" } | Select-Object -ExpandProperty Name\r\n        }\r\n    }\r\n\r\n    # This was moved outside the function so I don't overload WMI.\r\n    $ServiceList = if ($PSVersionTable.PSVersion.Major -ge 5) {\r\n        Get-CimInstance win32_service\r\n    }\r\n    else {\r\n        Get-WmiObject win32_service\r\n    }\r\n    \r\n    # Looks for a service based on the executable.\r\n    function Find-Service {\r\n        [CmdletBinding()]\r\n        param(\r\n            [Parameter(ValueFromPipeline)]\r\n            [String]$Name\r\n        )\r\n        process {\r\n            # Get-Service will display an error everytime it has an issue reading a service. Ignoring them as they're not relevant.\r\n            $ServiceList | Where-Object { $_.State -notlike \"Disabled\" -and $_.State -notlike \"Stopped\" } | \r\n                Where-Object { $_.PathName -Like \"*$Name.exe*\" }\r\n        }\r\n    }\r\n\r\n    function Set-NinjaProperty {\r\n        [CmdletBinding()]\r\n        Param(\r\n            [Parameter(Mandatory = $True)]\r\n            [String]$Name,\r\n            [Parameter()]\r\n            [String]$Type,\r\n            [Parameter(Mandatory = $True, ValueFromPipeline = $True)]\r\n            $Value,\r\n            [Parameter()]\r\n            [String]$DocumentName\r\n        )\r\n    \r\n        $Characters = $Value | Measure-Object -Character | Select-Object -ExpandProperty Characters\r\n        if ($Characters -ge 10000) {\r\n            throw [System.ArgumentOutOfRangeException]::New(\"Character limit exceeded, value is greater than 10,000 characters.\")\r\n        }\r\n        \r\n        # If we're requested to set the field value for a Ninja document we'll specify it here.\r\n        $DocumentationParams = @{}\r\n        if ($DocumentName) { $DocumentationParams[\"DocumentName\"] = $DocumentName }\r\n        \r\n        # This is a list of valid fields that can be set. If no type is given, it will be assumed that the input doesn't need to be changed.\r\n        $ValidFields = \"Attachment\", \"Checkbox\", \"Date\", \"Date or Date Time\", \"Decimal\", \"Dropdown\", \"Email\", \"Integer\", \"IP Address\", \"MultiLine\", \"MultiSelect\", \"Phone\", \"Secure\", \"Text\", \"Time\", \"URL\", \"WYSIWYG\"\r\n        if ($Type -and $ValidFields -notcontains $Type) { Write-Warning \"$Type is an invalid type! Please check here for valid types. https:\/\/ninjarmm.zendesk.com\/hc\/en-us\/articles\/16973443979789-Command-Line-Interface-CLI-Supported-Fields-and-Functionality\" }\r\n        \r\n        # The field below requires additional information to be set\r\n        $NeedsOptions = \"Dropdown\"\r\n        if ($DocumentName) {\r\n            if ($NeedsOptions -contains $Type) {\r\n                # We'll redirect the error output to the success stream to make it easier to error out if nothing was found or something else went wrong.\r\n                $NinjaPropertyOptions = Ninja-Property-Docs-Options -AttributeName $Name @DocumentationParams 2&gt;&amp;1\r\n            }\r\n        }\r\n        else {\r\n            if ($NeedsOptions -contains $Type) {\r\n                $NinjaPropertyOptions = Ninja-Property-Options -Name $Name 2&gt;&amp;1\r\n            }\r\n        }\r\n        \r\n        # If an error is received it will have an exception property, the function will exit with that error information.\r\n        if ($NinjaPropertyOptions.Exception) { throw $NinjaPropertyOptions }\r\n        \r\n        # The below type's require values not typically given in order to be set. The below code will convert whatever we're given into a format ninjarmm-cli supports.\r\n        switch ($Type) {\r\n            \"Checkbox\" {\r\n                # While it's highly likely we were given a value like \"True\" or a boolean datatype it's better to be safe than sorry.\r\n                $NinjaValue = [System.Convert]::ToBoolean($Value)\r\n            }\r\n            \"Date or Date Time\" {\r\n                # Ninjarmm-cli expects the GUID of the option to be selected. Therefore, the given value will be matched with a GUID.\r\n                $Date = (Get-Date $Value).ToUniversalTime()\r\n                $TimeSpan = New-TimeSpan (Get-Date \"1970-01-01 00:00:00\") $Date\r\n                $NinjaValue = $TimeSpan.TotalSeconds\r\n            }\r\n            \"Dropdown\" {\r\n                # Ninjarmm-cli is expecting the guid of the option we're trying to select. So we'll match up the value we were given with a guid.\r\n                $Options = $NinjaPropertyOptions -replace '=', ',' | ConvertFrom-Csv -Header \"GUID\", \"Name\"\r\n                $Selection = $Options | Where-Object { $_.Name -eq $Value } | Select-Object -ExpandProperty GUID\r\n        \r\n                if (-not $Selection) {\r\n                    throw [System.ArgumentOutOfRangeException]::New(\"Value is not present in dropdown\")\r\n                }\r\n        \r\n                $NinjaValue = $Selection\r\n            }\r\n            default {\r\n                # All the other types shouldn't require additional work on the input.\r\n                $NinjaValue = $Value\r\n            }\r\n        }\r\n        \r\n        # We'll need to set the field differently depending on if its a field in a Ninja Document or not.\r\n        if ($DocumentName) {\r\n            $CustomField = Ninja-Property-Docs-Set -AttributeName $Name -AttributeValue $NinjaValue @DocumentationParams 2&gt;&amp;1\r\n        }\r\n        else {\r\n            $CustomField = Ninja-Property-Set -Name $Name -Value $NinjaValue 2&gt;&amp;1\r\n        }\r\n        \r\n        if ($CustomField.Exception) {\r\n            throw $CustomField\r\n        }\r\n    }\r\n\r\n    function Get-NinjaProperty {\r\n        [CmdletBinding()]\r\n        Param(\r\n            [Parameter(Mandatory = $True, ValueFromPipeline = $True)]\r\n            [String]$Name,\r\n            [Parameter()]\r\n            [String]$Type,\r\n            [Parameter()]\r\n            [String]$DocumentName\r\n        )\r\n    \r\n        # If we're requested to get the field value from a Ninja document we'll specify it here.\r\n        $DocumentationParams = @{}\r\n        if ($DocumentName) { $DocumentationParams[\"DocumentName\"] = $DocumentName }\r\n    \r\n        # These two types require more information to parse.\r\n        $NeedsOptions = \"DropDown\", \"MultiSelect\"\r\n    \r\n        # Grabbing document values requires a slightly different command.\r\n        if ($DocumentName) {\r\n            # Secure fields are only readable when they're a device custom field\r\n            if ($Type -Like \"Secure\") { throw [System.ArgumentOutOfRangeException]::New(\"$Type is an invalid type! Please check here for valid types. https:\/\/ninjarmm.zendesk.com\/hc\/en-us\/articles\/16973443979789-Command-Line-Interface-CLI-Supported-Fields-and-Functionality\") }\r\n    \r\n            # We'll redirect the error output to the success stream to make it easier to error out if nothing was found or something else went wrong.\r\n            Write-Host \"Retrieving value from Ninja Document...\"\r\n            $NinjaPropertyValue = Ninja-Property-Docs-Get -AttributeName $Name @DocumentationParams 2&gt;&amp;1\r\n    \r\n            # Certain fields require more information to parse.\r\n            if ($NeedsOptions -contains $Type) {\r\n                $NinjaPropertyOptions = Ninja-Property-Docs-Options -AttributeName $Name @DocumentationParams 2&gt;&amp;1\r\n            }\r\n        }\r\n        else {\r\n            # We'll redirect error output to the success stream to make it easier to error out if nothing was found or something else went wrong.\r\n            $NinjaPropertyValue = Ninja-Property-Get -Name $Name 2&gt;&amp;1\r\n    \r\n            # Certain fields require more information to parse.\r\n            if ($NeedsOptions -contains $Type) {\r\n                $NinjaPropertyOptions = Ninja-Property-Options -Name $Name 2&gt;&amp;1\r\n            }\r\n        }\r\n    \r\n        # If we received some sort of error it should have an exception property and we'll exit the function with that error information.\r\n        if ($NinjaPropertyValue.Exception) { throw $NinjaPropertyValue }\r\n        if ($NinjaPropertyOptions.Exception) { throw $NinjaPropertyOptions }\r\n    \r\n        if (-not $NinjaPropertyValue) {\r\n            throw [System.NullReferenceException]::New(\"The Custom Field '$Name' is empty!\")\r\n        }\r\n    \r\n        # This switch will compare the type given with the quoted string. If it matches, it'll parse it further; otherwise, the default option will be selected.\r\n        switch ($Type) {\r\n            \"Dropdown\" {\r\n                # Drop-Down custom fields come in as a comma-separated list of GUIDs; we'll compare these with all the options and return just the option values selected instead of a GUID.\r\n                $Options = $NinjaPropertyOptions -replace '=', ',' | ConvertFrom-Csv -Header \"GUID\", \"Name\"\r\n                $Options | Where-Object { $_.GUID -eq $NinjaPropertyValue } | Select-Object -ExpandProperty Name\r\n            }\r\n            \"MultiSelect\" {\r\n                # Multi-Select custom fields come in as a comma-separated list of GUID's we'll compare these with all the options and return just the option values selected instead of a guid.\r\n                $Options = $NinjaPropertyOptions -replace '=', ',' | ConvertFrom-Csv -Header \"GUID\", \"Name\"\r\n                $Selection = ($NinjaPropertyValue -split ',').trim()\r\n    \r\n                foreach ($Item in $Selection) {\r\n                    $Options | Where-Object { $_.GUID -eq $Item } | Select-Object -ExpandProperty Name\r\n                }\r\n            }\r\n            default {\r\n                # If no type was given or not one that matches the above types just output what we retrieved.\r\n                $NinjaPropertyValue\r\n            }\r\n        }\r\n    }\r\n\r\n    # List of AV's and how to detect them.\r\n    $AVList = @(\r\n        [PSCustomObject]@{ Name = \"Bitdefender Antivirus\"; DisplayName = \"Bitdefender Agent\", \"Bitdefender Endpoint Security Tools\"; xmlPath = \"$env:ProgramFiles\\BitDefender\\Endpoint Security\\update_statistics.xml\"; ExecutablePath = \"Bitdefender\\Endpoint Security\\EPSecurityService.exe\", \"Bitdefender Agent\\ProductAgentService.exe\", \"Bitdefender\\Endpoint Security\\EPProtectedService.exe\"; ProcessName = \"ProductAgentUi\", \"ProductAgentService\", \"EPProtectedService\", \"EPSecurityService\" }\r\n        [PSCustomObject]@{ Name = \"Carbon Black\"; DisplayName = \"Carbon Black Cloud Sensor\", \"Carbon Black App Control Agent\"; Definitions = \"Confer\\scanner\\data_0\\aevdf.dat\"; ExecutablePath = \"Confer\\RepMgr64.exe\", \"Confer\\RepWSC64.exe\", \"Confer\\repwav.exe\"; SpecialExecutablePath = \"$env:SystemRoot\\CarbonBlack\\cb.exe\"; ProcessName = \"RepMgr64\", \"RepWSC64\", \"cb\" }\r\n        [PSCustomObject]@{ Name = \"Crowdstrike\"; DisplayName = \"CrowdStrike Windows Sensor\", \"Falcon Agent\"; Definitions = \"$env:SystemRoot\\system32\\drivers\\crowdstrike\\*.sys\"; ExecutablePath = \"CrowdStrike\\CSFalconService.exe\"; ProcessName = \"CSFalconService\" }\r\n        [PSCustomObject]@{ Name = \"Cylance\"; DisplayName = \"Cylance OPTICS\", \"Cylance Smart Antivirus\", \"Cylance PROTECT\"; Definitions = \"$env:ProgramData\\Cylance\\Desktop\\chp.db\"; ExecutablePath = \"Cylance\\Desktop\\CylanceSvc.exe\", \"Cylance\\Optics\\CyOptics.exe\"; ProcessName = \"cylancesvc\", \"cylancedrv\", \"CyOptics\" }\r\n        [PSCustomObject]@{ Name = \"ESET Security\"; DisplayName = \"ESET Security\", \"ESET Endpoint Security\", \"ESET Management Agent\", \"ESET Server Security\"; RegistryDefPath = \"HKLM:\\SOFTWARE\\ESET\\ESET Security\\CurrentVersion\\Info\"; RegistryDefName = \"ScannerVersion\"; ExecutablePath = \"ESET\\RemoteAdministrator\\Agent\\ERAAgent.exe\", \"ESET\\ESET Security\\ekrn.exe\"; ProcessName = \"ERAAgent\", \"ekrn\" }\r\n        [PSCustomObject]@{ Name = \"Huntress\"; DisplayName = \"Huntress Agent\"; ExecutablePath = \"Huntress\\HuntressAgent.exe\"; ProcessName = \"HuntressAgent\", \"HuntressRio\" }\r\n        [PSCustomObject]@{ Name = \"MalwareBytes\"; DisplayName = \"Malwarebytes\"; Definitions = \"$env:ProgramData\\Malwarebytes\\MBAMService\\scan.mbdb\"; ExecutablePath = \"Malwarebytes\\Anti-Malware\\mbam.exe\", \"Malwarebytes\\Anti-Malware\\MBAMService.exe\"; ProcessName = \"MBAMService\" }\r\n        [PSCustomObject]@{ Name = \"Windows Defender\"; ProcessName = \"MsMpEng\" }\r\n        [PSCustomObject]@{ Name = \"Sentinel Agent\"; DisplayName = \"Sentinel Agent\"; Definitions = \"$env:ProgramFiles\\SentinelOne\\Sentinel Agent *\\config\\DecoyPersistentConfig.json\"; ExecutablePath = \"SentinelOne\\Sentinel Agent *\\SentinelAgent.exe\"; ProcessName = \"SentinelServiceHost\", \"SentinelStaticEngine\", \"SentinelStaticEngineScanner\", \"SentinelUI\" }\r\n        [PSCustomObject]@{ Name = \"Sophos\"; DisplayName = \"Sophos Endpoint Agent\"; RegistryDefPath = \"HKLM:\\SOFTWARE\\Sophos\\Sophos File Scanner\\Application\\Versions\"; RegistryDefName = \"VirusDataVersion\"; ExecutablePath = \"Sophos\\Remote Management System\\ManagementAgentNT.exe\", \"Sophos\\Sophos Anti-Virus\\SavService.exe\", \"Sophos\\Endpoint Defense\\SEDService.exe\"; ProcessName = \"ManagementAgentNT\", \"SAVService\", \"SEDService\" }\r\n        [PSCustomObject]@{ Name = \"Vipre\"; DisplayName = \"VIPRE Business Agent\"; Definitions = \"$env:ProgramFiles\\VIPRE Business Agent\\Definitions\\defver.txt\"; ExecutablePath = \"VIPRE\\SBAMSvc.exe\"; ProcessName = \"SBAMSvc\" }\r\n        [PSCustomObject]@{ Name = \"Webroot SecureAnywhere\"; DisplayName = \"Webroot SecureAnywhere\"; Definitions = \"$env:ProgramData\\WRData\\WRlog.log\"; ExecutablePath = \"Webroot\\WRSA.exe\"; ProcessName = \"WRSA\" }\r\n    )\r\n\r\n    $ExitCode = 0\r\n}\r\nprocess {\r\n\r\n    # Let's see what tools we don't want to alert on.\r\n    $ExcludedAVs = New-Object System.Collections.Generic.List[String]\r\n\r\n    if ($ExcludeAV) {\r\n        $ExcludeAV.split(',') | ForEach-Object {\r\n            $ExcludedAVs.Add($_.Trim())\r\n        }\r\n    }\r\n\r\n    # For this kind of alert it might be worth it to create a whole custom field of ignorables.\r\n    if ($ExclusionsFromCustomField) {\r\n        try {\r\n            Write-Host \"Retrieving exclusions from custom field '$ExclusionsFromCustomField'...\"\r\n            $Exclusions = Get-NinjaProperty -Name $ExclusionsFromCustomField\r\n            Write-Host \"Successfully retrieved $Exclusions.\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            exit 1\r\n        }\r\n        \r\n        if ($Exclusions) {\r\n            $Exclusions.split(',') | ForEach-Object {\r\n                $ExcludedAVs.Add($_.Trim())\r\n            }\r\n        }\r\n    }\r\n\r\n    # WMI Would have better AV coverage and would likely be more accurate. However Windows Server does not have the Security Center\r\n    if (Test-IsWorkstation) {\r\n        Write-Host \"Desktop Windows Detected, Checking the Windows Security Center....\"\r\n        $AVinfo = if ($PSVersionTable.PSVersion.Major -ge 5) {\r\n            Get-CimInstance -Namespace root\/SecurityCenter2 -Class AntivirusProduct\r\n        }\r\n        else {\r\n            Get-WmiObject -Namespace root\/SecurityCenter2 -Class AntivirusProduct\r\n        }\r\n    }\r\n\r\n    $AVs = New-Object System.Collections.Generic.List[Object]\r\n\r\n    # This takes our list and begins searching by the 4 methods in the begin block.\r\n    if ($AVInfo) {\r\n        Write-Warning \"Antivirus info received from the Windows Security Center, this may result in duplicate entries in the report due to their naming scheme.\"\r\n        $AVinfo | ForEach-Object {\r\n            $Executable = ($_.pathToSignedReportingExe -replace '%programfiles%', \"$env:ProgramFiles\" | Get-Item).BaseName\r\n            $RunningStatus = Find-Process -Name $Executable\r\n\r\n            $ConvertToHex = [Convert]::ToString($_.ProductState, 16).PadLeft(6, '0')\r\n            $ProductStateHex = $ConvertToHex.Substring(2, 2)\r\n            $DefinitionsHex = $ConvertToHex.Substring(4, 2)\r\n\r\n            $ProductState = switch ($ProductStateHex) {\r\n                \"10\" { \"Active\" }\r\n                default { \"Inactive\" }\r\n            }\r\n\r\n            $UpToDateWMI = switch ($DefinitionsHex) {\r\n                \"00\" { $True }\r\n                default { $False }\r\n            }\r\n\r\n            if ($_.displayName -eq \"Windows Defender\" -and ((Get-Command Get-MpComputerStatus -ErrorAction SilentlyContinue).Count -ne 0)) {\r\n                $Version = (Get-MpComputerStatus).AMProductVersion\r\n                $Definitions = (Get-MpComputerStatus).AntivirusSignatureLastUpdated\r\n            }\r\n            else {\r\n                $Definitions = Get-Date $_.timestamp -ErrorAction SilentlyContinue\r\n            }\r\n\r\n            $UpToDate = if ($Definitions -and $Definitions -gt (Get-Date).AddDays(-$OutOfDate) -and ($UpToDateWMI -like \"True\")) {\r\n                $True\r\n            }\r\n            else {\r\n                $False\r\n            }\r\n\r\n            if ($_.displayName -ne \"Windows Defender\") {\r\n                $Version = Find-UninstallKey -Version -DisplayName \"$($_.displayName)\"\r\n            }\r\n\r\n            [PSCustomObject]@{\r\n                Name        = $_.displayName\r\n                Installed   = \"Yes\"\r\n                Definitions = if ($Definitions) { Get-Date $Definitions -Format \"yyyy\/MM\/dd\" }else { $null }\r\n                UpToDate    = $UpToDate\r\n                Running     = if ($RunningStatus) { \"Yes\" }else { \"No\" }\r\n                Service     = $ProductState\r\n                Version     = if ($Version) { \"$Version\" }else { $null }\r\n            } | Where-Object { $ExcludedAVs -notcontains $_.Name } | ForEach-Object { $AVs.Add($_) }\r\n        } \r\n    }\r\n\r\n    $AVList | Where-Object { $AVs.Name -notcontains $_.Name } | ForEach-Object {\r\n\r\n        $UninstallKey = if ($_.DisplayName) {\r\n            $_.DisplayName | Find-UninstallKey\r\n        }\r\n        \r\n        $UninstallInfo = if ($_.DisplayName) {\r\n            $_.DisplayName | Find-UninstallKey -Version\r\n        }\r\n        \r\n        $RunningStatus = if ($_.ProcessName) {\r\n            $_.ProcessName | Find-Process\r\n        }\r\n\r\n        $ServiceStatus = if ($_.ProcessName) {\r\n            $_.ProcessName | Find-Service\r\n        }\r\n\r\n        # AV's don't really have a consistent way to check their definitions (unless it's desktop windows)\r\n        $Definitions = if ($_.Definitions) {\r\n            $_.Definitions | Find-Definitions\r\n        }\r\n        elseif ($_.Name -eq \"BitDefender\") {\r\n            [xml]$xml = Get-Content $_.xmlPath -ErrorAction SilentlyContinue\r\n            if ($xml) {\r\n                [datetime]$origin = '1970-01-01 00:00:00'\r\n                $ConvertFromUnix = $origin.AddSeconds($xml.UpdateStatistics.Antivirus.Check.updtime)\r\n                Get-Date ($ConvertFromUnix.ToLocalTime()) -ErrorAction SilentlyContinue\r\n            }\r\n        }\r\n        elseif ($_.Name -eq \"Sophos\") {\r\n            $RegValue = (Get-ItemProperty -Path $_.RegistryDefPath -ErrorAction SilentlyContinue).($_.RegistryDefName)\r\n            if ($RegValue) {\r\n                Get-Date ([datetime]::ParseExact($RegValue.SubString(0, 8), 'yyyyMMdd', $null)) -ErrorAction SilentlyContinue\r\n            }\r\n        }\r\n        elseif ($_.Name -eq \"ESET\") {\r\n            $RegValue = (Get-ItemProperty -Path $_.RegistryDefPath -ErrorAction SilentlyContinue).($_.RegistryDefName)\r\n            if ($RegValue) {\r\n                $RegValue -match '(\\d{8})' | Out-Null\r\n                Get-Date ([datetime]::ParseExact($Matches[0], 'yyyyMMdd', $null)) -ErrorAction SilentlyContinue\r\n            }\r\n        }\r\n        \r\n        $InstallPath = if ($_.ExecutablePath) {\r\n            $_.ExecutablePath | Find-Executable\r\n        }\r\n        elseif ($_.SpecialExecutablePath) {\r\n            $_.SpecialExecutablePath | Find-Executable -Special\r\n        }\r\n\r\n        if ($UninstallKey -or $RunningStatus -or $InstallPath -or $ServiceStatus) {\r\n            $Installed = \"Yes\"\r\n        }\r\n        else {\r\n            $Installed = \"No\"\r\n        }\r\n\r\n        if ($_.Name -eq \"Windows Defender\" -and ((Get-Command Get-MpComputerStatus -ErrorAction SilentlyContinue).Count -ne 0)) {\r\n            $UninstallInfo = (Get-MpComputerStatus).AMProductVersion\r\n            $Definitions = (Get-MpComputerStatus).AntivirusSignatureLastUpdated\r\n        }\r\n\r\n        $UpToDate = if ($Definitions -and $Definitions -gt (Get-Date).AddDays(-$OutOfDate)) {\r\n            $True\r\n        }\r\n        else {\r\n            $False\r\n        }\r\n\r\n        [PSCustomObject]@{\r\n            Name        = $_.Name\r\n            Installed   = $Installed\r\n            Definitions = if ($Definitions) { Get-Date $Definitions -Format \"yyyy\/MM\/dd\" }else { $Null }\r\n            UpToDate    = $UpToDate\r\n            Running     = if ($RunningStatus) { \"Yes\" }else { \"No\" }\r\n            Service     = if ($ServiceStatus) { \"Active\" }else { \"Inactive\" }\r\n            Version     = $UninstallInfo\r\n        } | Where-Object { $ExcludedAVs -notcontains $_.Name } | ForEach-Object { $AVs.Add($_) }\r\n    }\r\n\r\n    $InstalledAVs = $AVs | Where-Object { $_.Installed -eq \"Yes\" }\r\n    Write-Host \"\"\r\n\r\n    if (!$InstalledAVs) {\r\n        Write-Host \"[Alert] It appears there's no installed antivirus? You may want to check the list of AV's this script supports.\"\r\n        $ExitCode = 1\r\n    }\r\n    \r\n    if ($InstalledAVs | Where-Object { $_.UpToDate -Like \"False\" }) {\r\n        Write-Host \"[Alert] The AV definitions are out of date!\"\r\n        $ExitCode = 1\r\n    }\r\n\r\n    if ($InstalledAVs | Where-Object { $_.HasRunningService -Like \"False\" }) {\r\n        Write-Host \"[Alert] The AV's service doesn't appear to be running, is the AV Updating or performing maintenance?\"\r\n        $ExitCode = 1\r\n    }\r\n\r\n    if ($InstalledAVs | Where-Object { $_.CurrentlyRunning -Like \"False\" }) {\r\n        Write-Host \"[Alert] The AV doesn't appear to have a running process, is the AV Updating or performing maintenance?\"\r\n        $ExitCode = 1\r\n    }\r\n\r\n    # If we found anything in the four checks, we're going to indicate it's installed, but we may also want to save our results to a custom field.\r\n    if ($ShowNotFound) {\r\n        $AVs | Format-Table -AutoSize -Wrap | Out-String | Write-Host\r\n    }\r\n    else {\r\n        if ($InstalledAVs) {\r\n            $InstalledAVs | Format-Table -AutoSize -Wrap | Out-String | Write-Host\r\n        }\r\n    }\r\n\r\n    if ($ExportAll) {\r\n        $ExportReport = $InstalledAVs | Format-Table -AutoSize -Wrap | Out-String\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportAll'.\"\r\n            Set-NinjaProperty -Name $ExportAll -Value $ExportReport\r\n            Write-Host \"Successfully set Custom Field '$ExportAll'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        }\r\n    }\r\n\r\n    if ($ExportDef) {\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportDef'.\"\r\n            $Value = ($InstalledAVs | Select-Object -ExpandProperty Definitions) -join ', '\r\n            Set-NinjaProperty -Name $ExportDef -Value ( $Value | Out-String )\r\n            Write-Host \"Successfully set Custom Field '$ExportDef'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        }\r\n    }\r\n\r\n    if ($ExportDefStatus) {\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportDefStatus'.\"\r\n            $Value = ($InstalledAVs | Select-Object -ExpandProperty UpToDate) -join ', '\r\n            Set-NinjaProperty -Name $ExportDefStatus -Value ( $Value | Out-String )\r\n            Write-Host \"Successfully set Custom Field '$ExportDefStatus'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        }\r\n    }\r\n\r\n    if ($ExportName) {\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportName'.\"\r\n            $Value = ($InstalledAVs | Select-Object -ExpandProperty Name) -join ', '\r\n            Set-NinjaProperty -Name $ExportName -Value ( $Value | Out-String )\r\n            Write-Host \"Successfully set Custom Field '$ExportName'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        } \r\n    }\r\n\r\n    if ($ExportStatus) {\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportStatus'.\"\r\n            $Value = ($InstalledAVs | Select-Object -ExpandProperty Running) -join ', '\r\n            Set-NinjaProperty -Name $ExportStatus -Value ( $Value | Out-String )\r\n            Write-Host \"Successfully set Custom Field '$ExportStatus'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        }\r\n    }\r\n\r\n    if ($ExportVersion) {\r\n        try {\r\n            Write-Host \"Attempting to set Custom Field '$ExportVersion'.\"\r\n            $Value = (($InstalledAVs | Select-Object -ExpandProperty Version | ForEach-Object { $_.Trim() }) -join ', ')\r\n            Set-NinjaProperty -Name $ExportVersion -Value ($Value | Out-String)\r\n            Write-Host \"Successfully set Custom Field '$ExportVersion'!\"\r\n        }\r\n        catch {\r\n            Write-Host \"[Error] $($_.Message)\"\r\n            $ExitCode = 1\r\n        }\r\n    }\r\n\r\n    exit $ExitCode\r\n}end {\r\n    \r\n    \r\n    \r\n}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p>Greifen Sie auf \u00fcber 300 Skripte im NinjaOne Dojo zu.<\/p>\n<p><a href=\"https:\/\/www.ninjaone.com\/de\/kostenlosetestversionformular\/\">Zugang erhalten<\/a><\/p>\n<\/div>\n<h2>Detailansicht<\/h2>\n<p>Dieses PowerShell-Skript wurde entwickelt, um verschiedene auf einem Windows-System installierte Antivirenprogramme zu erkennen, Details zu deren Definitionen und Status abzurufen und die Ergebnisse zu exportieren. Es unterst\u00fctzt die Erkennung von 11 g\u00e4ngigen Antivirenl\u00f6sungen, darunter BitDefender, Carbon Black, Crowdstrike, Cylance, ESET, Huntress, MalwareBytes, Windows Defender, SentinelOne, Sophos, Vipre und Webroot.<\/p>\n<h2>Wie es funktioniert<\/h2>\n<p><strong>1. Initialisierung und Parameterbehandlung: <\/strong> Das Skript beginnt mit der Definition verschiedener Parameter, mit denen seine Ausf\u00fchrung angepasst werden kann. Dazu geh\u00f6ren Optionen zum Ausschluss bestimmter Antivirenprogramme. &#8218;Ript&#8216; \u00fcberpr\u00fcft, ob es mit Administratorrechten ausgef\u00fchrt wird, da dies f\u00fcr den Zugriff auf bestimmte Systeminformationen erforderlich ist. Wenn das Skript nicht als Administrator ausgef\u00fchrt wird, bricht es mit einer Fehlermeldung ab.<\/p>\n<p><strong>2. \u00dcberpr\u00fcfung auf Administratorrechte:<\/strong> Das Skript \u00fcberpr\u00fcft, ob es mit Administratorrechten ausgef\u00fchrt wird, da dies f\u00fcr den Zugriff auf bestimmte Systeminformationen erforderlich ist. Wenn das Skript nicht als Admin ausgef\u00fchrt wird, bricht es mit einer Fehlermeldung ab.<\/p>\n<p><strong>3. Abrufen von Antivirus-Informationen: <\/strong> Das Skript verwendet mehrere Methoden, um installierte Antiviren-Software zu erkennen:<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"2\"><strong>Registrierungs-Schl\u00fcssel:<\/strong> Es sucht in der Windows-Registrierung nach Eintr\u00e4gen, die mit Antiviren-Software zusammenh\u00e4ngen.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"2\"><strong>WMI (Windows Management Instrumentation):<\/strong> Bei Desktop-Systemen fragt es das Windows-Sicherheitscenter nach Antiviren-Details ab.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1440,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"2\"><strong>Prozesse und Services:<\/strong> Es wird nach laufenden Prozessen und Diensten gesucht, die mit bekannten Antivirenprogrammen verbunden sind.<\/li>\n<\/ul>\n<p><strong>4. Sammeln von Definitionsdaten: <\/strong> F\u00fcr jedes erkannte Antivirenprogramm ermittelt das Skript das Datum vom letzten Update der Definition. Damit wird festgestellt, ob die Definitionen auf der Grundlage des angegebenen Schwellenwerts veraltet sind.<\/p>\n<p><strong>5. Zusammenstellung der Ergebnisse: <\/strong> Das Skript stellt die Ergebnisse in einer Tabelle zusammen, die Details wie den Namen der Antivirensoftware, das Datum des letzten Definitionsupdates, die Version und den aktuellen Betriebsstatus enth\u00e4lt.<\/p>\n<p><strong>6. Exportieren der Ergebnisse: <\/strong> Wenn angegeben, exportiert das Skript die Ergebnisse in benutzerdefinierte Felder, was f\u00fcr die Integration mit IT-Management-Tools wie NinjaOne n\u00fctzlich sein kann.<\/p>\n<h2>Potenzielle Anwendungsf\u00e4lle<\/h2>\n<p>Stellen Sie sich einen IT-Experten vor, der ein gro\u00dfes Netzwerk von Windows-Systemen verwaltet. Die regelm\u00e4\u00dfige manuelle \u00dcberpr\u00fcfung des Antivirenstatus auf jedem System ist zeitaufw\u00e4ndig und fehleranf\u00e4llig. Mithilfe dieses Skripts kann der IT-Experte den Prozess automatisieren und sicherstellen, dass alle Systeme \u00fcber aktuelle Antivirendefinitionen verf\u00fcgen und ihre Antiviren-Software aktiv ausgef\u00fchrt wird. Werden Probleme festgestellt, wie zum Beispiel veraltete Definitionen oder inaktive Antivirenprogramme, kann das Skript das IT-Team benachrichtigen, sodass der Fehler umgehend behoben werden kann.<\/p>\n<h2>Alternative Methoden<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><strong>Manuelle \u00dcberpr\u00fcfung:<\/strong> Die manuelle \u00dcberpr\u00fcfung des Antivirenstatus auf jedem System ist arbeitsintensiv und ineffizient, insbesondere in gro\u00dfen Umgebungen.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><strong>Tools von Drittanbietern:<\/strong> Es gibt zwar kommerzielle Tools zur \u00dcberwachung des Virenschutzstatus, diese k\u00f6nnen jedoch teuer sein und erfordern m\u00f6glicherweise eine zus\u00e4tzliche Infrastruktur.<\/li>\n<\/ul>\n<p>Dieses PowerShell-Skript bietet eine kosteneffektive und flexible Alternative, die IT-Experten die M\u00f6glichkeit bietet, es an ihre spezifischen Anforderungen anzupassen.<\/p>\n<h2>FAQs<\/h2>\n<h3>Wie kann ich das Skript mit Administratorrechten ausf\u00fchren?<\/h3>\n<p>Klicken Sie mit der rechten Maustaste auf die PowerShell-Anwendung und w\u00e4hlen Sie &#8218;Als Administrator ausf\u00fchren&#8216;, bevor Sie das Skript ausf\u00fchren.<\/p>\n<h3>Kann ich weitere Antivirenprogramme zur Erkennungsliste hinzuf\u00fcgen?<\/h3>\n<p>Ja, das Skript kann modifiziert werden, um zus\u00e4tzliche Antivirenprogramme aufzunehmen, indem ihre Details zum Array $AVList hinzugef\u00fcgt werden.<\/p>\n<h3>Was sollte ich tun, wenn das Skript veraltete Definitionen meldet?<\/h3>\n<p>\u00dcberpr\u00fcfen Sie die betroffenen Systeme, um sicherzustellen, dass sie mit dem Internet verbunden und f\u00fcr den Empfang automatischer Updates konfiguriert sind. Aktualisieren Sie ggf. die Antivirendefinitionen manuell.<\/p>\n<h2>Folgen<\/h2>\n<p>Die regelm\u00e4\u00dfige \u00dcberpr\u00fcfung des Status der Antiviren-Software ist entscheidend f\u00fcr die Aufrechterhaltung einer sicheren IT-Umgebung. Dieses Skript stellt sicher, dass Antivirenprogramme installiert, auf dem neuesten Stand und aktiv sind, wodurch <a href=\"https:\/\/www.ninjaone.com\/de\/blog\/5-schritte-zur-entfernung-von-malware-von-ihrem-computer\/\" target=\"_blank\" rel=\"noopener\">das Risiko von Malware-Infektionen<\/a> und anderen Sicherheitsbedrohungen <a href=\"https:\/\/www.ninjaone.com\/de\/blog\/5-schritte-zur-entfernung-von-malware-von-ihrem-computer\/\" target=\"_blank\" rel=\"noopener\">verringert wird<\/a>. Durch die Automatisierung dieser \u00dcberpr\u00fcfungen k\u00f6nnen sich IT-Abteilungen auf andere wichtige Aufgaben konzentrieren, was die Gesamteffizienz und die Sicherheitslage verbessert.<\/p>\n<h2>Empfehlungen<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><strong>Planen Sie regelm\u00e4\u00dfige \u00dcberpr\u00fcfungen:<\/strong> F\u00fchren Sie das Skript regelm\u00e4\u00dfig aus (zum Beispiel t\u00e4glich oder w\u00f6chentlich), um f\u00fcr eine kontinuierliche \u00dcberwachung des Antivirenstatus zu sorgen.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><strong>Passen Sie Ausschl\u00fcsse an:<\/strong> Verwenden Sie den Parameter -ExcludeAV, um alle Antivirenprogramme auszuschlie\u00dfen, die f\u00fcr Ihre Umgebung nicht relevant sind.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"6\" data-aria-level=\"1\"><strong>\u00dcberpr\u00fcfen Sie die Warnmeldungen und reagieren Sie darauf:<\/strong> K\u00fcmmern Sie sich umgehend um alle vom Skript generierten Warnmeldungen, zum Beispiel \u00fcber veraltete Definitionen oder inaktive Antivirenprogramme.<\/li>\n<\/ul>\n<h2>Abschlie\u00dfende \u00dcberlegungen<\/h2>\n<p>Im Bereich der IT-Sicherheit ist Wachsamkeit ausschlaggebend. Dieses PowerShell-Skript bietet ein leistungsf\u00e4higes Tool zur Automatisierung der \u00dcberwachung des Virenschutzstatus, um sicherzustellen, dass Systeme vor neuen Bedrohungen gesch\u00fctzt sind. Durch die Integration dieses Skripts in Verwaltungs-Tools wie <a href=\"https:\/\/www.ninjaone.com\/de\/\" target=\"_blank\" rel=\"noopener\">NinjaOne<\/a> k\u00f6nnen IT-Experten ihre Arbeitsabl\u00e4ufe weiter optimieren und ihre Sicherheitslage verbessern.<\/p>\n","protected":false},"author":35,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_lmt_disableupdate":"no","_lmt_disable":""},"operating_system":[4212],"use_cases":[4384,4306],"class_list":["post-388710","script_hub","type-script_hub","status-publish","hentry","script_hub_category-windows","use_cases-netzwerksicherheit","use_cases-wartung"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/script_hub\/388710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/comments?post=388710"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/media?parent=388710"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/operating_system?post=388710"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/use_cases?post=388710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}