Teams powershell module Get-CsCallQueue Statistics are now blank?
We has been using the Get-CsCallQueue cmdlet that comes in the powershell Teams module to get the Number of Calls In Queue statistic for our call queues. As of a few days ago, this field has been coming back blank for all our queues. Does anyone know what causes this? A search of the web shows other people have had this issue over the last few years but I don't know if there is a solution on our end or if it is some change in Azure that is causing it?2.5KViews1like8CommentsCreating, getting and deleting Shifts using PowerShell
Hi, I am trying to prototype an interface for my organisation which can list, create and delete Shifts using PowerShell. The interface would take in data from a seperate application I cannot control, so I am restricted to using PowerShell. Is it only possible to do this by using appropriate MS Graph API calls and managing the associated permission scopes? Ideally if there was a way to do it directly through PowerShell this would be preferred. Any guidance or alternate methods on how I could go about designing this interface would be appreciated.1.5KViews0likes2CommentsGet-CsOnlineVoicemailUserSettings really slow, is there a Graph alternative?
Get-CsOnlineVoicemailUserSettings takes around 1,5 seconds per user to get VoicemailEnabled value. I need to run this in a tenant with 100.000 users, leading to a VERY LONG TIME. Is there a faster PowerShell or Graph API alternative? Thanks, IvanSolved2.2KViews8likes2CommentsError creating application access policy
I'm trying to create online meetings using Microsoft Graph API, but it is not working as expected. The cmdlet Connect-MicrosoftTeams with an MFA enabled account seems to work fine. It outputs: Account | Environment | Tenant | TenantId <MY-ACCOUNT> | AzureCloud | <TENANT> | <TENANTID> However, when I run the command to create an application access policy: New-CsApplicationAccessPolicy -Identity Test-policy -AppIds "<MY-APP-ID>" -Description "Test policy" I get the following error: Get-CsOnlineSession: C:\Users\fadc8\OneDrive\Documentos\PowerShell\Modules\MicrosoftTeams\2.5.0\netcoreapp3.1\SfBORemotePowershellModule.psm1:273 Line | 273 | $remoteSession = (Get-CsOnlineSessionCommand) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Run Connect-MicrosoftTeams before running cmdlets. Invoke-Command: C:\Users\fadc8\OneDrive\Documentos\PowerShell\Modules\MicrosoftTeams\2.5.0\netcoreapp3.1\SfBORemotePowershellModule.psm1:113 Line | 113 | -Session $session ` | ~~~~~~~~ | Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument | that is not null or empty, and then try the command again. I found the source script: https://www.powershellgallery.com/packages/MicrosoftTeams/2.5.0/Content/net472%5CSfBORemotePowershellModule.psm1 It is looking for an implicit remote session... I don't know if it is relevant, but the MSA I'm using has Global Administator privillege. Could you help me to understand what is wrong? Workstation configuration: Windows 10 PowerShell 7.1.4 PowerShellGet 2.2.5 MicrosoftTeams 2.5.0Solved2.5KViews0likes4CommentsService Requests for Microsoft Teams Powershell Module (or any Powershell Modules?)
Hello, We experienced a pretty serious bug using theMicrosoft Teams PowerShell Module a couple weeks ago and the support resource via the service ticket replied that supporting the Powershell module is "is out of support boundaries." Just curious if anyone has a better method for reporting bugs / issues when using theMicrosoft Teams PowerShell Module or if there's a more "premium" type of support that Microsoft offers to provide support for developers using things like Powershell, APIs and SDKs?1KViews0likes2CommentsManual Install of Teams PowerShell Module?
Instead of using Install-Module to install the latest version (1.1.6) of the Teams PowerShell module, is it possible to download the NUPKG file and manually install? I would like to install the module on a machine that has limited access to external sites and adding the PowerShell Gallery to that list is not an option at the moment. I've attempted to use the instructions at the link below but doing so results in a bunch of "could not load file or assembly" errors when attempting Import-Module MicrosoftTeams. Is a manual install even possible? Manual Package Download - PowerShell | Microsoft DocsSolved16KViews1like4CommentsNew-CsBatchPolicyAssignmentOperation cmdlet is stuck
Hello! We are working with the new cmdlet to assign users to specific policies. Unfortunately it seems like the process is stuck. I guess because a couple of users were not ready to be assigned. I dunno. XXX TeamsMeetingPolicy Videoconfonly InProgress xxx 04.05.2020 06:32:03 XXX TeamsMessagingPolicy Videoconfonly InProgress xxx 04.05.2020 06:32:04 XXX TeamsAppSetupPolicy Videoconfonly NotStarted xxx 04.05.2020 06:32:05 XXX TeamsAppPermissionPolicy BlockAll InProgress xxx 04.05.2020 06:32:06 XXX TeamsCallingPolicy DisallowCalling NotStarted xxx 04.05.2020 06:32:07 Is there any way to stop this operation?Solved2.8KViews0likes7CommentsProvisioning Shifts (schedule) for a Microsoft Team via PowerShell
Hi 🙂 I am trying to provision Shifts (schedule) for Teams. The overall script creates a new Team, then passes the ID to the shifts piece. But I cannot, for the life of me, find a way to provision it. Here's my code (using a hard coded ID till I figure out what's up.) Ultimately, this will be part of a script that creates several Teams, each needing to have Shifts enabled. Where I start # THIS IS WHERE I'M STUCK #in my code,trying to work with the "Enabled" parameter, I have tried to use $true, 1, nothing, "yes". Nothing works. If I don't leave the space null after -Enabled, I get an error "Update-MgTeamSchedule : A positional parameter cannot be found that accepts argument 'True'" (or whatever notnull value I put there.) If I leave the space after -Enabled null, I get "Update-MgTeamSchedule : [UnknownError] : At line:1 char:1 + Update-MgTeamSchedule -TeamId e532aa85-3ec5-4318-9515-6c60cfaa7f36 -E ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ({ TeamId = e532...GraphSchedule }:<>f__AnonymousType0`2) [Update-MgTeamSchedule_UpdateExpanded], Exception + FullyQualifiedErrorId : UnknownError,Microsoft.Graph.PowerShell.Cmdlets.UpdateMgTeamSchedule_UpdateExpanded" AND - how should the TimeZone be formatted for New York? "American/NewYork" or "American/New York" (with or without a space). Any help would be greatly appreciated. 🙂 🙂 (I am not a PS pro obviously, but I am a super enthusiast.) TIA! function EnableShifts { param ( [parameter( HelpMessage = "Group ID" )] [string] $tGroupId ) process { #Import-Module -Name MicrosoftTeams Connect-MicrosoftTeams -Credential $cred # Let's make sure it's getting the ID Write-Host "Group ID:" $tGroupId <# company/app info #> $AppId = "xx" $AppSecret = 'xx' $TenantId = "xx" #$TenantName = "xx" #$TenantShortName = "xx" # Construct URI and body needed for authentication $uri = "https://login.microsoftonline.com/$TenantId/oauth2/v2.0/token" $body = @{ client_id = $AppId scope = "https://graph.microsoft.com/.default" client_secret = $AppSecret grant_type = "client_credentials" } # Get OAuth 2.0 Token $tokenRequest = Invoke-WebRequest -Method Post -Uri $uri -ContentType "application/x-www-form-urlencoded" -Body $body -UseBasicParsing # Unpack Access Token $token = ($tokenRequest.Content | ConvertFrom-Json).access_token $headers = @{Authorization = "Bearer $token" } $ctype = "application/json" # check out the Team output Get-Team -GroupId $tGroupId $uriPath = "https://graph.microsoft.com/v1.0/teams/$tGroupId" # Connect to graph to use the graph powershell modules Connect-Graph -Scopes Schedule.ReadWrite.All -TenantId $TenantId try { # see what this command returns Get-MgTeamSchedule -TeamId $tGroupId # THIS IS WHERE I'M STUCK # Update-MgTeamSchedule -TeamId $tGroupId -Enabled $true #Invoke-WebRequest -Method Put -Uri "$uriPath/schedule" -ContentType $ctype -Headers $headers # | ConvertTo-Json Write-Host "Shifts provisioned" } catch { Write-Host "Error provisioning Shifts:" $Error -BackgroundColor yellow -ForegroundColor black break } finally { } } } #for testing. comment out to use the CreateTeams_Search.CSV EnableShifts -tGroupId "xxx" #Team id4.9KViews0likes3CommentsUsing UseOAuth switch in the move to Teams command for 100Users password doesnt work all the time
This is my Commandbelow/ first I assignvaluesto $save of the CSV file with list of the user, second run foreach user in users do the move. what happen that script start running and move about 6 to 10 user before it prompt me to add the username and pssword again but it doesnt accept it. I have to click on sign-outand forget password by using the three dots beside my ID then wait up to 6 minutes before it accept the same username and password again. Issue is this is deletingit purposeinstead of having this script [t run on its own and save time I have to deal with the password and its doesn'tmatter if I am using PS_ISE or Skype PS or Windows PS all version 5 and up. Try { $save = Import-Csv yarab1.csv -Header Identity } catch { Write-host "Couldnt find the file!! make sure the file located under C:\Temp - File Name: Yarab1.csv" -BackgroundColor Black -ForegroundColor red Write-Warning "File is missing or The process cannot access the file because it is being used by another process." -WarningAction Inquire } Try { $save | Foreach-Object {Move-CsUser -Identity $.identity -Target sipfed.online.lync.com -Confirm:$false -UseOAuth -MoveToTeams -Force -BypassAudioConferencingCheck -BypassEnterpriseVoiceCheck -HostedMigrationOverrideUrl https://adminxx.online.lync.com/HostedMigration/hostedmigrationService.svc}} catch {Write-Host "An error occurred: $.Identity couldn't be found" -ForegroundColor Yellow -BackgroundColor Red } {catch {Write-Host "Please check if user is enabled in AD or no user object for $.Identity"} Write-Warning "error occurred: moving the user $_.Identity. how do you want to be processed" -WarningAction Inquire }1.3KViews0likes1CommentUnable to install latest PowerShell Module
I'm trying to follow the instructions here:https://docs.microsoft.com/en-us/MicrosoftTeams/private-channels-life-cycle-management#teams-powershell-modulebecause ultimately I want to run theGet-TeamChannelUser which is only available in these beta modules. It looks like they are at version 1.0.21, but I can't get past version 0.9.6. I closed out of all PS sessions (even rebooted), uninstalled the original Teams module and then started trying to install the latest. You can see in the screen shot below I already registered the repository which is why I get that error. Now when I get the version of the installed module, it's still 0.9.6 and the Get-TeamChannelUser is not available. I've tried to do an Update-Module and even use the -UseMinimumVersion flag but none of that works. What am I missing here?Solved17KViews0likes7Comments