This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-ExchangeOnline -UserPrincipalName <YOUR UPN> -ShowProgress $true | |
#$O365Groups = Get-UnifiedGroup | Where-Object { $_.WelcomeMessageEnabled -eq $true } | |
$O365Groups = Get-UnifiedGroup | |
foreach ($group in $O365Groups) { | |
Write-Host "Disabling Welcome Message on O365 Group: " -NoNewline; Write-Host $group.DisplayName -ForegroundColor Cyan | |
Set-UnifiedGroup $group.Identity -AlwaysSubscribeMembersToCalendarEvents:$false -AutoSubscribeNewMembers:$false -SubscriptionEnabled:$false -UnifiedGroupWelcomeMessageEnabled:$false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$siteUrl = "" | |
Connect-PnPOnline –Url $siteUrl -UseWebLogin | |
$items =Get-PnPListItem -List "SitePages" -PageSize 1000 | |
foreach ($item in $items) | |
{ | |
if ($item.Id -ne 1) | |
{ | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$configPath = "$ENV:APPDATA\Microsoft\Teams\desktop-config.json"; | |
$cookiesFilePath = "$ENV:APPDATA\Microsoft\Teams\Cookies" | |
$cookiesJournalPath = "$ENV:APPDATA\Microsoft\Teams\Cookies-journal" | |
$teams = Get-Process Teams -ErrorAction SilentlyContinue | |
if ($teams) { | |
Stop-Process -Name Teams -Force | |
} | |
Start-Sleep -s 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c whoami /upn"); | |
procStartInfo.RedirectStandardOutput = true; | |
procStartInfo.UseShellExecute = false; | |
procStartInfo.CreateNoWindow = true; | |
System.Diagnostics.Process proc = new System.Diagnostics.Process(); | |
proc.StartInfo = procStartInfo; | |
proc.Start(); | |
string result = proc.StandardOutput.ReadToEnd(); | |
var email = result.Trim(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "90d3ea99-ce5f-4b8d-8fe9-2b66766b0bcc", | |
"name": "Yammer API (Public)", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Get My Feed", | |
"request": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remember to run the script "as Administrator" | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\AppData\Local\Microsoft\VisualStudio') > $null | |
$pathExclusions.Add($env:USERPROFILE + '\.nuget\packages') > $null | |
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393216}", | |
"initialCols": 120, | |
"initialRows": 30, | |
"profiles": [ | |
{ | |
"acrylicOpacity": 0.85, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$currentUTCtime = (Get-Date).ToUniversalTime() | |
$expiredResources = Search-AzGraph -Query 'where todatetime(tags.expireOn) < now() | project id, name' | |
foreach ($r in $expiredResources) { | |
Write-Host "==> Deleting $($r.name)..."; | |
Remove-AzResource -ResourceId $r.id -Force -WhatIf | |
} | |
$expiredResources = Get-AzResourceGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A collection of my favorites DNS |