Skip to content

Instantly share code, notes, and snippets.

@bobalob
Last active December 3, 2016 18:04
Show Gist options
  • Save bobalob/6e4bf9458c07e78f024b5c855f17812c to your computer and use it in GitHub Desktop.
Save bobalob/6e4bf9458c07e78f024b5c855f17812c to your computer and use it in GitHub Desktop.
Configuration InstallApp
{
Param(
[Parameter(Mandatory=$true)][ValidateNotNullorEmpty()][PsCredential]$credential
)
Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
Node $AllNodes.NodeName
{
LocalConfigurationManager
{
CertificateId = $node.Thumbprint
}
Package SuperApplication
{
Ensure = 'Present'
Name = 'Super Application'
Path = "\\fileserver\superapp\setup.msi"
ProductId = 'e804de56-6249-4132-9677-d4877907d84a'
Arguments = "extras=super"
Credential = $credential
ReturnCode = [UInt32]3010,0
}
}
}
InstallApp -OutPutPath C:\DSC\CredentialPush `
-ConfigurationData C:\DSC\ConfigData\dscclient.example.com-ConfigData.psd1 `
-Credential $Credential (Get-Credential)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment