Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views1 page

Uninstall Apps

Uploaded by

Muthu Pandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Uninstall Apps

Uploaded by

Muthu Pandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

# Define the list of target computers

$targetComputers = @("QER-SS2301-OWS1", "QER-ELE-HI-FES2")

# Define the list of applications to uninstall


$appNames = @("Microsoft.ZuneMusic", "Microsoft.ZuneVideo",
"Microsoft.XboxSpeechToTextOverlay", "Microsoft.XboxGamingOverlay",
"Microsoft.XboxGameOverlay", "Microsoft.Xbox.TCUI", "Microsoft.WindowsFeedbackHub",
"Microsoft.WindowsCamera", "Microsoft.People",
"Microsoft.MicrosoftSolitaireCollection", "Microsoft.GetHelp",
"Microsoft.GamingApp", "Microsoft.BingWeather", "Microsoft.BingNews",
"Clipchamp.Clipchamp", "MicrosoftTeams", "Microsoft.WindowsAlarms",
"Microsoft.OneDriveSync", "Microsoft.XboxIdentityProvider",
"Microsoft.WindowsMaps", "Microsoft.YourPhone", "Microsoft.PowerAutomateDesktop",
"Microsoft.Getstarted", "Microsoft.WindowsSoundRecorder",
"Microsoft.549981C3F5F10", "Microsoft.WindowsStore",
"microsoft.windowscommunicationsapps", "Microsoft.Todos")

# Define the path for the marker file


$markerFilePath = "$env:USERPROFILE\first_login_marker.txt"

# Get the current computer name


$currentComputer = $env:COMPUTERNAME

# Check if the current computer is in the list of target computers


if ($targetComputers -contains $currentComputer) {
# Check if the marker file exists
if (-Not (Test-Path -Path $markerFilePath)) {
foreach ($appName in $appNames) {
$app = Get-AppxPackage -Name $appName
if ($app) {
Remove-AppxPackage -Package $app.PackageFullName
}
}
# Create the marker file to indicate the script has run
New-Item -Path $markerFilePath -ItemType File
}

You might also like