├── Designer
├── Grani_ScriptOnOSVersion.ps1
├── Designer.csproj
├── Grani_WebPI.ps1
├── Grani_ScheduleTaskLog.ps1
├── Grani_TCPAckFrequency.ps1
├── Grani_RegistryKey.ps1
├── Grani_InheritACL.ps1
├── Grani_SymbolicLink.ps1
├── Grani_TopShelf.ps1
├── Grani_CredentialManager.ps1
├── Grani_HostsFile.ps1
├── Grani_DotNetFramework.ps1
├── Grani_DomainJoin.ps1
├── Grani_ACL.ps1
├── Grani_PfxImport.ps1
├── Grani_Download.ps1
└── Grani_S3Content.ps1
├── InstallModules
├── GraniResource.psd1
├── Package
├── GraniResource_2.3.zip
├── GraniResource_2.4.zip
├── GraniResource_2.5.zip
├── GraniResource_2.6.zip
├── GraniResource_2.7.zip
├── GraniResource_2.7.1.zip
├── GraniResource_2.7.2.zip
├── GraniResource_2.8.0.zip
├── GraniResource_2.8.1.zip
├── GraniResource_2.8.2.zip
├── GraniResource_2.9.0.zip
├── GraniResource_2.9.1.zip
├── GraniResource_3.0.0.zip
├── GraniResource_3.0.2.zip
├── GraniResource_3.0.3.zip
├── GraniResource_3.1.0.zip
├── GraniResource_3.2.0.zip
├── GraniResource_3.3.0.zip
├── GraniResource_3.4.0.zip
├── GraniResource_3.4.1.zip
├── GraniResource_3.5.0.zip
├── GraniResource_3.5.1.zip
├── GraniResource_3.6.0.zip
├── GraniResource_3.6.1.zip
├── GraniResource_3.6.2.zip
├── GraniResource_3.6.3.zip
├── GraniResource_3.6.4.zip
├── GraniResource_3.6.8.zip
├── GraniResource_3.7.0.zip
├── GraniResource_3.7.1.zip
├── GraniResource_3.7.2.zip
├── GraniResource_3.7.3.zip
├── GraniResource_3.7.4.zip
├── GraniResource_3.7.5.zip
├── GraniResource_3.7.6.zip
├── GraniResource_2.10.0.zip
├── GraniResource_2.10.1.zip
├── GraniResource_2.11.0.zip
├── GraniResource_2.11.3.zip
├── GraniResource_3.7.10.0.zip
├── GraniResource_3.7.11.0.zip
├── GraniResource_3.7.7.0.zip
├── GraniResource_3.7.8.0.zip
├── GraniResource_3.7.8.1.zip
├── GraniResource_3.7.8.2.zip
├── GraniResource_3.7.8.3.zip
├── GraniResource_3.7.8.4.zip
├── GraniResource_3.7.9.0.zip
└── GraniResource_3.7.9.1.zip
├── DSCResources
├── Grani_ACL
│ ├── cACL.png
│ └── Grani_ACL.schema.mof
├── Grani_WebPI
│ ├── cWebPI.png
│ ├── Grani_WebPI.schema.mof
│ └── README.md
├── Grani_Download
│ ├── cDownload.png
│ ├── Grani_Download.schema.mof
│ └── README.md
├── Grani_TopShelf
│ ├── cTopShelf.png
│ ├── Grani_TopShelf.psm1
│ └── Grani_TopShelf.schema.mof
├── Grani_HostsFile
│ ├── cHostsFile.png
│ └── Grani_HostsFile.schema.mof
├── Grani_PfxImport
│ ├── cPfxImport.png
│ └── Grani_PfxImport.schema.mof
├── Grani_S3Content
│ ├── cS3Content.png
│ └── Grani_S3Content.schema.mof
├── Grani_DomainJoin
│ ├── cDomainJoin.png
│ ├── Grani_DomainJoin.psm1
│ └── Grani_DomainJoin.schema.mof
├── Grani_InheritACL
│ ├── cInheritACL.png
│ ├── Grani_InheritACL.schema.mof
│ ├── cInheritACLProtectedNoPreserve.png
│ └── cInheritACLProtectedPreserve.png
├── cWebPILauncher
│ ├── cWebPILauncher.png
│ ├── cWebPILauncher.md
│ └── cWebPILauncher.schema.psm1
├── Grani_RegistryKey
│ ├── cRegistryKey.png
│ └── Grani_RegistryKey.schema.mof
├── Grani_ScheduleTask
│ ├── cScheduleTask.png
│ └── Grani_ScheduleTask.schema.mof
├── Grani_SymbolicLink
│ ├── cSymbolicLink.png
│ ├── Grani_SymbolicLink.schema.mof
│ └── README.md
├── Grani_PendingReboot
│ ├── cPendingReboot.png
│ ├── Grani_PendingReboot.psm1
│ └── Grani_PendingReboot.schema.mof
├── Grani_DotNetFramework
│ ├── cDotNetFramework.png
│ ├── Grani_DotNetFramework.schema.mof
│ └── README.md
├── Grani_ScheduleTaskLog
│ ├── cScheduleTaskLog.png
│ ├── Grani_ScheduleTaskLog.schema.mof
│ ├── README.md
│ └── Grani_ScheduleTaskLog.psm1
├── Grani_TCPAckFrequency
│ ├── cTCPAckFrequency.png
│ ├── Grani_TCPAckFrequency.schema.mof
│ ├── README.md
│ └── Grani_TCPAckFrequency.psm1
├── Grani_CredentialManager
│ ├── cCredentialManager.png
│ └── Grani_CredentialManager.schema.mof
├── Grani_GitHubApiContent
│ ├── cGitHubApiContent.png
│ └── Grani_GitHubApiContent.schema.mof
└── Grani_ScriptOnOSVersion
│ ├── cScriptOnOSVersion.png
│ ├── Grani_ScriptOnOSVersion.schema.mof
│ └── README.md
├── Tests
├── Grani_ACL
│ ├── Absent
│ │ ├── cACLResource.txt
│ │ ├── ACLChange
│ │ │ └── Localhost.mof
│ │ └── cACLResource.ps1
│ └── Present
│ │ ├── cACLResource.txt
│ │ ├── ACLChange
│ │ └── Localhost.mof
│ │ └── cACLResource.ps1
├── Grani_ScheduleTaskLog
│ ├── Enabled.txt
│ ├── Disabled.txt
│ ├── Enabled
│ │ └── localhost.mof
│ ├── Disabled
│ │ └── localhost.mof
│ ├── Enabled.ps1
│ └── Disabled.ps1
├── cWebPILauncher
│ ├── cWebPILauncher.txt
│ ├── cWebPILauncher
│ │ └── Localhost.mof
│ └── cWebPILauncher.ps1
├── Grani_WebPI
│ ├── WAP_PowerShellAPI
│ │ ├── Skip.txt
│ │ ├── Install.txt
│ │ ├── mof
│ │ │ └── localhost.mof
│ │ └── cWebPi.ps1
│ ├── GetTargetResource.ps1
│ ├── SetTargetResource.ps1
│ ├── TestTargetResource.ps1
│ ├── SetTargetResource.Tests.ps1
│ ├── TestTargetResource.Tests.ps1
│ └── GetTargetResource.Tests.ps1
├── Grani_Download
│ ├── Configuration
│ │ ├── mof
│ │ │ └── localhost.mof
│ │ ├── ConfigurationSample.ps1
│ │ └── cache
│ │ │ └── -448662428
│ ├── CacheHelper.ps1
│ ├── GetCacheKey.ps1
│ ├── GetPathItemType.ps1
│ ├── TargetResource.ps1
│ ├── ValidationHelper.ps1
│ ├── Invoke-HttpClient.ps1
│ ├── GetPathItemType.Tests.ps1
│ ├── GetCacheKey.Tests.ps1
│ ├── Invoke-HttpClient.Tests.ps1
│ └── ValidationHelper.Tests.ps1
├── Grani_InheritACL
│ ├── notProtected
│ │ ├── mof
│ │ │ └── Localhost.mof
│ │ ├── cInheritACLResource.png
│ │ ├── cInheritACLResource.txt
│ │ ├── cInheritACLResource_skip.txt
│ │ └── cInheritACLResource.ps1
│ ├── IsProtectedPreserve
│ │ ├── mof
│ │ │ └── Localhost.mof
│ │ ├── cInheritACLResource.png
│ │ ├── cInheritACLResource_Skip.txt
│ │ ├── cInheritACLResource.ps1
│ │ └── cInheritACLResource.txt
│ ├── IsProtectedNotPreserveBad
│ │ ├── mof
│ │ │ └── Localhost.mof
│ │ ├── cInheritACLResource.png
│ │ ├── cInheritACLResource.txt
│ │ ├── cInheritACLResource_Skip.txt
│ │ └── cInheritACLResource.ps1
│ ├── IsProtectedNotPreserveCorrect
│ │ ├── mof
│ │ │ └── Localhost.mof
│ │ ├── cInheritACLResource.png
│ │ ├── cInheritACLResource.txt
│ │ ├── cInheritACLResource_Skip.txt
│ │ └── cInheritACLResource.ps1
│ └── TargetResource.ps1
├── Grani_TopShelf
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── cTopShelf.ps1
│ │ └── Present
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── cTopShelf.ps1
│ ├── SampleTopShelfService
│ │ ├── SampleTopShelfService
│ │ │ ├── packages.config
│ │ │ ├── App.config
│ │ │ ├── Service.cs
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ └── Program.cs
│ │ └── SampleTopShelfService.sln
│ ├── Service.ps1
│ └── TargetResource.ps1
├── Grani_RegistryKey
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── cRegistryKey.ps1
│ │ └── Present
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── cRegistryKey.ps1
│ ├── RegistryKey.ps1
│ └── TargetResource.ps1
├── Grani_SymbolicLink
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── cSymbolicLink.ps1
│ │ └── Present
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── cSymbolicLink.ps1
│ ├── IsTest.ps1
│ ├── TargetResource.ps1
│ └── IsTest.Tests.ps1
├── Grani_GitHubApiContent
│ ├── Configuration
│ │ ├── cache
│ │ │ ├── 709375691
│ │ │ └── 1724884378
│ │ ├── mof
│ │ │ └── localhost.mof
│ │ ├── ConfigurationSample.ps1
│ │ └── ConfigurationSampleRaw.ps1
│ ├── CacheHelper.ps1
│ ├── GetCacheKey.ps1
│ ├── GetPathItemType.ps1
│ ├── Invoke-HttpClient.ps1
│ ├── TargetResource.ps1
│ ├── ValidationHelper.ps1
│ ├── GetPathItemType.Tests.ps1
│ └── GetCacheKey.Tests.ps1
├── Grani_PfxImport
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ └── Present
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ ├── CertHelper.ps1
│ ├── TargetResource.ps1
│ └── CertHelper.Tests.ps1
├── Grani_S3Content
│ ├── Configuration
│ │ ├── withAction
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ ├── withoutAction
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ └── CheckSumFileName
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ ├── HashHelper.ps1
│ ├── GetPathItemType.ps1
│ ├── TargetResource.ps1
│ ├── ScriptBlockHelper.ps1
│ ├── ValidationHelper.ps1
│ ├── ScriptBlockHelper.Tests.ps1
│ ├── GetPathItemType.Tests.ps1
│ └── HashHelper.Tests.ps1
├── Grani_ScheduleTask
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── cScheduleTask.txt
│ │ │ ├── absent
│ │ │ │ └── localhost.mof
│ │ │ └── cScheduleTask.ps1
│ │ └── Present
│ │ │ ├── Once
│ │ │ ├── SYSTEM
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ └── SpecificUser
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ ├── Daily
│ │ │ ├── SYSTEM
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ └── SpecificUser
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ ├── AtStartup
│ │ │ ├── SYSTEM
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ └── SpecificUser
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ ├── Repetition
│ │ │ ├── SYSTEM
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ └── SpecificUser
│ │ │ │ ├── SetLog.txt
│ │ │ │ ├── SkipLog.txt
│ │ │ │ ├── present
│ │ │ │ └── localhost.mof
│ │ │ │ └── cScheduleTask.ps1
│ │ │ └── AtLogOn
│ │ │ ├── SpecificUser
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── present
│ │ │ │ └── localhost.mof
│ │ │ └── cScheduleTask.ps1
│ │ │ └── SYSTEM+AnyUser
│ │ │ ├── SetLog.txt
│ │ │ ├── SkipLog.txt
│ │ │ ├── present
│ │ │ └── localhost.mof
│ │ │ └── cScheduleTask.ps1
│ ├── TargetResource.ps1
│ ├── TestScheduledTaskStatus.ps1
│ ├── ValidateTaskPathLastChar.ps1
│ ├── ValidateTaskPathLastChar.Tests.ps1
│ └── TestScheduledTaskStatus.Tests.ps1
├── Grani_DomainJoin
│ ├── Configuration
│ │ ├── JoinDomain
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ └── UnJoinDomain
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ ├── TargetResourceJoin.ps1
│ ├── TargetResourceUnJoin.ps1
│ ├── TargetResourceUnJoin.Tests.ps1
│ └── TargetResourceJoin.Tests.ps1
├── Grani_DotNetFramework
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ └── Present
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ ├── Validate.ps1
│ ├── Verify.ps1
│ ├── TargetResource.ps1
│ ├── Verify.Tests.ps1
│ └── Validate.Tests.ps1
├── Grani_TCPAckFrequency
│ ├── Grani_TCPAckFrequency
│ │ ├── Disable
│ │ │ ├── Skip.txt
│ │ │ ├── Install.txt
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── cTCPAckFrequency.ps1
│ │ └── Enable
│ │ │ ├── Skip.txt
│ │ │ ├── Install.txt
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── cTCPAckFrequency.ps1
│ ├── GetTargetResource.ps1
│ ├── SetTargetResource.ps1
│ ├── TestTargetResource.ps1
│ ├── SetTargetResource.Tests.ps1
│ ├── TestTargetResource.Tests.ps1
│ └── GetTargetResource.Tests.ps1
├── Grani_HostsFile
│ ├── Configuration
│ │ ├── StaticIp
│ │ │ ├── Absent
│ │ │ │ ├── mof
│ │ │ │ │ └── localhost.mof
│ │ │ │ └── ConfigurationSample.ps1
│ │ │ └── Present
│ │ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ │ └── ConfigurationSample.ps1
│ │ └── DnsServer
│ │ │ ├── Absent
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ │ └── Present
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ ├── Helper.ps1
│ └── TargetResource.ps1
├── Grani_ScriptOnOSVersion
│ ├── Configuration
│ │ ├── Absent
│ │ │ ├── absent
│ │ │ │ └── localhost.mof
│ │ │ ├── cScriptOnOSVersion.ps1
│ │ │ ├── SkipLog.txt
│ │ │ └── SetLog.txt
│ │ └── Present
│ │ │ ├── present
│ │ │ └── localhost.mof
│ │ │ ├── cScriptOnOSVersion.ps1
│ │ │ ├── SkipLog.txt
│ │ │ └── SetLog.txt
│ ├── TargetResource.ps1
│ └── .vscode
│ │ └── launch.json
├── Grani_PendingReboot
│ ├── Configuration
│ │ ├── SkipFilePendingReboot
│ │ │ ├── mof
│ │ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ │ └── ForRebootNodeIfNeededFalse
│ │ │ ├── mof
│ │ │ └── localhost.mof
│ │ │ └── ConfigurationSample.ps1
│ └── TargetResourceJoin.ps1
├── Tests.csproj
└── Grani_CredentialManager
│ └── Integration
│ ├── Grani_CredentialManager.Config.Absent.ps1
│ ├── Grani_CredentialManager.Config.Present.ps1
│ └── Grani_CredentialManager.Config.MultipleTargetPresent.ps1
├── New-GraniResourceManifest.ps1
├── LICENSE
├── GraniResource.sln
└── .gitattributes
/Designer/Grani_ScriptOnOSVersion.ps1:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/InstallModules:
--------------------------------------------------------------------------------
1 | Install-Module xDSCResourceDesigner
--------------------------------------------------------------------------------
/GraniResource.psd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/GraniResource.psd1
--------------------------------------------------------------------------------
/Package/GraniResource_2.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.4.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.5.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.5.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.6.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.6.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.7.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.7.zip
--------------------------------------------------------------------------------
/DSCResources/Grani_ACL/cACL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ACL/cACL.png
--------------------------------------------------------------------------------
/Package/GraniResource_2.7.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.7.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.7.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.7.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.8.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.8.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.8.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.8.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.8.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.8.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.9.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.9.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.9.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.9.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.0.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.0.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.0.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.0.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.0.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.0.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.1.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.1.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.2.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.2.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.3.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.3.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.4.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.4.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.4.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.4.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.5.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.5.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.5.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.5.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.4.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.6.8.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.6.8.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.4.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.5.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.5.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.6.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.6.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.10.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.10.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.10.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.10.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.11.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.11.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_2.11.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_2.11.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.10.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.10.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.11.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.11.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.7.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.7.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.8.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.8.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.8.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.8.1.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.8.2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.8.2.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.8.3.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.8.3.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.8.4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.8.4.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.9.0.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.9.0.zip
--------------------------------------------------------------------------------
/Package/GraniResource_3.7.9.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Package/GraniResource_3.7.9.1.zip
--------------------------------------------------------------------------------
/DSCResources/Grani_WebPI/cWebPI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_WebPI/cWebPI.png
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Absent/cACLResource.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ACL/Absent/cACLResource.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Enabled.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTaskLog/Enabled.txt
--------------------------------------------------------------------------------
/Tests/cWebPILauncher/cWebPILauncher.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/cWebPILauncher/cWebPILauncher.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_Download/cDownload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_Download/cDownload.png
--------------------------------------------------------------------------------
/DSCResources/Grani_TopShelf/cTopShelf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_TopShelf/cTopShelf.png
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Present/cACLResource.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ACL/Present/cACLResource.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Disabled.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTaskLog/Disabled.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_ACL/Grani_ACL.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ACL/Grani_ACL.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_HostsFile/cHostsFile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_HostsFile/cHostsFile.png
--------------------------------------------------------------------------------
/DSCResources/Grani_PfxImport/cPfxImport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_PfxImport/cPfxImport.png
--------------------------------------------------------------------------------
/DSCResources/Grani_S3Content/cS3Content.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_S3Content/cS3Content.png
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/WAP_PowerShellAPI/Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_WebPI/WAP_PowerShellAPI/Skip.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_DomainJoin/cDomainJoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_DomainJoin/cDomainJoin.png
--------------------------------------------------------------------------------
/DSCResources/Grani_InheritACL/cInheritACL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_InheritACL/cInheritACL.png
--------------------------------------------------------------------------------
/DSCResources/cWebPILauncher/cWebPILauncher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/cWebPILauncher/cWebPILauncher.png
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Absent/ACLChange/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ACL/Absent/ACLChange/Localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_RegistryKey/cRegistryKey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_RegistryKey/cRegistryKey.png
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTask/cScheduleTask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScheduleTask/cScheduleTask.png
--------------------------------------------------------------------------------
/DSCResources/Grani_SymbolicLink/cSymbolicLink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_SymbolicLink/cSymbolicLink.png
--------------------------------------------------------------------------------
/DSCResources/Grani_TopShelf/Grani_TopShelf.psm1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_TopShelf/Grani_TopShelf.psm1
--------------------------------------------------------------------------------
/DSCResources/Grani_WebPI/Grani_WebPI.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_WebPI/Grani_WebPI.schema.mof
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Present/ACLChange/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ACL/Present/ACLChange/Localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Enabled/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTaskLog/Enabled/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/WAP_PowerShellAPI/Install.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_WebPI/WAP_PowerShellAPI/Install.txt
--------------------------------------------------------------------------------
/Tests/cWebPILauncher/cWebPILauncher/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/cWebPILauncher/cWebPILauncher/Localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_DomainJoin/Grani_DomainJoin.psm1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_DomainJoin/Grani_DomainJoin.psm1
--------------------------------------------------------------------------------
/DSCResources/Grani_PendingReboot/cPendingReboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_PendingReboot/cPendingReboot.png
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Disabled/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTaskLog/Disabled/localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_Download/Grani_Download.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_Download/Grani_Download.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_TopShelf/Grani_TopShelf.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_TopShelf/Grani_TopShelf.schema.mof
--------------------------------------------------------------------------------
/Tests/Grani_Download/Configuration/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_Download/Configuration/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/notProtected/mof/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/notProtected/mof/Localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Absent/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Absent/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Absent/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Absent/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Present/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Present/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Present/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Present/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/WAP_PowerShellAPI/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_WebPI/WAP_PowerShellAPI/mof/localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_DotNetFramework/cDotNetFramework.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_DotNetFramework/cDotNetFramework.png
--------------------------------------------------------------------------------
/DSCResources/Grani_HostsFile/Grani_HostsFile.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_HostsFile/Grani_HostsFile.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_PfxImport/Grani_PfxImport.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_PfxImport/Grani_PfxImport.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_S3Content/Grani_S3Content.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_S3Content/Grani_S3Content.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTaskLog/cScheduleTaskLog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScheduleTaskLog/cScheduleTaskLog.png
--------------------------------------------------------------------------------
/DSCResources/Grani_TCPAckFrequency/cTCPAckFrequency.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_TCPAckFrequency/cTCPAckFrequency.png
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Absent/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Absent/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Absent/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Absent/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Present/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Present/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Absent/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Absent/SetLog.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_CredentialManager/cCredentialManager.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_CredentialManager/cCredentialManager.png
--------------------------------------------------------------------------------
/DSCResources/Grani_DomainJoin/Grani_DomainJoin.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_DomainJoin/Grani_DomainJoin.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_GitHubApiContent/cGitHubApiContent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_GitHubApiContent/cGitHubApiContent.png
--------------------------------------------------------------------------------
/DSCResources/Grani_InheritACL/Grani_InheritACL.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_InheritACL/Grani_InheritACL.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_PendingReboot/Grani_PendingReboot.psm1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_PendingReboot/Grani_PendingReboot.psm1
--------------------------------------------------------------------------------
/DSCResources/Grani_RegistryKey/Grani_RegistryKey.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_RegistryKey/Grani_RegistryKey.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_ScriptOnOSVersion/cScriptOnOSVersion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScriptOnOSVersion/cScriptOnOSVersion.png
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Configuration/cache/1724884378:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_GitHubApiContent/Configuration/cache/1724884378
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Configuration/cache/709375691:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_GitHubApiContent/Configuration/cache/709375691
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/notProtected/cInheritACLResource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/notProtected/cInheritACLResource.png
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/notProtected/cInheritACLResource.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/notProtected/cInheritACLResource.txt
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Present/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Present/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Absent/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Absent/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Present/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Present/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Present/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Present/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTask/Grani_ScheduleTask.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScheduleTask/Grani_ScheduleTask.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_SymbolicLink/Grani_SymbolicLink.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_SymbolicLink/Grani_SymbolicLink.schema.mof
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Configuration/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_GitHubApiContent/Configuration/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedPreserve/mof/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedPreserve/mof/Localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/Configuration/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_PfxImport/Configuration/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/Configuration/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_PfxImport/Configuration/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TopShelf/Configuration/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_InheritACL/cInheritACLProtectedNoPreserve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_InheritACL/cInheritACLProtectedNoPreserve.png
--------------------------------------------------------------------------------
/DSCResources/Grani_InheritACL/cInheritACLProtectedPreserve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_InheritACL/cInheritACLProtectedPreserve.png
--------------------------------------------------------------------------------
/DSCResources/Grani_PendingReboot/Grani_PendingReboot.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_PendingReboot/Grani_PendingReboot.schema.mof
--------------------------------------------------------------------------------
/Designer/Designer.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/notProtected/cInheritACLResource_skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/notProtected/cInheritACLResource_skip.txt
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_RegistryKey/Configuration/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/withAction/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_S3Content/Configuration/withAction/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Absent/cScheduleTask.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Absent/cScheduleTask.txt
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_SymbolicLink/Configuration/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/Configuration/JoinDomain/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_DomainJoin/Configuration/JoinDomain/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Configuration/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_DotNetFramework/Configuration/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/mof/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/mof/Localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource.png
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Absent/absent/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Absent/absent/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/Skip.txt
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/Skip.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_DotNetFramework/Grani_DotNetFramework.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_DotNetFramework/Grani_DotNetFramework.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_GitHubApiContent/Grani_GitHubApiContent.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_GitHubApiContent/Grani_GitHubApiContent.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTaskLog/Grani_ScheduleTaskLog.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScheduleTaskLog/Grani_ScheduleTaskLog.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_TCPAckFrequency/Grani_TCPAckFrequency.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_TCPAckFrequency/Grani_TCPAckFrequency.schema.mof
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/Configuration/UnJoinDomain/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_DomainJoin/Configuration/UnJoinDomain/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Configuration/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_DotNetFramework/Configuration/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/StaticIp/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_HostsFile/Configuration/StaticIp/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/withoutAction/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_S3Content/Configuration/withoutAction/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/Install.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/Install.txt
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/Install.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/Install.txt
--------------------------------------------------------------------------------
/DSCResources/Grani_CredentialManager/Grani_CredentialManager.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_CredentialManager/Grani_CredentialManager.schema.mof
--------------------------------------------------------------------------------
/DSCResources/Grani_ScriptOnOSVersion/Grani_ScriptOnOSVersion.schema.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/DSCResources/Grani_ScriptOnOSVersion/Grani_ScriptOnOSVersion.schema.mof
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/DnsServer/Absent/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_HostsFile/Configuration/DnsServer/Absent/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/DnsServer/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_HostsFile/Configuration/DnsServer/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/StaticIp/Present/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_HostsFile/Configuration/StaticIp/Present/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/mof/Localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/mof/Localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource_Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource_Skip.txt
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/CheckSumFileName/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_S3Content/Configuration/CheckSumFileName/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Absent/absent/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScriptOnOSVersion/Configuration/Absent/absent/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource.png
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Present/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScriptOnOSVersion/Configuration/Present/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource.png
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource_Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource_Skip.txt
--------------------------------------------------------------------------------
/Tests/Grani_PendingReboot/Configuration/SkipFilePendingReboot/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_PendingReboot/Configuration/SkipFilePendingReboot/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource_Skip.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource_Skip.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/SetLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/SetLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_PendingReboot/Configuration/ForRebootNodeIfNeededFalse/mof/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_PendingReboot/Configuration/ForRebootNodeIfNeededFalse/mof/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/SkipLog.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/SkipLog.txt
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/present/localhost.mof:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/guitarrapc/GraniResource/HEAD/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/present/localhost.mof
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Enabled.ps1:
--------------------------------------------------------------------------------
1 | configuration Enabled
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cScheduleTaskLog hoge
5 | {
6 | Enable = $true
7 | }
8 | }
9 |
10 | Enabled -OutputPath Enabled
11 | Start-DscConfiguration -Wait -Force -Verbose -Path Enabled
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/WAP_PowerShellAPI/cWebPi.ps1:
--------------------------------------------------------------------------------
1 | configuration hoge
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cWebPi fuga
5 | {
6 | Name = 'WAP_PowerShellAPI'
7 | }
8 | }
9 |
10 | hoge -OutputPath hoge
11 | Start-DscConfiguration -Wait -Force -Verbose -Path hoge
--------------------------------------------------------------------------------
/Tests/Grani_Download/CacheHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/GetCacheKey.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Helper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/CertHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/HashHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTaskLog/Disabled.ps1:
--------------------------------------------------------------------------------
1 | configuration Disabled
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cScheduleTaskLog hoge
5 | {
6 | Enable = $false
7 | }
8 | }
9 |
10 | Disabled -OutputPath Disabled
11 | Start-DscConfiguration -Wait -Force -Verbose -Path Disabled
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/IsTest.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Service.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Validate.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Verify.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/GetPathItemType.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/ValidationHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/RegistryKey.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/GetPathItemType.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/GetTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/SetTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/TestTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/TargetResourceJoin.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/Invoke-HttpClient.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/CacheHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/GetCacheKey.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/ScriptBlockHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/ValidationHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Designer/Grani_WebPI.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Name `
5 | -Type String `
6 | -Attribute Key
7 |
8 | New-xDscResource -Name Grani_WebPI -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cWebPI -Force
9 |
10 |
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/TargetResourceUnJoin.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/GetPathItemType.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Invoke-HttpClient.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/ValidationHelper.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_PendingReboot/TargetResourceJoin.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/TargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/GetTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/SetTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/TestTargetResource.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/cWebPILauncher/cWebPILauncher.ps1:
--------------------------------------------------------------------------------
1 | configuration hoge
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cWebPILauncher fuga
5 | {
6 | ProductId = "4D84C195-86F0-4B34-8FDE-4A17EB41306A"
7 | }
8 | }
9 |
10 | hoge -OutputPath hoge
11 | Start-DscConfiguration -Path hoge -Wait -Force -Verbose
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/TestScheduledTaskStatus.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/ValidateTaskPathLastChar.ps1:
--------------------------------------------------------------------------------
1 | $parent = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $modulePath = $parent.Replace("Tests","DSCResources")
3 | $name = Split-Path $modulePath -leaf
4 | iex (Get-Content (Join-Path $modulePath "$name.psm1") -Raw).Replace("Export-ModuleMember -Function *-TargetResource", "")
5 |
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Disable/cTCPAckFrequency.ps1:
--------------------------------------------------------------------------------
1 | configuration test
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cTCPAckFrequency test
5 | {
6 | Enable = $false
7 | }
8 | }
9 |
10 | test -OutputPath test
11 | Start-DscConfiguration -Verbose -Force -Wait -Path test
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/Grani_TCPAckFrequency/Enable/cTCPAckFrequency.ps1:
--------------------------------------------------------------------------------
1 | configuration test
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cTCPAckFrequency test
5 | {
6 | Enable = $true
7 | }
8 | }
9 |
10 | test -OutputPath test
11 | Start-DscConfiguration -Verbose -Force -Wait -Path test
--------------------------------------------------------------------------------
/Designer/Grani_ScheduleTaskLog.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Enable `
5 | -Type Boolean `
6 | -Attribute Key
7 |
8 | New-xDscResource -Name Grani_ScheduleTaskLog -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cScheduleTaskLog -Force
9 |
10 |
--------------------------------------------------------------------------------
/Designer/Grani_TCPAckFrequency.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Enable `
5 | -Type Boolean `
6 | -Attribute Key
7 |
8 | New-xDscResource -Name Grani_TCPAckFrequency -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cTCPAckFrequency -Force
9 |
10 |
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Absent/cRegistryKey.ps1:
--------------------------------------------------------------------------------
1 | configuration absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cRegistryKey hoge
5 | {
6 | Key = "HKEY_LOCAL_MACHINE\SOFTWARE\hoge/piyo\fuga/nyao"
7 | Ensure = "Absent"
8 | }
9 | }
10 |
11 | absent
12 | Start-DscConfiguration -Path absent -Wait -Verbose -Force
--------------------------------------------------------------------------------
/Tests/Grani_RegistryKey/Configuration/Present/cRegistryKey.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cRegistryKey hoge
5 | {
6 | Key = "HKEY_LOCAL_MACHINE\SOFTWARE\hoge/piyo\fuga/nyao"
7 | Ensure = "Present"
8 | }
9 | }
10 |
11 | present
12 | Start-DscConfiguration -Path present -Wait -Verbose -Force
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Present/cSymbolicLink.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cSymbolicLink hoge
5 | {
6 | SourcePath = "C:\Logs\DSC"
7 | DestinationPath = "C:\DSC"
8 | Ensure = "Present"
9 | }
10 | }
11 |
12 | present
13 | Start-DscConfiguration -Path present -Wait -Verbose -Force
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Configuration/Absent/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 |
5 | cDotNetFramework hoge
6 | {
7 | KB = "KB3045563"
8 | Ensure = "Absent"
9 | NoRestart = $true
10 | }
11 | }
12 |
13 | Absent
14 | Start-DscConfiguration -Force -Wait -Path Absent -Verbose
15 | Get-DscConfiguration
16 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_PendingReboot/Configuration/ForRebootNodeIfNeededFalse/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration PendingReboot
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cPendingReboot PendingReboot
5 | {
6 | Name = "Pending Reboot"
7 | WaitTimeSec = 5
8 | Force = $true
9 | WhatIf = $false
10 | }
11 | }
12 | PendingReboot
13 | Start-DscConfiguration -Path PendingReboot -Wait -Force -Verbose
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/withoutAction/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadS3Object
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cS3Content Download
5 | {
6 | S3BucketName = "YourBucketName"
7 | Key = "ObjectName"
8 | DestinationPath = "c:\Path\To\Save\Content.log"
9 | }
10 | }
11 |
12 | DownloadS3Object
13 | Start-DscConfiguration -Verbose -Force -Wait -Path DownloadS3Object
--------------------------------------------------------------------------------
/Tests/Grani_Download/Configuration/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadGitHubRawContent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cDownload hoge
5 | {
6 | DestinationPath = "C:\Tools\README.md"
7 | Uri = "https://raw.githubusercontent.com/guitarrapc/DSCResources/master/README.md"
8 | }
9 | }
10 |
11 | DownloadGitHubRawContent
12 | Start-DscConfiguration -Wait -Verbose -Force -Path DownloadGitHubRawContent
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/DnsServer/Absent/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cHostsFile hoge
5 | {
6 | HostName = "google.com"
7 | IpAddress = "8.8.8.8"
8 | Ensure = "Absent"
9 | Reference = "DnsServer"
10 | }
11 | }
12 |
13 | absent
14 | Start-DscConfiguration -Force -Wait -Path absent -Verbose
15 | Get-DscConfiguration
16 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/StaticIp/Absent/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cHostsFile hoge
5 | {
6 | HostName = "google.com"
7 | IpAddress = "8.8.8.8"
8 | Ensure = "Absent"
9 | Reference = "StaticIp"
10 | }
11 | }
12 |
13 | absent
14 | Start-DscConfiguration -Force -Wait -Path absent -Verbose
15 | Get-DscConfiguration
16 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Absent/cTopShelf.ps1:
--------------------------------------------------------------------------------
1 | configuration absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cTopShelf hoge
5 | {
6 | ServiceName = "SampleTopShelfService"
7 | Path = (Resolve-Path "..\..\SampleTopShelfService\SampleTopShelfService\bin\Debug\SampleTopShelfService.exe").Path
8 | Ensure = "Absent"
9 | }
10 | }
11 |
12 | absent
13 | Start-DscConfiguration -Path absent -Wait -Verbose -Force -Debug
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/StaticIp/Present/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cHostsFile hoge
5 | {
6 | HostName = "google.com"
7 | IpAddress = "8.8.8.8"
8 | Ensure = "Present"
9 | Reference = "StaticIp"
10 | }
11 | }
12 |
13 | Present
14 | Start-DscConfiguration -Force -Wait -Path Present -Verbose
15 | Get-DscConfiguration
16 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/Configuration/Present/cTopShelf.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cTopShelf hoge
5 | {
6 | ServiceName = "SampleTopShelfService"
7 | Path = (Resolve-Path "..\..\SampleTopShelfService\SampleTopShelfService\bin\Debug\SampleTopShelfService.exe").Path
8 | Ensure = "Present"
9 | }
10 | }
11 |
12 | present
13 | Start-DscConfiguration -Path present -Wait -Verbose -Force -Debug
--------------------------------------------------------------------------------
/Tests/Grani_HostsFile/Configuration/DnsServer/Present/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cHostsFile hoge
5 | {
6 | HostName = "google.com"
7 | IpAddress = "8.8.8.8"
8 | Ensure = "Present"
9 | Reference = "DnsServer"
10 | }
11 | }
12 |
13 | Present
14 | Start-DscConfiguration -Force -Wait -Path Present -Verbose
15 | Get-DscConfiguration
16 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_PendingReboot/Configuration/SkipFilePendingReboot/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration PendingReboot
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cPendingReboot PendingReboot
5 | {
6 | Name = "Pending Reboot"
7 | WaitTimeSec = 5
8 | Force = $true
9 | WhatIf = $true
10 | TriggerPendingFileRename = $false
11 | }
12 | }
13 |
14 | PendingReboot
15 | Start-DscConfiguration -Wait -Force -Verbose PendingReboot
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/CheckSumFileName/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadS3Object
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cS3Content Download
5 | {
6 | S3BucketName = "YourBucketName"
7 | Key = "ObjectName"
8 | DestinationPath = "c:\Path\To\Save\Content.log"
9 | CheckSum = "FileName"
10 | }
11 | }
12 |
13 | DownloadS3Object
14 | Start-DscConfiguration -Verbose -Force -Wait -Path DownloadS3Object
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/SetTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_WebPI : Set-TargetResource" {
6 |
7 | $availableName = "ARRv3_0"
8 | Context "Should install complete." {
9 | It "Set-TargetResource should success as package '$availableName' is valid" {
10 | {Set-TargetResource -Name $availableName} | Should not Throw
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Tests/Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/Configuration/withAction/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadS3Object
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cS3Content Download
5 | {
6 | S3BucketName = "YourBucketName"
7 | Key = "ObjectName"
8 | DestinationPath = "c:\Path\To\Save\Content.log"
9 | PreAction = {"PreAction : {0}" -f (Get-Date)}
10 | PostAction = {"PostAction : {0}" -f (Get-Date)}
11 | }
12 | }
13 |
14 | DownloadS3Object
15 | Start-DscConfiguration -Verbose -Force -Wait -Path DownloadS3Object
--------------------------------------------------------------------------------
/Tests/Grani_Download/Configuration/cache/-448662428:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | System.Management.Automation.PSCustomObject
5 | System.Object
6 |
7 |
8 | F53C273BFC27562EA94E39D66B4360B899349D6E81B8BD26B78DF915923A831D
9 | C:\Tools\README.md
10 | 2015-01-21T20:50:37.9865728Z
11 | https://raw.githubusercontent.com/guitarrapc/DSCResources/master/README.md
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Designer/Grani_RegistryKey.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Key `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "SubKey Path to create."
8 | $property += New-xDscResourceProperty `
9 | -Name Ensure `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "Ensure Key exists or not-exists" `
13 | -ValueMap Present, Absent `
14 | -Values Present, Absent
15 |
16 | New-xDscResource -Name Grani_RegistryKey -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cRegistryKey -Force
17 |
18 |
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Absent/cScriptOnOSVersion.ps1:
--------------------------------------------------------------------------------
1 | configuration absent
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cScriptOnOSVersion hoge
5 | {
6 | Key = "hoge"
7 | SetScript = {Remove-Item -Path Env:Grani_ScriptOnOSVersion}
8 | TestScript = {!(Test-Path Env:Grani_ScriptOnOSVersion)}
9 | ExecuteOnPlatform = [Environment]::OSVersion.Platform
10 | ExecuteOnVersion = [System.Environment]::OSVersion.Version.ToString()
11 | When = 'Equal'
12 | }
13 | }
14 |
15 | absent
16 | Start-DscConfiguration -Path absent -Wait -Verbose -Force -Credential (Get-Credential)
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/ValidateTaskPathLastChar.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_ScheduleTask : ValidateTaskPathLastChar" {
6 |
7 | Context "GetPathItemType" {
8 |
9 | It "Last TaskPath char was not \. Output as add \ on last." {
10 | ValidateTaskPathLastChar -taskPath "hoge" | Should be "hoge\"
11 | }
12 |
13 | It "Last TaskPath char was \. No modify." {
14 | ValidateTaskPathLastChar -taskPath "hoge\" | Should be "hoge\"
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Present/cScriptOnOSVersion.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -ModuleName GraniResource
4 | cScriptOnOSVersion hoge
5 | {
6 | Key = "hoge"
7 | SetScript = {Set-Item -Path Env:Grani_ScriptOnOSVersion -Value 1}
8 | TestScript = {(Test-Path Env:Grani_ScriptOnOSVersion) -and (Get-Item -Path Env:Grani_ScriptOnOSVersion).Value -eq 1}
9 | ExecuteOnPlatform = [Environment]::OSVersion.Platform
10 | ExecuteOnVersion = [System.Environment]::OSVersion.Version.ToString()
11 | When = 'Equal'
12 | }
13 | }
14 |
15 | present
16 | Start-DscConfiguration -Path present -Wait -Verbose -Force -Credential (Get-Credential)
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/SetTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_TCPAckFrequency : Set-TargetResource" {
6 |
7 | $Enable = $true
8 | $Disable = $false
9 | Context "Should install complete." {
10 | It "Set-TargetResource should success as Enale : '$Enable'" {
11 | {Set-TargetResource -Enable $Enable} | Should not Throw
12 | }
13 |
14 | It "Set-TargetResource should success as Enale : '$Disable'" {
15 | {Set-TargetResource -Enable $Disable} | Should not Throw
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Absent/cACLResource.ps1:
--------------------------------------------------------------------------------
1 | # Absent
2 | configuration ACLChange
3 | {
4 | Import-DscResource -ModuleName GraniResource
5 |
6 | node Localhost
7 | {
8 | File hoge
9 | {
10 | Ensure = "Present"
11 | DestinationPath = "C:\host.txt"
12 | Type = "file"
13 | Contents = "hoge"
14 | }
15 |
16 | cACL Absent
17 | {
18 | Ensure = "Absent"
19 | Path = "C:\host.txt"
20 | Account = "Users"
21 | Rights = "FullControl"
22 | }
23 | }
24 | }
25 |
26 | ACLChange -OutputPath .
27 | Start-DscConfiguration -Wait -Force -Verbose -Path ACLChange
28 |
--------------------------------------------------------------------------------
/Tests/Grani_ACL/Present/cACLResource.ps1:
--------------------------------------------------------------------------------
1 | # Present
2 | configuration ACLChange
3 | {
4 | Import-DscResource -ModuleName GraniResource
5 |
6 | node Localhost
7 | {
8 | File hoge
9 | {
10 | Ensure = "Present"
11 | DestinationPath = "C:\host.txt"
12 | Type = "file"
13 | Contents = "hoge"
14 | }
15 |
16 | cACL FullCONTROL
17 | {
18 | Ensure = "Present"
19 | Path = "C:\host.txt"
20 | Account = "Users"
21 | Rights = "FullControl"
22 | }
23 | }
24 | }
25 |
26 | ACLChange -OutputPath .
27 | Start-DscConfiguration -Wait -Force -Verbose -Path ACLChange
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource.ps1:
--------------------------------------------------------------------------------
1 | # Present
2 | configuration InheritACL
3 | {
4 | Import-DscResource -ModuleName GraniResource
5 |
6 | $path = "C:\test";
7 | node Localhost
8 | {
9 | File hoge
10 | {
11 | Ensure = "Present"
12 | DestinationPath = $path
13 | Type = "Directory"
14 | }
15 |
16 | cInheritACL hoge
17 | {
18 | Path = $path
19 | IsProtected = $true
20 | PreserveInheritance = $true
21 | }
22 | }
23 | }
24 |
25 | InheritACL
26 | Start-DscConfiguration -Wait -Force -Verbose -Path InheritACL
27 | Get-DscConfiguration
28 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/notProtected/cInheritACLResource.ps1:
--------------------------------------------------------------------------------
1 | # Present
2 | configuration InheritACL
3 | {
4 | Import-DscResource -ModuleName GraniResource
5 |
6 | $path = "C:\test";
7 | node Localhost
8 | {
9 | File hoge
10 | {
11 | Ensure = "Present"
12 | DestinationPath = $path
13 | Type = "Directory"
14 | }
15 |
16 | cInheritACL hoge
17 | {
18 | Path = $path
19 | IsProtected = $false
20 | PreserveInheritance = $true
21 | }
22 | }
23 | }
24 |
25 | InheritACL
26 | Start-DscConfiguration -Wait -Force -Verbose -Path InheritACL
27 | Test-DscConfiguration
28 | Get-DscConfiguration
29 |
--------------------------------------------------------------------------------
/Designer/Grani_InheritACL.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Path `
5 | -Type String `
6 | -Attribute Key
7 | $property += New-xDscResourceProperty `
8 | -Name Ensure `
9 | -Type String `
10 | -Attribute Read `
11 | -ValueMap Present, Absent `
12 | -Values Present, Absent
13 | $property += New-xDscResourceProperty `
14 | -Name IsProtected `
15 | -Type Boolean `
16 | -Attribute Required
17 | $property += New-xDscResourceProperty `
18 | -Name PreserveInheritance `
19 | -Type Boolean `
20 | -Attribute Write
21 |
22 | New-xDscResource -Name Grani_InheritACL -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cInheritACL -Force
23 |
24 |
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService/Service.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics.Eventing;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace SampleTopShelfService
9 | {
10 | internal class Service
11 | {
12 | public string ServiceName { get; private set; }
13 |
14 | public Service(string serviceName)
15 | {
16 | this.ServiceName = serviceName;
17 | }
18 |
19 | public void Start()
20 | {
21 | Console.WriteLine("Running Service");
22 | }
23 |
24 | public void Stop()
25 | {
26 | Console.WriteLine("Stopping Service");
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Designer/Grani_SymbolicLink.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name DestinationPath `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "Symbolic Link path."
8 | $property += New-xDscResourceProperty `
9 | -Name SourcePath `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "Symbolic Link source path"
13 | $property += New-xDscResourceProperty `
14 | -Name Ensure `
15 | -Type String `
16 | -Attribute Required `
17 | -Description "Ensure Symbolic Link is Present or Absent." `
18 | -ValueMap Present, Absent `
19 | -Values Present, Absent
20 |
21 | New-xDscResource -Name Grani_SymbolicLink -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cSymbolicLink -Force
22 |
23 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Configuration/Present/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration Present
2 | {
3 | $uri46 = "http://go.microsoft.com/fwlink/?LinkId=528222";
4 | $folder = "c:\Test";
5 | $path = Join-Path $folder "NDP46-KB3045560-Web.exe";
6 |
7 | Import-DscResource -ModuleName GraniResource
8 |
9 | cDownload hoge
10 | {
11 | Uri = $uri46
12 | DestinationPath = $path
13 | }
14 |
15 | cDotNetFramework hoge
16 | {
17 | KB = "KB3045563"
18 | InstallerPath = $path
19 | Ensure = "Present"
20 | NoRestart = $true
21 | LogPath = "C:\Test\Present.log"
22 | DependsOn = "[cDownload]hoge"
23 | }
24 | }
25 |
26 | Present
27 | Start-DscConfiguration -Force -Wait -Path Present -Verbose
28 | Get-DscConfiguration
29 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/TestTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_TCPAckFrequency : Test-TargetResource" {
6 |
7 | $Enable = $true
8 | $Disable = $false
9 |
10 | $testEnable = Test-TargetResource -Enable $Enable
11 | $testDisable = Test-TargetResource -Enable $Disable
12 |
13 | Context "Test-TargetResource should return boolean" {
14 |
15 | It "Test-TargetResource should return $true for Enable : '$Enable'" {
16 | $testEnable | Should be $true
17 | }
18 |
19 | It "Test-TargetResource should return $false for Enable : '$Disable'" {
20 | $testDisable | Should be $false
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Absent/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration absent
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "absent"
9 | Execute = "powershell.exe"
10 | TaskName = "hoge"
11 | TaskPath = "\"
12 | ScheduledAt = [datetime]"00:00:00", [datetime]"01:00:00"
13 | }
14 | }
15 | }
16 |
17 | $ConfigurationData = @{
18 | Allnodes = @(
19 | @{
20 | NodeName = "*"
21 | PSDscAllowPlainTextPassword = $true
22 | }
23 | @{
24 | NodeName ="localhost"
25 | Role = "localhost"
26 | }
27 | )
28 | }
29 | absent -OutputPath . -ConfigurationData $ConfigurationData
30 | Start-DscConfiguration -Wait -Force -Verbose -Path absent
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/Configuration/Absent/cSymbolicLink.ps1:
--------------------------------------------------------------------------------
1 | configuration absent
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "absent"
9 | Execute = "powershell.exe"
10 | TaskName = "hoge"
11 | TaskPath = "\"
12 | ScheduledAt = [datetime]"00:00:00", [datetime]"01:00:00"
13 | }
14 | }
15 | }
16 |
17 | $ConfigurationData = @{
18 | Allnodes = @(
19 | @{
20 | NodeName = "*"
21 | PSDscAllowPlainTextPassword = $true
22 | }
23 | @{
24 | NodeName ="localhost"
25 | Role = "localhost"
26 | }
27 | )
28 | }
29 | absent -OutputPath . -ConfigurationData $ConfigurationData
30 | Start-DscConfiguration -Wait -Force -Verbose -Path absent
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/TestTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_WebPI : Test-TargetResource" {
6 |
7 | $availableName = "WordPress"
8 | $installedName = "PowerShell3"
9 |
10 | $TestTargetResourceInstall = Test-TargetResource -Name $installedName
11 | $TestTargetResourceAvailable = Test-TargetResource -Name $availableName
12 |
13 | Context "Test-TargetResource should return boolean" {
14 |
15 | It "Test-TargetResource should return $true with '$installedName'" {
16 | $TestTargetResourceInstall | Should be $true
17 | }
18 |
19 | It "Test-TargetResource should return $false with '$availableName'" {
20 | $TestTargetResourceAvailable | Should be $false
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTaskLog/README.md:
--------------------------------------------------------------------------------
1 | Grani_ScheduleTaskLog
2 | ============
3 |
4 | DSC Resource to configure Schedule Task Log enable/disable.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_ScheduleTaskLog | cScheduleTaskLog | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| not yet
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Disable Schedule Task Log.
34 |
35 | ```powershell
36 | configuration DisableScheduleTaskLog
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cScheduleTaskLog DisableScheduleTaskLog
40 | {
41 | Enable = $false
42 | }
43 | }
44 | ```
45 |
--------------------------------------------------------------------------------
/DSCResources/Grani_TCPAckFrequency/README.md:
--------------------------------------------------------------------------------
1 | Grani_TCPAckFrequency
2 | ============
3 |
4 | DSC Resource to configure TCPAckFrequency.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_TCPAckFrequency | cTCPAckFrequency | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Disable TCP Ack Frequency. You need restart computer to apply configuration.
34 |
35 | ```powershell
36 | configuration DisableTCPAckFrequency
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cTCPAckFrequency DisableTCPAckFrequency
40 | {
41 | Enable = $false
42 | }
43 | }
44 | ```
45 |
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveBad/cInheritACLResource.ps1:
--------------------------------------------------------------------------------
1 | # It can be work when there are already non-inherited access in $path.
2 | # But if it were scratch path, there should be none of non-inherited access,
3 | # and configuration should throw as there will be no access left.
4 | configuration InheritACL
5 | {
6 | Import-DscResource -ModuleName GraniResource
7 |
8 | $path = "C:\test";
9 | node Localhost
10 | {
11 | File hoge
12 | {
13 | Ensure = "Present"
14 | DestinationPath = $path
15 | Type = "Directory"
16 | }
17 |
18 | cInheritACL hoge
19 | {
20 | Path = $path
21 | IsProtected = $true
22 | PreserveInheritance = $false
23 | }
24 | }
25 | }
26 |
27 | InheritACL
28 | Start-DscConfiguration -Wait -Force -Verbose -Path InheritACL
29 | Get-DscConfiguration
30 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_CredentialManager/Integration/Grani_CredentialManager.Config.Absent.ps1:
--------------------------------------------------------------------------------
1 | configuration Grani_CredentialManager_Config_Absent
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node localhost
5 | {
6 | cCredentialManager Absent
7 | {
8 | InstanceIdentifier = $Node.InstanceIdentifier
9 | Ensure = $Node.Ensure
10 | Target = $Node.Target
11 | Credential = $Node.Credential
12 | }
13 | }
14 | }
15 |
16 | #configurationData
17 | $configurationDataAbsent = @{
18 | AllNodes = @(
19 | @{
20 | NodeName = "localhost"
21 | PSDscAllowPlainTextPassword = $true
22 | InstanceIdentifier = "PesterTest"
23 | Ensure = "Absent"
24 | Target = "PesterTest"
25 | Credential = New-Object PSCredential ("PesterTestDummy", ("PesterTestPassword" | ConvertTo-SecureString -Force -AsPlainText))
26 | }
27 | )
28 | }
29 |
--------------------------------------------------------------------------------
/Tests/Grani_CredentialManager/Integration/Grani_CredentialManager.Config.Present.ps1:
--------------------------------------------------------------------------------
1 | configuration Grani_CredentialManager_Config_Present
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node localhost
5 | {
6 | cCredentialManager Present
7 | {
8 | InstanceIdentifier = $Node.InstanceIdentifier
9 | Ensure = $Node.Ensure
10 | Target = $Node.Target
11 | Credential = $Node.Credential
12 | }
13 | }
14 | }
15 |
16 | #configurationData
17 | $configurationDataPresent = @{
18 | AllNodes = @(
19 | @{
20 | NodeName = "localhost"
21 | PSDscAllowPlainTextPassword = $true
22 | InstanceIdentifier = "PesterTest"
23 | Ensure = "Present"
24 | Target = "PesterTest"
25 | Credential = New-Object PSCredential ("PesterTestDummy", ("PesterTestPassword" | ConvertTo-SecureString -Force -AsPlainText))
26 | }
27 | )
28 | }
29 |
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/Configuration/JoinDomain/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DomainJoin
2 | {
3 | param
4 | (
5 | [PSCredential]$Credential
6 | )
7 |
8 | Import-DscResource -ModuleName GraniResource
9 |
10 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
11 | {
12 | cDomainJoin DomainJoin
13 | {
14 | Identifier = 'DomainJoin'
15 | DomainName = 'contoso.com'
16 | Credential = $Credential
17 | }
18 | }
19 | }
20 |
21 | $configurationData = @{
22 | AllNodes = @(
23 | @{
24 | NodeName = '*'
25 | PSDSCAllowPlainTextPassword = $true
26 | }
27 | @{
28 | NodeName = "localhost"
29 | Role = "localhost"
30 | }
31 | )
32 | }
33 |
34 | $credential = (Get-Credential)
35 | DomainJoin -Credential $credential -ConfigurationData $configurationData
36 | Start-DscConfiguration -Verbose -Force -Wait -Path DomainJoin
--------------------------------------------------------------------------------
/DSCResources/cWebPILauncher/cWebPILauncher.md:
--------------------------------------------------------------------------------
1 | cWebPILauncher
2 | ============
3 |
4 | Composite DSC Resource to configure Web Platform Installater.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | cWebPILauncher | cWebPILauncher | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| not yet
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Web Platform Installer v5. (default uri)
34 |
35 | ```powershell
36 | configuration WebPI
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cWebPi ARRv3
40 | {
41 | Name = 'ARRv3_0'
42 | }
43 | }
44 | ```
45 |
46 | Tips
47 | ----
48 |
49 | Make sure ProductId is valid for Installer Uri msi. Default Installer uri is WebPI v5.
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/Configuration/UnJoinDomain/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DomainUnJoin
2 | {
3 | param
4 | (
5 | [PSCredential]$Credential
6 | )
7 |
8 | Import-DscResource -ModuleName GraniResource
9 |
10 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
11 | {
12 | cDomainJoin DomainUnJoin
13 | {
14 | Identifier = 'DomainUnjoin'
15 | WorkGroupName = 'WORKGROUP'
16 | Credential = $Credential
17 | }
18 | }
19 | }
20 |
21 | $configurationData = @{
22 | AllNodes = @(
23 | @{
24 | NodeName = '*'
25 | PSDSCAllowPlainTextPassword = $true
26 | }
27 | @{
28 | NodeName = "localhost"
29 | Role = "localhost"
30 | }
31 | )
32 | }
33 |
34 | $credential = (Get-Credential)
35 | DomainUnJoin -Credential $credential -ConfigurationData $configurationData
36 | Start-DscConfiguration -Verbose -Force -Wait -Path DomainUnJoin -Debug
--------------------------------------------------------------------------------
/DSCResources/Grani_WebPI/README.md:
--------------------------------------------------------------------------------
1 | Grani_WebPI
2 | ============
3 |
4 | DSC Resource to configure Web Platform Installer Packages.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_WebPI | cWebPI | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Install Web Platform Version 5
34 |
35 | ```powershell
36 | configuration WebPILauncherInstall
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cWebPILauncher Installv5
40 | {
41 | ProductId = "4D84C195-86F0-4B34-8FDE-4A17EB41306A"
42 | }
43 | }
44 | ```
45 |
46 | Tips
47 | ----
48 |
49 | Web Platform Installer never offer unistall method. This module only manage installation status.
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/CertHelper.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_PfxImport : ValidationHelper" {
6 |
7 | Context "GetCertPath test" {
8 | It "CertStoreName : My should not Throw." {
9 | {GetCertPath -CertStoreName My } | Should not Throw
10 | }
11 |
12 | It "[System.String] => CertStoreName : My should be Cert:\LocalMachine\My." {
13 | GetCertPath -CertStoreName My | Should be "Cert:\LocalMachine\My"
14 | }
15 |
16 | foreach ($x in [Enum]::GetNames([System.Security.Cryptography.X509Certificates.StoreName]))
17 | {
18 | It "[System.Security.Cryptography.X509Certificates.StoreName] => CertStoreName : $x should be Cert:\LocalMachine\$x." {
19 | GetCertPath -CertStoreName $x | Should be "Cert:\LocalMachine\$x"
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/ScriptBlockHelper.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_S3Content : ScriptBlockHelper" {
6 |
7 | $folder = "c:\hoge"
8 | $scriptString = "whoami"
9 | $noReturnScriptString = "return ''"
10 | $credential = Get-Credential
11 |
12 | Context "ScriptBlockExecute Helper test" {
13 |
14 | It "ScriptBlock without Credential should not throw." {
15 | {ExecuteScriptBlock -ScriptBlockString $scriptString} | Should not Throw
16 | }
17 |
18 | It "ScriptBlock with Credential should not throw." {
19 | {ExecuteScriptBlock -ScriptBlockString $scriptString -Credential $credential} | Should not Throw
20 | }
21 |
22 | It "ScriptBlock void return should not throw." {
23 | {ExecuteScriptBlock -ScriptBlockString $noReturnScriptString} | Should not Throw
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Designer/Grani_TopShelf.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Path `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "TopShelf Service Path."
8 | $property += New-xDscResourceProperty `
9 | -Name ServiceName `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "Service Name | Display Name which installed by TopShelf. This must be same as you define in TopShelf."
13 | $property += New-xDscResourceProperty `
14 | -Name Ensure `
15 | -Type String `
16 | -Attribute Required `
17 | -Description "Relates to TopShelf Verbs. Ensure means install, uninstall means unistall. Only support install/uninstall as we only need these with DSC. : http://docs.topshelf-project.com/en/latest/overview/commandline.html" `
18 | -ValueMap Present, Absent `
19 | -Values Present, Absent
20 |
21 | New-xDscResource -Name Grani_TopShelf -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cTopShelf -Force
22 |
23 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SYSTEM/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "present"
9 | Execute = "powershell.exe"
10 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
11 | TaskName = "hoge"
12 | TaskPath = "\"
13 | ScheduledAt = [datetime]"00:00:00"
14 | Once = $true
15 | Runlevel = "Highest"
16 | Disable = $false
17 | }
18 | }
19 | }
20 |
21 | $ConfigurationData = @{
22 | Allnodes = @(
23 | @{
24 | NodeName = "*"
25 | PSDscAllowPlainTextPassword = $true
26 | }
27 | @{
28 | NodeName ="localhost"
29 | Role = "localhost"
30 | }
31 | )
32 | }
33 | present -OutputPath . -ConfigurationData $ConfigurationData
34 | Start-DscConfiguration -Wait -Force -Verbose -Path present
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedPreserve/cInheritACLResource.txt:
--------------------------------------------------------------------------------
1 | /*
2 | @TargetNode='Localhost'
3 | @GeneratedBy=Administrator
4 | @GenerationDate=07/30/2015 21:54:08
5 | @GenerationHost=DSCSERVER
6 | */
7 |
8 | instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
9 | {
10 | ResourceID = "[File]hoge";
11 | Type = "Directory";
12 | Ensure = "Present";
13 | DestinationPath = "C:\\test";
14 | ModuleName = "PSDesiredStateConfiguration";
15 | SourceInfo = "::9::9::File";
16 | ModuleVersion = "1.0";
17 |
18 | };
19 |
20 | instance of Grani_InheritACL as $Grani_InheritACL1ref
21 | {
22 | ResourceID = "[cInheritACL]hoge";
23 | PreserveInheritance = True;
24 | Path = "C:\\test";
25 | SourceInfo = "::16::9::cInheritACL";
26 | ModuleName = "GraniResource";
27 | IsProtected = True;
28 | ModuleVersion = "3.2.0";
29 |
30 | };
31 |
32 | instance of OMI_ConfigurationDocument
33 | {
34 | Version="1.0.0";
35 | Author="Administrator";
36 | GenerationDate="07/30/2015 21:54:08";
37 | GenerationHost="DSCSERVER";
38 | };
39 |
40 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SYSTEM/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "present"
9 | Execute = "powershell.exe"
10 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
11 | TaskName = "hoge"
12 | TaskPath = "\"
13 | ScheduledAt = [datetime]"00:00:00"
14 | Daily = $true
15 | Runlevel = "Highest"
16 | Disable = $false
17 | }
18 | }
19 | }
20 |
21 | $ConfigurationData = @{
22 | Allnodes = @(
23 | @{
24 | NodeName = "*"
25 | PSDscAllowPlainTextPassword = $true
26 | }
27 | @{
28 | NodeName ="localhost"
29 | Role = "localhost"
30 | }
31 | )
32 | }
33 | present -OutputPath . -ConfigurationData $ConfigurationData
34 | Start-DscConfiguration -Wait -Force -Verbose -Path present
--------------------------------------------------------------------------------
/DSCResources/cWebPILauncher/cWebPILauncher.schema.psm1:
--------------------------------------------------------------------------------
1 | configuration cWebPILauncher
2 | {
3 | param
4 | (
5 | [Parameter(Mandatory = $false, helpMessage = "Install and search from Reg by Get-DSCModuleProductId")]
6 | [string]$ProductId = "4D84C195-86F0-4B34-8FDE-4A17EB41306A",
7 |
8 | [Parameter(Mandatory = $false)]
9 | [string]$InstallerUri = "http://go.microsoft.com/fwlink/?LinkId=255386"
10 | )
11 |
12 | function Get-RedirectedUrl ([String]$URL) {
13 | $request = [System.Net.WebRequest]::Create($InstallerUri)
14 | $request.AllowAutoRedirect = $false
15 | $response = $request.GetResponse()
16 | $response | where StatusCode -eq "Found" | % {$_.GetResponseHeader("Location")}
17 | }
18 |
19 | $name = "Web Platform Installer"
20 | $DownloadPath = Get-RedirectedUrl $InstallerUri
21 |
22 | Package InstallWebPILauncher {
23 | Name = $name
24 | Path = $DownloadPath
25 | ReturnCode = 0
26 | ProductId = $productId
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SYSTEM/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "present"
9 | Execute = "powershell.exe"
10 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
11 | TaskName = "hoge"
12 | TaskPath = "\"
13 | AtStartup = $true
14 | Runlevel = "Highest"
15 | Disable = $false
16 | }
17 | }
18 | }
19 |
20 | $ConfigurationData = @{
21 | Allnodes = @(
22 | @{
23 | NodeName = "*"
24 | PSDscAllowPlainTextPassword = $true
25 | }
26 | @{
27 | NodeName ="localhost"
28 | Role = "localhost"
29 | }
30 | )
31 | }
32 | ScheduleTask -OutputPath . -ConfigurationData $ConfigurationData
33 | Start-DscConfiguration -Wait -Force -Verbose -Path ScheduleTask
34 | Test-DscConfiguration
35 | Get-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SYSTEM+AnyUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "present"
9 | Execute = "powershell.exe"
10 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
11 | TaskName = "hoge"
12 | TaskPath = "\"
13 | AtLogOn = $true
14 | Runlevel = "Highest"
15 | Disable = $false
16 | }
17 | }
18 | }
19 |
20 | $ConfigurationData = @{
21 | Allnodes = @(
22 | @{
23 | NodeName = "*"
24 | PSDscAllowPlainTextPassword = $true
25 | }
26 | @{
27 | NodeName ="localhost"
28 | Role = "localhost"
29 | }
30 | )
31 | }
32 | ScheduleTask -OutputPath . -ConfigurationData $ConfigurationData
33 | Start-DscConfiguration -Wait -Force -Verbose -Path ScheduleTask -Debug
34 | Test-DscConfiguration
35 | Get-DscConfiguration
--------------------------------------------------------------------------------
/Designer/Grani_CredentialManager.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name InstanceIdentifier `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "Configuration Instance Identifier to handle same Target with multiple PsDscRunCredential."
8 | $property += New-xDscResourceProperty `
9 | -Name Target `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "Credential Manager entry identifier link to Credential."
13 | $property += New-xDscResourceProperty `
14 | -Name Credential `
15 | -Type PSCredential `
16 | -Attribute Write `
17 | -Description "Credential to save."
18 | $property += New-xDscResourceProperty `
19 | -Name Ensure `
20 | -Type String `
21 | -Attribute Required `
22 | -ValueMap Present, Absent `
23 | -Values Present, Absent `
24 | -Description "Ensure Target entry is Present or Absent."
25 | New-xDscResource -Name Grani_CredentialManager -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cCredentialManager -Force
26 |
27 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Configuration/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadGitHubContentFromAPI
2 | {
3 | param
4 | (
5 | [PSCredential]$Credential
6 | )
7 |
8 | Import-DscResource -ModuleName GraniResource
9 |
10 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
11 | {
12 | cGitHubApiContent hoge
13 | {
14 | DestinationPath = "C:\Tools\README.md"
15 | Repository = "DSCResources"
16 | RepositoryOwner = "guitarrapc"
17 | ContentPath = "README.md"
18 | OAuth2Token = $Credential
19 | }
20 | }
21 | }
22 |
23 | $configurationData = @{
24 | AllNodes = @(
25 | @{
26 | NodeName = '*'
27 | PSDSCAllowPlainTextPassword = $true
28 | }
29 | @{
30 | NodeName = "localhost"
31 | Role = "localhost"
32 | }
33 | )
34 | }
35 | DownloadGitHubContentFromAPI -Credential (Get-Credential) -ConfigurationData $configurationData
36 | Start-DscConfiguration -Wait -Verbose -Force -Path DownloadGitHubContentFromAPI
--------------------------------------------------------------------------------
/New-GraniResourceManifest.ps1:
--------------------------------------------------------------------------------
1 | param([string]$Version, [string]$Path)
2 |
3 | $script:moduleManufest = @{
4 | Path = $Path
5 | ModuleVersion = $Version
6 | Author = 'guitarrapc'
7 | CompanyName = 'Grani'
8 | Description = 'DSC Resource for Windows Configuration Management.'
9 | PowerShellVersion = '4.0'
10 | CLRVersion = '4.0'
11 | RequiredModules = @()
12 | FunctionsToExport = @('*')
13 | CmdletsToExport = '*'
14 | Tags = "DesiredStateConfiguration", "DSC", "DSCResources"
15 | ReleaseNotes = "https://github.com/guitarrapc/GraniResource/releases/tag/ver.$Version"
16 | ProjectUri = "https://github.com/guitarrapc/GraniResource"
17 | LicenseUri = "https://github.com/guitarrapc/GraniResource/blob/master/LICENSE"
18 | <#
19 | # As these are not supported in PowerShell 4.0...
20 | # and this section cause Module Version in mof to be force "0.0"
21 | DscResourcesToExport = @()
22 | #>
23 | }
24 |
25 | New-ModuleManifest @moduleManufest
--------------------------------------------------------------------------------
/Tests/Grani_CredentialManager/Integration/Grani_CredentialManager.Config.MultipleTargetPresent.ps1:
--------------------------------------------------------------------------------
1 | configuration Grani_CredentialManager_Config_MultipleTargetPresent
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node localhost
5 | {
6 | foreach($identifier in $Node.InstanceIdentifier)
7 | {
8 | cCredentialManager $identifier
9 | {
10 | InstanceIdentifier = $identifier
11 | Ensure = $Node.Ensure
12 | Target = $Node.Target
13 | Credential = $Node.Credential
14 | }
15 | }
16 | }
17 | }
18 |
19 | #configurationData
20 | $configurationDataMultipleTargetPresent = @{
21 | AllNodes = @(
22 | @{
23 | NodeName = "localhost"
24 | PSDscAllowPlainTextPassword = $true
25 | InstanceIdentifier = @("PesterTest", "PesterTest2")
26 | Ensure = "Present"
27 | Target = "PesterTest"
28 | Credential = New-Object PSCredential ("PesterTestDummy", ("PesterTestPassword" | ConvertTo-SecureString -Force -AsPlainText))
29 | }
30 | )
31 | }
32 |
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.22823.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleTopShelfService", "SampleTopShelfService\SampleTopShelfService.csproj", "{B8075B79-F649-451C-9F65-9EF2DA743FC4}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B8075B79-F649-451C-9F65-9EF2DA743FC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B8075B79-F649-451C-9F65-9EF2DA743FC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B8075B79-F649-451C-9F65-9EF2DA743FC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B8075B79-F649-451C-9F65-9EF2DA743FC4}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Ikiru Yoshizaki
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/Designer/Grani_HostsFile.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name HostName `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "HostName to be redirected."
8 | $property += New-xDscResourceProperty `
9 | -Name Ensure `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "Ensure Host Entry is Present or Absent." `
13 | -ValueMap Present, Absent `
14 | -Values Present, Absent
15 | $property += New-xDscResourceProperty `
16 | -Name IpAddress `
17 | -Type String `
18 | -Attribute Required `
19 | -Description "IP Address for reference."
20 | $property += New-xDscResourceProperty `
21 | -Name Reference `
22 | -Type String `
23 | -Attribute Write `
24 | -ValueMap DnsServer, StaticIp `
25 | -Values DnsServer, StaticIp `
26 | -Description "Reference type for DnsServer. When Reference is DnsServer, resolve DNS with selected server. When Reference is StaticIp, no resolve and just added IP Address"
27 |
28 | New-xDscResource -Name Grani_HostsFile -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cHostsFile -Force
29 |
30 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtStartup/SpecificUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | param([PSCredential]$Credential)
4 | Import-DscResource -Modulename GraniResource
5 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
6 | {
7 | cScheduleTask ScheduleTask
8 | {
9 | Ensure = "Present"
10 | Execute = "powershell.exe"
11 | Argument = '-Command "Get-Date | Out-File c:\hoge1.log"'
12 | TaskName = "hoge"
13 | TaskPath = "\"
14 | AtStartup = $true
15 | Compatibility = "Win8"
16 | Disable = $false
17 | Credential = $Credential
18 | }
19 | }
20 | }
21 |
22 | $ConfigurationData = @{
23 | Allnodes = @(
24 | @{
25 | NodeName = "*"
26 | PSDscAllowPlainTextPassword = $true
27 | }
28 | @{
29 | NodeName ="localhost"
30 | Role = "localhost"
31 | }
32 | )
33 | }
34 | $credential = Get-Credential
35 | ScheduleTask -ConfigurationData $ConfigurationData -Credential $credential
36 | Start-DscConfiguration -Wait -Force -Verbose ScheduleTask
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SYSTEM/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration present
2 | {
3 | Import-DscResource -Modulename GraniResource
4 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
5 | {
6 | cScheduleTask hoge
7 | {
8 | Ensure = "Present"
9 | Execute = "powershell.exe"
10 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
11 | TaskName = "hoge"
12 | TaskPath = "\"
13 | ScheduledAt = [datetime]"00:00:00"
14 | RepetitionIntervalTimeSpanString = @(([TimeSpan]"01:00:00").ToString())
15 | RepetitionDurationTimeSpanString = @(([TimeSpan]::MaxValue).ToString())
16 | Compatibility = "Win8"
17 | Disable = $false
18 | }
19 | }
20 | }
21 |
22 | $ConfigurationData = @{
23 | Allnodes = @(
24 | @{
25 | NodeName = "*"
26 | PSDscAllowPlainTextPassword = $true
27 | }
28 | @{
29 | NodeName ="localhost"
30 | Role = "localhost"
31 | }
32 | )
33 | }
34 | present -OutputPath . -ConfigurationData $ConfigurationData
35 | Start-DscConfiguration -Wait -Force -Verbose -Path present
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/Configuration/ConfigurationSampleRaw.ps1:
--------------------------------------------------------------------------------
1 | configuration DownloadGitHubRawContentFromAPI
2 | {
3 | param
4 | (
5 | [PSCredential]$Credential
6 | )
7 |
8 | Import-DscResource -ModuleName GraniResource
9 |
10 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
11 | {
12 | cGitHubApiContent hoge
13 | {
14 | DestinationPath = "C:\Tools\xDscResourceDesigner.zip"
15 | Repository = "DSCResources"
16 | RepositoryOwner = "guitarrapc"
17 | ContentPath = "MicrosoftScriptCenter/xDSCResourceDesigner.zip"
18 | OAuth2Token = $Credential
19 | ContentType = "application/vnd.github.v3.raw"
20 | }
21 | }
22 | }
23 |
24 | $configurationData = @{
25 | AllNodes = @(
26 | @{
27 | NodeName = '*'
28 | PSDSCAllowPlainTextPassword = $true
29 | }
30 | @{
31 | NodeName = "localhost"
32 | Role = "localhost"
33 | }
34 | )
35 | }
36 | DownloadGitHubRawContentFromAPI -Credential (Get-Credential) -ConfigurationData $configurationData
37 | Start-DscConfiguration -Wait -Verbose -Force -Path DownloadGitHubRawContentFromAPI
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Daily/SpecificUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | param([PSCredential]$Credential)
4 | Import-DscResource -Modulename GraniResource
5 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
6 | {
7 | cScheduleTask ScheduleTask
8 | {
9 | Ensure = "Present"
10 | Execute = "powershell.exe"
11 | Argument = '-Command "Get-Date | Out-File c:\hoge1.log"'
12 | TaskName = "hoge"
13 | TaskPath = "\"
14 | ScheduledAt = [datetime]"00:00:00"
15 | Daily = $true
16 | Compatibility = "Win8"
17 | Disable = $false
18 | Credential = $Credential
19 | }
20 | }
21 | }
22 |
23 | $ConfigurationData = @{
24 | Allnodes = @(
25 | @{
26 | NodeName = "*"
27 | PSDscAllowPlainTextPassword = $true
28 | }
29 | @{
30 | NodeName ="localhost"
31 | Role = "localhost"
32 | }
33 | )
34 | }
35 | $credential = Get-Credential
36 | ScheduleTask -ConfigurationData $ConfigurationData -Credential $credential
37 | Start-DscConfiguration -Wait -Force -Verbose ScheduleTask
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Once/SpecificUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | param([PSCredential]$Credential)
4 | Import-DscResource -Modulename GraniResource
5 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
6 | {
7 | cScheduleTask ScheduleTask
8 | {
9 | Ensure = "Present"
10 | Execute = "powershell.exe"
11 | Argument = '-Command "Get-Date | Out-File c:\hoge1.log"'
12 | TaskName = "hoge"
13 | TaskPath = "\"
14 | ScheduledAt = [datetime]"00:00:00"
15 | Once = $true
16 | Compatibility = "Win8"
17 | Disable = $false
18 | Credential = $Credential
19 | }
20 | }
21 | }
22 |
23 | $ConfigurationData = @{
24 | Allnodes = @(
25 | @{
26 | NodeName = "*"
27 | PSDscAllowPlainTextPassword = $true
28 | }
29 | @{
30 | NodeName ="localhost"
31 | Role = "localhost"
32 | }
33 | )
34 | }
35 | $credential = Get-Credential
36 | ScheduleTask -ConfigurationData $ConfigurationData -Credential $credential
37 | Start-DscConfiguration -Wait -Force -Verbose ScheduleTask
--------------------------------------------------------------------------------
/Tests/Grani_SymbolicLink/IsTest.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_SymbolicLink : Is*" {
6 |
7 | $directory = "d:\hoge"
8 | $file = "hoge"
9 | $path = Join-Path $directory $file
10 | New-Item -Path $path -ItemType File -Force > $null
11 |
12 | Context "IsFile" {
13 |
14 | It "IsFile will null for Directory." {
15 | IsFile -Path $directory | Should be $null
16 | }
17 |
18 | It "IsFile will return System.IO.FileInfo for File." {
19 | (IsFile -Path $path).GetType().FullName | Should be ([System.IO.FileInfo].FullName)
20 | }
21 | }
22 |
23 | Context "IsDirectory" {
24 |
25 | It "IsDirectory will null for File." {
26 | IsDirectory -Path $path | Should be $null
27 | }
28 |
29 | It "IsDirectory will return System.IO.DirectoryInfo for Directory." {
30 | (IsDirectory -Path $directory).GetType().FullName | Should be ([System.IO.DirectoryInfo].FullName)
31 | }
32 | }
33 |
34 | Remove-Item -Path $directory -Force -Recurse > $null
35 | }
36 |
--------------------------------------------------------------------------------
/Designer/Grani_DotNetFramework.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name KB `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "Describe FotNetFramework KB."
8 | $property += New-xDscResourceProperty `
9 | -Name Ensure `
10 | -Type String `
11 | -Attribute Required `
12 | -ValueMap Present, Absent `
13 | -Values Present, Absent `
14 | -Description "Describe going to install DotnetFramework or not."
15 | $property += New-xDscResourceProperty `
16 | -Name InstallerPath `
17 | -Type String `
18 | -Attribute Write `
19 | -Description "Describe Path to the offline installation file. It only use for installation."
20 | $property += New-xDscResourceProperty `
21 | -Name NoRestart `
22 | -Type Boolean `
23 | -Attribute Write `
24 | -Description "Describe restart after install/uninstall."
25 | $property += New-xDscResourceProperty `
26 | -Name LogPath `
27 | -Type string `
28 | -Attribute Write `
29 | -Description "Describe installation log log file|Directory Path."
30 |
31 | New-xDscResource -Name Grani_DotNetFramework -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cDotNetFramework -Force
32 |
33 |
--------------------------------------------------------------------------------
/DSCResources/Grani_ScriptOnOSVersion/README.md:
--------------------------------------------------------------------------------
1 | Grani_ScriptOnOSVersion
2 | ============
3 |
4 | DSC Resource to run Script by each OSVersion
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_ScriptOnOSVersion | cScriptOnOSVersion | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Run Script to write EnvironmentVariables only when equal to "Windows 10.0.16299.0""
34 |
35 | ```powershell
36 | configuration present
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cScriptOnOSVersion ScriptOnOSVersion
40 | {
41 | Key = "ScriptOnOSVersion"
42 | SetScript = {Set-Item -Path Env:Grani_ScriptOnOSVersion -Value 1}
43 | TestScript = {(Test-Path Env:Grani_ScriptOnOSVersion) -and (Get-Item -Path Env:Grani_ScriptOnOSVersion).Value -eq 1}
44 | ExecuteOnPlatform = "Win32NT"
45 | ExecuteOnVersion = "10.0.16299.0"
46 | When = 'Equal'
47 | }
48 | }
49 | ```
50 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/AtLogOn/SpecificUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | param([PSCredential]$Credential)
4 | Import-DscResource -Modulename GraniResource
5 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
6 | {
7 | cScheduleTask ScheduleTask
8 | {
9 | Ensure = "Present"
10 | Execute = "powershell.exe"
11 | Argument = '-Command "Get-Date | Out-File c:\hoge1.log"'
12 | TaskName = "hoge"
13 | TaskPath = "\"
14 | AtLogOn = $true
15 | Compatibility = "Win8"
16 | Disable = $false
17 | Credential = $Credential
18 | AtLogOnUserId = "test"
19 | }
20 | }
21 | }
22 |
23 | $ConfigurationData = @{
24 | Allnodes = @(
25 | @{
26 | NodeName = "*"
27 | PSDscAllowPlainTextPassword = $true
28 | }
29 | @{
30 | NodeName ="localhost"
31 | Role = "localhost"
32 | }
33 | )
34 | }
35 | $credential = Get-Credential
36 | ScheduleTask -ConfigurationData $ConfigurationData -Credential $credential
37 | Start-DscConfiguration -Wait -Force -Verbose ScheduleTask -Debug
38 | Test-DscConfiguration
39 | Get-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Absent/SkipLog.txt:
--------------------------------------------------------------------------------
1 | VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
2 | SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
3 | root/Microsoft/Windows/DesiredStateConfiguration'.
4 | VERBOSE: An LCM method call arrived from computer WINDOWS10PRO with user sid
5 | S-1-5-21-689215209-1089682319-2662094331-1001.
6 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ]
7 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Resource ] [[cScriptOnOSVersion]hoge]
8 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Test ] [[cScriptOnOSVersion]hoge]
9 | VERBOSE: [WINDOWS10PRO]: [[cScriptOnOSVersion]hoge] Check Platform&OSVersion indicate to run
10 | script.
11 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Test ] [[cScriptOnOSVersion]hoge] in 0.0050 seconds.
12 | VERBOSE: [WINDOWS10PRO]: LCM: [ Skip Set ] [[cScriptOnOSVersion]hoge]
13 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Resource ] [[cScriptOnOSVersion]hoge]
14 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ]
15 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] in 0.0750 seconds.
16 | VERBOSE: Operation 'Invoke CimMethod' complete.
17 | VERBOSE: Time taken for configuration job to complete is 0.142 seconds
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Present/SkipLog.txt:
--------------------------------------------------------------------------------
1 | VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
2 | SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
3 | root/Microsoft/Windows/DesiredStateConfiguration'.
4 | VERBOSE: An LCM method call arrived from computer WINDOWS10PRO with user sid
5 | S-1-5-21-689215209-1089682319-2662094331-1001.
6 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ]
7 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Resource ] [[cScriptOnOSVersion]hoge]
8 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Test ] [[cScriptOnOSVersion]hoge]
9 | VERBOSE: [WINDOWS10PRO]: [[cScriptOnOSVersion]hoge] Check Platform&OSVersion indicate to run
10 | script.
11 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Test ] [[cScriptOnOSVersion]hoge] in 0.0350 seconds.
12 | VERBOSE: [WINDOWS10PRO]: LCM: [ Skip Set ] [[cScriptOnOSVersion]hoge]
13 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Resource ] [[cScriptOnOSVersion]hoge]
14 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ]
15 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] in 0.0990 seconds.
16 | VERBOSE: Operation 'Invoke CimMethod' complete.
17 | VERBOSE: Time taken for configuration job to complete is 0.172 seconds
--------------------------------------------------------------------------------
/Designer/Grani_DomainJoin.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Identifier `
5 | -Type String `
6 | -Attribute Key
7 | $property += New-xDscResourceProperty `
8 | -Name Name `
9 | -Type String `
10 | -Attribute Read
11 | $property += New-xDscResourceProperty `
12 | -Name Ensure `
13 | -Type String `
14 | -Attribute Read `
15 | -ValueMap Present, Absent `
16 | -Values Present, Absent `
17 | -Description "Describe Status is in desired state."
18 | $property += New-xDscResourceProperty `
19 | -Name DomainName `
20 | -Type String `
21 | -Attribute Write
22 | $property += New-xDscResourceProperty `
23 | -Name WorkGroupName `
24 | -Type String `
25 | -Attribute Write
26 | $property += New-xDscResourceProperty `
27 | -Name Credential `
28 | -Type PSCredential `
29 | -Attribute Write
30 | $property += New-xDscResourceProperty `
31 | -Name UnjoinCredential `
32 | -Type PSCredential `
33 | -Attribute Write
34 | $property += New-xDscResourceProperty `
35 | -Name Restart `
36 | -Type Boolean `
37 | -Attribute Write
38 |
39 | New-xDscResource -Name Grani_DomainJoin -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cDomainJoin -Force
40 |
41 |
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/Configuration/Present/Repetition/SpecificUser/cScheduleTask.ps1:
--------------------------------------------------------------------------------
1 | configuration ScheduleTask
2 | {
3 | param([PSCredential]$Credential)
4 | Import-DscResource -Modulename GraniResource
5 | Node $AllNodes.Where{$_.Role -eq "localhost"}.NodeName
6 | {
7 | cScheduleTask ScheduleTask
8 | {
9 | Ensure = "Present"
10 | Execute = "powershell.exe"
11 | Argument = '-Command "Get-Date | Out-File c:\hoge.log"'
12 | TaskName = "hoge"
13 | TaskPath = "\"
14 | ScheduledAt = [datetime]"00:00:00"
15 | RepetitionIntervalTimeSpanString = @(([TimeSpan]"01:00:00").ToString())
16 | RepetitionDurationTimeSpanString = @(([TimeSpan]::MaxValue).ToString())
17 | Compatibility = "Win8"
18 | Disable = $false
19 | }
20 | }
21 | }
22 |
23 | $ConfigurationData = @{
24 | Allnodes = @(
25 | @{
26 | NodeName = "*"
27 | PSDscAllowPlainTextPassword = $true
28 | }
29 | @{
30 | NodeName ="localhost"
31 | Role = "localhost"
32 | }
33 | )
34 | }
35 | $credential = Get-Credential
36 | ScheduleTask -ConfigurationData $ConfigurationData -Credential $credential
37 | Start-DscConfiguration -Wait -Force -Verbose ScheduleTask
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6 | // アセンブリに関連付けられている情報を変更するには、
7 | // これらの属性値を変更してください。
8 | [assembly: AssemblyTitle("SampleTopShelfService")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SampleTopShelfService")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから
18 | // 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、
19 | // その型の ComVisible 属性を true に設定してください。
20 | [assembly: ComVisible(false)]
21 |
22 | // 次の GUID は、このプロジェクトが COM に公開される場合の、typelib の ID です
23 | [assembly: Guid("b8075b79-f649-451c-9f65-9ef2da743fc4")]
24 |
25 | // アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
33 | // 既定値にすることができます:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/TargetResourceUnJoin.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Computer : *-TargetResource" {
6 |
7 | $identifier = "hoge"
8 | $domainName = (Get-Credential).UserName
9 | $credential = Get-Credential
10 | $workGroup = "WORKGROUP"
11 |
12 | Context "Already configured environment. UnJoin Domain" {
13 | It "Test-TargetResource should return true" {
14 | Test-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential | should be $true
15 | }
16 |
17 | It "Set-TargetResource should not Throw" {
18 | {Set-TargetResource -Identifier $identifier -WorkGroup $workGroup -Credential $credential} | should not Throw
19 | }
20 |
21 | It "Get-TargetResource should return Ensure : Absent" {
22 | (Get-TargetResource -Identifier $identifier -WorkGroup $workGroup -Credential $credential).Ensure | should be ([Ensuretype]::Present.ToString())
23 | }
24 |
25 | It "Test-TargetResource should return true" {
26 | Test-TargetResource -Identifier $identifier -WorkGroupName $workGroup -Credential $credential | should be $true
27 | }
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/Designer/Grani_ACL.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name Path `
5 | -Type String `
6 | -Attribute Key
7 | $property += New-xDscResourceProperty `
8 | -Name Account `
9 | -Type String `
10 | -Attribute Key
11 | $property += New-xDscResourceProperty `
12 | -Name Rights `
13 | -Type String `
14 | -Attribute Write `
15 | -ValueMap ReadAndExecute, Modify, FullControl `
16 | -Values ReadAndExecute, Modify, FullControl
17 | $property += New-xDscResourceProperty `
18 | -Name Ensure `
19 | -Type String `
20 | -Attribute Write `
21 | -ValueMap Present, Absent `
22 | -Values Present, Absent
23 | $property += New-xDscResourceProperty `
24 | -Name Access `
25 | -Type String `
26 | -Attribute Write `
27 | -ValueMap Allow, Deny `
28 | -Values Allow, Deny
29 | $property += New-xDscResourceProperty `
30 | -Name Inherit `
31 | -Type Boolean `
32 | -Attribute Write
33 | $property += New-xDscResourceProperty `
34 | -Name Recurse `
35 | -Type Boolean `
36 | -Attribute Write
37 | $property += New-xDscResourceProperty `
38 | -Name Strict `
39 | -Type Boolean `
40 | -Attribute Write
41 |
42 | New-xDscResource -Name Grani_ACL -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cACL -Force
43 |
44 |
--------------------------------------------------------------------------------
/Tests/Grani_TopShelf/SampleTopShelfService/SampleTopShelfService/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Topshelf;
7 |
8 | namespace SampleTopShelfService
9 | {
10 | class Program
11 | {
12 | private static readonly string _serviceName = "SampleTopShelfService";
13 | private static readonly string _displayName = "SampleTopShelfService";
14 | private static readonly string _description = "SampleTopShelfService Description";
15 |
16 | static void Main(string[] args) => HostFactory.Run(x =>
17 | {
18 | x.EnableShutdown();
19 |
20 | // Reference to Logic Class
21 | x.Service(s =>
22 | {
23 | s.ConstructUsing(name => new Service(_serviceName));
24 | s.WhenStarted(sc => sc.Start());
25 | s.WhenStopped(sc => sc.Stop());
26 | });
27 |
28 | // Service Start mode
29 | x.StartAutomaticallyDelayed();
30 |
31 | // Service RunAs
32 | x.RunAsLocalSystem();
33 |
34 | // Service information
35 | x.SetServiceName(_serviceName);
36 | x.SetDisplayName(_displayName);
37 | x.SetDescription(_description);
38 | });
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Absent/SetLog.txt:
--------------------------------------------------------------------------------
1 | VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
2 | SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
3 | root/Microsoft/Windows/DesiredStateConfiguration'.
4 | VERBOSE: An LCM method call arrived from computer WINDOWS10PRO with user sid
5 | S-1-5-21-689215209-1089682319-2662094331-1001.
6 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ]
7 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Resource ] [[cScriptOnOSVersion]hoge]
8 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Test ] [[cScriptOnOSVersion]hoge]
9 | VERBOSE: [WINDOWS10PRO]: [[cScriptOnOSVersion]hoge] Check Platform&OSVersion indicate to run
10 | script.
11 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Test ] [[cScriptOnOSVersion]hoge] in 0.0140 seconds.
12 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ] [[cScriptOnOSVersion]hoge]
13 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] [[cScriptOnOSVersion]hoge] in 0.0100 seconds.
14 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Resource ] [[cScriptOnOSVersion]hoge]
15 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ]
16 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] in 0.0890 seconds.
17 | VERBOSE: Operation 'Invoke CimMethod' complete.
18 | VERBOSE: Time taken for configuration job to complete is 0.166 seconds
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/Configuration/Present/SetLog.txt:
--------------------------------------------------------------------------------
1 | VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
2 | SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
3 | root/Microsoft/Windows/DesiredStateConfiguration'.
4 | VERBOSE: An LCM method call arrived from computer WINDOWS10PRO with user sid
5 | S-1-5-21-689215209-1089682319-2662094331-1001.
6 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ]
7 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Resource ] [[cScriptOnOSVersion]hoge]
8 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Test ] [[cScriptOnOSVersion]hoge]
9 | VERBOSE: [WINDOWS10PRO]: [[cScriptOnOSVersion]hoge] Check Platform&OSVersion indicate to run
10 | script.
11 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Test ] [[cScriptOnOSVersion]hoge] in 0.2100 seconds.
12 | VERBOSE: [WINDOWS10PRO]: LCM: [ Start Set ] [[cScriptOnOSVersion]hoge]
13 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] [[cScriptOnOSVersion]hoge] in 0.0170 seconds.
14 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Resource ] [[cScriptOnOSVersion]hoge]
15 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ]
16 | VERBOSE: [WINDOWS10PRO]: LCM: [ End Set ] in 0.7070 seconds.
17 | VERBOSE: Operation 'Invoke CimMethod' complete.
18 | VERBOSE: Time taken for configuration job to complete is 0.859 seconds
--------------------------------------------------------------------------------
/DSCResources/Grani_SymbolicLink/README.md:
--------------------------------------------------------------------------------
1 | Grani_SymbolicLink
2 | ============
3 |
4 | DSC Resource to configure SymbolicLink.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_SymbolicLink | cSymbolicLink | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Create Symbolic Link.
34 |
35 | ```powershell
36 | configuration present
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cSymbolicLink hoge
40 | {
41 | SourcePath = "C:\Logs\DSC"
42 | DestinationPath = "C:\DSC"
43 | Ensure = "Present"
44 | }
45 | }
46 | ```
47 |
48 | - Remove Symbolic Link.
49 |
50 | ```powershell
51 | configuration absent
52 | {
53 | Import-DscResource -ModuleName GraniResource
54 | cSymbolicLink hoge
55 | {
56 | SourcePath = "C:\Logs\DSC"
57 | DestinationPath = "C:\DSC"
58 | Ensure = "Absent"
59 | }
60 | }
61 | ```
62 |
63 | Tips
64 | ----
65 |
66 | **SourcePath must exist beforehand.**
67 |
68 | In this Resource, Source Path must exist before configuration apply to the node.
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/Configuration/Absent/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | # variables
2 | $certPath = GetCertPath -CertStoreName My
3 | $dns = "test.contoso.com"
4 | $file = "test.pfx"
5 | $parent = "C:\hoge"
6 | $exportLocation = Join-Path $parent $file
7 |
8 | # create self-signed certificate
9 | $cert = New-SelfSignedCertificate -Dns $dns -CertStoreLocation $certPath
10 |
11 | # export certificate
12 | New-Item -Path $parent -ItemType Directory -Force > $null
13 | Export-PfxCertificate -Force -Password $credential.Password -FilePath $exportLocation -Cert $cert.PSPath
14 | Remove-Item -Path $cert.PSPath -Force
15 |
16 | configuration pfxImport
17 | {
18 | Import-DscResource -ModuleName GraniResource
19 |
20 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
21 | {
22 | cPfxImport hoge
23 | {
24 | ThumbPrint = $cert.Thumbprint
25 | Ensure = "Absent"
26 | PfxFilePath = $exportLocation
27 | CertStoreName = "My"
28 | }
29 | }
30 | }
31 |
32 | $configurationData = @{
33 | AllNodes = @(
34 | @{
35 | NodeName = '*'
36 | PSDSCAllowPlainTextPassword = $true
37 | }
38 | @{
39 | NodeName = "localhost"
40 | Role = "localhost"
41 | }
42 | )
43 | }
44 | pfxImport -ConfigurationData $configurationData
45 | Start-DscConfiguration -Wait -Verbose -Force -Path pfxImport
--------------------------------------------------------------------------------
/Tests/Grani_InheritACL/IsProtectedNotPreserveCorrect/cInheritACLResource.ps1:
--------------------------------------------------------------------------------
1 | # Present
2 | configuration InheritACL
3 | {
4 | Import-DscResource -ModuleName GraniResource
5 |
6 | $path = "C:\test";
7 | node Localhost
8 | {
9 | File hoge
10 | {
11 | Ensure = "Present"
12 | DestinationPath = $path
13 | Type = "Directory"
14 | }
15 |
16 | # Create non inherited Aceess before change to protected w/ non preserve
17 | cACL hoge
18 | {
19 | Access = "Allow"
20 | Ensure = "Present"
21 | Path = $path
22 | Account = "Users"
23 | Rights = "FullControl"
24 | Inherit = $false
25 | Recurse = $true
26 | }
27 |
28 | cInheritACL hoge
29 | {
30 | Path = $path
31 | IsProtected = $true
32 | PreserveInheritance = $false
33 | }
34 |
35 | # Promise remove AccessRule which you don't want to set
36 | cACL hoge2
37 | {
38 | Access = "Allow"
39 | Ensure = "Absent"
40 | Path = $path
41 | Account = "administrators"
42 | Rights = "FullControl"
43 | Inherit = $false
44 | Recurse = $true
45 | }
46 | }
47 | }
48 |
49 | InheritACL
50 | Start-DscConfiguration -Wait -Force -Verbose -Path InheritACL
51 | Get-DscConfiguration
52 | Test-DscConfiguration
--------------------------------------------------------------------------------
/Tests/Grani_PfxImport/Configuration/Present/ConfigurationSample.ps1:
--------------------------------------------------------------------------------
1 | # variables
2 | $certPath = GetCertPath -CertStoreName My
3 | $dns = "test.contoso.com"
4 | $file = "test.pfx"
5 | $parent = "C:\hoge"
6 | $exportLocation = Join-Path $parent $file
7 |
8 | # create self-signed certificate
9 | $cert = New-SelfSignedCertificate -Dns $dns -CertStoreLocation $certPath
10 |
11 | # export certificate
12 | New-Item -Path $parent -ItemType Directory -Force > $null
13 | Export-PfxCertificate -Force -Password $credential.Password -FilePath $exportLocation -Cert $cert.PSPath
14 | Remove-Item -Path $cert.PSPath -Force
15 |
16 | configuration pfxImport
17 | {
18 | param
19 | (
20 | [PSCredential]$Credential
21 | )
22 | Import-DscResource -ModuleName GraniResource
23 |
24 | node $Allnodes.Where{$_.Role -eq "localhost"}.NodeName
25 | {
26 | cPfxImport hoge
27 | {
28 | ThumbPrint = $cert.Thumbprint
29 | Ensure = "Present"
30 | PfxFilePath = $exportLocation
31 | CertStoreName = "My"
32 | Credential = $Credential
33 | }
34 | }
35 | }
36 |
37 | $configurationData = @{
38 | AllNodes = @(
39 | @{
40 | NodeName = '*'
41 | PSDSCAllowPlainTextPassword = $true
42 | }
43 | @{
44 | NodeName = "localhost"
45 | Role = "localhost"
46 | }
47 | )
48 | }
49 | pfxImport -Credential (Get-Credential) -ConfigurationData $configurationData
50 | Start-DscConfiguration -Wait -Verbose -Force -Path pfxImport
--------------------------------------------------------------------------------
/DSCResources/Grani_ScheduleTaskLog/Grani_ScheduleTaskLog.psm1:
--------------------------------------------------------------------------------
1 | function Set-TargetResource {
2 | [CmdletBinding()]
3 | param
4 | (
5 | [parameter(Mandatory = $true)]
6 | [System.Boolean]$Enable
7 | )
8 |
9 | try {
10 | $instance = ScheduledTaskLogInstance
11 | $instance.IsEnabled = $Enable
12 | $instance.SaveChanges()
13 | }
14 | finally {
15 | $instance.Dispose() > $null
16 | }
17 | }
18 |
19 | function Get-TargetResource {
20 | [CmdletBinding()]
21 | [OutputType([System.Collections.Hashtable])]
22 | param
23 | (
24 | [parameter(Mandatory = $true)]
25 | [System.Boolean]$Enable
26 | )
27 |
28 | try {
29 | $instance = ScheduledTaskLogInstance
30 | return @{
31 | Enable = $instance.IsEnabled
32 | }
33 | }
34 | finally {
35 | $instance.Dispose() > $null
36 | }
37 | }
38 |
39 | function Test-TargetResource {
40 | [CmdletBinding()]
41 | [OutputType([System.Boolean])]
42 | param
43 | (
44 | [parameter(Mandatory = $true)]
45 | [System.Boolean]$Enable
46 | )
47 |
48 | return (Get-TargetResource -Enable $Enable).Enable -eq $Enable
49 | }
50 |
51 | function ScheduledTaskLogInstance {
52 | [CmdletBinding()]
53 | [OutputType([System.Diagnostics.Eventing.Reader.EventLogConfiguration])]
54 | param
55 | (
56 | )
57 | $logName = 'Microsoft-Windows-TaskScheduler/Operational'
58 | $instance = New-Object System.Diagnostics.Eventing.Reader.EventLogConfiguration $logName
59 | return $instance
60 | }
61 |
62 | Export-ModuleMember -Function *-TargetResource
--------------------------------------------------------------------------------
/Designer/Grani_PfxImport.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name ThumbPrint `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "Thumbprint of target pfx."
8 | $property += New-xDscResourceProperty `
9 | -Name Ensure `
10 | -Type String `
11 | -Attribute Required `
12 | -ValueMap Present, Absent `
13 | -Values Present, Absent `
14 | -Description "Determine pfx to be import or not."
15 | $property += New-xDscResourceProperty `
16 | -Name PfxFilePath `
17 | -Type String `
18 | -Attribute Write `
19 | -Description "File path to the pfx."
20 | $property += New-xDscResourceProperty `
21 | -Name CertStoreLocation `
22 | -Type String `
23 | -Attribute Read `
24 | -ValueMap "LocalMachine" `
25 | -Values "LocalMachine" `
26 | -Description "Certification Store Location."
27 | $property += New-xDscResourceProperty `
28 | -Name CertStoreName `
29 | -Type String `
30 | -Attribute Write `
31 | -Description "Certification Store Name" `
32 | -ValueMap "AddressBook", "AuthRoot", "CertificateAuthority", "Disallowed", "My", "Root", "TrustedPeople", "TrustedPublisher" `
33 | -Values "AddressBook", "AuthRoot", "CertificateAuthority", "Disallowed", "My", "Root", "TrustedPeople", "TrustedPublisher"
34 | $property += New-xDscResourceProperty `
35 | -Name Credential `
36 | -Type PSCredential `
37 | -Attribute Write `
38 | -Description "Specify Password to import pfx."
39 |
40 | New-xDscResource -Name Grani_PfxImport -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cPfxImport -Force
41 |
42 |
--------------------------------------------------------------------------------
/Tests/Grani_ScriptOnOSVersion/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // IntelliSense を使用して利用可能な属性を学べます。
3 | // 既存の属性の説明をホバーして表示します。
4 | // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "PowerShell",
9 | "request": "launch",
10 | "name": "PowerShell Launch Current File",
11 | "script": "${file}",
12 | "args": [],
13 | "cwd": "${file}"
14 | },
15 | {
16 | "type": "PowerShell",
17 | "request": "launch",
18 | "name": "PowerShell Launch Current File in Temporary Console",
19 | "script": "${file}",
20 | "args": [],
21 | "cwd": "${file}",
22 | "createTemporaryIntegratedConsole": true
23 | },
24 | {
25 | "type": "PowerShell",
26 | "request": "launch",
27 | "name": "PowerShell Launch Current File w/Args Prompt",
28 | "script": "${file}",
29 | "args": [
30 | "${command:SpecifyScriptArgs}"
31 | ],
32 | "cwd": "${file}"
33 | },
34 | {
35 | "type": "PowerShell",
36 | "request": "attach",
37 | "name": "PowerShell Attach to Host Process",
38 | "processId": "${command:PickPSHostProcess}",
39 | "runspaceId": 1
40 | },
41 | {
42 | "type": "PowerShell",
43 | "request": "launch",
44 | "name": "PowerShell Interactive Session",
45 | "cwd": "${workspaceRoot}"
46 | }
47 | ]
48 | }
--------------------------------------------------------------------------------
/DSCResources/Grani_DotNetFramework/README.md:
--------------------------------------------------------------------------------
1 | Grani_DotNetFramework
2 | ============
3 |
4 | DSC Resource to install/uninstall .NetFramework offline file.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_DotNetFramework | cDotNetFramework | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Install .NetFramework 4.6
34 |
35 | Download and Install .NetFramework 4.6 for Windows Server 2012 R2
36 |
37 | ```powershell
38 | configuration Present
39 | {
40 | $uri46 = "http://go.microsoft.com/fwlink/?LinkId=528222";
41 | $folder = "c:\Test";
42 | $path = Join-Path $folder "NDP46-KB3045560-Web.exe";
43 |
44 | Import-DscResource -ModuleName GraniResource
45 |
46 | cDownload hoge
47 | {
48 | Uri = $uri46
49 | DestinationPath = $path
50 | }
51 |
52 | cDotNetFramework hoge
53 | {
54 | KB = "KB3045563"
55 | InstallerPath = $path
56 | Ensure = "Present"
57 | NoRestart = $true
58 | LogPath = "C:\Test\Present.log"
59 | DependsOn = "[cDownload]hoge"
60 | }
61 | }
62 | ```
63 |
64 | - Uninstall .NetFramework 4.6
65 |
66 | Uninstall .NetFramework 4.6 for Windows Server 2012 R2
67 |
68 | ```powershell
69 | configuration Absent
70 | {
71 | Import-DscResource -ModuleName GraniResource
72 |
73 | cDotNetFramework hoge
74 | {
75 | KB = "KB3045563"
76 | Ensure = "Absent"
77 | NoRestart = $true
78 | }
79 | }
80 | ```
81 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/GetPathItemType.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Download : GetPathItemType" {
6 |
7 | $pathF = "d:\hoge\ReadMe.md"
8 | $pathD = "d:\hoge\ReadMe"
9 |
10 | $parent = Split-Path -Path $pathF -Parent
11 | New-Item -Path $parent -ItemType Directory -Force > $null
12 |
13 | New-Item -Path $pathF -ItemType File -Force > $null
14 | New-Item -Path $pathD -ItemType Directory -Force > $null
15 |
16 | Context "GetPathItemType should get ItemType" {
17 |
18 | It "Get-Item Type check should return System.IO.FileInfo" {
19 | (Get-Item -Path $pathF).GetType().FullName | Should be "System.IO.FileInfo"
20 | }
21 |
22 | It "Get-Item Type check should return System.IO.DirectoryInfo" {
23 | (Get-Item -Path $pathD).GetType().FullName | Should be "System.IO.DirectoryInfo"
24 | }
25 |
26 | It "GetPathItemType should return FileInfo" {
27 | GetPathItemType -Path $pathF | Should be "FileInfo"
28 | }
29 |
30 | It "GetPathItemType should return DirectoryInfo" {
31 | GetPathItemType -Path $pathD | Should be "DirectoryInfo"
32 | }
33 |
34 | It "Pipeline passing File Item to GetPathItemType should return FileInfo" {
35 | Get-ChildItem -Path $pathF -File | GetPathItemType | Should be "FileInfo"
36 | }
37 |
38 | It "Pipeline passing Directory Item to GetPathItemType should return DirectoryInfo" {
39 | Get-Item -Path $pathD | GetPathItemType | Should be "DirectoryInfo"
40 | }
41 | }
42 |
43 | Remove-Item -Path $pathF -Force > $null
44 | Remove-Item -Path $pathD -Force > $null
45 | }
46 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/GetPathItemType.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_S3Content : GetPathItemType" {
6 |
7 | $pathF = "c:\hoge\ReadMe.md"
8 | $pathD = "c:\hoge\ReadMe"
9 |
10 | $parent = Split-Path -Path $pathF -Parent
11 | New-Item -Path $parent -ItemType Directory -Force > $null
12 |
13 | New-Item -Path $pathF -ItemType File -Force > $null
14 | New-Item -Path $pathD -ItemType Directory -Force > $null
15 |
16 | Context "GetPathItemType should get ItemType" {
17 |
18 | It "Get-Item Type check should return System.IO.FileInfo" {
19 | (Get-Item -Path $pathF).GetType().FullName | Should be "System.IO.FileInfo"
20 | }
21 |
22 | It "Get-Item Type check should return System.IO.DirectoryInfo" {
23 | (Get-Item -Path $pathD).GetType().FullName | Should be "System.IO.DirectoryInfo"
24 | }
25 |
26 | It "GetPathItemType should return FileInfo" {
27 | GetPathItemType -Path $pathF | Should be "FileInfo"
28 | }
29 |
30 | It "GetPathItemType should return DirectoryInfo" {
31 | GetPathItemType -Path $pathD | Should be "DirectoryInfo"
32 | }
33 |
34 | It "Pipeline passing File Item to GetPathItemType should return FileInfo" {
35 | Get-ChildItem -Path $pathF -File | GetPathItemType | Should be "FileInfo"
36 | }
37 |
38 | It "Pipeline passing Directory Item to GetPathItemType should return DirectoryInfo" {
39 | Get-Item -Path $pathD | GetPathItemType | Should be "DirectoryInfo"
40 | }
41 | }
42 |
43 | Remove-Item -Path $pathF -Force > $null
44 | Remove-Item -Path $pathD -Force > $null
45 | }
46 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/GetPathItemType.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_GitHubApiContent : GetPathItemType" {
6 |
7 | $pathF = "d:\hoge\ReadMe.md"
8 | $pathD = "d:\hoge\ReadMe"
9 |
10 | $parent = Split-Path -Path $pathF -Parent
11 | New-Item -Path $parent -ItemType Directory -Force > $null
12 |
13 | New-Item -Path $pathF -ItemType File -Force > $null
14 | New-Item -Path $pathD -ItemType Directory -Force > $null
15 |
16 | Context "GetPathItemType should get ItemType" {
17 |
18 | It "Get-Item Type check should return System.IO.FileInfo" {
19 | (Get-Item -Path $pathF).GetType().FullName | Should be "System.IO.FileInfo"
20 | }
21 |
22 | It "Get-Item Type check should return System.IO.DirectoryInfo" {
23 | (Get-Item -Path $pathD).GetType().FullName | Should be "System.IO.DirectoryInfo"
24 | }
25 |
26 | It "GetPathItemType should return FileInfo" {
27 | GetPathItemType -Path $pathF | Should be "FileInfo"
28 | }
29 |
30 | It "GetPathItemType should return DirectoryInfo" {
31 | GetPathItemType -Path $pathD | Should be "DirectoryInfo"
32 | }
33 |
34 | It "Pipeline passing File Item to GetPathItemType should return FileInfo" {
35 | Get-ChildItem -Path $pathF -File | GetPathItemType | Should be "FileInfo"
36 | }
37 |
38 | It "Pipeline passing Directory Item to GetPathItemType should return DirectoryInfo" {
39 | Get-Item -Path $pathD | GetPathItemType | Should be "DirectoryInfo"
40 | }
41 | }
42 |
43 | Remove-Item -Path $pathF -Force > $null
44 | Remove-Item -Path $pathD -Force > $null
45 | }
46 |
--------------------------------------------------------------------------------
/DSCResources/Grani_TCPAckFrequency/Grani_TCPAckFrequency.psm1:
--------------------------------------------------------------------------------
1 | function Set-TargetResource {
2 | [CmdletBinding()]
3 | param
4 | (
5 | [parameter(Mandatory = $true)]
6 | [System.Boolean]$Enable
7 | )
8 |
9 | $value = if ($Enable) {
10 | 2
11 | }
12 | else {
13 | 1
14 | }
15 |
16 | Get-NetworkInterfaceRegisty `
17 | | where TcpAckFrequency -ne $value `
18 | | % { Set-ItemProperty -Path $_.PSPath -Name TcpAckFrequency -Value $value -Force -PassThru }
19 | }
20 |
21 | function Get-TargetResource {
22 | [CmdletBinding()]
23 | [OutputType([System.Collections.Hashtable])]
24 | param
25 | (
26 | [parameter(Mandatory = $true)]
27 | [System.Boolean]$Enable
28 | )
29 |
30 | $tcpAckFrequency = Get-NetworkInterfaceRegisty | % {$_.GetValue("TCPAckFrequency")} | sort -Unique
31 | $result = switch ($tcpAckFrequency) {
32 | 1 { $false }
33 | 2 { $true }
34 | default { $true }
35 | }
36 |
37 | return @{
38 | Enable = $result
39 | }
40 | }
41 |
42 | function Test-TargetResource {
43 | [CmdletBinding()]
44 | [OutputType([System.Boolean])]
45 | param
46 | (
47 | [parameter(Mandatory = $true)]
48 | [System.Boolean]$Enable
49 | )
50 |
51 | $result = Get-TargetResource -Enable $Enable
52 | return $result.Enable -eq $Enable
53 | }
54 |
55 | function Get-NetworkInterfaceRegisty {
56 | [CmdletBinding()]
57 | [OutputType([Microsoft.Win32.RegistryKey[]])]
58 | param
59 | ()
60 |
61 | return Get-ChildItem -Path "registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces" `
62 | | where {
63 | Get-ItemProperty -Path "registry::$_" `
64 | | where AddressType -eq 0
65 | }
66 | }
67 |
68 | Export-ModuleMember -Function *-TargetResource
--------------------------------------------------------------------------------
/Designer/Grani_Download.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty -Name Uri `
4 | -Type String `
5 | -Attribute Key `
6 | -Description "Request Uri to obtain file."
7 | $property += New-xDscResourceProperty `
8 | -Name DestinationPath `
9 | -Type String `
10 | -Attribute Required `
11 | -Description "File Path to output Donwloaded item."
12 | $property += New-xDscResourceProperty `
13 | -Name Header `
14 | -Type Hashtable `
15 | -Attribute Write `
16 | -Description "Specify Headers for Web Request."
17 | $property += New-xDscResourceProperty `
18 | -Name ContentType `
19 | -Type String `
20 | -Attribute Write `
21 | -Description "Specify ContentType for Web Request."
22 | $property += New-xDscResourceProperty `
23 | -Name Credential `
24 | -Type PSCredential `
25 | -Attribute Write `
26 | -Description "Specify Basic Authorization Credential Web Request."
27 | $property += New-xDscResourceProperty `
28 | -Name UserAgent `
29 | -Type String `
30 | -Attribute Write `
31 | -Description "Specify User-Agent for Web Request"
32 | $property += New-xDscResourceProperty `
33 | -Name AllowRedirect `
34 | -Type Boolean `
35 | -Attribute Write `
36 | -Description "Specify if you want to control Redirect."
37 | $property += New-xDscResourceProperty `
38 | -Name CacheLocation `
39 | -Type String `
40 | -Attribute Write `
41 | -Description "Specify CacheLocation to hold your last configuration result."
42 | $property += New-xDscResourceProperty `
43 | -Name Ensure `
44 | -Type String `
45 | -Attribute Read `
46 | -ValueMap Present, Absent `
47 | -Values Present, Absent `
48 | -Description "Describe File is exist on DestinationPath or not."
49 |
50 | New-xDscResource -Name Grani_Download -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cDownload -Force
51 |
52 |
--------------------------------------------------------------------------------
/Tests/Grani_TCPAckFrequency/GetTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_TCPAckFrequency : Get-TargetResource" {
6 |
7 | $Enable = $true
8 | $Disable = $false
9 |
10 | $networkInterfaceEnable = Get-TargetResource -Enable $Enable
11 | $networkInterfaceDisable = Get-TargetResource -Enable $Disable
12 |
13 | Context "All test must return valid value" {
14 |
15 | It "Get-TargetResource Network Interface should return object for Enable : $Enable" {
16 | $networkInterfaceEnable | Should not be $null
17 | }
18 | It "Get-TargetResource Network Interface should return object for Enable : $Disable" {
19 | $networkInterfaceDisable | Should not be $null
20 | }
21 | It "Get-TargetResource Network Interface should contains Enable: $Enable" {
22 | $networkInterfaceEnable | %{ $_.Enable -eq $Enable }
23 | }
24 | It "Get-TargetResource Network Interface should contains Disable: $Disable" {
25 | $networkInterfaceDisable | %{ $_.Enable -eq $Disable }
26 | }
27 | It "Get-TargetResource Network Interface should contains Result for Enable test" {
28 | $networkInterfaceEnable.Result | Should not be $null
29 | }
30 | It "Get-TargetResource Network Interface should contains Result for Disable test" {
31 | $networkInterfaceDisable.Result | Should not be $null
32 | }
33 | It "Get-TargetResource Network Interface should contains Result should be : $Enable" {
34 | $networkInterfaceEnable.Result | Should be $Enable
35 | }
36 | It "Get-TargetResource Network Interface should contains Result should be : $Disable" {
37 | $networkInterfaceDisable.Result | Should be $Disable
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Tests/Grani_ScheduleTask/TestScheduledTaskStatus.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_ScheduleTask : TestScheduledTaskStatus" {
6 |
7 | $taskName = "hoge"
8 | $taskPath = "\"
9 | $execute = "powershell.exe"
10 | $argument = "-Command 'Get-Date'"
11 | $workingDirectory = "c:\hoge"
12 | $disable = $false
13 | $scheduledAt = [datetime]"0:0:0"
14 |
15 | Context "Scratch environment." {
16 |
17 | It "TestScheduledTaskStatus should not throw" {
18 | {TestScheduledTaskStatus -TaskName $taskName -TaskPath $taskPath -Disable $true} | Should not Throw
19 | }
20 |
21 | It "TestScheduledTaskStatus should contains false" {
22 | (((TestScheduledTaskStatus -TaskName $TaskName -Disable $true).GetEnumerator() | %{$_.Value.result}) -contains $false) | Should be $true
23 | }
24 |
25 | It "Register scheduledTask -> TestScheduledTaskStatus should not contains false" {
26 | $action = New-ScheduledTaskAction -Execute $execute -Argument $argument -WorkingDirectory $workingDirectory
27 | $trigger = New-ScheduledTaskTrigger -At $scheduledAt -Once
28 | Register-ScheduledTask -TaskName $taskName -TaskPath $taskPath -Action $action -Trigger $trigger -Force
29 | (((TestScheduledTaskStatus -TaskName $taskName -Disable $disable).GetEnumerator() | %{$_.Value.result}) -contains $false) | Should be $false
30 | }
31 |
32 | It "Disable scheduledTask -> TestScheduledTaskStatus should contains false" {
33 | Get-ScheduledTask -TaskName $taskName -TaskPath $TaskPath | Disable-ScheduledTask
34 | (((TestScheduledTaskStatus -TaskName $taskName -TaskPath $taskPath -Disable $true).GetEnumerator() | %{$_.Value.result}) -contains $false) | Should be $false
35 | }
36 |
37 | Unregister-ScheduledTask -TaskName $taskName -TaskPath $taskPath -Confirm:$false
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Tests/Grani_DomainJoin/TargetResourceJoin.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Computer : *-TargetResource" {
6 |
7 | $identifier = "hoge"
8 | $domainName = (Get-Credential).UserName
9 | $credential = Get-Credential
10 |
11 | Context "Scratch environment. Join Domain" {
12 | It "Get-TargetResource should not throw" {
13 | {Get-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential} | should not Throw
14 | }
15 |
16 | $result = Get-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential
17 | It "Get-TargetResource should return Ensure : Absent" {
18 | $result.Ensure | should be ([Ensuretype]::Absent.ToString())
19 | }
20 |
21 | It "Get-TargetResource should return Identifier : $identifier" {
22 | $result.Identifier | should be $identifier
23 | }
24 |
25 | It "Get-TargetResource should return DomainName : $domainName" {
26 | $result.DomainName | should be $domainName
27 | }
28 |
29 | It "Test-TargetResource should return false" {
30 | Test-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential | should be $false
31 | }
32 |
33 | It "Set-TargetResource should not Throw" {
34 | {Set-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential} | should not Throw
35 | }
36 |
37 | It "Get-TargetResource should return Ensure : Present" {
38 | (Get-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential).Ensure | should be ([Ensuretype]::Present.ToString())
39 | }
40 |
41 | It "Test-TargetResource should return true" {
42 | Test-TargetResource -Identifier $identifier -DomainName $domainName -Credential $credential | should be $true
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/DSCResources/Grani_Download/README.md:
--------------------------------------------------------------------------------
1 | Grani_Download
2 | ============
3 |
4 | DSC Resource to download content from remote uri.
5 |
6 | Resource Information
7 | ----
8 |
9 | Name | FriendlyName | ModuleName
10 | -----|-----|-----
11 | Grani_Download | cDownload | GraniResource
12 |
13 | Test Status
14 | ----
15 |
16 | See **Test** Project for the detail.
17 |
18 | Method | Result
19 | ----|----
20 | Pester| pass
21 | Configuration| pass
22 | Get-DSCConfiguration| pass
23 | Test-DSCConfiguration| pass
24 |
25 | Intellisense
26 | ----
27 |
28 | 
29 |
30 | Sample
31 | ----
32 |
33 | - Download content from raw.github.com
34 |
35 | ```powershell
36 | configuration DownloadSample
37 | {
38 | Import-DscResource -ModuleName GraniResource
39 | cDownload DownloadItem
40 | {
41 | DestinationPath = "C:\Tools\README.md"
42 | Uri = "https://raw.githubusercontent.com/guitarrapc/DSCResources/master/README.md"
43 | }
44 | }
45 | ```
46 |
47 | Tips
48 | ----
49 |
50 | **Trace Remote file change**
51 |
52 | Grani_Download will not trace remote file change in default.
53 |
54 | If you want to change on remote file, there are 2 way would be thinkable.
55 |
56 | 1. Always download Remote content and override on local.
57 | 2. Download on temp location, hash check and override if change detected.
58 |
59 | Both way would try to connect remote content. It means if there are any Rate Limit on API then API will consume every time access. Grani_Download avoid this API consume by not tracing remote file change.
60 |
61 | You can do way 1 by passing LCM special location which will erace every time LCM try to run (SET).
62 |
63 | ```powershell
64 | configuration DownloadSample
65 | {
66 | Import-DscResource -ModuleName GraniResource
67 | cDownload DownloadItem
68 | {
69 | DestinationPath = "C:\Tools\README.md"
70 | Uri = "https://raw.githubusercontent.com/guitarrapc/DSCResources/master/README.md"
71 | CacheLocation = "$env:ProgramData\Microsoft\Windows\PowerShell\Configuration\BuiltinProvCache\Grani_Download"
72 | }
73 | }
74 | ```
75 |
--------------------------------------------------------------------------------
/Designer/Grani_S3Content.ps1:
--------------------------------------------------------------------------------
1 | Import-Module xDSCResourceDesigner
2 | $property = @()
3 | $property += New-xDscResourceProperty `
4 | -Name DestinationPath `
5 | -Type String `
6 | -Attribute Key `
7 | -Description "Path to output Donwloaded item."
8 | $property += New-xDscResourceProperty `
9 | -Name S3BucketName `
10 | -Type String `
11 | -Attribute Required `
12 | -Description "S3 Bucket name to access."
13 | $property += New-xDscResourceProperty `
14 | -Name Key `
15 | -Type String `
16 | -Attribute Write `
17 | -Description "S3 Object Key which identify content. You can't use both Key and KeyPrefix at once."
18 | $property += New-xDscResourceProperty `
19 | -Name Ensure `
20 | -Type String `
21 | -Attribute Read `
22 | -ValueMap Present, Absent `
23 | -Values Present, Absent `
24 | -Description "Describe File is exist on DestinationPath or not."
25 | $property += New-xDscResourceProperty `
26 | -Name PreAction `
27 | -Type String `
28 | -Attribute Write `
29 | -Description "Pre Action of Download Content. It only run when Test false."
30 | $property += New-xDscResourceProperty `
31 | -Name PostAction `
32 | -Type String `
33 | -Attribute Write `
34 | -Description "Post Action of Download Content. It only run when Test false."
35 | $property += New-xDscResourceProperty `
36 | -Name Credential `
37 | -Type PSCredential `
38 | -Attribute Write `
39 | -Description "Action execute Credential. You can ignore it if run as SYSTEM."
40 | $property += New-xDscResourceProperty `
41 | -Name CheckSum `
42 | -Type String `
43 | -Attribute Write `
44 | -ValueMap FileHash, FileName `
45 | -Values FileHash, FileName `
46 | -Description "Checksum to compare S3Object and Local Content. Default is FileHash."
47 | $property += New-xDscResourceProperty `
48 | -Name Region `
49 | -Type String `
50 | -Attribute Write `
51 | -Description "Use when you want to override AWS Region andpoint string to handle S3bucket."
52 |
53 | New-xDscResource -Name Grani_S3Content -Property $property -Path .\ -ModuleName GraniResource -FriendlyName cS3Content -Force
54 |
55 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/GetCacheKey.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Download : GetCacheKey" {
6 |
7 | $path = "d:\hoge\ReadMe.md"
8 | $uri = "https://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
9 |
10 | $path2 = "d:\hoge\ReadMe2.md"
11 | $uri2 = "https://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README2.md"
12 |
13 | $parent = Split-Path -Path $path -Parent
14 | New-Item -Path $parent -ItemType Directory -Force > $null
15 |
16 | New-Item -Path $path -ItemType File -Force > $null
17 | New-Item -Path $path2 -ItemType File -Force > $null
18 | 1..100 | Get-Random -Count 10 | Out-File -FilePath $path
19 | 1..100 | Get-Random -Count 10 | Out-File -FilePath $path2
20 |
21 | Context "GetCacheKey should return hash string from FileName and Url" {
22 |
23 | It "GetCacheKey should not BeNullOrEmpty" {
24 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not BeNullOrEmpty
25 | }
26 |
27 | It "GetCacheKey should not be 0" {
28 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not be "0"
29 | }
30 |
31 | It "GetCacheKey should Match for same file, uri." {
32 | GetCacheKey -DestinationPath $path -Uri $Uri | Should Match (GetCacheKey -DestinationPath $path -Uri $Uri)
33 | }
34 |
35 | It "GetCacheKey should not Match for random file." {
36 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path2 -Uri $Uri)
37 | }
38 |
39 | It "GetCacheKey should not Match for random uri." {
40 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path -Uri $Uri2)
41 | }
42 |
43 | It "GetCacheKey should not Match for random file and uri." {
44 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path2 -Uri $Uri2)
45 | }
46 | }
47 |
48 | Remove-Item -Path $parent -Force -Recurse
49 | }
50 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Verify.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_DotNetFramework : Verify" {
6 |
7 | $validKB = (Get-Hotfix | select -First 1).HotFixId;
8 | $invalidKB = "KB1";
9 | $present = "present";
10 | $absent = "absent";
11 |
12 | Context "VerifyExitCode" {
13 |
14 | It "Exit Code 0 should not throw" {
15 | {VerifyExitCode -ExitCode 0} | Should not throw
16 | }
17 |
18 | It "Exit Code 1641 should not throw" {
19 | {VerifyExitCode -ExitCode 1641} | Should not throw
20 | }
21 |
22 | It "Exit Code 3010 should not throw" {
23 | {VerifyExitCode -ExitCode 3010} | Should not throw
24 | }
25 |
26 | It "Exit Code 1602 should throw" {
27 | {VerifyExitCode -ExitCode 1602} | Should throw
28 | }
29 |
30 | It "Exit Code 1603 should throw" {
31 | {VerifyExitCode -ExitCode 1603} | Should throw
32 | }
33 |
34 | It "Exit Code 5100 should throw" {
35 | {VerifyExitCode -ExitCode 5100} | Should throw
36 | }
37 |
38 | It "Exit Code 16389 should throw" {
39 | {VerifyExitCode -ExitCode 16389} | Should throw
40 | }
41 |
42 | It "Exit Code 1, other exit code, should throw" {
43 | {VerifyExitCode -ExitCode 1} | Should throw
44 | }
45 | }
46 |
47 | Context "VerifyInstallation" {
48 |
49 | It "Valid Hotfix $validKB should not throw for Ensure $present." {
50 | {VerifyInstallation -KB $validKB -Ensure $present} | Should not throw
51 | }
52 |
53 | It "Valid Hotfix $validKB should throw for Ensure $absent." {
54 | {VerifyInstallation -KB $validKB -Ensure $absent} | Should throw
55 | }
56 |
57 | It "Invalid Hotfix $validKB should not throw for Ensure $absent." {
58 | {VerifyInstallation -KB $invalidKB -Ensure $absent} | Should not throw
59 | }
60 |
61 | It "Invalid Hotfix $validKB should throw for Ensure $present." {
62 | {VerifyInstallation -KB $invalidKB -Ensure $present} | Should throw
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/Invoke-HttpClient.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Download : Invoke-HttpClient" {
6 |
7 | $path = "d:\hoge\ReadMe.md"
8 | $path2 = "d:\hoge\ReadMe2.md"
9 | $path3 = "d:\hoge\ReadMe3.md"
10 |
11 | $parent = Split-Path -Path $path -Parent
12 |
13 | $uri = [uri]"https://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
14 | $uri2 = [uri]"https://raw.githubusercontent.com/guitarrapc/DSCResources/master/README.md"
15 | [uri]$invalidUri = [uri]"https://invalid.address.google.contosocom"
16 |
17 | New-Item -Path $parent -ItemType Directory -Force > $null
18 |
19 | Context "Invoke-HttpClient success/failure test" {
20 | It "Invoke-HttpClient should Throw for invalid Uri download" {
21 | {Invoke-HttpClient -Uri $invalidUri -Path $path} | Should Throw
22 | }
23 |
24 | It "Invoke-HttpClient should not Throw." {
25 | {
26 | Invoke-HttpClient -Uri $uri -Path $path;
27 | Invoke-HttpClient -Uri $uri2 -Path $path3;
28 | } | Should Not Throw
29 | }
30 | }
31 |
32 | Context "Invoke-HttpClient should download stream and save file test" {
33 |
34 | It "Invoke-HttpClient should download file" {
35 | (Get-Item -Path $path).GetType().FullName | Should be System.IO.FileInfo
36 | (Get-Item -Path $path3).GetType().FullName | Should be System.IO.FileInfo
37 | }
38 |
39 | It "Copy Downloaded content should not throw." {
40 | {
41 | Get-Item -Path $path;
42 | Copy-Item -Path $path -Destination $path2
43 | } | Should not Throw
44 | }
45 |
46 | }
47 |
48 | Context "Invoke-HttpClient downloaded file test" {
49 | It "Same Filehash for same uri/version download." {
50 | GetFileHash -Path $path | Should be (GetFileHash -Path $path2)
51 | }
52 |
53 | It "Different Filehash for different uri/version download." {
54 | GetFileHash -Path $path | Should not be (GetFileHash -Path $path3)
55 | }
56 | }
57 |
58 | Remove-Item -Path $path -Force
59 | Remove-Item -Path $path2 -Force
60 | }
61 |
--------------------------------------------------------------------------------
/Tests/Grani_WebPI/GetTargetResource.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_WebPI : Get-TargetResource" {
6 |
7 | $availableName = "WordPress"
8 | $installedName = "PowerShell3"
9 |
10 | $available = Get-WebPlatformInstallerProduct -Available
11 | $install = Get-WebPlatformInstallerProduct -Installed
12 |
13 | $GetTargetResourceInstall = Get-TargetResource -Name $installedName
14 | $GetTargetResourceAvailable = Get-TargetResource -Name $availableName
15 |
16 | Context "All test must return valid value" {
17 |
18 | It "Available Package List should return object" {
19 | $available | Should not be $null
20 | }
21 | It "Available Package should return Package '$availableName'" {
22 | $available | where ProductId -eq $availableName | select -ExpandProperty ProductId | Should be $availableName
23 | }
24 | It "Installed Package List should return object" {
25 | $install | Should not be $null
26 | }
27 | It "Installed Package should return Package '$installedName'" {
28 | $install | where ProductId -eq $installedName | select -ExpandProperty ProductId | Should be $installedName
29 | }
30 | It "Get-TargetResource should not return null" {
31 | $GetTargetResourceInstall | Should not be $null
32 | }
33 | It "Get-TargetResource should return Package '$installedName'" {
34 | $GetTargetResourceInstall.GetEnumerator() | where Value -eq $installedName | Select -ExpandProperty Value | Should be $installedName
35 | }
36 | }
37 |
38 | Context "All test should return null" {
39 |
40 | It "Available Package '$availableName' should not return from Installed Package" {
41 | $install | where ProductId -eq $availableName | Should be $null
42 | }
43 | It "Installed Package '$installedName' should not return from available Package" {
44 | $available | where ProductId -eq $installedName | Should be $null
45 | }
46 | It "Get-TargetResource should not return Package '$availableName'" {
47 | $GetTargetResourceAvailable | Where Value -eq $availableName | Should be $null
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Tests/Grani_DotNetFramework/Validate.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_DotNetFramework : Validate" {
6 |
7 | $validPath = Get-ChildItem -Path $env:USERPROFILE -Recurse -File | select -First 1;
8 | $invalidPath = "z:\hogemoge\fugafuga\piyopiyo\zzzzzzzzzzzzzzzzzzzz";
9 |
10 | $validKB = (Get-Hotfix | select -First 1).HotFixId;
11 | $number = $validKB.Replace("KB","");
12 | $invalidKB = "ho" + $number;
13 |
14 | Context "IsHotfixEntryExists" {
15 |
16 | It "valid kb $validKB should be found" {
17 | IsHotfixEntryExists -Kb $validKB | Should be $true
18 | }
19 |
20 | It "non kb format number $numbver should not be found" {
21 | IsHotfixEntryExists -Kb $number | Should be $false
22 | }
23 |
24 | It "invalid kb $invalidKB should not be found" {
25 | IsHotfixEntryExists -Kb $invalidKB | Should be $false
26 | }
27 | }
28 |
29 | Context "ValidateInstallerPath" {
30 |
31 | It "Valid Path should not throw" {
32 | {ValidateInstallerPath -Path $validPath.FullName} | Should not throw
33 | }
34 |
35 | It "Invalid Path should throw" {
36 | {ValidateInstallerPath -Path $invalidPath} | Should throw
37 | }
38 | }
39 |
40 | Context "ValidateKb" {
41 |
42 | It "valid kb $validKB should not throw when parse to int." {
43 | {[int](ValidateKb -KB $validKB)} | Should not throw
44 | }
45 |
46 | It "valid number $number should not throw when parse to int." {
47 | {[int](ValidateKb -KB $number)} | Should not throw
48 | }
49 |
50 | It "invalid kb $invalidKB should throw when parse to int." {
51 | {[int](ValidateKb -KB $invalidKB)} | Should throw
52 | }
53 |
54 | It "valid kb $validKB should be int." {
55 | ([int](ValidateKb -KB $validKB)).GetType().FullName | Should be "System.Int32"
56 | }
57 |
58 | It "Number $number should be int." {
59 | ([int](ValidateKb -KB $number)).GetType().FullName | Should be "System.Int32"
60 | }
61 |
62 | It "validkb $validKB should be equal to number $number." {
63 | ValidateKb -KB $validKB | Should be $number
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Tests/Grani_GitHubApiContent/GetCacheKey.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_GitHubApiContent : GetCacheKey" {
6 |
7 | $path = "d:\hoge\ReadMe.md"
8 | $path2 = "d:\hoge\ReadMe2.md"
9 |
10 | $Repository = "DSCResources"
11 | $Repository2 = "valentia"
12 | $RepositoryOwner = "guitarrapc"
13 | $ContentPath = "README.md"
14 | $Branch = "master"
15 |
16 | [uri]$uri = ParseGitHubApiUri -RepositoryOwner $RepositoryOwner -Repository $Repository -ContentPath $ContentPath -Branch $Branch
17 | [uri]$uri2 = ParseGitHubApiUri -RepositoryOwner $RepositoryOwner -Repository $Repository2 -ContentPath $ContentPath -Branch $Branch
18 |
19 | $parent = Split-Path -Path $path -Parent
20 | New-Item -Path $parent -ItemType Directory -Force > $null
21 |
22 | New-Item -Path $path -ItemType File -Force > $null
23 | New-Item -Path $path2 -ItemType File -Force > $null
24 | 1..100 | Get-Random -Count 10 | Out-File -FilePath $path
25 | 1..100 | Get-Random -Count 10 | Out-File -FilePath $path2
26 |
27 | Context "GetCacheKey should return hash string from FileName and Url" {
28 |
29 | It "GetCacheKey should not BeNullOrEmpty" {
30 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not BeNullOrEmpty
31 | }
32 |
33 | It "GetCacheKey should not be 0" {
34 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not be "0"
35 | }
36 |
37 | It "GetCacheKey should Match for same file, uri." {
38 | GetCacheKey -DestinationPath $path -Uri $Uri | Should Match (GetCacheKey -DestinationPath $path -Uri $Uri)
39 | }
40 |
41 | It "GetCacheKey should not Match for random file." {
42 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path2 -Uri $Uri)
43 | }
44 |
45 | It "GetCacheKey should not Match for random uri." {
46 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path -Uri $Uri2)
47 | }
48 |
49 | It "GetCacheKey should not Match for random file and uri." {
50 | GetCacheKey -DestinationPath $path -Uri $Uri | Should not Match (GetCacheKey -DestinationPath $path2 -Uri $Uri2)
51 | }
52 | }
53 |
54 | Remove-Item -Path $parent -Force -Recurse
55 | }
56 |
--------------------------------------------------------------------------------
/GraniResource.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27130.2027
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Root", "Root", "{F6C2E1B5-DC94-4C03-B801-B2292E338EDD}"
7 | ProjectSection(SolutionItems) = preProject
8 | GraniResource.psd1 = GraniResource.psd1
9 | New-GraniResourceManifest.ps1 = New-GraniResourceManifest.ps1
10 | README.md = README.md
11 | EndProjectSection
12 | EndProject
13 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Designer", "Designer\Designer.csproj", "{A58D3D3C-FF82-4099-8435-177DB8241579}"
14 | EndProject
15 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSCResources", "DSCResources\DSCResources.csproj", "{25DD5BA3-6264-42FB-B09B-6BDDBE9E70A9}"
16 | EndProject
17 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{AB277373-293E-4143-8B56-F47AF7EDF315}"
18 | EndProject
19 | Global
20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
21 | Debug|Any CPU = Debug|Any CPU
22 | Release|Any CPU = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
25 | {A58D3D3C-FF82-4099-8435-177DB8241579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {A58D3D3C-FF82-4099-8435-177DB8241579}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {A58D3D3C-FF82-4099-8435-177DB8241579}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {A58D3D3C-FF82-4099-8435-177DB8241579}.Release|Any CPU.Build.0 = Release|Any CPU
29 | {25DD5BA3-6264-42FB-B09B-6BDDBE9E70A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30 | {25DD5BA3-6264-42FB-B09B-6BDDBE9E70A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
31 | {25DD5BA3-6264-42FB-B09B-6BDDBE9E70A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
32 | {25DD5BA3-6264-42FB-B09B-6BDDBE9E70A9}.Release|Any CPU.Build.0 = Release|Any CPU
33 | {AB277373-293E-4143-8B56-F47AF7EDF315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34 | {AB277373-293E-4143-8B56-F47AF7EDF315}.Debug|Any CPU.Build.0 = Debug|Any CPU
35 | {AB277373-293E-4143-8B56-F47AF7EDF315}.Release|Any CPU.ActiveCfg = Release|Any CPU
36 | {AB277373-293E-4143-8B56-F47AF7EDF315}.Release|Any CPU.Build.0 = Release|Any CPU
37 | EndGlobalSection
38 | GlobalSection(SolutionProperties) = preSolution
39 | HideSolutionNode = FALSE
40 | EndGlobalSection
41 | GlobalSection(ExtensibilityGlobals) = postSolution
42 | SolutionGuid = {D9E53D9F-FEFC-49C9-A119-804AB2B2A095}
43 | EndGlobalSection
44 | EndGlobal
45 |
--------------------------------------------------------------------------------
/Tests/Grani_S3Content/HashHelper.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_S3Content : HashHelper" {
6 |
7 | # Local definition
8 | $pathF = "c:\hoge\ReadMe.md"
9 | $pathD = "c:\hoge\ReadMe"
10 | $pathNotExist = "c:\hoge\notexist.md"
11 |
12 | $parent = Split-Path -Path $pathF -Parent
13 | New-Item -Path $parent -ItemType Directory -Force > $null
14 |
15 | New-Item -Path $pathF -ItemType File -Force > $null
16 | New-Item -Path $pathD -ItemType Directory -Force > $null
17 |
18 | # S3 definition
19 | $bucketName = [Guid]::NewGuid().ToString()
20 | $key = [Guid]::NewGuid().ToString()
21 |
22 | Context "GetFileHash should get Local FileHash" {
23 |
24 | It "Folder should be null" {
25 | GetFileHash -Path $pathD | should be $null
26 | }
27 |
28 | It "GetFileHash should not BeNullOrEmpty" {
29 | GetFileHash -Path $pathF | Should Not BeNullOrEmpty
30 | }
31 |
32 | It "GetFileHash should be MD5 hash string." {
33 | GetFileHash -Path $pathF | Should be (Get-FileHash -Path $pathF -Algorithm MD5).Hash
34 | }
35 |
36 | It "GetFileHash should not be SHA256 hash string." {
37 | GetFileHash -Path $pathF | Should not be (Get-FileHash -Path $pathF -Algorithm SHA256).Hash
38 | }
39 | }
40 |
41 | Context "GetS3ObjectHash should get S3 FileHash" {
42 |
43 | It "Bucket not exist should Throw" {
44 | {GetS3ObjectHash -Bucket $pathNotExist -Key $Key} | Should Throw
45 | }
46 |
47 | New-S3Bucket -BucketName $bucketName > $null
48 |
49 | It "Bucket exist but Key not exist should Throw" {
50 | {GetS3ObjectHash -Bucket $bucketName -Key $Key} | Should Throw
51 | }
52 |
53 | Write-S3Object -BucketName $bucketName -Key $Key -File $pathF
54 |
55 | It "Bucket/Key exist should not Throw" {
56 | {GetS3ObjectHash -Bucket $bucketName -Key $Key} | Should not Throw
57 | }
58 |
59 | Read-S3Object -BucketName $bucketName -Key $key -File $pathF > $null
60 | }
61 |
62 | Context "GetFileHash and GetS3ObjectHash should get same hash" {
63 |
64 | It "S3Hash should same as LocalHash." {
65 | GetFileHash -Path $pathF | Should be (GetS3ObjectHash -Bucket $bucketName -Key $key)
66 | }
67 | }
68 |
69 | Remove-Item -Path $parent -Force -Recurse > $null
70 | Remove-S3Bucket -BucketName $bucketName -DeleteBucketContent -Force
71 | }
72 |
--------------------------------------------------------------------------------
/Tests/Grani_Download/ValidationHelper.Tests.ps1:
--------------------------------------------------------------------------------
1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
2 | $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
3 | . "$here\$sut"
4 |
5 | Describe "Grani_Download : ValidationHelper" {
6 |
7 | $http = [uri]"http://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
8 | $https = [uri]"https://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
9 | $file = [uri]"file://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
10 | $unc = [uri]"c:\raw.githubusercontent.com\guitarrapc\WindowsCredentialVault\master\README.md"
11 | $invalid = [uri]"httttp://raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
12 | $other = [uri]"//raw.githubusercontent.com/guitarrapc/WindowsCredentialVault/master/README.md"
13 |
14 | $path = "d:\hoge\ReadMe.md"
15 | $parent = Split-Path -Path $path -Parent
16 |
17 | Context "ValidateUri test" {
18 | It "http scheme should not be null." {
19 | ValidateUri -Uri $http | Should Not Be $null
20 | }
21 |
22 | It "https scheme should not be null." {
23 | ValidateUri -Uri $https | Should Not Be $null
24 | }
25 |
26 | It "file scheme should not be null." {
27 | ValidateUri -Uri $file | Should Not Be $null
28 | }
29 |
30 | It "UNC scheme format should be fail." {
31 | {ValidateUri -Uri $unc} | Should Not Be $null
32 | }
33 |
34 | It "invalid scheme format should be fail." {
35 | {ValidateUri -Uri $invalid} | Should Throw
36 | }
37 |
38 | It "other scheme format should be fail." {
39 | {ValidateUri -Uri $other} | Should Throw
40 | }
41 | }
42 |
43 | Context "ValidateFile test" {
44 |
45 | It "Parent Directory Should created when not exists." {
46 | ValidateFilePath -Path $path
47 | (Get-Item -Path $parent).GetType().FullName | should be "System.IO.DirectoryInfo"
48 | }
49 |
50 | It "Nothing should do when File already exist and null return." {
51 | New-Item -Path $path -ItemType File > $null
52 | ValidateFilePath -Path $path | should be $null
53 | Remove-Item -Path $path -Force > $null
54 | }
55 |
56 | It "Already exist Directory for same name should Throw." {
57 | New-Item -Path $path -ItemType Directory > $null
58 | {ValidateFilePath -Path $path} | should Throw
59 | }
60 |
61 | Remove-Item -Path $parent -Recurse -Force > $null
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------