Get-ADUser -Filter * -SearchBase "ou=users,ou=RESTRICTED,ou=china,dc=tcsgegdc,dc=com" -Properties samAccountName, displayName | select -Property @{name="Emp No.";expression={ $_.SamAccountName}}, @{name="Name";expression={ $_.displayName}} | .\Export-XLSX -path 'C:\ToolKits\DomainAccount\GE.XLSX' -WorkSheetName 'GE'
Export-XLSX PowerShell generate real Excel XLSX files without Excel and COM
http://gallery.technet.microsoft.com/scriptcenter/Export-XLSX-PowerShell-f2f0c035