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
$uri = (dir $PSCommandPath).BaseName | |
start msedge -args "--app=https://$uri" |
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
$containerTo = 'srt' | |
dir -File | where name -NotLike *.$containerTo | %{ | |
Write-Host | |
$_.FullName | |
& cmd /c "ffmpeg -n -i ""$($_.Name)"" -map 0:s:0 ""$($_.BaseName).$containerTo"" 2>&1" | |
} |
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
$containerFrom = 'flv' | |
$containerTo = 'mp4' | |
dir -File -Filter "*.$containerFrom" | %{ | |
$_.FullName | |
Write-Host | |
& cmd /c "ffmpeg -i ""$($_.Name)"" -acodec copy -vcodec copy ""$($_.BaseName).$containerTo"" 2>&1" | |
} |
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 Verb-LibraryFunctionName { | |
param | |
( | |
) | |
begin | |
{ | |
$timestamp = Get-Date -format "yyyyMMddHHmmss" | |
$executionName = $MyInvocation.MyCommand |
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-MsolUserLicenceService { | |
param | |
( | |
[Parameter(ValueFromPipeline = $true)] | |
[Microsoft.Online.Administration.User] $User | |
) | |
PROCESS { | |
$user | ? { $_.isLicensed -eq $true } | % { | |
$user = $_ |
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
$tenant = (Get-MsolCompanyInformation).DisplayName | |
$out = @() | |
Get-MsolAccountSku | %{ | |
$licence = $_ | |
$licence.ServiceStatus | %{ | |
$service = $_ | |
$out += [PSCustomObject] @{ |
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
$tenant = (Get-AzureADTenantDetail).DisplayName | |
$out = @() | |
Get-AzureADSubscribedSku | %{ | |
$licence = $_ | |
$licence.ServicePlans | %{ | |
$service = $_ | |
$out += [PSCustomObject] @{ |
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-duplicates | |
{ | |
param($nums) | |
$tortoise = $nums[0] | |
$hare = $nums[0] | |
do | |
{ | |
$tortoise = $nums[$tortoise] |
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
$keywordUpn = "riju" | |
Get-AzureADUser -Filter "startswith(UserPrincipalName, '$($keywordUpn)')" | %{ | |
$user = $_ | |
Get-AzureADUserMembership -ObjectId $user.ObjectId | %{ | |
$group = $_ | |
[PSCustomObject] @{ | |
UserPrincipalName = $user.UserPrincipalName | |
GroupDisplayName = $group.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
cls | |
function Get-RelativeComplement { | |
param([PSObject[]]$Of, [PSObject[]]$In ) | |
Compare-Object $In $Of -IncludeEqual -PassThru | ?{ | |
$Of -notcontains $_ | |
} | |
} |