Sir, i love your video! i have a question. this command in particular. $Updates = "Critical Updates","Security Updates" Get-WindowsUpdate -AcceptAll -Verbose -Install -IgnoreReboot -Category $Updates I have 2 questions. Q1. does this mean that when the KB is already installed in the server it will not be installed again right? Q2. if the KB is not for that Particular server, it will not install or download it, am i correct? thanks so much and more power. i subbed.
This works just like regular windows updates, it if is already installed it does not re-install, it only installed updated that are required for that OS
Hey hi i give a challenge to you. Write powershell script for update a webconfig file in particular place based on given value (webconfig file in particular VM and inside a vm has c:documents\web.config )
This is the list defined in the PSWindowsUpdates scripts 'Critical Updates', 'Definition Updates', 'Drivers', 'Feature Packs', 'Security Updates', 'Service Packs', 'Tools', 'Update Rollups', 'Updates', 'Upgrades', 'Microsoft'
7:14 Hi Tom its me again, referring to the timeline i posted above, do you have a script that pulls the server names from a .txt file then using that to declare on you $serverlist instead of the manual server name input? id like to see how you integrate that on this existing script you made.
There is a video on PowerShell ping and notify, which incorporates a Server text file as a source, you should be able to integrate that into the windows update scripts. ruclips.net/video/rkhKd_rUGuk/видео.html
Hi Tom, thanks for the video. I tried to execute the PSTools\psexec command with parameters and it errors out to Import-Module PSTools. So I used the Import-Module command and gave exact path to this module. Import-Module 'C:\Program Files\WindowsPowerShell\Modules\PSTools\PsExec.exe' Error: ResourceUnavailable: (C:\Program File...ools\PsExec.exe:String) Any idea whats wrong with this? Am I in the right direction?
You don't import the PSTools, that is run as an external command called through the Powershell command : Start-Process -FilePath wu-launch.bat -ArgumentList $server this then called that batch file. the wu-launch.bat file uses psexec to send the command to the remote computer to start the updates.
Hi Tom, I was able to kick off the wu-launch.bat file from the Start-Process. The PsExec made the connection to the Server with the credentials and supposed to run the winupdate.bat file that is in the Domain controller/AD server, but looks like that's not happening. I see the message on the powershell window that "Starting cmd on the Server with Process ID" but no response after that. Any idea what is going on?
I create a scripts folder on the server being updated and place the update batch file and the update powershell file there. If the powershell file is run at all you should see the transcript status.txt file.
@@TomsTechShow Hi Tom, I see the status.txt file after I placed the update batch file and ps file in the scripts folder in the server that needs updates. Since the updates are not happening with the scripts, I had to separately run them and found out the scripts need elevated privileges at the server side that needs the updates. So how to do this included in the script when I kick off from the AD server. Any help is appreciated. VERBOSE: Accept [2] Updates to Download WARNING: Your security policy don't allow a non-administator identity to perform this task DONE Transcript stopped, output file is C:\Scripts\Status.txt
@@saradadoguparthi9896 Hey there, The user that I use to remotely send the command is a Domain Admin and is in the Administrator group on the system being updated.
Very nice
I have been looking for something like this script for a long time now. Thanks for the good work. I just subscribed. Keep up the good work.
Sir, i love your video! i have a question.
this command in particular.
$Updates = "Critical Updates","Security Updates"
Get-WindowsUpdate -AcceptAll -Verbose -Install -IgnoreReboot -Category $Updates
I have 2 questions.
Q1. does this mean that when the KB is already installed in the server it will not be installed again right?
Q2. if the KB is not for that Particular server, it will not install or download it, am i correct?
thanks so much and more power.
i subbed.
This works just like regular windows updates, it if is already installed it does not re-install, it only installed updated that are required for that OS
@@TomsTechShow Thanks bro! Awesome! i can definitely use this for my prod or lab! have a great day!
Hey hi i give a challenge to you.
Write powershell script for update a webconfig file in particular place based on given value (webconfig file in particular VM and inside a vm has c:documents\web.config )
Hi Tom, I don't see the Windows update powershell scripts on your BitBucket repository. Could you please help with this?
Thanks again
They are in the general-scripts project folder. bitbucket.org/tomstechshow/general-scripts/src/master/ You need the files that say 'Add WU files'
What other categories are available options under $Updates = "Critical Updates","Security Updates"
This is the list defined in the PSWindowsUpdates scripts 'Critical Updates', 'Definition Updates', 'Drivers', 'Feature Packs', 'Security Updates', 'Service Packs', 'Tools', 'Update Rollups', 'Updates', 'Upgrades', 'Microsoft'
7:14
Hi Tom its me again, referring to the timeline i posted above, do you have a script that pulls the server names from a .txt file then using that to declare on you $serverlist instead of the manual server name input? id like to see how you integrate that on this existing script you made.
There is a video on PowerShell ping and notify, which incorporates a Server text file as a source, you should be able to integrate that into the windows update scripts. ruclips.net/video/rkhKd_rUGuk/видео.html
@@TomsTechShow great! Ill look it up thank you!
Hi Tom, thanks for the video.
I tried to execute the PSTools\psexec command with parameters and it errors out to Import-Module PSTools.
So I used the Import-Module command and gave exact path to this module.
Import-Module 'C:\Program Files\WindowsPowerShell\Modules\PSTools\PsExec.exe'
Error: ResourceUnavailable: (C:\Program File...ools\PsExec.exe:String)
Any idea whats wrong with this? Am I in the right direction?
You don't import the PSTools, that is run as an external command called through the Powershell command : Start-Process -FilePath wu-launch.bat -ArgumentList $server this then called that batch file. the wu-launch.bat file uses psexec to send the command to the remote computer to start the updates.
Hi Tom, I was able to kick off the wu-launch.bat file from the Start-Process.
The PsExec made the connection to the Server with the credentials and supposed to run the winupdate.bat file that is in the Domain controller/AD server, but looks like that's not happening. I see the message on the powershell window that "Starting cmd on the Server with Process ID" but no response after that. Any idea what is going on?
I create a scripts folder on the server being updated and place the update batch file and the update powershell file there. If the powershell file is run at all you should see the transcript status.txt file.
@@TomsTechShow Hi Tom, I see the status.txt file after I placed the update batch file and ps file in the scripts folder in the server that needs updates. Since the updates are not happening with the scripts, I had to separately run them and found out the scripts need elevated privileges at the server side that needs the updates. So how to do this included in the script when I kick off from the AD server. Any help is appreciated.
VERBOSE: Accept [2] Updates to Download
WARNING: Your security policy don't allow a non-administator identity to perform this task
DONE
Transcript stopped, output file is C:\Scripts\Status.txt
@@saradadoguparthi9896 Hey there, The user that I use to remotely send the command is a Domain Admin and is in the Administrator group on the system being updated.
Will update heppens online with out sccm
Updates can be sourced from either Microsoft servers or a local Windows Update Server