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
<# | |
CSV FORMAT | |
+------------+--------------+--------------+ | |
| Group Name | Group Owner1 | Group Owner2 | | |
+------------+--------------+--------------+ | |
| group1 | user@domain | user@domain | | |
| group2 | user@domain | user@domain | | |
| group3 | user@domain | user@domain | |
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-AzureADUserDirectoryRole { | |
param | |
( | |
[Parameter(ValueFromPipeline = $true)] | |
[Microsoft.Online.Administration.User] $User | |
) | |
BEGIN { | |
$_directoryRoles = Get-AzureADDirectoryRole | |
$_directoryRoleMembers = $_directoryRoles | %{ |
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
$searchString = '' | |
$_servicePrincipals = Get-AzureADServicePrincipal -All 1 | |
[PSCustomObject] @{ | |
Applications = Get-AzureADApplication -All 1 -SearchString $searchString | %{ | |
$_requiredResourceAccess = $_.RequiredResourceAccess.ResourceAccess | |
[PSCustomObject] @{ | |
ApplicationName = $_.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
dir *.m2ts ` | |
| %{ "file '$($_.Name)'"} ` | |
| Out-File mylist.txt -Encoding ascii | |
# copy video | |
# transcode audio to aac | |
# - copying pcm_bluray will produce audio error | |
# - transcoding to pcm_s16be will make the stream unreadable | |
ffmpeg -f concat -safe 0 -i mylist.txt -c:v copy -c:a aac output.ts -y |
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
$userid = '1234567' | |
$uri = "https://cy.cyworld.com/home/$userid/posts" | |
$timestamp = Get-Date -format "yyyyMMddHHmmss" | |
$outputPath = "$([Environment]::GetFolderPath("Desktop"))\$userid\$timestamp\" | |
mkdir $outputPath -ErrorAction SilentlyContinue > $null | |
$origin = ([datetime]'1/1/1970') | |
$headers = @{ | |
"Accept"="application/json, text/javascript, */*; q=0.01" |
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
$url = @{ | |
browser = $null | |
hangouts = 'hangouts.google.com' | |
calendar = 'calendar.google.com' | |
gmail = 'mail.google.com' | |
whatsapp = 'web.whatsapp.com' | |
keep = 'keep.google.com' | |
meet = 'meet.google.com' | |
teams = 'teams.microsoft.com' | |
} |
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 Export-All-XSPSolution ($Location) | |
{ | |
$farm = Get-SPFarm | |
If (test-path $Location) {} Else {mkdir $Location} | |
Write-Host "Downloading..." | |
$farm.Solutions | |
foreach($solution in $farm.Solutions){ | |
$solution = $farm.Solutions[$solution.Name] |
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
$farm = Get-SPFarm | |
$farm.Solutions ` | |
| sort name ` | |
| ft Name, Deployed, DeployedWebApplications, DeployedServers, DeploymentState |
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 Log-MsolSubscription | |
{ | |
begin | |
{ | |
$timestamp = Get-Date -format "yyyyMMddHHmmss" | |
$executionName = $MyInvocation.MyCommand | |
$logFilename = "$($timestamp)_$(gc env:computername)_$($executionName)" | |
$logPath = "$([Environment]::GetFolderPath("Desktop"))\$executionName\$logFilename.log" | |
Start-Transcript -Path $logPath > $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-BrowserProfile { | |
param | |
( | |
[Parameter(Position=0)] | |
[ValidateSet('chrome','msedge','All')] | |
$Browser = 'All', | |
) | |
$browsers = @{} |