{"id":14980485,"url":"https://github.com/nyanhp/xdschelper","last_synced_at":"2025-10-29T00:30:32.403Z","repository":{"id":57665934,"uuid":"85066623","full_name":"nyanhp/xDscHelper","owner":"nyanhp","description":"A DSC resource module that contains helper resources not fitting elsewhere","archived":false,"fork":false,"pushed_at":"2020-07-02T08:56:05.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"mimir","last_synced_at":"2025-02-01T20:11:33.128Z","etag":null,"topics":["dsc-resources","powershell"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nyanhp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-15T11:54:01.000Z","updated_at":"2022-11-12T23:05:30.000Z","dependencies_parsed_at":"2022-09-26T20:31:33.123Z","dependency_job_id":null,"html_url":"https://github.com/nyanhp/xDscHelper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyanhp%2FxDscHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyanhp%2FxDscHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyanhp%2FxDscHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyanhp%2FxDscHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyanhp","download_url":"https://codeload.github.com/nyanhp/xDscHelper/tar.gz/refs/heads/mimir","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238743913,"owners_count":19523201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dsc-resources","powershell"],"created_at":"2024-09-24T14:01:50.682Z","updated_at":"2025-10-29T00:30:32.030Z","avatar_url":"https://github.com/nyanhp.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/9dr2dqkats65yb8u/branch/master?svg=true)](https://ci.appveyor.com/project/nyanhp/xdschelper/branch/master)\n\n# xDscHelper\nA DSC resource module that contains helper resources not fitting elsewhere. All of the resources in this repository are provided AS IS.\n\n## Installation\nTo install xDscHelper module either\n\n* Unzip the content under $env:ProgramFiles\\WindowsPowerShell\\Modules folder\n* Or `Install-Module xDscHelper` in an elevated PowerShell session\n\nRun `Get-DSCResource` to see that xDscHelper is among the DSC Resources listed\n\nRequirements\nThis module requires at least PowerShell v4.0, which ships in Windows 8.1 or Windows Server 2012R2.\n\n## Description\nThe module xDscHelper contains the following resources:\n\n* xWaitForItem - Allows you to wait for files to reach a specific length or content or for folders reach a specified amount of child items\n* xMaintenanceWindow - Allows you to specify a maintenance window as a dependency for your resources\n * **Warning**: This will screw up your reporting unless you can exclude the xMaintenanceWindow resources. xMaintenanceWindow throws an error in the Set-TargetResource operation in order to stop dependecy processing. This means: Your configuration cannot be applied.\n\n## Examples\nThis example for xWaitForItem waits for a hypothetic configuration file created by another system, process or product which a local service depends on:  \n\n```powershell\nconfiguration conf\n{\n    Import-DscResource -ModuleName xDscHelper\n\n    node localhost\n    {\n        # Wait for a third party product or another system to create a file you need\n        xWaitForItem configFile\n        {\n            Path = 'C:\\ConfigFileFromOtherSystem.ini'\n            Type = 'File'\n            MinimumLength = 1\n        }\n\n        # Use it as a dependency\n        Service myService\n        {\n           Name = 'IniNeedingService'\n           Path = 'C:\\Svc\\My.exe'\n           DependsOn = '[xWaitForItem]configFile'\n        }\n    }\n}\n```\n\nThis example for xWaitForItem waits for a folder to fully replicate it's contents:  \n\n```powershell\nconfiguration conf\n{\n    Import-DscResource -ModuleName xDscHelper\n\n    node localhost\n    {\n        # Wait for e.g folder replication\n        xWaitForItem folderContents\n        {\n            Path = 'C:\\SomeReplicatedFolder'\n            Type = 'Directory'\n            ChildItemCount = 25\n        }\n\n        # Use it as a dependency\n        Service myService\n        {\n           Name = 'FileNeedingService'\n           Path = 'C:\\Svc\\My.exe'\n           DependsOn = '[xWaitForItem]folderContents'\n        }\n    }\n}\n```\n\nThis example for xMaintenanceWindow defines a maintenance window for the second tuesday of each month from 10 pm to 6 am and uses it as a dependency for other resources:  \n\n```powershell\nconfiguration conf\n{\n    Import-DscResource -ModuleName xDscHelper\n\n    node localhost\n    {\n        xMaintenanceWindow patchday\n        {\n            ScheduleStart = (Get-Date).Date.AddHours(22)\n            ScheduleEnd = (Get-Date).Date.AddHours(6)\n            ScheduleType = 'Monthly'\n            DayOfWeek = 'Tuesday'\n            DayOfMonth = 2\n        }\n\n        Package 1\n        {\n            DependsOn = '[xMaintenanceWindow]patchday'\n            ...\n        }\n\n        Package 2\n        {\n            DependsOn = '[xMaintenanceWindow]patchday'\n            ...\n        }\n\n        Package 3\n        {\n            DependsOn = '[xMaintenanceWindow]patchday'\n            ...\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanhp%2Fxdschelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyanhp%2Fxdschelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanhp%2Fxdschelper/lists"}