Reference : install windows command
Run this command with powershell ->Administrator
PS C:\Windows\system32> cd ..
PS C:\Windows> cd ..
PS C:\> Set-ExecutionPolicy RemoteSigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PS C:\> Install-Module PSWindowsUpdate
NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\rfaycaldr\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): A
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\rfaycaldr\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): A
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PS C:\> Get-WindowsUpdate
ComputerName Status KB Size Title
------------ ------ -- ---- -----
AYSWDRSVS... -D----- KB890830 73MB Windows Malicious Software Removal Tool x64 - v5.130 (KB890830)
AYSWDRSVS... -D----- KB5046547 72MB 2024-11 Cumulative Update for .NET Framework 3.5, 4.8 and 4.8.1 for Microso...
AYSWDRSVS... -D----- KB2267602 1GB Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (...
AYSWDRSVS... -D----- KB5046616 25GB 2024-11 Cumulative Update for Microsoft server operating system version 21H...
ComputerName Status KB Size Title
------------ ------ -- ---- -----
AYSWDRSVS... -D----- KB890830 73MB Windows Malicious Software Removal Tool x64 - v5.130 (KB890830)
AYSWDRSVS... -D----- KB5046547 72MB 2024-11 Cumulative Update for .NET Framework 3.5, 4.8 and 4.8.1 for Microso...
AYSWDRSVS... -D----- KB2267602 1GB Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (...
AYSWDRSVS... -D----- KB5046616 25GB 2024-11 Cumulative Update for Microsoft server operating system version 21H...
PS C:\> Get-WindowsUpdate -AcceptAll -Install -AutoReboot
No comments:
Post a Comment