Hi
I'm writing a small script to get information about my servers. One of the things I'm doing is getting FSMO roles like this:
$AllDomainControllers = Get-ADDomainController -Filter * -server $Domain
Foreach ($DCController in $AllDomainControllers)
{
$ObjDCControllerInfo = New-Object PSObject
$ObjDCControllerInfo | Add-Member -MemberType NoteProperty -Name OperationMasterRoles -Value $DCController.OperationMasterRoles
}
When I output this custom object this is what I get:
OperationMasterRoles : {SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster...}
Note the dotted lines at the end. How do I get ridd of this?
I tryed to output this to a file using width:
$ObjDCControllerInfo | Out-File $LogFile -Width 120 -encoding unicode
but I still get the dotted lines in the log file. Is there maybe a limit on the size for NoteProperty type?
Best regards, Bjorn Moritz