
Exchange 2010 EMS에 다음 명령을 입력하고 있으며 대화형으로 실행할 때 작동합니다.
$a = Get-MailboxDatabaseCopyStatus -server theName | fl name,activedatabasecopy,status,contentindexstate
Write-Host $a
동일한 명령이 있는 EMS 창 내에서 스크립트를 호출하면 다음과 같은 결과가 나타납니다.
Microsoft.PowerShell.Commands.Internal.Format.FormatStartData Microsoft.PowerShell.Commands.Internal.Format.GroupStartData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.GroupEndData Microsoft.PowerShell.Commands.Internal.Format.FormatEndData
왜 동일한 명령이 다르게 출력되는지 잘 모르겠습니다. 어떤 아이디어가 있나요? 감사해요.
답변1
파이프라인 출력은 스크립트와 수동 명령 입력에서 다르게 수정되는 것 같습니다. "out-host" 사용에 대해 언급한 아래 게시물에서 답변을 찾았습니다.