Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell广告导出_Powershell - Fatal编程技术网

Powershell广告导出

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

我希望从我的广告环境中导出特定信息以上载到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, 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 准备好让你的简历显著增长