duffney / invokedsc Goto Github PK
View Code? Open in Web Editor NEWPowerShell module for Invoking DSC from json
License: MIT License
PowerShell module for Invoking DSC from json
License: MIT License
allow arrays in json for resources that require a property of string detect string property and convert array to flat string with | out-file
"AuthenticationInfo":[
{
"CimType":"MSFT_xWebApplicationAuthenticationInformation",
"Properties":{
"Anonymous":true,
"Basic":true
}
}
]
AuthenticationInfo isn't an array of Cims but contains a CimType add logic in ConvertTo-DSC that tests if the object contains CimType and create single cim instance.
add a -force param that invokes set and skips set method for invoke-dsc and invoke-dscconfiguraiton
throw an error when config is missing dscResourceName with the json object in error message
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Functions/Get-POSHOriginSecret.ps1
avoid pscriptanalyzer error for using convertto-securestring
Could a switch be added test the local system only? So it would just run the test method and return the result. I would then want to capture that result and do something with it for reporting purposes.
It's a check to determine the current state vs. the desired state.
When declaring null values for module versions invoke-dscresource fails with unable to find dsc resource because of module side loading with multiple versions.
give the ability to specify credentials that are used by splitting the string by '\
and converting to a psCred inside the convertto-dsc function.
foreach ($module in $modules) { Write-Verbose -Message "Installing [$module]" Install-Module -Name $module -Repository $Repository -Confirm:$false }
Write a function that suppresses the verbose module loading of invoke-dscresource so only useful output is shown
Examples:
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Internal/_ConvertDscVerboseOutput.ps1
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Functions/Invoke-POSHOriginNEW.ps1#L73
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Internal/_WriteResourceStatus.ps1
add logic within Invoke-Dsc to handle retries when LCM state is detected as busy
because Invoke-DscConfiguration runs as the user executing the cmdlet it doesn't have access to the gallery created by DSC because it runs as NT system. Consider using PSModule resource from PackageManagementProviderResource instead.
This is great, exactly what I've been looking for.
My goal is to avoid files on the local systems all together. I forked this just to add InputObject param to Get-ModuleFromConfiguration and Invoke-DscConfiguration, it's working well. Simple thing to add, but I can open pull request if you want.
I haven't thought through how Invoke-DscConfigurationByRoles could be modified to support recursing through several objects in a url and processing them.
$oldProgPref = $global:ProgressPreference
$global:ProgressPreference = 'SilentlyContinue'
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Functions/Invoke-POSHOrigin.ps1
foreach ($module in $modules)
{
Write-Verbose -Message "Verifying [$module] exists"
if (!(Get-Module -name $module -ListAvailable))
{
Write-Verbose -Message "[$module] not found"
Write-Verbose -Message "Installing [$module]"
Install-Module -Name $module -Repository $Repository -Confirm:$false
}
else
{
Write-Verbose -Message "Module [$module] already exists"
}
}
if (!(Get-Module -FullyQualifiedName @{ModuleName=$module.Name;moduleversion=$module.Value} -ListAvailable))
Using ModuleVersion in the module specification will return all existing modules. This results in the if statement returning true and the logic skipping the download of more than one module version.
To fix update to RequiredVersion
Get-Module -FullyQualifiedName @{ModuleName=$module.Name;FullyQualifiedName =$module.Value} -ListAvailable
Need a way to suppress the verbose output of importing modules per function call.
references:
https://github.com/devblackops/POSHOrigin/blob/dev/POSHOrigin/Functions/Invoke-POSHOriginNEW.ps1#L73
mock calls to get-dscresource to avoid having to download them during build
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.