{"id":230048,"date":"2024-04-05T08:44:21","date_gmt":"2024-04-05T08:44:21","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=230048"},"modified":"2024-04-05T08:45:41","modified_gmt":"2024-04-05T08:45:41","slug":"benutzer-anmeldung-monitoring-mit-powershell","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/de\/script-hub\/benutzer-anmeldung-monitoring-mit-powershell\/","title":{"rendered":"Monitoring von Benutzeranmeldungen in Windows-Systemen mit PowerShell"},"content":{"rendered":"<h2>Die wichtigsten Erkenntnisse<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"1\" data-aria-level=\"1\"><strong>Automatisierte Benutzer\u00fcberwachung<\/strong>: Dieses PowerShell-Skript automatisiert die \u00dcberwachung von Benutzeranmeldungen auf Windows-Systemen.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Anpassbare \u00dcberpr\u00fcfungen<\/strong>: Passen Sie das Skript so an, dass es nach bestimmten Benutzern oder jedem angemeldeten Benutzer sucht.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>NinjaOne RMM-Integration<\/strong>: Integriert mit NinjaOne RMM f\u00fcr verbesserte Anpassung und Datenbeschaffung.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Operative Effizienz<\/strong>: Stellt sicher, dass die f\u00fcr die Anwendungsfunktionalit\u00e4t erforderlichen Benutzerkonten aktiv sind.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Verbesserung der Sicherheit<\/strong>: Hilft bei der Aufrechterhaltung der Sicherheit durch die \u00dcberwachung von autorisierten und nicht autorisierten Anmeldungen.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Flexibilit\u00e4t<\/strong>: Passt sich durch die Handhabung von Umgebungsvariablen an unterschiedliche Laufzeitumgebungen an.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"7\" data-aria-level=\"1\"><strong>Echtzeit-Warnungen<\/strong>: Bietet sofortige Warnungen basierend auf dem Anmeldestatus des Benutzers.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"8\" data-aria-level=\"1\"><strong>Kompatibilit\u00e4t<\/strong>: Unterst\u00fctzt Windows 10 und Windows Server 2012 R2 aufw\u00e4rts.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"9\" data-aria-level=\"1\"><strong>Einfache Integration<\/strong>: Kann in bestehende IT-Verwaltungstools integriert werden, um eine koh\u00e4rente System\u00fcberwachung zu erm\u00f6glichen.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"10\" data-aria-level=\"1\"><strong>Unterst\u00fctzung bei der Einhaltung der Vorschriften<\/strong>: Hilft bei der Einhaltung von Sicherheitsprotokollen durch die Verfolgung von Benutzeraktivit\u00e4ten.<\/li>\n<\/ul>\n<h2>Hintergrund<\/h2>\n<p>Das bereitgestellte Skript ist ein PowerShell-Tool, das f\u00fcr IT-Experten und <a href=\"https:\/\/www.ninjaone.com\/what-is-an-msp\/\">Managed Service Provider (MSPs<\/a> ) entwickelt wurde, um Benutzeranmeldungen auf Windows-basierten Systemen zu \u00fcberwachen. Ihre Bedeutung ergibt sich aus der Notwendigkeit, sicherzustellen, dass bestimmte Benutzerkonten aktiv sind, oder zu \u00fcberpr\u00fcfen, ob ein Benutzer angemeldet ist, insbesondere bei \u00e4lteren Anwendungen, die authentifizierte Benutzersitzungen erfordern. Das Skript zeichnet sich durch seine Anpassungsm\u00f6glichkeiten und die Integration mit NinjaOne RMM, unserer <a href=\"https:\/\/www.ninjaone.com\/de\/rmm\/\">Plattform f\u00fcr Fern\u00fcberwachung und -verwaltung, aus.<\/a><\/p>\n<h2>Das Skript:<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">&lt;#\r\n.SYNOPSIS\r\n    Alert if no user is logged in, or if a specified user is not logged in. It can also accept a custom text field name to identify the user to check.\r\n.DESCRIPTION\r\n    Alert if no user is logged in, or if a specified user is not logged in. It can also accept a custom text field name to identify the user to check.\r\n    \r\n    Intended for legacy apps that are non-functional without an actual user account signed in.\r\n.EXAMPLE\r\n    (No Parameters)\r\n    itAdmin alternateAdmin tuser is currently signed in!\r\n\r\nPARAMETER: -CheckUser \"itAdmin\"\r\n    Enter in the user you'd like to alert on. ex. to alert on user itAdmin use -CheckUser \"itAdmin\"\r\n.EXAMPLE\r\n    -CheckUser \"itAdmin\"\r\n    itAdmin is currently signed in!\r\n\r\nPARAMETER: -CustomFieldName \"ReplaceMeWithAnyTextCustomField\"\r\n    The name of a text custom field to grab the CheckUser value from.\r\n.EXAMPLE\r\n    -CustomFieldName \"ReplaceMeWithAnyTextCustomField\"\r\n    itAdmin is currently signed in!\r\n\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10, Windows Server 2012 R2\r\n    Release Notes: Renamed script and added Script Variable support\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    [Switch]$ActiveOnly = [System.Convert]::ToBoolean($env:userMustBeActive),\r\n    [Parameter()]\r\n    [String]$CheckUser,\r\n    [Parameter()]\r\n    [String]$CustomFieldName\r\n)\r\n\r\nbegin {\r\n    # If script variables are used overwrite the existing variables.\r\n    if ($env:userToCheckFor -and $env:userToCheckFor -notlike \"null\") { $CheckUser = $env:userToCheckFor }\r\n    if ($env:retrieveUserFromCustomFieldName -and $env:retrieveUserFromCustomFieldName -notlike \"null\") { $CustomFieldName = $env:retrieveUserFromCustomFieldName }\r\n\r\n    # This function is to make it easier to parse Ninja Custom Fields.\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($PSVersionTable.PSVersion.Major -lt 3){\r\n            throw \"PowerShell 3.0 or higher is required to retrieve data from custom fields. https:\/\/ninjarmm.zendesk.com\/hc\/en-us\/articles\/4405408656013\"\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 \"$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        # 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            \"Attachment\" {\r\n                # Attachments come in a JSON format this will convert it into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Checkbox\" {\r\n                # Checkbox's come in as a string representing an integer. We'll need to cast that string into an integer and then convert it to a more traditional boolean.\r\n                [System.Convert]::ToBoolean([int]$NinjaPropertyValue)\r\n            }\r\n            \"Date or Date Time\" {\r\n                # In Ninja Date and Date\/Time fields are in Unix Epoch time in the UTC timezone the below should convert it into local time as a datetime object.\r\n                $UnixTimeStamp = $NinjaPropertyValue\r\n                $UTC = (Get-Date \"1970-01-01 00:00:00\").AddSeconds($UnixTimeStamp)\r\n                $TimeZone = [TimeZoneInfo]::Local\r\n                [TimeZoneInfo]::ConvertTimeFromUtc($UTC, $TimeZone)\r\n            }\r\n            \"Decimal\" {\r\n                # In ninja decimals are strings that represent a decimal this will cast it into a double data type.\r\n                [double]$NinjaPropertyValue\r\n            }\r\n            \"Device Dropdown\" {\r\n                # Device Drop-Downs Fields come in a JSON format this will convert it into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Device MultiSelect\" {\r\n                # Device Multi-Select Fields come in a JSON format this will convert it into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\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            \"Integer\" {\r\n                # Cast's the Ninja provided string into an integer.\r\n                [int]$NinjaPropertyValue\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            \"Organization Dropdown\" {\r\n                # Turns the Ninja provided JSON into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Organization Location Dropdown\" {\r\n                # Turns the Ninja provided JSON into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Organization Location MultiSelect\" {\r\n                # Turns the Ninja provided JSON into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Organization MultiSelect\" {\r\n                # Turns the Ninja provided JSON into a PowerShell Object.\r\n                $NinjaPropertyValue | ConvertFrom-Json\r\n            }\r\n            \"Time\" {\r\n                # Time fields are given as a number of seconds starting from midnight. This will convert it into a datetime object.\r\n                $Seconds = $NinjaPropertyValue\r\n                $UTC = ([timespan]::fromseconds($Seconds)).ToString(\"hh\\:mm\\:ss\")\r\n                $TimeZone = [TimeZoneInfo]::Local\r\n                $ConvertedTime = [TimeZoneInfo]::ConvertTimeFromUtc($UTC, $TimeZone)\r\n\r\n                Get-Date $ConvertedTime -DisplayHint Time\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    function Get-User {\r\n        $quser = quser.exe\r\n        $quser -replace '\\s{2,}', ',' -replace '&gt;' | ConvertFrom-Csv\r\n    }\r\n\r\n}process {\r\n\r\n    # If a custom field name is provided grab the text and overwrite the $CheckUser variable with it.\r\n    if ($CustomFieldName) { \r\n        if (-not ($CheckUser)) {\r\n            try{\r\n                $CheckUser = Get-NinjaProperty -Name $CustomFieldName\r\n            }catch{\r\n                Write-Warning \"$($_.ToString())\"\r\n            }\r\n\r\n            if(-not $CheckUser){\r\n                Write-Warning \"The custom field $CustomFieldName was empty!\" \r\n            }\r\n        }\r\n    }\r\n\r\n    if($CheckUser){\r\n        Write-Host \"Checking for $CheckUser.\"\r\n    }else{\r\n        Write-Host \"Checking if any user is logged in.\"\r\n    }\r\n\r\n    # This will work whether or not your looking for any user to be logged in ($CheckUser = $null) or a specific one.\r\n    $LoggedInUsers = Get-User\r\n    if ($ActiveOnly) {\r\n        $Test = $LoggedInUsers | Where-Object { $_.USERNAME -match $CheckUser } | Where-Object { $_.STATE -like \"Active\" }\r\n    }\r\n    else {\r\n        $Test = $LoggedInUsers | Where-Object { $_.USERNAME -match $CheckUser } \r\n    }\r\n\r\n    # If we didn't find the user or users we were looking for error out and exit 1\r\n    if (!$Test) {\r\n        Write-Error \"The user(s) you are checking for is not currently logged in!\"\r\n        $LoggedInUsers | Format-Table USERNAME, STATE, \"LOGON TIME\", SESSIONNAME | Out-String | Write-Host\r\n        exit 1\r\n    }\r\n    else {\r\n        # Otherwise exit 0\r\n        Write-Host \"$($LoggedInUsers.USERNAME) is currently signed in!\"\r\n        $LoggedInUsers | Format-Table USERNAME, STATE, \"LOGON TIME\", SESSIONNAME | Out-String | Write-Host\r\n        exit 0\r\n    }\r\n    \r\n}end {\r\n    \r\n    \r\n    \r\n}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p>Zugriff auf \u00fcber 300 Skripte im NinjaOne Dojo<\/p>\n<p><a href=\"https:\/\/www.ninjaone.com\/freetrialform\/\">Zugang erhalten<\/a><\/p>\n<\/div>\n<h2>Detaillierte Aufschl\u00fcsselung<\/h2>\n<p>Das Skript arbeitet in mehreren Stufen:<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"1\" data-aria-level=\"1\"><strong>Initialisierung<\/strong>: Sie beginnt mit der Einrichtung von Parametern, die ihr Verhalten steuern, wie z. B. die \u00dcberpr\u00fcfung nur aktiver Benutzer oder die Konzentration auf einen bestimmten Benutzer.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Handhabung von Umgebungsvariablen<\/strong>: Es \u00fcberpr\u00fcft Umgebungsvariablen, die m\u00f6glicherweise seine Parameter \u00fcberschreiben k\u00f6nnten, um Anpassungsf\u00e4higkeit in verschiedenen Laufzeitumgebungen zu gew\u00e4hrleisten.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Abfrage von benutzerdefinierten Feldern<\/strong>: Das Skript kann Benutzerinformationen aus benutzerdefinierten Feldern abrufen, was Flexibilit\u00e4t beim Abrufen von Anmeldedaten erm\u00f6glicht.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Benutzeranmeldedatenabruf <\/strong>: Durch die Verwendung des Befehls <strong>quser<\/strong> ruft es die Liste der angemeldeten Benutzer:innen ab, eine Kernfunktionalit\u00e4t des Skripts.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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>Benutzerpr\u00fcfung und -warnung<\/strong>: Je nach den festgelegten Parametern \u00fcberpr\u00fcft das Skript entweder nach jedem angemeldeten Benutzer oder einem bestimmten Benutzer und gibt entsprechende Warnungen aus.<\/li>\n<\/ul>\n<h2>M\u00f6gliche Anwendungsf\u00e4lle<\/h2>\n<p>Stellen Sie sich einen IT-Administrator vor, der f\u00fcr ein Netzwerk verantwortlich ist, in dem f\u00fcr bestimmte Anwendungen ein Admin-Benutzer st\u00e4ndig angemeldet sein muss. Mit diesem Skript k\u00f6nnen sie automatische \u00dcberpr\u00fcfungen einrichten, um sicherzustellen, dass die erforderlichen Benutzerkonten aktiv sind, und so die Funktionalit\u00e4t der Anwendung und die Systemsicherheit aufrechterhalten.<\/p>\n<h2>Vergleiche<\/h2>\n<p>Herk\u00f6mmliche Methoden zur \u00dcberwachung der Benutzeranmeldung beinhalten manuelle Pr\u00fcfungen oder einfache Skripte ohne Anpassungsm\u00f6glichkeiten. Dieses PowerShell-Skript \u00fcbertrifft diese Methoden mit seiner <a href=\"https:\/\/www.ninjaone.com\/de\/integrationen\/\">Integration in NinjaOne RMM<\/a>, seiner Anpassungsf\u00e4higkeit und seinen automatischen Alarmierungsfunktionen.<\/p>\n<h2>FAQs<\/h2>\n<p><strong>F: Wie wird die Sicherheit durch dieses Skript verbessert?<\/strong><br \/>\nA: Indem sichergestellt wird, dass die erforderlichen Benutzerkonten aktiv sind und nicht autorisierte Anmeldungen \u00fcberwacht werden.<\/p>\n<p><strong>F: Kann es f\u00fcr Nicht-Administratoren angepasst werden?<\/strong><br \/>\nA: Nat\u00fcrlich kann das Skript so angepasst werden, dass es jedes Benutzerkonto \u00fcberwacht.<\/p>\n<p><strong>F: Ist es mit allen Windows-Versionen kompatibel?<\/strong><br \/>\nA: Es unterst\u00fctzt Windows 10 und Windows Server 2012 R2 und h\u00f6her.<\/p>\n<h2>Auswirkungen<\/h2>\n<p>Die F\u00e4higkeit des Skripts, Benutzeranmeldungen zu \u00fcberwachen, ist f\u00fcr die Aufrechterhaltung von Sicherheitsprotokollen, die Einhaltung von Vorschriften und die Verhinderung von unbefugtem Zugriff unerl\u00e4sslich. Es hilft auch bei der Fehlersuche und der betrieblichen Wartung, indem es Benutzeranmeldedaten in Echtzeit bereitstellt.<\/p>\n<h2>Empfehlungen<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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=\"1\" data-aria-level=\"1\">Aktualisieren Sie das Skript regelm\u00e4\u00dfig, um mit Systemaktualisierungen Schritt zu halten.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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\">Passen Sie die Skriptparameter an die spezifischen Anforderungen der IT-Umgebung an.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" 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\">Integrieren Sie das Skript in bestehende IT-Verwaltungstools, um einen koh\u00e4renten \u00dcberwachungsansatz zu erhalten.<\/li>\n<\/ul>\n<h2>Abschlie\u00dfende \u00dcberlegungen<\/h2>\n<p>Die Einbindung dieses PowerShell-Skripts in Ihre IT-Infrastruktur, insbesondere in Kombination mit NinjaOne, verbessert Ihre M\u00f6glichkeiten zur effektiven \u00dcberwachung von Benutzeranmeldungen. Die Plattform von NinjaOne bietet eine zus\u00e4tzliche Verwaltungs- und Sicherheitsebene, die das Skript zu einem unsch\u00e4tzbaren Bestandteil einer umfassenden IT-Managementstrategie macht.<\/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":[4309],"class_list":["post-230048","script_hub","type-script_hub","status-publish","hentry","script_hub_category-windows","use_cases-benutzerinnen-und-zugangsverwaltung"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/script_hub\/230048","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=230048"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/media?parent=230048"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/operating_system?post=230048"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/use_cases?post=230048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}