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
######################################################################################## | |
# JEA Helper Tool - Version 2.0 | |
# By the Enterprise Cloud Group (ECG) CAT team | |
# Please send feedback to [email protected] | |
######################################################################################## | |
param ( | |
#[String]$SMAEndpointWS = "https://wap01.contoso.com", | |
[String]$SMAEndpointWS = "", | |
[String]$SMAEndpointPort = "9090" |
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
######################################################################################## | |
# JEA Toolkit Helper | |
# Version 1.0 | |
# by the Windows Server and System Center CAT team - http://aka.ms/bcb | |
# Please send feedback to [email protected] | |
######################################################################################## | |
param ( | |
[String]$SMAEndpointWS = "", | |
[String]$SMAEndpointPort = "9090" |
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
$Test = [PSCustomObject] @{ | |
Name = 'Przemek' | |
Surname = 'Klys' | |
"Difffrent parametr" = 'ok' | |
} | |
function Get-WhereObject { | |
[cmdletBinding()] | |
param( | |
[Parameter(Mandatory, Position = 0, ValueFromPipeline)][PSCustomObject] $Test |
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 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 | |
} |
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-Sid { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, Position = 0)] | |
[System.String] | |
$Account, | |
[Parameter(Mandatory = $false, Position = 1)] | |
[System.String] | |
$Domain = $null |
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-Sid { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, Position = 0)] | |
[System.String] | |
$Account, | |
[Parameter(Mandatory = $false, Position = 1)] | |
[System.String] | |
$Domain = $null |
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
Clear-Host | |
Write-Color "Windows PowerShell" | |
Write-Color "Copyright (C) Microsoft Corporation. All rights reserved." -LinesAfter 1 | |
<# Alternatively if you don't have Write-Color | |
Clear-Host | |
Write-Host "Windows PowerShell" | |
Write-Host "Copyright (C) Microsoft Corporation. All rights reserved." | |
Write-Host | |
#> |
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
# Surname list from a web site | |
$uri = "https://names.mongabay.com/most_common_surnames.htm" | |
$data = Invoke-WebRequest $uri | |
$table_surname = $data.ParsedHtml.getElementsByTagName("table") | Select -first 1 | |
[array]$table_surname = $table_surname | select -ExpandProperty innertext | |
$table_surname = $table_surname.Replace("SurnameApproximate", "").replace("Number%", "").replace("FrequencyRank", "") | |
$table_surname = $table_surname -split "`n" | |
[regex]$filter = '[^a-zA-Z]' | |
$surname_list = $table_surname -replace $filter |
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
Clear-Host | |
Function Limit-BlockUsageOne { | |
[CmdletBinding()] | |
Param ( | |
$Stop = 1 | |
) | |
Begin { | |
if ($Stop -eq 2) { | |
break |
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
$lists = Get-PnPList -Includes RootFolder.ServerRelativeUrl, IsCatalog, IsSiteAssetsLibrary | |
$Rewritten = foreach ($list in $lists) { | |
[PSCustomObject] @{ | |
Id = $List.Id | |
Title = $list.Title | |
Url = $list.RootFolder.ServerRelativeUrl | |
IsCatalog = $List.IsCatalog | |
IsSiteAssetsLibrary = $List.IsSiteAssetsLibrary | |
} | |
} |
NewerOlder