Get-Mailbox Parameters
Hi!
Sometimes I need to re-write all the data from an user. And I was thinking on do some scripting and let the keys CTRL, C and V rest for a while, as long as my hands and head!
Is there a way to get data like Street Address, phone, Title, company and so on and put them on a variable so I can "transport" them from a similar profile?
Where can I get the names of these fields?
Thanks!
November 30th, 2010 1:54pm
Sometimes I Answer myself yes... Here's a posible solution! I post it so anyone can use/try it Thank you anyway!!!!! $userid = read-host "Similar a quien?" $sim = get-user -id $userid $nuevo = read-host "Usuario?" Set-user -id $nuevo -StreetAddress $sim.StreetAddress
-City $sim.City -StateOrProvince $sim.StateOrProvince -CountryOrRegion $sim.CountryOrRegion -Phone $sim.Phone write-host "Datos de Direccion Copiados" Set-User -id $nuevo -Company $sim.Company -Department $sim.Department -Office $sim.Office write-host "Datos
de Organizacion Copiados" Best Regards bzk
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 3:40pm
Sometimes I Answer myself yes... Here's a posible solution! I post it so anyone can use/try it Thank you anyway!!!!!
$userid = read-host "Profile From"
$sim = get-user -id $userid
$nuevo = read-host "Profile to?"
Set-user -id $nuevo -StreetAddress $sim.StreetAddress -City $sim.City -StateOrProvince $sim.StateOrProvince -CountryOrRegion $sim.CountryOrRegion -Phone $sim.Phone
write-host "Datos de Direccion Copiados"
Set-User -id $nuevo -Company $sim.Company -Department $sim.Department -Office $sim.Office
write-host "Datos de Organizacion Copiados"
Best Regards bzk
November 30th, 2010 3:41pm