$hddts=Get-ADComputer -Filter 'name -like "hddt*"'|select -ExpandProperty name
above is my script to test the connection to AD computers , my requirement is to copy all the live machines to one txt file and not in live machines to another txt file .
but here, file name "hddtpingable.txt" is replacing existing data with current instead writing sequence , please help in correcting myscript by adding any cmdlet which fulfil my requirement
Look at the help for Out-File and see if the -Append parameter has any use to your requirement.
You must be logged in to reply to this topic.