Last active
February 26, 2020 01:10
-
-
Save PlagueHO/e8120e1cc01b447d084322eb2ad14c95 to your computer and use it in GitHub Desktop.
DSC Configuration for installing Windows Admin Center
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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