Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Last active February 26, 2020 01:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/e8120e1cc01b447d084322eb2ad14c95 to your computer and use it in GitHub Desktop.
Save PlagueHO/e8120e1cc01b447d084322eb2ad14c95 to your computer and use it in GitHub Desktop.
DSC Configuration for installing Windows Admin Center
configuration WindowsAdminCenter
{
param
(
[System.String]
$WacProductId = '{7019BE31-3389-46FB-A077-B813D53C1266}',
[System.String]
$WacDownloadPath = 'https://download.microsoft.com/download/1/0/5/1059800B-F375-451C-B37E-758FFC7C8C8B/WindowsAdminCenter1809.5.msi',
[System.Int16]
$Port = 6516,
[System.String]
$Thumbprint
)
Import-DscResource -ModuleName PSDscResources
if ([System.String]::IsNullOrEmpty($Thumbprint))
{
$wacInstallArguments = "/qn /l*v c:\windows\temp\windowsadmincenter.msiinstall.log SME_PORT=$Port SSL_CERTIFICATE_OPTION=generate"
}
else
{
$wacInstallArguments = "/qn /l*v c:\windows\temp\windowsadmincenter.msiinstall.log SME_PORT=$Port SME_THUMBPRINT=$Thumbprint"
}
Node localhost
{
MsiPackage InstallWindowsAdminCenter
{
ProductId = $WacProductId
Path = $WacDownloadPath
Arguments = $wacInstallArguments
Ensure = 'Present'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment