A script to list all members and owners per Team

This script will list all members and owners per team.When you add -savedcred:$true it will save a credential file locally, which will give you automated access using that same account to your tenant.It won't save your credential plane text, it will use credential vault, which should be perfectly secure.When using MFA on that service-account, make sure you use an app password. It also list the...

Automatically clean folders in batch (Powershell Scripts)

Introduction This script is made for automatically cleaning folders. Getting Started You can create a scheduled task to automatically clean a folder. If you create a scheduled task using Auto_cleanup.ps1, you can clean a single folder (recursively). You can use the Path argument to define a path, and use the daystokeep argument to define the amount of days that files and folders should be kept....

Read all services and scheduled tasks in your server environment (including Server 2003)

At one point we found out that many system administrators had used their own administrator account for Windows Services and scheduled tasks. This became a problem only when a few colleagues decided to leave for another company.  Accounts were turned off and all kinds of services fell out. Among other things, an SQL server that turned out to run under one of these administrator accounts.  To...

Sync AD Groups with Microsoft Teams (BETA)

Microsoft Teams doesn’t allow you to define a group for membership (dynamically). When you add an Azure AD group to a Team, all users will be added once. Once someone is added to that group, it won’t be added to the team automatically. For this I created this script. You define an Active Directory group and a Microsoft Team to manage. All users that are in the AD group, but aren’t in the...