File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848
4949 . NOTES
5050 Author: Blake Drumm
51- Version: 1.4
51+ Version: 1.5
5252 Created: November 17th, 2023
5353 Modified: March 18th, 2024
5454#>
@@ -540,15 +540,9 @@ function Invoke-SCXWinRMEnumeration
540540 # Output handling
541541 if ($OutputType -eq ' CSV' )
542542 {
543- if ($OutputType -match ' Text' )
544- {
545- $ParentDirectory = Split-Path $OutputFile
546- $OutputPath = " $ParentDirectory \$ ( [System.IO.Path ]::GetFileNameWithoutExtension($OutputFile )) .csv"
547- }
548- else
549- {
550- $OutputPath = $OutputFile
551- }
543+ $ParentDirectory = Split-Path $OutputFile
544+ $OutputPath = " $ParentDirectory \$ ( [System.IO.Path ]::GetFileNameWithoutExtension($OutputFile )) .csv"
545+
552546 if ($results -match " Error for" )
553547 {
554548 $results | Out-File - FilePath $OutputPath - ErrorAction Stop
@@ -565,15 +559,9 @@ function Invoke-SCXWinRMEnumeration
565559 }
566560 if ($OutputType -eq ' Text' )
567561 {
568- if ($OutputType -match ' CSV' )
569- {
570- $ParentDirectory = Split-Path $OutputFile
571- $OutputPath = " $ParentDirectory \$ ( [System.IO.Path ]::GetFileNameWithoutExtension($OutputFile )) .txt"
572- }
573- else
574- {
575- $OutputPath = $OutputFile
576- }
562+ $ParentDirectory = Split-Path $OutputFile
563+ $OutputPath = " $ParentDirectory \$ ( [System.IO.Path ]::GetFileNameWithoutExtension($OutputFile )) .txt"
564+
577565 $results | Out-File - FilePath $OutputPath - ErrorAction Stop
578566 if (-NOT $PassThru )
579567 {
You can’t perform that action at this time.
0 commit comments