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 MkZip { | |
[CmdletBinding()] | |
param ( | |
[Parameter( | |
Mandatory = $true, | |
ValueFromPipeline = $true | |
)] | |
[string]$Directory | |
) |
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 MakeIso { | |
param ( | |
[string]$SourceFolder, | |
[string]$ISOFile | |
) | |
Start-Process oscdimg.exe -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b$SourceFolder\boot\etfsboot.com#pEF,e,b$SourceFolder\efi\microsoft\boot\efisys.bin $SourceFolder $ISOFile" -Wait | |
} |
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 ClipFile { | |
param( | |
[Parameter(Mandatory = $true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$FilePath | |
) | |
try { | |
$Item = Get-Item -Path $FilePath -ErrorAction Stop | |
} | |
catch { |
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
<# | |
.SYNOPSIS | |
Moves a file or directory to the Recycle Bin. | |
.DESCRIPTION | |
The Remove-ItemToRecycleBin function moves a specified file or directory to the Recycle Bin. | |
It uses the Microsoft.VisualBasic.FileIO.FileSystem class to perform the operation. | |
Original author: Ste (https://stackoverflow.com/users/8262102/ste) | |
Improved by: everydayintech (github.com/everydayintech) |
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
Import-Module Microsoft.Graph.Beta.Devices.CorporateManagement -ErrorAction Stop | |
$ReadAllScopes = @( | |
"DeviceManagementApps.Read.All" | |
) | |
Connect-MgGraph -NoWelcome -Scopes $ReadAllScopes | |
$WindowsAppsFilter = "(isof('microsoft.graph.win32CatalogApp') or isof('microsoft.graph.windowsStoreApp') or isof('microsoft.graph.microsoftStoreForBusinessApp') or isof('microsoft.graph.officeSuiteApp') or (isof('microsoft.graph.win32LobApp') and not(isof('microsoft.graph.win32CatalogApp'))) or isof('microsoft.graph.windowsMicrosoftEdgeApp') or isof('microsoft.graph.windowsPhone81AppX') or isof('microsoft.graph.windowsPhone81StoreApp') or isof('microsoft.graph.windowsPhoneXAP') or isof('microsoft.graph.windowsAppX') or isof('microsoft.graph.windowsMobileMSI') or isof('microsoft.graph.windowsUniversalAppX') or isof('microsoft.graph.webApp') or isof('microsoft.graph.windowsWebApp') or isof('microsoft.graph.winGetApp')) and (microsoft.graph.managedApp/appAvailability eq null or microsoft.graph.managedApp/appAvailability eq |
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
# Original Script: https://z-nerd.com/blog/2020/03/31-intune-win32-apps-powershell-script-installer/ | |
# Added Exit Code handling by: baartch | |
# Improved Exit Code handling by: https://github.com/everydayintech | |
If ($ENV:PROCESSOR_ARCHITEW6432 -eq 'AMD64') { | |
Write-Host 'Detected 32-bit PowerShell on 64-Bit OS, starting 64-bit PowerShell process...' | |
$argsString = '' | |
Try { | |
foreach ($k in $MyInvocation.BoundParameters.keys) { | |
switch ($MyInvocation.BoundParameters[$k].GetType().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
[ | |
{ | |
"CatalogVersion": "23.01.08", | |
"Status": null, | |
"Component": "DriverPack", | |
"ReleaseDate": "21.05.06", | |
"Manufacturer": "Microsoft", | |
"Model": "Surface 3", | |
"Product": "Surface_3", | |
"Name": "Microsoft Surface 3 WiFi Win10 18362", |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
autounattend.xml sample for silent Windows installation (intended for LAB USE only) | |
- Mofify Image index as needed, index 5 is Windows 11 Pro (most of the time) | |
- Modify Administrator password, default is: changeMePlease | |
- Modify language and keyboard as needed, assumes en-us image with swiss german keyboard layout | |
- Tested with Windows 11 22H2 | |
-> put this file in root directory of a Windows installation media or | |
copy content of downloaded ISO (C:\ISOFILES) from Microsoft and generate custom ISO (C:\WIN11.iso) with Oscdimg: |
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
$CurrentDir = if($null -eq $MyInvocation.MyCommand.Path){Get-Location | Select-Object -ExpandProperty Path} else{Split-Path -Parent -Path $MyInvocation.MyCommand.Path} | |
$Filename = Read-Host -Prompt "Enter Filename" | |
$SecretFile = (Join-Path $CurrentDir $Filename) | |
Read-Host -AsSecureString -Prompt "Enter Secret" | ConvertFrom-SecureString | Out-File $SecretFile |
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
$win32PointingDevices = Get-CimInstance win32_POINTINGDEVICE | |
$availablePointingDevices = @() | |
foreach($item in $win32PointingDevices) | |
{ | |
try | |
{ | |
$ffw = Get-ItemProperty "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\$($item.PNPDeviceID)\Device Parameters" -Name 'FlipFlopWheel' -ErrorAction Stop | |
$availablePointingDevices += [PSCustomObject]@{ |
NewerOlder