Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvs committed Mar 22, 2024
1 parent 5c369b7 commit 6b4bb6b
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions functions/DiskSmartInfo.functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -195,32 +195,5 @@ function Get-DiskSmartInfo
# Remove unnecessary System.Management.Automation.Runspaces.RemotingErrorRecord objects from ErrorVariable
inClearRemotingErrorRecords
}


# $length = $PSCmdlet.SessionState.PSVariable.GetValue($PSCmdlet.MyInvocation.BoundParameters.ErrorVariable).Count
# $value = $PSCmdlet.SessionState.PSVariable.Get($PSCmdlet.MyInvocation.BoundParameters.ErrorVariable).Value
# $value.RemoveAt(0)
# $PSCmdlet.SessionState.PSVariable.Get($PSCmdlet.MyInvocation.BoundParameters.ErrorVariable).Value.RemoveAt($length - 1)

# while ($value.ForEach{$PSItem.GetType().FullName} -contains 'System.Management.Automation.Runspaces.RemotingErrorRecord')
# {
# $value.ForEach{if ($PSItem.GetType().FullName -eq 'System.Management.Automation.Runspaces.RemotingErrorRecord') {$value.Remove($PSItem); continue}}
# }

# if ($PSCmdlet.MyInvocation.BoundParameters.ErrorVariable)
# {
# $value = $PSCmdlet.SessionState.PSVariable.GetValue($PSCmdlet.MyInvocation.BoundParameters.ErrorVariable)
# while ($true)
# {
# $value.ForEach{
# if ($PSItem.GetType().FullName -eq 'System.Management.Automation.Runspaces.RemotingErrorRecord')
# {
# $value.Remove($PSItem)
# continue
# }
# }
# break
# }
# }
}
}

0 comments on commit 6b4bb6b

Please sign in to comment.