Skip to content

Instantly share code, notes, and snippets.

View Atreidae's full-sized avatar

James Arber Atreidae

View GitHub Profile
@Atreidae
Atreidae / Alwayson.ps1
Created June 30, 2020 15:28
Create Always On IP Phone Policy
New-CsIPPhonePolicy -Identity "Always-On" -EnablePowerSaveMode $false
Get-Csuser -filter {<your filter syntax here>} | Grant-CsIPPhonePolicy -PolicyName "Always-On"
@Atreidae
Atreidae / Remove-CsRgsUser.ps1
Last active June 29, 2020 03:04
Remove user from Response Groups in Skype for Business and Lync,
#Skype User Offboarding Response Group Cleanup. UcMadScientist.com
#Define user account
$SipAddress = "Button.Mash@EquestriAero.com"
#Create an array of response groups containing the user
$RGSGroups = (Get-CsRgsAgentGroup | where {$_.AgentsByuri -contains "Sip:$SipAddress"})
#Run through the groups and remove the user
ForEach ($Group in $RGSGroups)
@Atreidae
Atreidae / Export-AllUmPrompts.ps1
Created June 5, 2020 05:49
A quick script to export all the custom UM Prompts from Microsoft Exchange
$AutoAttendants = (get-UmAutoAttendant)
Foreach ($Attendant in $AutoAttendants)
{
Write-host "Processing $($attendant.name)" -colour green
New-Item -Path . -Name $attendant.name -ItemType "directory"
Set-Location -Path .\$($Attendant.name)
@Atreidae
Atreidae / gist:ca28064a560bcd82872747fa8dd82f2a
Created May 19, 2020 02:45
The most unhelpful error message ever
PS C:\UcMadScientist\Scripts\Migrate-CsUsers> Import-CsUserData -PoolFqdn aumlesfb01.ucmadscientist.com -FileName .\ContactsExportModified.zip -UserFilter button.mash@ucmadscientist.com
Import-CsUserData : Specified part does not exist in the package.
@Atreidae
Atreidae / Clear-S4BFabricLogs.ps1
Last active July 6, 2022 02:16
Clean up Azure Fabric Perfmon Logs
Function Clear-S4BFabricLogs
{
<#
.SYNOPSIS
Removes old Windows Fabric log files and Perfmon Data
.DESCRIPTION
Removes logfiles older than 14 days from the following locations
C:\ProgramData\Microsoft\SF\Log\PerformanceCounters_WindowsFabricPerfCounter
C:\ProgramData\Microsoft\SF\Log\PerformanceCountersBinaryArchive
@Atreidae
Atreidae / Update-QoE.ps1
Last active February 6, 2020 04:42
Update Skype4B QoE Database Schema
Install-CsDatabase -DatabaseType Monitoring -SqlServerFqdn sql.ucmadscientist.com -SqlInstanceName Foo_Lync -Update