Thursday, November 21, 2024

How to run install windows update with 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

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...

PS C:\> Get-WindowsUpdate -AcceptAll -Install -AutoReboot

Friday, November 15, 2024

How to install fish shell and oh my post them

 See link youtube https://www.youtube.com/watch?v=NRGzYzgWFwM

open Terminal

sudo apt install fish -y

chsh -s /usr/bin/fish

sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -o /usr/local/bin/oh-my-posh

sudo rm /usr/local/bin/oh-my-posh

sudo mv posh-linux-amd64 /usr/local/bin/oh-my-posh

sudo chmod +x /usr/local/bin/oh-my-posh

vim ~/.config/fish/config.fish

#add below to file config.fish

oh-my-posh init fish --config $HOME/.poshthemes/montys.omp.json | source

Download font

mkdir -p $HOME/.local/share/fonts

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FiraCode.zip -O $HOME/Downloads/firacode.zip

unzip $HOME/Downloads/firacode.zip -d $HOME/.local/share/fonts

fc-cache -f -v

run Tweaks



open teminal



mkdir ~/.poshthemes

wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/themes.zip -O ~/.poshthemes/themes.zip

unzip ~/.poshthemes/themes.zip -d ~/.poshthemes
chmod  u+rw ~/.poshthemes/*.json
bash -c "$(wget -qO- https://git.io/vQgMr)"
shoose : Everforest Dark Hard

bash -c "$(wget -qO- https://git.io/vQgMr)"

shoose : Everforest Light Hard

finish logout ubuntu

Monday, November 4, 2024

Create certificate with openssl command to install on IIS (windows 2019)

 Create certificate with openssl command to install IIS

#Create csr and praivatekey

openssl genrsa -out faxconkey.key 2048

chmod a-w faxconkey.key

openssl req -out faxconcsr.csr -key faxconkey.key -new -sha256

#copy file .csr and .key to windows server for gen file cert

open browser http://servertest/certsrv/

login: user Administrator domain

passwd:

-> Request certificate

-> Advanced certificate request

-> open file .csr with notepad and copy text file on .csr to generate cer

-> Certificate template : Web Server

-> Submit

-> Download file certificate

-> Convert .cer to .pfx

c:\Program Files\OpenSSL-Win64\bin>openssl pkcs12 -export -in D:\Certificate\test\faxconcer.cer -inkey D:\Certificate\test\faxconKey.key -out D:\Certificate\test\certificate-faxcon.pfx

Enter passwd key:

-> Install file .pfx to IIS server by import