Files
PowerShell-PSDscResources/Tests/Integration/MSFT_ServiceResource_CredentialOnly.config.ps1
T
2016-12-15 14:03:39 -08:00

40 lines
750 B
PowerShell

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
}
}
}