Tests/Integration/MSFT_xServiceResource_CredentialOnly.config.ps1
param ( [Parameter(Mandatory = $true)] [System.String] $ConfigurationName ) Configuration $ConfigurationName { param ( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.String] $Name, [ValidateSet('Present', 'Absent')] [ValidateNotNullOrEmpty()] [System.String] $Ensure = 'Present', [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Management.Automation.PSCredential] $Credential ) Import-DscResource -ModuleName 'xPSDesiredStateConfiguration' Node localhost { xService Service1 { Name = $Name Ensure = $Ensure Credential = $Credential } } } |