xxxxxxxxxx
$Response = Invoke-RestMethod -Uri 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net' -Method GET -Headers @{Metadata="true"}
xxxxxxxxxx
$packagesToRemove = @(
"Microsoft.Advertising.Xaml",
"Microsoft.Messaging",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.MicrosoftStickyNotes",
"Microsoft.MixedReality.Portal",
"Microsoft.OneConnect",
"Microsoft.People",
"Microsoft.Todos",
"Microsoft.Whiteboard",
"Microsoft.Getstarted",
"MicrosoftTeams",
"Microsoft.PowerAutomateDesktop",
"Microsoft.WindowsAppRuntime.1.3",
"Microsoft.XboxGameOverlay",
"Microsoft.XboxIdentityProvider",
"NVIDIACorp.NVIDIAControlPanel",
"RealtekSemiconductorCorp.RealtekAudioControl",
"RivetNetworks.KillerControlCenter",
"SynapticsIncorporated.SynDellWPF",
"AppUp.ThunderboltControlCenter",
"AppUp.IntelGraphicsExperience"
)
foreach ($package in $packagesToRemove) {
try {
$app = Get-AppxPackage -Name $package -AllUsers
if ($app) {
Remove-AppxPackage -Package $app.PackageFullName
Write-Host "Removed package: $package"
} else {
Write-Host "Package not found: $package"
}
} catch {
Write-Host "Error removing package: $package. Error: $_"
}
}
xxxxxxxxxx
Get-ChildItem -Recurse -Filter *.flac | ForEach-Object { $_.FullName } | Out-File "C:\Path\To\Your\Playlist.m3u"
xxxxxxxxxx
# Check if running with elevated privileges
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "Please run the script as an administrator."
exit
}
# Specify the Wireshark download URL
$wiresharkUrl = "https://1.as.dl.wireshark.org/win64/Wireshark-win64-3.6.1.exe"
# Specify the installation directory
$installDirectory = "C:\Program Files\Wireshark"
# Specify the installation command
$installCommand = "& $installDirectory\Wireshark-win64-3.6.1.exe /S /desktopicon=no"
# Download Wireshark installer
Invoke-WebRequest -Uri $wiresharkUrl -OutFile "WiresharkInstaller.exe"
# Create the installation directory if it doesn't exist
if (-not (Test-Path $installDirectory)) {
New-Item -ItemType Directory -Path $installDirectory -Force
}
# Run the Wireshark installer silently
Start-Process -FilePath "WiresharkInstaller.exe" -ArgumentList "/S" -Wait
# Remove the downloaded installer
Remove-Item "WiresharkInstaller.exe" -Force
Write-Host "Wireshark has been installed successfully."