Import Cvs Adusers Error ...


hi ,

i export our users csv file modify attribute phone , title , after finished tried import

import-csv c:\ad\adusers.csv | foreach-object { set-aduser -identity $_.samaccountname -company $_.company -department $_.department -title $_.title -office $_.office  -officephone $_.officephone -ipphone $_.ipphone  }

but receive error :

set-aduser : parameter cannot found matches parameter name 'ipphone'

when remove ipphone it's work fine , , when try it's work : 

import-csv c:\ad\adusers.csv | where-object {$_.ipphone -eq "200"}

hope can understand problem


osma othman

hi osma,

>>hope can understand problem

very description, use method:

$data = import-csv c:\op.csv  $ipphone = $data.ipphone    set-aduser -identity rtest -add @{ipphone="$ipphone"}

there no alias ad ipphone attribute

-add <hashtable>
    specifies values add object property. use parameter add 1 or more values property that
    cannot modified using cmdlet parameter. modify object property, must use ldap display name. you
    can specify multiple values property specifying comma-separated list of values , more one
    property separating them using semicolon.. format parameter is

help set-aduser -parameter add

best regards,

andy


please remember mark replies answers if , unmark them if provide no help.
if have feedback technet subscriber support, contact tnmff@microsoft.com.






Windows Server  >  Windows Server 2012 General



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL