Created
August 7, 2016 08:56
-
-
Save guitarrapc/93713a4a2577abd6b9312677b641d307 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration Absent_System | |
{ | |
Import-DscResource -Modulename GraniResource | |
Node localhost | |
{ | |
cCredentialManager Absent | |
{ | |
InstanceIdentifier = $Node.InstanceIdentifier | |
Ensure = $Node.Ensure | |
Target = $Node.Target | |
} | |
} | |
} | |
$configurationData = @{ | |
AllNodes = @( | |
@{ | |
NodeName = "localhost" | |
PSDscAllowPlainTextPassword = $true | |
InstanceIdentifier = "JustAnIdentifierToKeepUnique" | |
Ensure = "Absent" | |
Target = "DesiredTargetName" | |
} | |
) | |
} | |
Absent_System -ConfigurationData $configurationData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration Present_System | |
{ | |
Import-DscResource -Modulename GraniResource | |
Node localhost | |
{ | |
cCredentialManager Present | |
{ | |
InstanceIdentifier = $Node.InstanceIdentifier | |
Ensure = $Node.Ensure | |
Target = $Node.Target | |
Credential = $Node.Credential | |
} | |
} | |
} | |
$configurationData = @{ | |
AllNodes = @( | |
@{ | |
NodeName = "localhost" | |
PSDscAllowPlainTextPassword = $true | |
InstanceIdentifier = "JustAnIdentifierToKeepUnique" | |
Ensure = "Present" | |
Target = "DesiredTargetName" | |
Credential = New-Object PSCredential ("PesterTestDummy", ("PesterTestPassword" | ConvertTo-SecureString -Force -AsPlainText)) | |
} | |
) | |
} | |
Present_System -ConfigurationData $configurationData |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment