• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 75
  • Last Modified:

Powershell script Select information

I am trying to write the following code.
To enable backup users contacts in lync
$UserEmail = Read-Host "enter email" 
$PrimaryPool = Get-CsUserPoolInfo "sip:$UserEmail" | Select PrimaryPoolFQDN 
Write-Host "test $PrimaryPool"
Export-CsUserData -PoolFqdn $PrimaryPool -FileName "X:\Test\test.zip" -UserFilter $UserEmail 

Open in new window

The problem is the $PrimaryPool is showing as @{PrimaryPoolFQDN=poolname} is it possible to just get the just the poolname and not @{PrimaryPoolFQDN part?
1 Solution
I won't be able to test the commands, but likely it'll work if you use
$PrimaryPool = Get-CsUserPoolInfo "sip:$UserEmail" | Select -expandProperty PrimaryPoolFQDN 

Open in new window

MattyS82Author Commented:
Exactly what I was looking for, thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now