Skip to content

Instantly share code, notes, and snippets.

Name DisplayName DisplayGroup Enabled Profile Direction Action
---- ----------- ------------ ------- ------- --------- ------
FileServer-ServerManager-SMB-TCP-In File Server Remote Management (SMB-In) File Server Remote Management True Any Inbound Allow
FileServer-ServerManager-DCOM-TCP-In File Server Remote Management (DCOM-In) File Server Remote Management True Any Inbound Allow
FileServer-ServerManager-Winmgmt-TCP-In File Server Remote Management (WMI-In)
using System;
using System.Web.UI;
using Microsoft.SharePoint.Client;
using File = System.IO.File;
using Microsoft.SharePoint;
using System.Security;
using System.IO;
using System.Net;
using Microsoft.Extensions.DependencyModel;
@andreagx
andreagx / DisableTeamCreation.ps1
Last active September 3, 2020 09:14
DisableTeamCreation.ps1
#AzureAD preview module needed
#Before install AzureADPreview module, uninstall AzureAD Module: Uninstall-Module -Name AzureAD -Force
$groupname = "TEAMS-TeamCreation"
Connect-AzureAD
Get-AzureADGroup -SearchString $groupname
$Template = Get-AzureADDirectorySettingTemplate | where {$_.DisplayName -eq 'Group.Unified'}
$Setting = $Template.CreateDirectorySetting()
# Attenzione prima di mettere in pausa gli aggiornamenti leggere qui:
# https://www.kyoceradocumentsolutions.com/asia/en/about-us/press/20210317_news.html
#
# Defect Patch (March 9 Released)
# Windows 10 Ver.20H2/2004 : KB5000802
# Windows 10 Ver.1909/1903 : KB5000808
# Windows 10 Ver.1803 : KB5000809
# Windows 10 Ver.1809 : KB5000822
#
# Microsoft had released the countermeasure Patch on 18thMarch.
# Set execution policy
$ExecutionPolicy = Get-ExecutionPolicy
if ($ExecutionPolicy -ne "RemoteSigned") {
Set-ExecutionPolicy RemoteSigned -Force
}
# Cleanup logs, change number of days as you want
$days = 7
# Path of the logs to cleanup