Files
PowerShell-PSDscResources/Tests/Integration/MSFT_ServiceResource_CredentialOnly.config.ps1

40 lines
771 B
PowerShell

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 'PSDscResources'
Node localhost
{
Service Service1
{
Name = $Name
Ensure = $Ensure
Credential = $Credential
}
}
}