DSCResources/xRegistryAccess/test.ps1





Import-Module "D:\powershell script\VSps\TFS WorkSpace\xRegistryDscResource\xRegistryAccess\xRegistryAccess\bin\Debug\xRegistryAccess.dll" -Verbose -Force -Prefix X


$par=@{
            Account="WIN-SHASLLBSN4O\Lynn";
            Path = "software\hphsite";
            RegistryRights = "ReadKey";
            InheritanceFlags = "ContainerInherit";
            PropagationFlags = "None";
            AccessControlType = "Allow";
            ensure = "present"
      }

Test-xTargetResource @par -Verbose -Debug

Set-XTargetResource @par










Configuration T
{
    Import-DscResource -module admin*
    Node localhost
    {
        xRegistryAccess XZ
        {
            Account="WIN-SHASLLBSN4O\Lynn"
            Path = "software\hphsite";
            RegistryRights = "FullControl"#"ReadKey","Delete"#,"FullControl"
            AccessControlType = "Allow"
            ensure = "present"
        }
    }
}
T c:\t
Start-DscConfiguration c:\t -Verbose -Wait