HyperVクラスタでいくつかの監査を実行するpowershellコマンドはほとんど書かれていません。コマンドはうまくいきますが、出力をトリミングする手助けができますので、必要な情報を収集できますか?出力がトリムされず、出力エラーが発生する
##Audit-CreatingDC
$AuditDC = Invoke-Command -ComputerName $ComputerName {Get-ChildItem -Path HKLM:\cluster\resources -recurse | get-itemproperty -name CreatingDC -erroraction 'silentlycontinue'}| ft CreatingDC,PSComputerName
####Audit-iSCSI
#Show which hosts are not communicating to the storage with the ‘-s’ and where there are duplicated targets:
$AuditISCSI = Invoke-Command -ComputerName $ComputerName { get-iscsisession } | FT PSComputerName, InitiatorPortalAddress, IsConnected -autosize
######Discover checkdsk errors - "Scan Needed". Execute using txt of one node from each cluster.
$AuditCHKDSK = Invoke-Command -ComputerName $ComputerName { get-volume | Where-Object –FilterScript { $_.HealthStatus -eq "Scan Needed" }} | FT PSComputerName, FileSystem, HealthStatus -autosize
そして、それぞれの出力は
CreatingDC PSComputerName
---------- --------------
\\dc-sc-02.oim.corp.com slcoc037
PSComputerName InitiatorPortalAddress IsConnected
-------------- ---------------------- -----------
slcoc037 10.214.61.107 True
PSComputerName FileSystem HealthStatus
-------------- ---------- ------------
slcoc037 CSVFS 1
を下回っている。しかし、私は
\\dc-sc-02.oim.corp.com
10.241.81.107
CSVFS 1
この形式で上記のための出力を必要とする誰もがこれらの3つのコマンドをトリミングするために私を助けることができますか?
$ AuditDC.CreatingDC、$ AuditISCSI.Initia ..... – guiwhatsthat