Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
Last active January 19, 2022 02:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatthews05/951656ac653fc827e379bd84fa31eb9d to your computer and use it in GitHub Desktop.
Save pmatthews05/951656ac653fc827e379bd84fa31eb9d to your computer and use it in GitHub Desktop.
param(
#OutPut CSV File Path
[Parameter(Mandatory)]
[string]
$Path
)
$InformationPreference = 'Continue'
Write-Information -MessageData "Obtaining Module, please connect when prompted..."
Import-Module "C:\\Program Files\\Common Files\\Skype for Business Online\\Modules\\SkypeOnlineConnector\\SkypeOnlineConnector.psd1"
$Session = New-CsOnlineSession
Import-PSSession -Session:$Session -AllowClobber
Write-Information -MessageData "Getting all enabled users"
$Users = Get-CsOnlineUser | Select-Object DisplayName, `
UserPrincipalName, `
SipAddress, `
TeamsMeetingPolicy, `
TeamsMessagingPolicy, `
TeamsMeetingBroadcastPolicy, `
TeamsAppPermissionPolicy, `
TeamsAppSetupPolicy, `
TeamsCallParkPolicy, `
TeamsCallingPolicy, `
CallerIdPolicy, `
TeamsChannelsPolicy, `
TeamsEmergencyCallingPolicy, `
TeamsEmergencyCallRoutingPolicy, `
TenantDialPlan, `
TeamsUpgradePolicy
$Users | Export-Csv -Path:$Path -NoTypeInformation
Write-Information "Complete"
Remove-PSSession -Session:$session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment