$trustedAppPool = 'fqdn.dev.local' 
$registrar = 's4bregistrar.dev.local'
$site = 'Site:Main' 
$conferencePolicyName = [string]::Format("Tag:{0}", $trustedAppPool)
$conferencePolicyDescription = [string]::Format("{0} RTC Launcher Conferencing Policy", $conferencePolicyName) 
$trustedAppCount = 1
$trustedAppPortStart = 7100
$trustedAppPortStep = 10
$trustedAppPattern = [string]::Format("{0}_0", $trustedAppPool) 
$trustedAppEndpointsCount = 6
$trustedAppEndpointsSipPattern = 'sip:{0}@dev.local' 

#trusted application creation
# optional trusted application pool registration
# New-CsTrustedApplicationPool -Identity $trustedAppPool -Registrar $registrar -Site $site 
New-CsConferencingPolicy $conferencePolicyName -AllowIPAudio $true -AllowIPVideo $true -AllowMultiView $false -Description $conferencePolicyDescription -AllowParticipantControl $true -AllowAnonymousParticipantsInMeetings $true -AllowExternalUserControl $true -EnableDialInConferencing $true -AllowConferenceRecording $false -EnableDataCollaboration $true -MaxVideoConferenceResolution VGA 
Enable-CsTopology 
#trusted application creation
for ($trustedAppIndex=0; $trustedAppIndex -lt $trustedAppCount; $trustedAppIndex++) {
$trustedAppId = [string]::Format($trustedAppPattern, $trustedAppIndex)
$trustedAppPort = $trustedAppPortStart + $trustedAppPortStep * $trustedAppIndex 
New-CsTrustedApplication -ApplicationId $trustedAppId -TrustedApplicationPoolFqdn $trustedAppPool -Port $trustedAppPort
}
Enable-CsTopology 
#trusted application endpoints creation
for ($trustedAppIndex=0; $trustedAppIndex -lt $trustedAppCount; $trustedAppIndex++) {
$trustedAppId = [string]::Format($trustedAppPattern, $trustedAppIndex) 
for ($trustedAppEndpointIndex=0; $trustedAppEndpointIndex -lt $trustedAppEndpointsCount; $trustedAppEndpointIndex++) {
$trustedAppEndpointSip = [string]::Format($trustedAppEndpointsSipPattern, $trustedAppId + $trustedAppEndpointIndex) 
New-CsTrustedApplicationEndpoint -ApplicationId $trustedAppId -TrustedApplicationPoolFqdn $trustedAppPool -SipAddress $trustedAppEndpointSip
}
}
Enable-CsTopology 
#assign conference policy for trusted applicatin endpoints
for ($trustedAppIndex=0; $trustedAppIndex -lt $trustedAppCount; $trustedAppIndex++) {
$trustedAppId = [string]::Format($trustedAppPattern, $trustedAppIndex) 
for ($trustedAppEndpointIndex=0; $trustedAppEndpointIndex -lt $trustedAppEndpointsCount; $trustedAppEndpointIndex++) { 
$trustedAppEndpointSip = [string]::Format($trustedAppEndpointsSipPattern, $trustedAppId + $trustedAppEndpointIndex) 
Get-CsTrustedApplicationEndpoint -Identity $trustedAppEndpointSip | Grant-CsConferencingPolicy -PolicyName $conferencePolicyName
}
}
Enable-CsTopology 
POWERSHELL