Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Tuesday, 5 September 2023

Unable to write to Active Directory due to lack of permissions

At times when I attempt to move a user from Skype to Teams I have been receiving the following error:


To view account that are causing the issue you can run the following PowerShell command

Get-ADUser -SearchBase "OU HERE" -Filter * -Properties nTSecurityDescriptor | ?{ $_.nTSecurityDescriptor.AreAccessRulesProtected -eq "True" }

Wednesday, 25 January 2023

List of Agents in Skype Work Groups

To get a list of agents in a skype work group run the following command via PowerShell:

++++++++++++++++++++++++++++

Get-CsRgsAgentGroup | select Name, @{Name=’AgentsByUri’;Expression={[string]::join(",", ($_.AgentsByUri))}} | Export-Csv agent-export.csv

++++++++++++++++++++++++++++

This can then be opened in Excel and manipulated to be used easier..

Open in Excel and "text to data" the AgentsByUri column, copy and then paste with "transpose" option to get in a nice format.

Thursday, 12 September 2019

Set LineURI via PowerShell Teams

Set the LineURI for a user using calling plans (Telstra Calling)

1. Need the location ID
Get-CsOnlineLisLocation


2. Set-CsOlineVoiceUser -Identity name -LocationID GUID-from-step-1 -telephonenumber +E.164-format



Friday, 2 August 2019

"Open File" Dialog

Migrating uses between Skype for Business and Skype Online lately and have been migrating in batches/pilot groups.

Having gotten sick of upding the filename or file location in the powershell script, i went searching and found a nice article on how to create a open file dialog box.

https://ilovepowershell.com/2017/03/08/how-to-open-a-directory-chooser-window-with-powershell/

I'm sure there is a better/easier to complete, but this worked for me.
++++++++++++++++++++++++++++++++++++++++++++
$connect = Read-host "Connect to O365 Skype Online: [Y|N]?"
if($connect -like "Y")
{
Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession
}
if($userCredential.UserName -eq $nul)
{
write-host "No Crediential Set for move" -ForegroundColor Red

else
{
write-host "connected user"
}

$openChooser = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$openChooser.ShowDialog()
$fileimport = import-csv $openChooser.FileName
foreach($i in $fileimport)
{
write-host -ForegroundColor Cyan $i.displayname -NoNewline
write-host " is currently being migrated"
}

++++++++++++++++++++++++++++++++++++++++++++

Tuesday, 11 June 2019

Get-CsVoiceRoute - View PstnGatewayLists

Always loosing this command, and takes me a few tries to find it again for what I'm looking for.

In the CSCP when looking at the associated trunks of a voice route, the trunk names are "truncated" and not fully displayed.



The command "Get-CsVoiceRoute" will display the full list of gateways that have been associated..


The above images is showing three (3) PstnGateways configured for the "Emergency" voice route

Tuesday, 3 December 2013

PowerShell Module for Sonus SBC 1000-2000

So while not an official release from Sonus, it looks fantastic and I will be using for backups more than anything else..

PowerShell Module for Sonus SBC 1000-2000


Nice work Vikas Jaswal (http://www.allthingsuc.co.uk), ill be keeping an eye on your blog from now on..


Monday, 4 June 2012

Lync Service Activity Levels

An easy way to see the number of conferences, parked calls etc from the Lync management Shell is using the CmdLet:
Get-CSWindowsService

Below is a screen shot of the output of the commad with no other paramaters.


To get the full details of the activity level for the Mediation Service you can run
Get-CsWindowsService -Name RTCMEDSRV | Select-Object -ExpandProperty ActivityLevel
This will give the below output.



There is bound to be a better way to get the details, but i found this today and thought it might be useful.


Sunday, 3 June 2012

Lync 2010 Install Power Shell Script

Came across this the other day, a nice PS script that installs on the Lync pre-reqs on the required server role.

Lync MVP Pat Richard has written the script over at ehloworld.com.

The script and all its previous version can be found
http://www.ehloworld.com/255  
To run the script you must have the PowerShell execution policy to RemoteSigned or Unrestricted
[Update] The Set-ExecutionPolicy command must be run from the Windows PowerShell that has been "Run As Administrator" otherwise the command will fail


Set-ExecutionPolicy -ExecutionPolicy {RemoteSigned | Unrestricted}

Genesys - BYOC Cloud

Post to identify links and IPs for Genesys BYOC as of 17th July 2026. BYOC Cloud public SIP IP addresses Dynamic Cloud Voice platform Follow...