From b1bc0ed48d6ede81cb02a9eb88ee60c817b58ff4 Mon Sep 17 00:00:00 2001 From: John Barnes <31294925+jrdbarnes@users.noreply.github.com> Date: Mon, 25 Mar 2019 22:28:21 +0000 Subject: [PATCH] Ignore warnings with Get-PSRepository. See https://github.com/hbuckle/puppet-powershellmodule/issues/22 --- lib/puppet/provider/psrepository/powershellcore.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/psrepository/powershellcore.rb b/lib/puppet/provider/psrepository/powershellcore.rb index 37296e2..1b047e6 100644 --- a/lib/puppet/provider/psrepository/powershellcore.rb +++ b/lib/puppet/provider/psrepository/powershellcore.rb @@ -67,7 +67,7 @@ def flush def self.instances_command <<-COMMAND - @(Get-PSRepository).foreach({ + @(Get-PSRepository -WarningAction SilentlyContinue).foreach({ [ordered]@{ 'name' = $_.Name 'source_location' = $_.SourceLocation