diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs index 4aa5902443..8c92f7c2ef 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs @@ -1793,8 +1793,8 @@ namespace Microsoft.PowerShell.Commands private void WriteProgress(string statusDescription, int? percentComplete, int? secondsRemaining) { ProgressRecordType recordType; - if (secondsRemaining.HasValue && secondsRemaining.GetValueOrDefault() == 0 && - percentComplete.HasValue && percentComplete.GetValueOrDefault() == 100) + if (secondsRemaining.HasValue && secondsRemaining.Value == 0 && + percentComplete.HasValue && percentComplete.Value == 100) { recordType = ProgressRecordType.Completed; }