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