Skip to content

Install-PSGPOAdmx

Installs the ADMX files of Windows from the package of Microsoft: into a folder, or to create the central store of the domain.

The help of the command, as Get-Help Install-PSGPOAdmx -Full gives it.

Syntax

Install-PSGPOAdmx [-UICulture <string[]>] [-AllLanguages] [-Path <string>] [-MsiPath <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Install-PSGPOAdmx -CentralStore [-UICulture <string[]>] [-AllLanguages] [-Directory <GPOToolsDirectory>] [-Server <string>] [-MsiPath <string>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The module does not ship ADMX files: the console reads those of the central store of the domain, of Windows (%windir%\PolicyDefinitions) or of the SYSVOL of a Samba domain controller. This command downloads the package of Microsoft, Administrative Templates (.admx) for Windows 11 (an .msi, from download.microsoft.com), extracts it without installing it (msiexec /a on Windows, msiextract of msitools on Linux and macOS) and installs its .admx files with their .adml files in the languages asked for (-UICulture) or all of them (-AllLanguages, 22 languages). The files are those of Microsoft, under its terms.

The module pins the package (Resources/PolicyDefinitions.json): a download whose size or SHA-256 differs is refused, and so are extracted files that are not those pinned, set by set (the .admx files, each language), before anything is written.

  • Without -CentralStore, the files go into -Path, by default next to the module when it can be written to, else into the data folder of the user (PSGPOTools/PolicyDefinitions), where the console and Initialize-PSGPOAdmx find them.
  • With -CentralStore, they go into the central store of the domain, SYSVOL\\Policies\PolicyDefinitions on the domain controller the directory comes from (Windows: its share; Linux: smbclient with Kerberos), as an administrator creates it for GPMC: every console of the domain then reads them. The files already there (the ADMX files of other products) are kept, those of the same name replaced.

A computer without internet: download the package on another computer (the page of Microsoft is in the error of a failed download) and give it with -MsiPath; it is checked as a download is.

Parameters

-UICulture

The languages of the .adml files to install (en-US, fr-FR...); by default en-US and the language of the session.

Type Required Position Default value Accepts pipeline input
String[] No Named None No

-AllLanguages

The 22 languages.

Type Required Position Default value Accepts pipeline input
SwitchParameter No Named None No

-Path

The PolicyDefinitions folder to write; next to the module, else the data folder of the user, by default.

Type Required Position Default value Accepts pipeline input
String No Named None No

-CentralStore

Writes the central store of the domain (SYSVOL\\Policies\PolicyDefinitions).

Type Required Position Default value Accepts pipeline input
SwitchParameter Yes Named None No

-Directory

With -CentralStore: the domain (from Get-PSGPODirectory); the domain of the computer by default.

Type Required Position Default value Accepts pipeline input
GPOToolsDirectory No Named None No

-Server

With -CentralStore: the domain controller to read the domain from and write to.

Type Required Position Default value Accepts pipeline input
String No Named None No

-MsiPath

The package of Microsoft downloaded beforehand (the .msi file): nothing is downloaded. It must be the package the module pins.

Type Required Position Default value Accepts pipeline input
String No Named None No

-Force

Writes even when ADMX files are already there.

Type Required Position Default value Accepts pipeline input
SwitchParameter No Named None No

-WhatIf

Type Required Position Default value Accepts pipeline input
SwitchParameter No Named None No

-Confirm

Type Required Position Default value Accepts pipeline input
SwitchParameter No Named None No

Examples

Example 1

Install-PSGPOAdmx
The .admx files, with their en-US .adml files and those of the language of the session,
next to the module.

Example 2

Install-PSGPOAdmx -CentralStore -Server dc.hardenbox.labo -UICulture en-US, fr-FR
Creates the central store of the domain, in English and French.

Example 3

Install-PSGPOAdmx -AllLanguages -Path ~/PolicyDefinitions; Initialize-PSGPOAdmx -Path ~/PolicyDefinitions

Example 4

Install-PSGPOAdmx -MsiPath 'D:\Administrative Templates (.admx) for Windows 11 Sep 2026 Update.msi'
From the package copied to a computer without internet.

Outputs

  • PSGPOTools.AdmxInstall