Windows X - Usage & Function Powershell Script

In 1 of my previous post service where I've shown on how to remove/uninstall Windows 10 built-in apps, straightaway it's fourth dimension to exercise your ain PowerShell script to run all those ascendence automatically.

Imagine yous need to exercise this everytime yous performed a novel installation, good if 1-2 organization thence it mightiness live OK with..... how close 10-50 systems ? I certainly volition desire to exercise this automatically.

Of course of written report firstly yous need to exercise the script starting fourth dimension thence salve it as well as run it at a afterward stage.

Related


1. Open --> PowerShell ISE.



2. You volition regard a novel application opened.



3. Create your script inwards the correct pane equally shown.


For slow reference, yous merely need to re-create & glue the next cmdlet into the pane. You may take away whatever cmdlet equally yous deem fits your requirements.


Get-AppxPackage -AllUsers *3dbuilder* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsalarms* | Remove-AppxPackage
Get-AppxPackage -AllUsers *zunevideo* | Remove-AppxPackage
Get-AppxPackage -AllUsers *officehub* | Remove-AppxPackage
Get-AppxPackage -AllUsers *skypeapp* | Remove-AppxPackage
Get-AppxPackage -AllUsers *getstarted* | Remove-AppxPackage
Get-AppxPackage -AllUsers *zunemusic* | Remove-AppxPackage
Get-AppxPackage -AllUsers *solitairecollection* | Remove-AppxPackage
Get-AppxPackage -AllUsers *bingfinance* | Remove-AppxPackage
Get-AppxPackage -allusers *bingnews* | Remove-AppxPackage
Get-AppxPackage -AllUsers *people* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsphone* | Remove-AppxPackage
Get-AppxPackage -AllUsers *commsphone* | Remove-AppxPackage
Get-AppxPackage -AllUsers *photos* | Remove-AppxPackage
Get-AppxPackage -AllUsers *bingsports* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsstore* | Remove-AppxPackage
Get-AppxPackage -AllUsers *bingweather* | Remove-AppxPackage
Get-AppxPackage -AllUsers *xboxapp* | Remove-AppxPackage
Get-AppxPackage -AllUsers *twitter* | Remove-AppxPackage
Get-AppxPackage -AllUsers *office.sway* | Remove-AppxPackage
Get-AppxPackage -AllUsers *xboxonesmartglass* | Remove-AppxPackage
Get-AppxPackage -AllUsers *messaging* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowscamera* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsmaps* | Remove-AppxPackage
Get-AppxPackage -AllUsers *soundrecorder* | Remove-AppxPackage
Get-AppxPackage -AllUsers *onenote* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsscan* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowscalculator* | Remove-AppxPackage


4. Now salve the newly created script to your preferred location, likewise yous need to ensure the file extension is ".ps1" earlier saving it.



5. Now yous must run --> PowerShell amongst "administrator" rights past times right-click --> Run equally administrator pick equally shown below.



6. Note the "Administrator" degree is shown on the direct house left corner of the windows.



7. As my script file was salve inwards [D:] folder, thence must starting fourth dimension alter the working directory first, your folder perhaps unlike from mine. Proper path is required.



8. Now type the script's filename equally shown below as well as press --> [ENTER] key.



9. You volition definitely meet this error, don't worry equally this is normal. This is because the "PowerShell Execution Policy" prevents whatever unauthorised scripts from running equally safety measures, which I real much similar this persuasion (even though around uncovering it troublesome).



10. Now type this cmdlet --> Get-ExecutionPolicy --> [ENTER]. It volition display the electrical flow condition of the policy, authorities annotation the "Restricted" degree equally shown below screen.



11. Now to alter it type the next cmdlet --> Set-ExecutionPolicy Unrestricted --> [ENTER], this volition alter the degree to "Unrestricted" which volition allows yous to run the script. When prompted merely type --> "A" telephone substitution --> [ENTER] to continue.



12. Type the script filename 1 time to a greater extent than as well as this fourth dimension yous should live able to run it without whatever fault message, if successful yous should live able to regard the below screen. This volition takes around times to consummate thence live patience.



13. Once completed, yous mightiness desire to alter dorsum the policy dorsum to "Restricted" equally safety measure, merely type --> Set-ExecutionPolicy Restricted --> [ENTER] key.



14. To actually exercise this automatically, yous volition need to exercise a batch file to starting fourth dimension alter the policy level, thence run the script as well as finally alter dorsum the policy to default level.

For that volition live around other posting coming soon.

HAPPY CODING !!!

Related Posts

0 Response to "Windows X - Usage & Function Powershell Script"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel