guitarrapc / GraniResource

PowerShell Desired State Configuration Resources for real production workload.
https://www.powershellgallery.com/packages/GraniResource
MIT License
43 stars 8 forks source link

[Enhancement]Add cPowerShellGet Resource #42

Closed guitarrapc closed 8 years ago

guitarrapc commented 8 years ago

Now I have confirmed it can host Private PowerShellGet Repository (PSRepository) with Nuget.Server. This is the time to install module with DSC.

However xPowerShellget or similar DSC Resources are not existing yet.

guitarrapc commented 8 years ago

Would be required to avoid import when PowerShellGet is not available on node.

Something like this in Get/Set/Test.

$script:IsPowerShellGetExists = if ((Get-Module -ListAvailable | where Name -eq PowerShellGet | measure).Count -ne 0){ $true; }else{ $false; }

function Get-TargetResource()
{
    if (!$script:IsPowerShellGetExists){ return; }
}

function Set-TargetResource()
{
    if (!$script:IsPowerShellGetExists){ return; }
}

function Test-TargetResource()
{
    if (!$script:IsPowerShellGetExists){ return; }
}
guitarrapc commented 8 years ago

AS PowerShell Get Still broken pending,,,