Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Development / July 2008

Tip: Looking for answers? Try searching our database.

Combining Powershell object properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick L - 31 Jul 2008 14:12 GMT
Hi,

I was wondering how you would combine two existing object properties into one (in Powershell)? I.E. $_.firstname + $_.lastname = $_.fullname

Do you need to you the add-member cmdlet?

Thanks,
-Nick
Karl Mitschke - 31 Jul 2008 15:02 GMT
Hello Nick,

Are you trying to populate an Exchange field with this information, or just
use it in your sript?

You could do

$user = get-user <alias>
$fullname = $user.FirstName + $user.lastname

now, $fullnae eill be 'firstnamelastname' with no spaces.

Karl

> Hi,
>
[quoted text clipped - 6 lines]
> Thanks,
> -Nic
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.