Hi, Sorry about a bad title. Didnt know how to title this question.
The case is that I want to run this command in a script for users in different domains: Test-CsAddressBookWebQuery -TargetFqdn $TargetFqdn -UserSipAddress User1$SipDomain -TargetSipAddress User2$SipDomain.
My problem is retrieving the $SipDomain from another command correctly.
I am using the
Get-CsSipDomain which gives out put like this:
Identity Name IsDefault
-------- ---- ---------
somestring somestring2 True
somestring3 somestring4 False
"somestring" is the string I need to get into $SipDomain variable.
I have tried to do
$SipDomain = Get-CsSipDomain | Where-Object {$_.Isdefault -eq $true} | Select-Object Identity
which gives me output
Identity--------
somestring
But this does not work in the first command as $SipDomain as I only need the string "somestring" in the variable.
Any tips to how I can achieve my goal?
Would be much apreciated! :)