windows-admins / ConfigMgr

GNU General Public License v3.0
225 stars 57 forks source link

VHD Application Install #77

Closed Ebag333 closed 5 years ago

Ebag333 commented 5 years ago
Line 1: Function 'Remove-RegistryKey'   has verb that could change system state. Therefore, the function has to   support 'ShouldProcess'.

Line 36: Function 'Update-RegistryKey'   has verb that could change system state. Therefore, the function has to   support 'ShouldProcess'. | Update-RegistryKey

Line 21: File 'PackagingHostConfig.ps1'   uses Write-Host. Avoid using Write-Host because it might not work in all   hosts, does not work when there is no host, and (prior to PS 5.0) cannot be   suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose,   or Write-Information.

Line 60: File 'PackagingHostConfig.ps1'   uses Write-Host. Avoid using Write-Host because it might not work in all   hosts, does not work when there is no host, and (prior to PS 5.0) cannot be   suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose,   or Write-Information.

https://dille.name/blog/2017/08/27/how-to-use-shouldprocess-in-powershell-functions/

Ebag333 commented 5 years ago

Calling @jones948 and @theaquamarine as you're the last two that touched this.

Looking at this, it's a pretty antiquated method of doing packages (and I'm adding a comment to the readme noting such), but I don't want to remove or archive it if there's still some value to it. If either of you are interested in addressing the 4 issues above I'll be more than happy to leave it up, otherwise it'll probably get archived.

Ebag333 commented 5 years ago

I actually took care of the Write-Host for ya ;)

Ebag333 commented 5 years ago

No errors to see here. Move along.