Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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-TemporaryDirectory { | |
<# | |
.SYNOPSIS | |
Creates a new temporary directory with a random name. | |
.DESCRIPTION | |
The Get-TemporaryDirectory function generates a random directory name and creates a new directory in the specified parent directory (or the system's temporary directory if no parent directory is specified) with that name. | |
.PARAMETER ParentDirectory | |
The parent directory in which the temporary directory should be created. If not specified, the system's temporary directory will be used. |
This file contains 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 ConvertTo-Hashtable { | |
<# | |
.LINK | |
https://gist.github.com/YoraiLevi/292bb8d0e2ce0f87d37e5d5d735fff16 | |
.LINK | |
https://stackoverflow.com/questions/77265408/powershell-array-to-hashtable-cannot-get-keys-value-with-bracket-notation-but-d | |
.LINK | |
https://peps.python.org/pep-0274/ |
This file contains 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
# https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-shouldprocess | |
function Test-ShouldProcess { | |
[CmdletBinding( | |
SupportsShouldProcess, | |
ConfirmImpact = 'High' | |
)] | |
param( | |
[Switch]$Force | |
) |
This file contains 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
<# | |
.SYNOPSIS | |
Requires powershell 5 or later | |
Provides Get and Set functions for KnownFolders | |
.EXAMPLE | |
PS> Set-KnownFolderPath Desktop $ENV:USERPROFILE/Desktop | |
.EXAMPLE | |
PS> $Path="" | |
PS> Get-KnownFolderPath Desktop ([ref]$Path) | |
.LINK |
This file contains 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
#https://serverfault.com/questions/1018220/how-do-i-install-an-app-from-windows-store-using-powershell | |
#Usage: | |
# > Download-AppxPackage "https://www.microsoft.com/p/dynamic-theme/9nblggh1zbkw" "$ENV:USERPROFILE\Desktop" | |
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30233.0_neutral_~_jdggxwd41xcr0.AppxBundle | |
# C:\Users\user\Desktop\55888ChristopheLavalle.DynamicTheme_1.4.30234.0_neutral_~_jdggxwd41xcr0.AppxBundle | |
# C:\Users\user\Desktop\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__8wekyb3d8bbwe.Appx | |
# C:\Users\user\Desktop\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__8wekyb3d8bbwe.Appx | |
# C:\Users\user\Desktop\Microsoft.Services.Store.Engagement_10.0.19011.0_x64__8wekyb3d8bbwe.Appx | |
# C:\Users\user\Desktop\Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe.Appx |
This file contains 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
lasti=0 | |
lastj=0 | |
var privatefb = function(){ | |
items = document.getElementsByClassName('_42ft _4jy0 _55pi _5vto _55_p _2agf _4o_4 _401v _p _1zg8 _4jy3 _517h _51sy _59pe') | |
for(i=lasti;i<items.length;i++) | |
{ items[i].click() | |
items[i].focus() | |
lasti=i | |
} | |
items2 = document.getElementsByClassName('_54nh _4chm') |