#powershell #skype4b Trunk Configuration

With New-CsTrunkConfiguration, a trunk can be created at the Global (default), site or pool (service) scope for a PSTN service from a PSTN gateway, IP-Public Branch Exchange (PBX) to a Session Border Controller (SBC) at the service provider.

Correspondingly, it is a simpe matter to run Get-CsTrunkConfiguration to get back a list of available trunk configuration information. However, executing this cmdlet with just the name of the trunk will fail:

PS > Get-CsTrunkConfiguration -Identity trunkName
Get-CsTrunkConfiguration: Cannot get item at this location. Get item at scopes: “Global, Site, Service”
Parameter name: Identity
At line:1 char:1
+ Get-CsTrunkConfiguration -Identity trunkName
+ ~~~
+ CategoryInfo : InvalidArgument: (Tag: trunkName:XdsIdentity)
[Get-CsTrunkConfiguration, ArgumentException
+ FullyQualifiedErrorId :BadLocation, Microsoft. Rtc.Management.Internal.GetCsTrunkConfigurationCmdlet

The solution is to always prefix the name with the trunk’s scope i. e.

Get-CsTrunkConfiguration site:trunkName

#powershell #skype4b PSTN Usage, Voice Policy & Route

Think of PSTN usage records as something which specify a class of call permitted in an organisation such as internal, local or international. Such records are used to associate with voice policies* and routes** to dictate usage of specific (gateway) routes by authorised users. A call can only be successful when a dialed number matches a route in a PSTN Usage.

A list of Public Switched Telephone Network, PSTN Usage records is accessible using the appropriately named Get-CsPstnUsage cmdlet. Because Global is the only identity applicable (to PSTN usages), you can basically retrieve available records via (Get-CsPstnUsage).Usage.

It is not possible to inspect the relationship between PSTN Usage, voice policy or route with a statement like Get-CsPstnUsage CH_Zurich. To resolve this, use Get-CsVoiceRoute or Get-CsVoicePolicy.

* assigned at the site or user scope where each voice policy must be linked to at least one PSTN usage record
** routes are assigned to telephone numbers

REFERENCE
Configure voice policies, PSTN usage records, and voice routes in Skype for Business
PSTN usage records in Lync Server 2013

#powershell #skype4b #msexchange List Mismatched Mail(box) Enabled User Email and SIP Addresses

#requires -version 3.0
###############################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
# Get a list of mismatched mail(box) enabled user email and SIP addresses
# without SkypeforBusiness or Exchange Server PowerShell modules
#
###############################################################################
# Continue reading

#powershell #skype4b Get List of Not Enabled Skype for Business Users (Without #skype4b Cmdlets)

#requires -version 3.0
###############################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
# Get a list of not enabled Skype for Business Users (without SkypeForBusiness
# Module Cmdlets)
#
###############################################################################
# Continue reading

#powershell Local Certificate Store Inventory (Windows)

#requires -version 3.0
###############################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
# Get a list of certificates installed in the local certificate store remotely
# across 1 or more machines (Certificates \ Personal \ Certificates)
#
# REQUIREMENTS: PowerShell Remoting enabled on target hosts
#
###############################################################################
Continue reading

#powershell Always Up-to-date Hardware Inventory (Windows)

#requires -version 3.0
###############################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
# Any Windows Server – Always Up-to-date Hardware Inventory (Core)
#
# REQUIREMENTS: PowerShell Remoting enabled on target hosts & firewall
# ports (WMI calls)
###############################################################################
Continue reading

#skype4b #powershell Always Up-to-date Infrastructure Inventory (Topology)

#requires -version 3.0
###############################################################################
# Copyright (c) 201x-2018 leedesmond.com
# All Rights Reserved. Use at your own risk and responsibility.
# Version 1.00
#
# Skype for Business Server – Always Up-to-date Inventory (Topology)
# Gathers core #skype4b infrastructure inventory (topology), supporting
# server roles, file stores and SQL backend databases.
#
# NOTE – change SiteId where appropriate
###############################################################################
Continue reading

#skype4b #powershell *-CsDatabase Common Error Messages (and Fix) II

Running Test-CsDatabase can produce different output for ExpectedVersion and InstalledVersion against one or more backend SQL databases in your Skype for Business Server infrastructure. Depending on the host where this cmdlet is executed, Continue reading

#skype4b #powershell Get Registrar Pool Names from Cluster Id (msRTCSIP-PrimaryHomeServer)

Instead of legible plain text is a long string describing the distinguished name of the Skype for Business Front-End Server pool in the msRTCSIP-PrimaryHomeServer Active Directory user attribute. This can become difficult to identify and manage if several registrar pools exist in your environment whether they are located in the same or different sites.

To decipher the DN (pool cluster Id) into the fully qualified distinguished name of the corresponding #skype4b pools, Continue reading