microsoft / DSCEA

DSC Environment Analyzer (DSCEA) is a simple implementation of PowerShell Desired State Configuration that uses the declarative nature of DSC to scan systems in an environment against a defined reference MOF file and generate compliance reports as to whether systems match the desired configuration.
https://microsoft.github.io/DSCEA
Other
197 stars 41 forks source link

Version 1.0.0.1 #29

Closed rkyttle closed 7 years ago

msftclas commented 7 years ago

@rkyttle, Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA. Thanks, Microsoft Pull Request Bot

rkyttle commented 7 years ago

Fixes #28

krjhitch commented 7 years ago

In reference to 56d67c25fd8d77ffaa1923b6afe501d95ffd8258 I think we should use the following code

$env:PSModulePath -split ';' | ForEach-Object {
    if(Test-Path (Join-Path -Path $_ -ChildPath 'DSCEA')) {
        if (!(Test-Path -Path 'C:\ProgramData\DSCEA')) {
            New-Item 'C:\ProgramData\DSCEA' -Type Directory
        }
        Copy-Item -Path (Get-ChildItem -Path $_ -Recurse -Filter 'logo.png').FullName -Destination 'C:\ProgramData\DSCEA\logo.png' -Force
    }
}