Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions GPO/NETworkManager.admx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
revision="1.0"
schemaVersion="1.0"
xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
<policyNamespaces>
<target prefix="NETworkManager" namespace="NETworkManager.Policies" />
</policyNamespaces>
<resources minRequiredRevision="1.0"/>
<supportedOn>
<definitions>
<definition name="RequiresNETworkManager20251111" displayName="$(string.RequiresNETworkManager20251111)"/>
</definitions>
</supportedOn>
<categories>
<category name="NETworkManager_Category" displayName="NETworkManager" />
</categories>
<policies>
<!-- Disable Update Check Policy -->
<policy name="DisableUpdateCheck"
class="User"
displayName="$(string.DisableUpdateCheck)"
explainText="$(string.DisableUpdateCheckMessage)"
key="Software\Policies\NETworkManager"
valueName="DisableUpdateCheck">
<parentCategory ref="NETworkManager_Category" />
<supportedOn ref="RequiresNETworkManager20251111" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
</policies>
</policyDefinitions>
16 changes: 16 additions & 0 deletions GPO/en-US/NETworkManager.adml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
revision="1.0"
schemaVersion="1.0"
xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
<displayName>NETworkManager Policy Settings</displayName>
<description>Policy settings for NETworkManager</description>
<resources>
<stringTable>
<string id="RequiresNETworkManager20251111">At least NETworkManager 2025.11.11.0</string>
<string id="DisableUpdateCheck">Disable Update Check</string>
<string id="DisableUpdateCheckMessage">When enabled, this policy prevents NETworkManager from checking for updates on startup. When disabled or not configured, update checks are performed.</string>
</stringTable>
</resources>
</policyDefinitionResources>
24 changes: 24 additions & 0 deletions Scripts/Update-LocalGroupPolicy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Check for administrative privileges and rerun as administrator if needed
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Host "Script is not running with administrative privileges. Restarting with elevated rights..."
Start-Process -FilePath "powershell.exe" -ArgumentList "-NoProfile -ExecutionPolicy Bypass -NoExit -File `"$PSCommandPath`"" -Verb RunAs
exit
}

# Update local group policy files for NETworkManager
[string]$GpoFolderPath = Join-Path -Path (Split-Path $PSScriptRoot -Parent) -ChildPath "GPO"
[string]$AdmxFilePath = Join-Path -Path $GpoFolderPath -ChildPath "NETworkManager.admx"
[string]$AdmlFolderPath = Join-Path -Path $GpoFolderPath -ChildPath "en-US"
[string]$AdmlFilePath = Join-Path -Path $AdmlFolderPath -ChildPath "NETworkManager.adml"

# Copy ADMX file to local policy store
$LocalAdmxPath = Join-Path -Path "$env:SystemRoot\PolicyDefinitions" -ChildPath "NETworkManager.admx"
Copy-Item -Path $AdmxFilePath -Destination $LocalAdmxPath -Force

# Copy ADML file to local policy store
$LocalAdmlPath = Join-Path -Path "$env:SystemRoot\PolicyDefinitions\en-US" -ChildPath "NETworkManager.adml"
Copy-Item -Path $AdmlFilePath -Destination $LocalAdmlPath -Force

# End of script
Write-Host "Local Group Policy files for NETworkManager have been updated."