Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Manipulating data from select statement

$
0
0

I have the following power shell which reports on current Activesync partnerships. I use the select statement to pull 4 fields that I am concerned with and it works but I am looking to manipulate the results of the identity just to clean it up a bit. The identity field currently shows up as Domain/OU/SubOU/UserName/ExchangeActiveSyncDevices/Device. Is there any way I can extract just the "UserName" portion from this?

$users = Get-CASMailbox -Filter {hasactivesyncdevicepartnership -eq $true} | Get-Mailbox
$users | foreach {Get-ActiveSyncDeviceStatistics -Mailbox $_.Identity} | select identity,devicemodel,firstsynctime,lastsuccesssync


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>