{"id":421080,"date":"2025-02-07T14:31:05","date_gmt":"2025-02-07T14:31:05","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=421080"},"modified":"2025-02-07T14:31:05","modified_gmt":"2025-02-07T14:31:05","slug":"konfiguration-von-nachrichten-und-interessen-powershell","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/de\/script-hub\/konfiguration-von-nachrichten-und-interessen-powershell\/","title":{"rendered":"PowerShell beherrschen: Automatisierung der Konfiguration von &#8218;Nachrichten und Interessen&#8216; in Windows"},"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 Kontrolle:<\/strong> Das Skript automatisiert die Verwaltung der Funktion &#8218;Nachrichten und Interessen&#8216; in Windows 10 und &#8218;Widgets&#8216; in Windows 11.<\/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>Verwaltung mehrerer Benutzer:innen:<\/strong> Das Skript erm\u00f6glicht \u00c4nderungen in allen Benutzerprofilen eines Systems, die verschiedene Kontotypen abdecken.<\/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>Erfordert Administratorrechte:<\/strong> Das Ausf\u00fchren des Skripts setzt Administratorrechte voraus, um Systemeinstellungen zu \u00e4ndern.<\/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>\u00c4nderungen des Registrierungsschl\u00fcssels:<\/strong> Die zentrale Funktion des Skripts besteht darin, dass es bestimmte Registrierungsschl\u00fcssel auf der Grundlage der Betriebssystemversion \u00e4ndern kann.<\/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>Sofortige Wirkung:<\/strong> Das Skript kann den Windows Explorer neu starten, um \u00c4nderungen sofort anzuwenden und so einen Systemneustart zu vermeiden.<\/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>Vielseitigkeit im Einsatz:<\/strong> Ideal f\u00fcr Unternehmensumgebungen, um Einheitlichkeit zu gew\u00e4hrleisten und Ablenkungen auf allen Computern des Unternehmens zu minimieren.<\/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>\u00dcberlegen gegen\u00fcber manuellen Methoden:<\/strong> Bietet einen effizienteren Ansatz im Vergleich zu herk\u00f6mmlichen manuellen Bearbeitungen oder Anpassungen von Gruppenrichtlinien.<\/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>Umkehrbarkeit:<\/strong> Durch das Skript vorgenommene \u00c4nderungen k\u00f6nnen r\u00fcckg\u00e4ngig gemacht werden, was eine flexible Verwaltung der Systemeinstellungen 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=\"9\" data-aria-level=\"1\"><strong>Empfohlene Sicherheitsma\u00dfnahmen:<\/strong> Vorsichtsma\u00dfnahmen wie gr\u00fcndliche Tests, Backups der Registrierung und eine klare Dokumentation sind f\u00fcr eine sichere und effektive Verwendung des Skripts ratsam.<\/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>Verbessertes IT-Management mit Tools:<\/strong> Die Integration dieses Skripts in Plattformen wie NinjaOne kann die IT-Verwaltungsaufgaben weiter rationalisieren.<\/li>\n<\/ul>\n<p>PowerShell-Skripte sind zu einem unverzichtbaren Tool in der Toolbox von IT-Expert:innen geworden und bieten ein leistungsstarkes Mittel zur Automatisierung und Verwaltung verschiedener Aspekte von Windows-Systemen. Eine solche Aufgabe ist die Konfiguration der Funktion &#8218;Nachrichten und Interessen&#8216; in Windows 10 und der Registerkarte &#8218;Widgets&#8216; in Windows 11. Diese Funktion ist zwar f\u00fcr einige Anwender:innen n\u00fctzlich, kann aber f\u00fcr andere eine Ablenkung oder ein unerw\u00fcnschtes Element sein, insbesondere in einem professionellen Umfeld. Das Verst\u00e4ndnis der effizienten Verwaltung dieser Funktion ist der Schl\u00fcssel zur Aufrechterhaltung eines optimalen und konzentrationsf\u00f6rdernden Arbeitsklimas.<\/p>\n<h2>Kontext<\/h2>\n<p>Das thematisierte Skript soll Administrator:innen die Kontrolle \u00fcber die Anzeige der Registerkarte &#8218;Nachrichten und Interessen&#8216;, bzw. der Registerkarte &#8218;Widgets&#8216; in Windows 11, in der Taskleiste erm\u00f6glichen. Dies ist besonders wichtig f\u00fcr IT-Expert:innen und <a href=\"https:\/\/www.ninjaone.com\/de\/was-ist-ein-msp\" target=\"_blank\" rel=\"noopener\">Managed Service Provider (MSPs)<\/a>, die mehrere Benutzerumgebungen verwalten. Die M\u00f6glichkeit, diese Funktionen per Fernzugriff zu aktivieren, zu deaktivieren oder \u00c4nderungen daran zu verhindern, gew\u00e4hrleistet eine einheitliche Benutzerumgebung, was sowohl f\u00fcr die <a href=\"https:\/\/www.ninjaone.com\/de\/blog\/checkliste-fuer-mehr-it-sicherheit-in-ihrem-unternehmen-ninjaone\/\" target=\"_blank\" rel=\"noopener\">Sicherheit<\/a> als auch f\u00fcr die einfache Verwaltung von entscheidender Bedeutung ist.<\/p>\n<h2>Das Skript zur Automatisierung der Konfiguration von &#8218;Nachrichten und Interessen&#8216;<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">#Requires -Version 5.1\r\n\r\n&lt;#\r\n.SYNOPSIS\r\n    Hides or shows the 'News and Interests' tab in the taskbar. On Windows 11, it hides or shows the widgets tab.\r\n.DESCRIPTION\r\n    Hides or shows the 'News and Interests' tab in the taskbar. On Windows 11, it hides or shows the widgets tab.\r\n.EXAMPLE\r\n    (No Parameters)\r\n    \r\n    WARNING: Hiding News and Interests from the taskbar for all users!\r\n    Registry::HKEY_USERS\\S-1-12-1-2117605486-1182246982-3318994623-3070967164\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 1 to 0\r\n    Registry::HKEY_USERS\\S-1-5-21-4122835015-3639794443-155648563-1001\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 1 to 0\r\n    WARNING: This script will take effect the next time the user completes a full sign-in or restarts.\r\n\r\nPARAMETER: -Enable\r\n    Reveals the 'News and Interests' tab in the taskbar.\r\n.EXAMPLE\r\n    -Enable\r\n\r\n    Revealing News and Interests for all users!\r\n    Registry::HKEY_USERS\\S-1-12-1-2117605486-1182246982-3318994623-3070967164\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 0 to 1\r\n    Registry::HKEY_USERS\\S-1-5-21-4122835015-3639794443-155648563-1001\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 0 to 1\r\n    WARNING: This script will take effect the next time the user completes a full sign-in or restarts.\r\n\r\nPARAMETER: -PreventChanges\r\n    Should the end-user be able to modify this setting after it's been set with this script?\r\n.EXAMPLE\r\n    -PreventChanges\r\n    \r\n    WARNING: Hiding News and Interests from the taskbar for all users!\r\n    Set Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Dsh\\AllowNewsAndInterests to 0\r\n    WARNING: This script will take effect the next time the user completes a full sign-in or restarts.\r\n\r\nPARAMETER: -RestartExplorer\r\n    In order for this script to take immediate effect, explorer.exe will need to be restarted.\r\n.EXAMPLE\r\n    -RestartExplorer\r\n\r\n    WARNING: Hiding News and Interests from the taskbar for all users!\r\n    Registry::HKEY_USERS\\S-1-12-1-2117605486-1182246982-3318994623-3070967164\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 1 to 0\r\n    Registry::HKEY_USERS\\S-1-5-21-4122835015-3639794443-155648563-1001\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDa changed from 1 to 0\r\n    WARNING: Restarting Explorer.exe\r\n\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum Supported OS: Windows 10+\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    [Switch]$Enable,\r\n    [Parameter()]\r\n    [Switch]$PreventChanges = [System.Convert]::ToBoolean($env:preventChanges),\r\n    [Parameter()]\r\n    [Switch]$RestartExplorer = [System.Convert]::ToBoolean($env:restartExplorer)\r\n)\r\n\r\nbegin {\r\n    # Grabbing dynamic script variables\r\n    if ($env:showOrHide -and $env:showOrHide -notlike \"null\") { if ($env:showOrHide -eq \"Show\") { $Enable = $True } }\r\n\r\n    # Check if script is running with local admin privileges.\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    # Get a list of all the user profiles for when the script is run as System.\r\n    function Get-UserHives {\r\n        param (\r\n            [Parameter()]\r\n            [ValidateSet('AzureAD', 'DomainAndLocal', 'All')]\r\n            [String]$Type = \"All\",\r\n            [Parameter()]\r\n            [String[]]$ExcludedUsers,\r\n            [Parameter()]\r\n            [switch]$IncludeDefault\r\n        )\r\n    \r\n        # User account SID's follow a particular pattern depending on if they're Azure AD or a Domain account or a local \"workgroup\" account.\r\n        $Patterns = switch ($Type) {\r\n            \"AzureAD\" { \"S-1-12-1-(\\d+-?){4}$\" }\r\n            \"DomainAndLocal\" { \"S-1-5-21-(\\d+-?){4}$\" }\r\n            \"All\" { \"S-1-12-1-(\\d+-?){4}$\" ; \"S-1-5-21-(\\d+-?){4}$\" } \r\n        }\r\n    \r\n        # We'll need the NTuser.dat file to load each user's registry hive. So we grab it if their account sid matches the above pattern. \r\n        $UserProfiles = Foreach ($Pattern in $Patterns) { \r\n            Get-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\*\" |\r\n                Where-Object { $_.PSChildName -match $Pattern } | \r\n                Select-Object @{Name = \"SID\"; Expression = { $_.PSChildName } },\r\n                @{Name = \"UserName\"; Expression = { \"$($_.ProfileImagePath | Split-Path -Leaf)\" } }, \r\n                @{Name = \"UserHive\"; Expression = { \"$($_.ProfileImagePath)\\NTuser.dat\" } }, \r\n                @{Name = \"Path\"; Expression = { $_.ProfileImagePath } }\r\n        }\r\n    \r\n        # There are some situations where grabbing the .Default user's info is needed.\r\n        switch ($IncludeDefault) {\r\n            $True {\r\n                $DefaultProfile = \"\" | Select-Object UserName, SID, UserHive, Path\r\n                $DefaultProfile.UserName = \"Default\"\r\n                $DefaultProfile.SID = \"DefaultProfile\"\r\n                $DefaultProfile.Userhive = \"$env:SystemDrive\\Users\\Default\\NTUSER.DAT\"\r\n                $DefaultProfile.Path = \"C:\\Users\\Default\"\r\n    \r\n                $DefaultProfile | Where-Object { $ExcludedUsers -notcontains $_.UserName }\r\n            }\r\n        }\r\n    \r\n        $UserProfiles | Where-Object { $ExcludedUsers -notcontains $_.UserName }\r\n    }\r\n\r\n    # Helper function for setting registry keys\r\n    function Set-RegKey {\r\n        param (\r\n            $Path,\r\n            $Name,\r\n            $Value,\r\n            [ValidateSet(\"DWord\", \"QWord\", \"String\", \"ExpandedString\", \"Binary\", \"MultiString\", \"Unknown\")]\r\n            $PropertyType = \"DWord\"\r\n        )\r\n        if (-not $(Test-Path -Path $Path)) {\r\n            # Check if path does not exist and create the path\r\n            New-Item -Path $Path -Force | Out-Null\r\n        }\r\n        if ((Get-ItemProperty -Path $Path -Name $Name -ErrorAction Ignore)) {\r\n            # Update property and print out what it was changed from and changed to\r\n            $CurrentValue = (Get-ItemProperty -Path $Path -Name $Name -ErrorAction Ignore).$Name\r\n            try {\r\n                Set-ItemProperty -Path $Path -Name $Name -Value $Value -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                Write-Error \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Error $_\r\n                exit 1\r\n            }\r\n            Write-Host \"$Path\\$Name changed from $CurrentValue to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction Ignore).$Name)\"\r\n        }\r\n        else {\r\n            # Create property with value\r\n            try {\r\n                New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $PropertyType -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                Write-Error \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Error $_\r\n                exit 1\r\n            }\r\n            Write-Host \"Set $Path\\$Name to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction Ignore).$Name)\"\r\n        }\r\n    }\r\n\r\n    # Restarts explorer.exe\r\n    function Reset-Explorer {\r\n        Write-Warning \"Restarting Explorer.exe\"\r\n        \r\n        Start-Sleep -Seconds 1\r\n        Get-Process explorer | Stop-Process -Force\r\n        Start-Sleep -Seconds 1\r\n\r\n        if (-not (Get-Process explorer)) {\r\n            Start-Process explorer.exe\r\n        }\r\n    }\r\n    \r\n    # Gets the OS Name E.g. Windows 10 Enterprise or Windows 11 Enterprise\r\n    function Get-OSName {\r\n        systeminfo | findstr \/B \/C:\"OS Name\"\r\n    }\r\n\r\n    $OSName = Get-OSName\r\n}\r\nprocess {\r\n    if (-not (Test-IsElevated)) {\r\n        Write-Error -Message \"Access Denied.\" -RecommendedAction \"Please run with Administrator privileges.\" -Exception (New-Object -TypeName System.UnauthorizedAccessException) -Category PermissionDenied\r\n        exit 1\r\n    }\r\n\r\n    # The registry key is different depending on if its Windows 10 or Windows 11\r\n    if ($OSName -Like \"*11*\") {\r\n        $AllUserPath = (Get-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Dsh\" -ErrorAction Ignore).AllowNewsAndInterests\r\n    }\r\n    else {\r\n        $AllUserPath = (Get-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Feeds\" -ErrorAction Ignore).EnableFeeds\r\n    }\r\n\r\n    # Issues a warning prior to removing the registry key that prevents changes from end-users\r\n    if ($AllUserPath -ge 0) {\r\n        $EnableOrDisable = switch ($AllUserPath) {\r\n            1 { \"revealed\" }\r\n            default { \"hidden\" }\r\n        }\r\n\r\n        if (-not ($PreventChanges)) {\r\n            Write-Warning \"News and Interests is currently $EnableOrDisable for all users. Removing 'Prevent Changes' setting to replace it with individual user setting as requested.\"\r\n            \r\n            if ($OSName -Like \"*11*\") {\r\n                Remove-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Dsh\" -Name \"AllowNewsAndInterests\"\r\n            }\r\n            else {\r\n                Remove-ItemProperty -Path \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Feeds\" -Name \"EnableFeeds\"\r\n            }\r\n        }\r\n    }\r\n\r\n    if ($OSName -Like \"*11*\") {\r\n        $KeyPath = \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Dsh\"\r\n        $KeyName = \"AllowNewsAndInterests\"\r\n        $Value = if ($Enable) { 1 }else { 0 }\r\n    }\r\n    else {\r\n        $KeyPath = \"Registry::HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Feeds\"\r\n        $KeyName = \"EnableFeeds\"\r\n        $Value = if ($Enable) { 1 }else { 0 }\r\n    }\r\n\r\n    # Sets a per user registry key if the end-user lock isn't set\r\n    if (-not ($PreventChanges)) {\r\n        $UserProfiles = Get-UserHives -Type \"All\"\r\n\r\n        $KeyPath = New-Object System.Collections.Generic.List[string]\r\n        $LoadedProfiles = New-Object System.Collections.Generic.List[Object]\r\n\r\n        Foreach ($UserProfile in $UserProfiles) {\r\n            # Load User ntuser.dat if it's not already loaded\r\n            If ((Test-Path \"Registry::HKEY_USERS\\$($UserProfile.SID)\" -ErrorAction Ignore) -eq $false) {\r\n                $LoadedProfiles.Add($UserProfile)\r\n                Start-Process -FilePath \"cmd.exe\" -ArgumentList \"\/C reg.exe LOAD HKU\\$($UserProfile.SID) `\"$($UserProfile.UserHive)`\"\" -Wait -WindowStyle Hidden\r\n            }\r\n            if ($OSName -Like \"*11*\") {\r\n                $KeyPath.Add(\"Registry::HKEY_USERS\\$($UserProfile.SID)\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\")\r\n            }\r\n            else {\r\n                $KeyPath.Add(\"Registry::HKEY_USERS\\$($UserProfile.SID)\\Software\\Microsoft\\Windows\\CurrentVersion\\Feeds\")\r\n            }\r\n        }\r\n\r\n        if ($OSName -Like \"*11*\") {\r\n            $KeyName = \"TaskbarDa\"\r\n            $Value = if ($Enable) { 1 }else { 0 }\r\n        }\r\n        else {\r\n            $KeyName = \"ShellFeedsTaskbarViewMode\"\r\n            $Value = if ($Enable) { 0 }else { 2 }\r\n        }\r\n    }\r\n\r\n    # Change the message depending on if we're hiding or showing the menu\r\n    if ($Enable) {\r\n        Write-Host \"Revealing News and Interests for all users!\"\r\n    }\r\n    else {\r\n        Write-Warning \"Hiding News and Interests from the taskbar for all users!\"\r\n    }\r\n    \r\n    # Setting the registry key\r\n    $KeyPath | ForEach-Object { Set-RegKey -Path $_ -Name $KeyName -Value $Value }\r\n\r\n    # Unload any profiles we loaded up earlier (if any)\r\n    Foreach ($LoadedProfile in $LoadedProfiles) {\r\n        [gc]::Collect()\r\n        Start-Sleep 1\r\n        Start-Process -FilePath \"cmd.exe\" -ArgumentList \"\/C reg.exe UNLOAD HKU\\$($LoadedProfile.SID)\" -Wait -WindowStyle Hidden | Out-Null\r\n    }\r\n\r\n    # Restart explorer.exe\r\n    if ($RestartExplorer) {\r\n        Reset-Explorer\r\n    }\r\n    else {\r\n        Write-Warning \"This script will take effect the next time the user completes a full sign-in or restarts.\"\r\n    }\r\n}\r\nend {\r\n    \r\n    \r\n    \r\n}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p style=\"text-align: center;\">Greifen Sie auf \u00fcber 300 Skripte im NinjaOne Dojo zu.<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.ninjaone.com\/de\/kostenlosetestversionformular\/\">Zugang erhalten<\/a><\/p>\n<\/div>\n<h2>Detaillierte Aufschl\u00fcsselung<\/h2>\n<ol>\n<li><strong>Initialisierung und Parametereinstellung:<\/strong> Das Skript beginnt mit dem Einrichten von Parametern zum Aktivieren der Funktion, zum Verhindern von \u00c4nderungen durch Endbenutzer:innen und zum Entscheiden, ob Windows Explorer bei sofortigen \u00c4nderungen neu gestartet werden soll. Es passt sich auch dynamisch an die Umgebungsvariablen an.<\/li>\n<li><strong>\u00dcberpr\u00fcfung auf Administratorrechte:<\/strong> Ein kritischer Schritt ist die \u00dcberpr\u00fcfung auf Administratorrechte. Das Skript pr\u00fcft, ob es mit den erforderlichen Berechtigungen ausgef\u00fchrt wird, um sicherzustellen, dass keine unbefugten \u00c4nderungen vorgenommen werden.<\/li>\n<li><strong>Behandlung von Benutzerprofilen:<\/strong> Es identifiziert alle Benutzerprofile auf dem System, was f\u00fcr die Anwendung von Einstellungen auf mehrere Benutzer:innen unerl\u00e4sslich ist. Dazu geh\u00f6rt die Behandlung verschiedener Kontotypen wie Azure AD, Domain oder lokale Konten.<\/li>\n<li><strong>\u00c4nderung des Registrierungsschl\u00fcssels:<\/strong> Das Skript greift dann auf die <a href=\"https:\/\/www.ninjaone.com\/blog\/what-is-windows-registry\/\" target=\"_blank\" rel=\"noopener\">Windows-Registrierung<\/a> zu und \u00e4ndert sie. Hier wird die Funktion &#8218;Nachrichten und Interessen&#8216; oder &#8218;Widgets&#8216; aktiviert oder deaktiviert. Je nach Betriebssystemversion (Windows 10 oder 11) zielt es auf unterschiedliche Registrierungsschl\u00fcssel ab.<\/li>\n<li><strong>Explorer-Prozess neu starten:<\/strong> Optional kann das Skript den Windows Explorer-Prozess neu starten, um \u00c4nderungen sofort anzuwenden, ohne dass eine Benutzeranmeldung oder ein Systemneustart erforderlich ist.<\/li>\n<\/ol>\n<h2>M\u00f6gliche Anwendungsf\u00e4lle<\/h2>\n<p>Stellen Sie sich eine Unternehmensumgebung vor, in der die IT-Abteilung ein standardisiertes und ablenkungsfreies Arbeitsklima auf allen Unternehmenscomputern sicherstellen muss. Mit diesem Skript k\u00f6nnen sie die Funktion &#8218;Nachrichten und Interessen&#8216; auf allen Rechnern effizient deaktivieren, um ein einheitliches Benutzererlebnis zu gew\u00e4hrleisten und die Ablenkung zu minimieren.<\/p>\n<h2>Vergleiche<\/h2>\n<p>Bisher mussten solche \u00c4nderungen manuell in der Registrierung vorgenommen oder Gruppenrichtlinien angepasst werden. Dieses Skript rationalisiert den Prozess und erm\u00f6glicht es, \u00c4nderungen schnell und skaliert vorzunehmen, im Gegensatz zu den zeitaufw\u00e4ndigeren manuellen Methoden.<\/p>\n<h2>FAQs<\/h2>\n<p><strong>Q1: Funktioniert dieses Skript unter allen Windows-Versionen?<br \/>\n<\/strong>A1: Das Skript ist f\u00fcr Windows 10 und h\u00f6here Versionen konzipiert.<\/p>\n<p><strong>Q2: Sind Administratorrechte f\u00fcr die Ausf\u00fchrung dieses Skripts erforderlich?<br \/>\n<\/strong>A2: Ja, um \u00c4nderungen an der Registrierung vorzunehmen, sind Administratorrechte erforderlich.<\/p>\n<p><strong>Q3: Kann dieses Skript \u00c4nderungen bei Bedarf r\u00fcckg\u00e4ngig machen?<br \/>\n<\/strong>A3: Ja, das Skript kann die Funktion aktivieren oder deaktivieren, sodass eine Umkehrung m\u00f6glich ist.<\/p>\n<h2>Folgen<\/h2>\n<p>Dieses Skript ist zwar von gro\u00dfem Nutzen, aber es ist wichtig, seine Auswirkungen zu bedenken. Die unbefugte Verwendung kann zu unerw\u00fcnschten Systemkonfigurationen f\u00fchren, und unbeabsichtigte Fehler bei der Skriptausf\u00fchrung k\u00f6nnen zu einer Instabilit\u00e4t des Systems f\u00fchren.<\/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\"><strong>Gr\u00fcndlich testen:<\/strong> F\u00fchren Sie das Skript vor dem Einsatz in einer Staging-Umgebung aus.<\/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>Backup der Registrierung:<\/strong> Sichern Sie immer Registrierungseinstellungen, bevor Sie \u00c4nderungen vornehmen.<\/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>Klare Dokumentation:<\/strong> F\u00fchren Sie eine klare Dokumentation der mit diesem Skript vorgenommenen \u00c4nderungen, damit Sie sp\u00e4ter darauf zur\u00fcckgreifen k\u00f6nnen.<\/li>\n<\/ul>\n<h2>Abschlie\u00dfende \u00dcberlegungen<\/h2>\n<p>Im Bereich des IT-Managements spielen Tools wie NinjaOne eine zentrale Rolle. Sie bieten eine einheitliche Plattform f\u00fcr die <a href=\"https:\/\/www.ninjaone.com\/de\/endpoint-management\/fernsteuerung-und-alarmierung\/\" target=\"_blank\" rel=\"noopener\">\u00dcberwachung und Automatisierung von IT-Aufgaben<\/a>, einschlie\u00dflich der Skriptbereitstellung. Dieses PowerShell-Skript kann in Kombination mit einem robusten Verwaltungs-Tool wie NinjaOne die F\u00e4higkeit von IT-Expert:innen, ihre digitale Umgebung zu verwalten und zu pflegen, erheblich verbessern und so zu mehr <a href=\"https:\/\/www.ninjaone.com\/de\/effizienz\/\" target=\"_blank\" rel=\"noopener\">Effizienz<\/a> und Kontrolle f\u00fchren.<\/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":[4307],"class_list":["post-421080","script_hub","type-script_hub","status-publish","hentry","script_hub_category-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/script_hub\/421080","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=421080"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/media?parent=421080"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/operating_system?post=421080"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/de\/wp-json\/wp\/v2\/use_cases?post=421080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}