Setup: O365 tenant with Teams Problem: You want to have a list with all private channel’s associated SharePoint sites and their owners. Solution: Run the following PowerShell commands
Category: Scripting
List all SharePoint sites associated with Teams
Setup: O365 Tenant with Teams Problem: List all SharePoint sites associated with Teams Solution: Run the following PowerShell
Take back ownership of an orphan Teams private channel
Setup: O365 tenant with Teams Problem: There is a private channel in a Team that is orphan – last owner left and no other user is part of that channel Solution: Run the following PowerShell commands OBS. You need to run both commands in this order. To change the owner of the SharePoint site associated […]
Restrict Microsoft Graph – Mail.Send permission to only one user
Setup: Microsoft 365 tentant. One application wants to send emails via Graph API. Problem: Assigning Mail.Send Graph permission is very dangerous if is not restricted to one user. By default that application can send on behalf of every user in organization. Solution: Before granting the consent as GA for the permission do the following to […]
Update AD DNS records with PowerShell
Setup: Microsoft Active Directory DNS Problem: You want to update some DNS records via PowerShell as part of a script, useful for failover situations. Solution: Use the following PowerShell script
Disable welcome message when new member is added to O365 group
Setup: O365 tenant Problem: Whenever a user is added to a O365 group the user will receive a standard notification. There are case when you do not want to send this message. Solution: Prerequsite : Microsoft.Exchange.Management.ExoPowershellModule Run the following PowerShell commands:
Export a list with all videos from Microsoft Stream
Setup: Tenant in O365 with Stream Problem: How to export a list with all the videos from Microsoft Stream into a CSV. Microsoft does not provide an API for this. Solution: Fort this task you need to use a combination of tools: PowerShell and Chrome. Step1. Load in Chrome the Stream admin https://web.microsoftstream.com/admin?view=Administrators . Inspect […]
Rescan all nodes of the cluster to find new SAN disk – PowerShell
Setup: A Windows cluster who was added a new SAN disk. Problem: Sometimes you need to scan each node for new disks in order to be able to add the disk in the cluster. Solution:
Compare group membership of two users in Powershell
Setup: Member server in Active Directory domain Problem: You need to compare group membership of two users Solution: Run this command in PowerShell The get-hash is a PowerShell hash function . Get-QADUser cmdlet is part of ActiveRoles
Compute a hash from a string in PowerShell
Setup: Computer with PowerShell installed Problem: Sometimes you want to create a hash from a string. Solution: Run this PowerShell script or include the function in your code: Example: