This file contains hidden or 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
function Find-MailFolderByName { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory, Position=0, ValueFromPipelineByPropertyName)] | |
[string][ValidateNotNullOrEmpty()]$UserPrincipalName, | |
[Parameter(Mandatory, Position=1)] | |
[string][ValidateNotNullOrEmpty()]$FolderName | |
) |
This file contains hidden or 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
# Optionally, connect to Exchange Online if not already connected: | |
# Import-Module ExchangeOnlineManagement | |
if (-not (get-command get-mailbox -ErrorAction SilentlyContinue) ) { | |
Connect-ExchangeOnline | |
} | |
# Load required .NET assemblies for WinForms | |
Add-Type -AssemblyName System.Windows.Forms | |
Add-Type -AssemblyName System.Drawing |
This file contains hidden or 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
function Get-IPRangeFromCIDR { | |
param( | |
$Range | |
) | |
# Set up empty list to contain the calculated range | |
$IPList = [System.Collections.Generic.list[object]]::new() | |
# split out input to IP and CIDR and calculate the num,ber of addresses with the power of MATH | |
$startIP, [int]$CIDR = $Range -split "/" | |
$NumberOfAddresses = [Math]::Pow(2, (32 - $CIDR)) |
This file contains hidden or 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
begin { | |
function Find-UninstallKey { | |
[CmdletBinding()] | |
param ( | |
[Parameter(ValueFromPipeline)] | |
[String]$DisplayName, | |
[Parameter()] | |
[Switch]$UninstallString | |
) |
This file contains hidden or 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
function Convert-ToHashtable { | |
param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true)] | |
[PSCustomObject]$InputObject | |
) | |
process { | |
$hashTable = @{} | |
foreach ($property in $InputObject.PSObject.Properties) { |
This file contains hidden or 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
# Load the required assemblies | |
Add-Type -AssemblyName System.Windows.Forms | |
Add-Type -AssemblyName System.Drawing | |
if (!(get-module Microsoft.Graph.Mail,Microsoft.Graph.Authentication -ListAvailable)) { | |
Write-host "Hang on, you don't have GraphAPI. Let me install that first" -Foregroundcolor green | |
Install-Module Microsoft.Graph.Authentication,Microsoft.Graph.Mail -verbos | |
} | |
if (!(Get-MgContext)) { |
This file contains hidden or 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
/* Change button primary color to green */ | |
.btn-primary { | |
background-color: #4CAF50; | |
border-color: #4CAF50; | |
} | |
.btn-primary:hover, | |
.btn-primary:focus { | |
background-color: #45a049; | |
border-color: #45a049; |
This file contains hidden or 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
# Pulls out all the relevent data we need from the policy | |
function Format-CAPDetails { | |
param( | |
[Parameter(ValueFromPipeline)] | |
$ConditionalAccessPolicy | |
) | |
PROCESS { | |
$UserPolicies = $ConditionalAccessPolicy.Conditions.users | |
[PScustomObject]@{ | |
DisplayName = $ConditionalAccessPolicy.DisplayName |
This file contains hidden or 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
$MediaPlayer = [Windows.Media.Playback.MediaPlayer, Windows.Media, ContentType = WindowsRuntime]::New() | |
$MediaPlayer.Source = [Windows.Media.Core.MediaSource]::CreateFromUri('https://zombo.com/zombo_words.mp3') | |
$MediaPlayer.Play() | |
while (1) {write-host @" | |
`r | |
███████ ██████ ███ ███ ██████ ██████ ██████ ██████ ███ ███ | |
███ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██ ████ ████ | |
███ ██ ██ ██ ████ ██ ██████ ██ ██ ██ ██ ██ ██ ████ ██ | |
███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ |
This file contains hidden or 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
[ | |
{ | |
"pkgName": "obs-studio", | |
"displayName": "OBS Studio", | |
"publisher": "Open Broadcaster Software", | |
"publisherSite": "https://obsproject.com/", | |
"pkgVersion": "27.0.1", | |
"pkgSource": "https://cdn-fastly.obsproject.com/downloads/OBS-Studio-27.0.1-Full-Installer-x64.exe", | |
"hash": "844F54C4ACF1ABBD51612CC9D4470E2E3A937106E5BE69BC94BBA7859FB748CD", |
NewerOlder