Skip to main content

Script I use to remove various things before I image a clean install


#Set-up script to remove apps and enable/disable features.

#Creates a logfile in C:
Start-Transcript -Path C:\SetupLog.txt -NoClobber

#List of apps to remove. May be ammended in the future.
#Please Note: Do Not Remove the Windows Store App. This will cause problems.
$AppsToRemove = @( “Microsoft3DViewer”
“GetHelp”
“Getstarted”
“OfficeHub”
“SolitaireCollection”
“MixedReality”
“OneNote”
“People”
“SkypeApp”
“Wallet”
“Alarms”
“windowscommunicationsapps”
“FeedbackHub”
“Finance”
“News”
“Sports”
“SoundRecorder”
“XBox”
“YourPhone”
“Zune”
“LinkedIn”
“DellInc”
“Watchdog”
“Messaging”)

#This is the main loop that removes the programs specified.
#It removes the apps from the current user and from provisioned packages preventing them from being
#installed when a new user profile is created, such as when a domain user logs into a new computer.
ForEach($App in $AppsToRemove){
Get-AppxPackage -AllUsers | ? Name -Like “$App” | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | ? DisplayName -Like “$App” | Remove-AppxProvisionedPackage -Online
}

#This section ensures that System Restore is active on the C:\ drive and creates a restore point
#after all changes are made. Please leave this as the last section.
Enable-ComputerRestore -Drive “C:”
CheckPoint-Computer -Description “Initial Installation” -RestorePointType APPLICATION_INSTALL

#Ends logging
Stop-Transcript

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings