Skip to content

Instantly share code, notes, and snippets.

View PrzemyslawKlys's full-sized avatar
🍉
Dreaming about great things! A bit bored...

Przemysław Kłys PrzemyslawKlys

🍉
Dreaming about great things! A bit bored...
View GitHub Profile
function Remove-WinADSharePermission {
[cmdletBinding(DefaultParameterSetName = 'Path', SupportsShouldProcess)]
param(
[Parameter(ParameterSetName = 'Path', Mandatory)][string] $Path,
[ValidateSet('Unknown')][string] $Type = 'Unknown',
[int] $LimitProcessing = [int32]::MaxValue
)
Begin {
[int] $Count = 0
}
@PrzemyslawKlys
PrzemyslawKlys / Dynamically generate Where-Object.ps1
Last active April 7, 2021 11:49
Dynamically generate Where-Object based on PSCustomObject
$Test = [PSCustomObject] @{
Name = 'Przemek'
Surname = 'Klys'
"Difffrent parametr" = 'ok'
}
function Get-WhereObject {
[cmdletBinding()]
param(
[Parameter(Mandatory, Position = 0, ValueFromPipeline)][PSCustomObject] $Test
@PrzemyslawKlys
PrzemyslawKlys / JEAToolkitHelper1.0.ps1
Last active May 20, 2021 07:57
JEA Toolkit Helper
########################################################################################
# JEA Toolkit Helper
# Version 1.0
# by the Windows Server and System Center CAT team - http://aka.ms/bcb
# Please send feedback to brunosa@microsoft.com
########################################################################################
param (
[String]$SMAEndpointWS = "",
[String]$SMAEndpointPort = "9090"
@PrzemyslawKlys
PrzemyslawKlys / JEAHelperToolv2.ps1
Created May 20, 2021 07:57
JEA Helper Tool - Version 2.0
########################################################################################
# JEA Helper Tool - Version 2.0
# By the Enterprise Cloud Group (ECG) CAT team
# Please send feedback to brunosa@microsoft.com
########################################################################################
param (
#[String]$SMAEndpointWS = "https://wap01.contoso.com",
[String]$SMAEndpointWS = "",
[String]$SMAEndpointPort = "9090"