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