Windows Updates through PowerShell
HTML-код
- Опубликовано: 11 сен 2024
- Did you know you can install updates with using PowerShell? This is the Guide for doing that!
Website guide: christitus.com... .
►► Digital Downloads ➜ www.cttstore.com
►► Reddit ➜ / christitustech
►► Titus Tech Talk ➜ / titustechtalk
►► Twitch ➜ / christitustech
Thanks for the video Chris. A couple minor items
1. Noobs will need to know to enable setting execution policy. This should be sufficient to get it going. Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
2. Your OUT-FILE code will not write the computer name and date as is, this should work better
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot | Out-File "C:\${env:COMPUTERNAME}_$(get-date -f yyyyMMdd)_MSUpdates.log"
3. Nit picking. One should not write log files to the root of the drive. Should probably make a folder in Documents or the Desktop and log it there. I like to put the date first that way it sorts by date.
Many thanks
Thank you!
I've been using the pswindowsudpate module for years. It saved a bunch of issues when trying to get a build up to the most recent patch level. It's not as good as apt or yum. But it's an improvement on the way windows normally works. You may find that it won't run unless the executionpolicy is set to remotesigned. (I usually use chocolatey to install it and I need to make sure that powershell is running a minimum of version 5.1 and the executionpolicy will allow the running of that module)
Thanks for all your videos! Thank God a sane person on RUclips showing cool stuff that actually is useful with a special comical touch. I'm both Windows and Linux power user. Used to write WDM drivers for Windows XP and Vista, then the good old VxD drivers for Windows 95/98 which still worked on XP! Now I'm hardcore Linux driver/user space coder C/ C++. Love this stuff!
I'm learning a lot from your videos regarding different installers and how to configure Linux Ubuntu is my primary, Kali my home distro. Looking at some other distros a bit later. Even have the freebie Oracle cloud account.
Great stuff! Keep it going with Linux!
God I like the modern touch of your right click that meets the old way of displaying it.
I want it now !
I wasn't able to get it to work perfectly with my system but I think it's called NileSoft Shell. Chris Titus has it in his Windows Utility listed as "Shell (Expanded Context Menu)" under the "Utilities" category. Hope that helps!
yoo this is amazing! It actually finds and installs optional updates (like drivers) as well! something that was missing since I installed your debloat script - I couldn't get optional updates anymore. No I finally can with this trick! Thanks!
Trick? It is something that has been broken from the beginning ... Still useless because a patch to the patch...
@@GooogleGoglee I don't really understand what you mean. When I use vanilla windows update it will give me optional drivers. Like for my monitor and stuff. Which is useful since when I uninstall my GPU driver through DDU it will also remove my monitor driver. So all I have to do is windows update to get it back. However, with Chris Titus's debloat script that's not possible anymore. It doesn't offer me optional update anymore, ever. Which is bad. But with this powershell trick It offers me optional updates again!
I get this error and both my Windows 10 and 11 systems.
the 'get-windowsupdate' command was found in the module 'pswindowsupdate', but the module could not be loaded.
Thanks Chris this is awesome!! I did have to add one additional prerequisite to allow scripts to run using this command: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
I prefer RemoteSigned to Unrestricted.
0:37 - Dec 16th 2022. Chris has somehow achieved time travel
Wait... why is that cumulative update 128GB in size??!
It is to reinstall all the crap he cut from the windows install ;)
The thing PSWindowsUpdate uses to update Windows has had a bug for a long time where cumulative updates will show as being much larger than they actually are.
And more over: why so geberic and no details? What does it do and what it contains??
Horrifying !! Just a GUI badly translated to CLI to hide better more things....
Hi Chris
Everything works thanks, you are my hero and mentor 😊
Greetings from Belgium
Tom
A 128GB Update? huh... Great content as always, tyvm!
It seems that the publication date on the site is only set for December 16 - in two days.
oops, fixed
Very informative video Chris! I also like experimenting with Windows, but unfortunately I did too much and completely broke my Windows Update service. I never knew you could manually install Updates from Powershell. Life changer! 😁
I would say switch to another OS better "time wasted"
I'm not even a windows user but I love seeing the stuff you are able to do with it
Excellent stuff... BTW your website guide link above is 404'ing ...
fixed
Hi Chris. Article gives a 404. Thanks for the vid!
More powershell stuff plz!
Never heard of this. Pretty cool.
FYI, On one of my systems it forced my to change the ExecutionPolicy. So you might want to add that to your guide or a pinned comment that if you face errors while executing the 2nd command (Add-WUServiceManager) you might need to change your ExectionPolicy :)
Thanks for the tip!
Thanks for the information. I will file this into things to know about Powershell.
Your Debloat Windows tool broke my windwos updates. Thanks. Now i have to painstakingly reinstall windows.
Can you upload for us windows10 lite for low end pc, users please chris and don't forget to remove microsoft defender either
thank you so much for your work and help.
Why does this powershell look cool?
Was there a chris' video on theme that I missed!?
3:42 - Probably nobody cares, but this is not a Windows Terminal feature, it is part of Powershell. The PSReadLine Module to be more specific. Or at least it does not work anymore, after typing "Remove-Module PSReadLine", which is unloading the module from the current session.
Hey Chris, I love learning powershell to update multiple computers! You mentioned a gaming pc that you run headless and also referred to another of your videos to do this?
Please elaborate.
The link works now, thank you.
Would this work in a closed network where Windows updates are pulled from a local server instead of directly from Microsoft?
We love CTT
Why doesn't the link to your website work?
confirm
@@BlackB00X working now!
Hello sir, please make a room tour video, what's changed, what's optimized, what do you use, its been a while
You read my mind, I actually just ripped out my entire desk and redoing things once again.
I used your settings to delay feature updates, but I let windows auto install security patches. If there are issues with Windows Update, then the powershell method has some value.
Basically you save me live CUZ I could not update simple met ode Thank you man
that's a very nice 404 page you have there
fixed
I followed the "Setting Up the Ultimate Windows 11" guide, built a custom installer via NTLite and applied the debloat GUI. Superb, thank you, low process count and a worthwhile speed increase over stock. If I update Windows through Powershell, or any other method for that matter, will I break the custom install in terms of bloat being added back or any of the strippage being put back?
Hey Chris! Any chance can you make a video on Installing Windows Update on Remote Computers with PowerShell!!!!!
this is very nice to know/learn about.
thank you for this, very informative and straight forward 👍👍 ... I have in my mind though if its feasible
there's an option in windows update settings that when I click the ""Pause updates for 7 days" option, right away the windows update is pause for 7 days. then you can adjust it up to 1 month i think in advanced options.. what I wanted is to automate the pausing every month, is there a powershell syntax or script that has equivalent results the way pausing in GUI? then when I have that script i can just trigger it using scheduller maybe
Awesome videos!
Might try this next time I have issues with the normal Windows Update setting.
Outstanding video
As a semi-power user, this is interesting. I'm late to the party in finding this. But here's a question:
If I just run those two commands (Get-WindowsUpdate/Install-WindowsUpdate), does that flag my computer get non-security beta updates? (I recalled MS doing something like this years ago on people who pressed the 'Check for update' button but don't know if they're still doing it today.)
Is it faster tho?cause sometimes windows update give me headache
Doesn't work for me I run the first 2 commands, but when I run the update command nothing happens just sits at the prompt and nothing happens and the output file is blank
A christmas wish:
A guide to create an install media:
Debloated windows 10/11, no defender/future updates (but ofcourse with the most recent update)
also containing own preinstalled apps like brave, steam and other own apps.
so we have a clean windows stick to start over with, when ever the darn thing gets clutted.
all you need do is make your own iso then run his debloater tool thru powershell as admin he has installer and tweaker/ debloat
he did a video like that (even 2 i think)
@@khitofn6249 but that should be done every time i reinstall windows ?
@@lollandz you downloading windows a lot ? Every time you fresh install or factory reset yes you would need to
@@khitofn6249 there is an option that makes it possible to install software like Adobe, steam and other things you might install on every fresh windows installation.
That is using a windows tool called sysprep..
I have tried this thing.. but I'm am not so skilled, and CTT is just a master at explaining and doing his stuff 👍😁
Very nice!!
Hello Chris, i was just requesting if you would make a video about RAID , troubleshooting tips on RAID Arrays
what camera is that ! its freaking epic!!!
Well, I think it's fun but the Windows Update is better now than before (couple of years ago), but in case if it's stuck, the commands are good to know
2:13 The third update is 128GB?
I think there might be a small mistake concerning the log file name.
It should be "$env:computername" and not "$env.computername"
He probably also wants to wrap the Get-Date and formatting. Something like "$env:computername-$(Get-Date -f yyyy-MM-dd)-MSUpdates.log"
@@neonicacid yeah, it's a bit of a mess ^^
website link is broken? Error 404 Not Found
fixed
So, I did a Windows 11 22H2 NTLite install and love it, everything is working great except I like Dolby Atmos but no longer have the Windows store. Is there a way to install Windows store apps from PowerShell?
After posting this I found your video titled "Install Microsoft Store Apps WITHOUT the Microsoft Store" Thank you!
3:09 What's the difference between "winget" and chocolatey?
why trying to install the update i keep getting the error admin rights required... even when running powershell as admin.
The updates that show up for me are all the driver updates that are under view optional updates in the settings menu for Windows Update. Should I run these? I was always under the impression you only do the optional updates if having an issue.
Hi Chris, Can you please make a video on a fix on windows 11 pswindowsupdate. Can't seem to get windows update working with power shell recently.
Windows Updates need vetting. I disabled WUDs as well.
Right Arrow Key Fill has been a Feature since I believe the DOS days, I know it is in cmd, way before pshell
Thank you for being a god
Chris, Think you mean 23H1. How can you have 22H3? When is the third half of the year :) ?
Oh yea this cool. But how if we just want to pick only one update?.
Thanks.
Great video, thank you! Any tips for installing few google fonts using PowerShell?
On Mac, dragging a folder to font folders works... but on windows after downloading zip files (google fonts)... it takes lots of time to move those fonts (dragging folders doesn't work on windows - font folder).
So, if you could recommend some PowerShell / script (with a few clicks or command line) would be very appreciated.
I have an industrial environment where I can use WSUS to send the updates to the clients but I have to initiate the actual update manually since I have to do that during a downtime cycle. PS looks like it could help with that. Is there a PS command technique I can use from my workstation to initiate the update on other machines ?
Is there any way to do this fir specific updates that u can pick to update
Do these commands only work in PowerShell 7.3.x or will they also work in native PowerShell 5.1?
Is there any cmdlet that downloads updates instead of doing direct installation, by informing build and architecture?
Thnks, man!
Could you use this in an organisation to upgrade devices from 1909 to 22H2? My organisation is telling us to manually use Windows Update Assistant as the update policies are broken on loads of devices.
I keep getting "Failed" as the result for all updates, please what do I do?
Do you happen to know it the KB4023057 update will restrict or block some of the update restrictions that you set in powershell or via your Utility script?
Your method of updating remotely works on my domain controllers, but not any of my other servers 🤷🏻♀
FreeBSD and Linux are so much easier. Put an update script in the same location on each VM. Set up sudo to allow a specific user to run it without a password, then run them all over ssh.
You can do quite the same with PSWindowsUpdate. Invoke-WUJob creates a scheduled task on the remote server.
Running windows domain, just use WSUS call it a day or depending how big your environment is get a EPM that does patch management.
I think Chris just read my mind. This morning I was installing updates on my Windows machine and wondering if there was a way to do this via Powershell, so I could make some scripts to update my system. And a few hours later, Chris makes this video! I recently made some scripts to update my mac and linux systems and I'm looking forward to do the same on Windows.
It would be nice if it would have progressbar like in winget. But great tool.
This is what I use for updating computers on the task sequence. I also make a task scheduler to run windows update every week on the background
You reboot every week using task scheduler?
I think you got your website guide releases flipped around. There's one up for Acronis but the one for this video isn't up yet.
oops, fixed!
I need help when install application s use power shell
the application install put whene need open they close
Ok ik this was for good intent but first this is why I went to this because my computer wouldn't let me update i would try it and it would say error and then uninstall the update and go into log in screen so it didn't work so I looked for a tutorial and found this video and I tried it out on my computer it installed on powershell then I reset my computer then I get blue screen error 0xc000021a and now I can't boot into windows I tried safe mode with networking and safe mode with command prompt and it just kept giving me the same error. I really need my computer I dont have enough to by another one I have alot of information on there and I would like to know if you could help me fix this issue btw on blue screen it lets me click advanced options and let's me use command prompt so if there is a way to fix it by using command prompt can you help me please.
Amazing video. I have a question... Recently i bought a larger 1TB nvme disk and did a clean install, only to find out i'm missing partitions that are hidden: :* FAT32 100MB (EFI System partition); :* Other 16MB (Reserved Partition); :* Recovery Partition 625MB (NTFS) I'm reading this info on a freshly correctly installed windows 11 os on my other 256GB nvme... Is there a way of recreating those partitions on my main nVME, and if you could do a video about this problem....
Can you target offline system with this?
Hi Chris it’s out of the box but u can help me on these.i have clean installation windows 10 on MacBook Pro 8.1 early 2011,2.3ghz,320 hd,it gets hotter when in use and uncomfortable to use ,I know many people who install it has over heating issues how can u help me plus others with this problem
Is this still different than patching through sconfig?
Good video.
Great video as always Chris.. thank you again..
my nvidia shadowplay dioesnt work what caused this?
Finally my windows now behaves more like Linux. Definitely an improvement.
Some cool stuff. Kinda baffled that this isn't built into PShell or CMD yet.
not working on my win 10 laptop.............help ctt
Is 22H2 now worth the update?
i dont have the option called Get-widnowsupdate
After this i'm thinking to automate security updates only, the rest the user decides...
Perfect
Bonjour j'ai essayé sur 2 pc windows 10 et ça fonctionne pas dommage merci quand meme
I gess the Webpage is not up yet? (gives 404)
fixed
Thank you 👍
nice infos
i need this
I've tried this and it sucks. The module seems very Beta to me. Perhaps if all your servers are on the newest version it will work, but I tried this on 2016 and 2019 and about 80% failed to install for different reasons. Using SCCM and WSUS is definitely a better idea, or just using the GUI. Better yet, switch your servers over to Linux 😜👍
Install-Module pswindowsupdate
Untrusted repository
You are installing the modules from an untrusted repository...
So is it safe to use it?
It's safe, it's Just that the package Is not signed by Microsoft so for them Is untrusted. That's pretty common for community packages
For years and years I never seem to have what these clips tell me I should have. None of these commands work in my windows 10. Not one.
Site is giving 404 :(
fixed
I tried this in Wine and it didn't work.
Just finished updating my server with this command
How to do offline windows updates using powershell on multiple windows servers? Like download KBs in one server then install it in multiple windows servers remotely using powershell.
For that application just use WSUS server to centrally manage. Point all the servers at it, then just publish the updates you want.