Powershell广告导出
我希望从我的广告环境中导出特定信息以上载到Sharepoint online 迄今为止的代码:Powershell广告导出,powershell,Powershell,我希望从我的广告环境中导出特定信息以上载到Sharepoint online 迄今为止的代码: $ADUSR = Get-ADUser -SearchBase "OU=Users,OU=company,DC=domain,DC=co,DC=uk" -SearchScope OneLevel -Filter * -Properties * |select name,givenName, sn, department, physicalDeliveryOfficeName, title, manag
$ADUSR = Get-ADUser -SearchBase "OU=Users,OU=company,DC=domain,DC=co,DC=uk" -SearchScope OneLevel -Filter * -Properties * |select name,givenName, sn, department, physicalDeliveryOfficeName, title, manager, streetAddress, l, st, postalCode, telephoneNumber, facsimileTelephoneNumber, otherTelephone, mobile, ipPhone, thumbnailPhoto, employeeNumber, userPrincipalName
$ADUSR | Export-Csv c:\sharepointinfo.csv
这是完美的,应该是直截了当的。但是属性“thumbnailPhoto”在csv文件中显示为“System.Byte[]”。
在PS中运行它,它返回并显示为我想要的。它将该属性导出为十进制,如何将其导出为十六进制?或导出AD中所示的值
您可以将六边形(缩略图照片)与所选零件一起使用吗
Rob$ADUSR=Get ADUser-SearchBase“OU=Users,OU=company,DC=domain,DC=co,DC=uk”-SearchScope One Level-Filter*-Properties*|选择名称、给定名称、序列号、部门、物理交付办公室名称、职务、经理、街道地址、l、st、邮政编码、电话号码、传真号码、其他电话、手机、ipPhone、@{l=“thumbnailPhoto”;e={[System.Text.Encoding]::Unicode.getChars($\.thumbnailPhoto)}},雇员编号,userPrincipalName
$ADUSR |导出Csv c:\sharepointinfo.Csv
准备好让你的简历显著增长