File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,6 @@ catch [System.Management.Automation.CommandNotFoundException] {
2626 }
2727}
2828
29- function Test-PuppetInstalled {
30- $rootPath = ' HKLM:\SOFTWARE\Puppet Labs\Puppet'
31- try {
32- if (Get-ItemProperty - Path $rootPath ) { RETURN $true }
33- }
34- catch {
35- RETURN $false
36- }
37- }
38-
3929function Test-PuppetInstalledVersion {
4030 $rootPath = ' HKLM:\SOFTWARE\Puppet Labs\Puppet'
4131
@@ -82,7 +72,7 @@ if ($version) {
8272 }
8373}
8474else {
85- if (Test-PuppetInstalled ) {
75+ if (Test-PuppetInstalledVersion ) {
8676 Write-Output " Version parameter not defined and agent detected. Nothing to do."
8777 Exit
8878 }
@@ -160,5 +150,5 @@ if($_noop -eq 'true') {
160150 DownloadPuppet
161151 InstallPuppet
162152 Cleanup
163- Write-Output " Puppet Agent installed on $env: COMPUTERNAME "
153+ Write-Output " Puppet Agent installed on $env: COMPUTERNAME "
164154}
You can’t perform that action at this time.
0 commit comments