Skip to content

Commit 14b3f7f

Browse files
authored
Merge pull request #16 from yumusb/patch-1
Fix the problem of non-English garbled codes
2 parents 6a1877a + a45edde commit 14b3f7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/Invoke-Meerkat.psm1

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Invoke-Meerkat {
88
99
Invoke-Meerkat takes advantage of the `export-csv` cmdlet in this way by exporting ALL enabled modules to csv. The basic syntax is `Invoke-Meerkat -Computer [Computername] -Modules [Module1, Module2, etc.]` (details via `get-help Invoke-Meerkat -Full`).
1010
11-
When running a single function against a single endpoint, the typical sytnax is 'Get-[ModuleName] -Computer [ComputerName]', which returns objects relevant to the function called. All modules support the pipeline, which means results can be exported. For example, 'Get-[ModuleName] -Computer [ComputerName] | export-csv "c:\temp\results.csv" -notypeinformation' will utilize PowerShell's built-in csv export function (details via 'get-help Get-[function] -Full').
11+
When running a single function against a single endpoint, the typical sytnax is 'Get-[ModuleName] -Computer [ComputerName]', which returns objects relevant to the function called. All modules support the pipeline, which means results can be exported. For example, 'Get-[ModuleName] -Computer [ComputerName] | export-csv "c:\temp\results.csv" -NoTypeInformation -Encoding UTF8' will utilize PowerShell's built-in csv export function (details via 'get-help Get-[function] -Full').
1212
1313
.PARAMETER Computer
1414
Computer can be a single hostname, FQDN, or IP address.
@@ -190,7 +190,7 @@ function Invoke-Meerkat {
190190
foreach ($Module in $Modules){
191191
try{
192192
& ("Get-" + $Module) |
193-
Export-Csv -NoTypeInformation -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
193+
Export-Csv -NoTypeInformation -Encoding UTF8 -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
194194
}
195195
catch{}
196196
}
@@ -205,7 +205,7 @@ function Invoke-Meerkat {
205205
try {
206206
Invoke-Command -ComputerName $Computer -SessionOption (New-PSSessionOption -NoMachineProfile) -ScriptBlock $ModuleCommandArray.$Module[0] -ArgumentList $ModuleCommandArray.$Module[1] |
207207
Select-Object -Property * -ExcludeProperty PSComputerName, RunspaceID, PSShowComputerName |
208-
Export-Csv -NoTypeInformation -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
208+
Export-Csv -NoTypeInformation -Encoding UTF8 -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
209209
}
210210
catch{}
211211
}
@@ -221,7 +221,7 @@ function Invoke-Meerkat {
221221
try{
222222
Invoke-Command -ComputerName $Computer -Credential $cred -SessionOption (New-PSSessionOption -NoMachineProfile) -ScriptBlock $ModuleCommandArray.$Module[0] -ArgumentList $ModuleCommandArray.$Module[1] |
223223
Select-Object -Property * -ExcludeProperty PSComputerName, RunspaceID, PSShowComputerName |
224-
Export-Csv -NoTypeInformation -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
224+
Export-Csv -NoTypeInformation -Encoding UTF8 -Path ($Output + $Computer + "_" + $DateScannedFolder + "_" + $Module + ".csv")
225225
}
226226
catch{}
227227
}

0 commit comments

Comments
 (0)