Skip to content

Commit

Permalink
Merge pull request #66 from dsccommunity/65-SCCMInstallProductName
Browse files Browse the repository at this point in the history
65 sccm install product name
  • Loading branch information
NEllis280 authored Sep 15, 2020
2 parents ddfd66b + 8d3deab commit dd87237
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
SecurityScopesToInclude, SecurityScopesToExclude to CMBoundaryGroup resource.
- Updated CMSystemDiscovery Resource to add needed throw and warn messages.
- Added InstanceDir parameter to SQL composite.
- Updated the xSCCMInstall resource accounting for the product name change on versions
1910 and greater.

### Removed

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ Please check out common DSC Community [contributing guidelines](https://dsccommu

### xSccmInstall

**Note**

If you installed SCCM on version 1906 or earlier, the registry key on the SCCM
server won't change on upgrade and you won't need to change the version here if
you are using apply and auto correct.

- **[String] SetupExePath** _(Required)_: Specifies the path to the setup.exe
for SCCM.
- **[String] IniFile** _(Required)_: Specifies the path of the ini file, to include
Expand All @@ -186,6 +192,7 @@ Please check out common DSC Community [contributing guidelines](https://dsccommu
- Values: { CAS | Primary }
- **[PSCredential] SccmInstallAccount** _(Required)_: Specifies the credentials to
use for the SCCM install.
- **[UInt32] Version** _(Required)_: Specifies the version of SCCM that will be installed.

#### xSccmInstall Examples

Expand Down
23 changes: 20 additions & 3 deletions source/DSCResources/xSccmInstall/xSccmInstall.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
.PARAMETER SccmInstallAccount
Specifies the credentials to use for the SCCM install.
.PARAMETER Version
Specifies the version of SCCM that will be installed.
#>
Configuration xSCCMInstall
{
Expand All @@ -34,18 +37,32 @@ Configuration xSCCMInstall

[Parameter(Mandatory = $true)]
[System.Management.Automation.PSCredential]
$SccmInstallAccount
$SccmInstallAccount,

[Parameter(Mandatory = $true)]
[ValidateSet('1902', '1906', '1910', '2002', '2006', '2010')]
[UInt32]
$Version
)

Import-DscResource -ModuleName PSDesiredStateConfiguration

if ($Version -lt 1910)
{
$prefix = 'System Center'
}
else
{
$prefix = 'Microsoft Endpoint'
}

if ($SccmServerType -eq 'CAS')
{
$productName = 'System Center Configuration Manager Central Administration Site Setup'
$productName = "$prefix Configuration Manager Central Administration Site Setup"
}
if ($SccmServerType -eq 'Primary')
{
$productName = 'System Center Configuration Manager Primary Site Setup'
$productName = "$prefix Configuration Manager Primary Site Setup"
}

Package SCCM
Expand Down
1 change: 1 addition & 0 deletions source/Examples/Resources/xSccmInstall/SccmInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Configuration Example
SetupExePath = 'C:\Temp\SCCMInstall\SMSSETUP\BIN\X64'
IniFile = 'C:\temp\Lab-CAS-Test.ini'
SccmServerType = 'CAS'
Version = 1902
SccmInstallAccount = $SccmInstallAccount
}
}
Expand Down

0 comments on commit dd87237

Please sign in to comment.