Import-Module FailoverClusters $filename = "C:temp" $filename += Get-Date -Format "yyyyMMdd_HHmmss" $filename += ".txt" $delimiter = "`t"
"[ClusterInfo]" | Out-File $filename -Encoding unicode -Append Get-Cluster | Select-Object Name, Domain | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Encoding unicode -Append "`n" | Out-File $filename -Encoding unicode -Append
"[QuorumInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterQuorum | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[GroupInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterGroup | Select-Object Name, State, OwnerNode, Priority, IsCoreGroup | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[ResourceInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterResource | Select-Object OwnerGroup,OwnerNode ,ResourceType, Name, State | Sort-Object OwnerGroup | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[NodeInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterNode | Select-Object Name, State | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[DiskInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterResource | Where-Object {$_.ResourceType -like "Physical Disk"} | Select-Object Name, State, OwnerNode | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[NetworkInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterNetwork | Select-Object Name, State | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
"[NetworkInterfaceInfo]" | Out-File $filename -Encoding unicode -Append Get-ClusterNetworkInterface | Select-Object Network, Name, State, Node | ConvertTo-Csv -NoTypeInformation -Delimiter $delimiter | Out-File $filename -Append "`n" | Out-File $filename -Encoding unicode -Append
|