We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7913f54 commit cdc8b0fCopy full SHA for cdc8b0f
src/dsc/psresourceget.ps1
@@ -890,7 +890,13 @@ if ($null -eq (Get-Module -Name Microsoft.PowerShell.PSResourceGet)) {
890
}
891
892
Write-Trace -level trace -message "Microsoft.PowerShell.PSResourceGet module is not imported. Importing it."
893
- Import-Module -Name Microsoft.PowerShell.PSResourceGet -Force -ErrorAction Stop -Verbose
+
894
+ try {
895
+ Import-Module -Name Microsoft.PowerShell.PSResourceGet -Force -ErrorAction Stop
896
+ }
897
+ catch {
898
+ Write-Trace -level info -message "IGNORING Failed to import Microsoft.PowerShell.PSResourceGet module. Error details: $($_.Exception.Message)"
899
900
901
902
switch ($Operation.ToLower()) {
0 commit comments