mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
get-counter issue with -computer parameter (#15166)
* get-counter issue fixed * Update src/Microsoft.PowerShell.Commands.Diagnostics/GetCounterCommand.cs Co-authored-by: Krishna Yalavarthi <kryalava@microsoft.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
This commit is contained in:
1 file changed
+3
-2
@@ -587,13 +587,14 @@ namespace Microsoft.PowerShell.Commands
|
||||
{
|
||||
foreach (string machine in ComputerName)
|
||||
{
|
||||
string slashBeforePath = path.Length > 0 && path[0] == '\\' ? string.Empty : "\\";
|
||||
if (machine.StartsWith("\\\\", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
retColl.Add(machine + "\\" + path);
|
||||
retColl.Add(machine + slashBeforePath + path);
|
||||
}
|
||||
else
|
||||
{
|
||||
retColl.Add("\\\\" + machine + "\\" + path);
|
||||
retColl.Add("\\\\" + machine + slashBeforePath + path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user