About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

Installing chocolatey software other required softwares for AzureDevOps purpose

Chocolatey is a package manager for Windows that allows you to install and manage software packages from the command line. To install Chocolatey on a Windows 10 machine, you can follow these steps:

Open a new command prompt window and run the following command, these commands will execute one by one and follow software will get installed.


@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

Example:-

C:\Windows\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe " -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

'C:\Users\rakeshkumar\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.

Chocolatey (choco.exe) is now ready.

You can call choco from anywhere, command line or powershell by typing choco.

Run choco /? for a list of functions.

You may need to shut down and restart powershell and/or consoles

 first prior to using choco.

Ensuring Chocolatey commands are on the path

Ensuring chocolatey.nupkg is in the lib folder


C:\Windows\system32>


The command provided abbove is a Windows PowerShell script that installs the Chocolatey package manager and adds it to the system PATH.


Chocolatey is a package manager for Windows that allows you to easily install, update, and manage software packages on your system. It is similar to package managers like apt or yum that are commonly used on Linux systems.


The script begins by calling the PowerShell executable with the -NoProfile, -InputFormat None, and -ExecutionPolicy Bypass options, which allow the script to run without loading a user profile and with unrestricted execution policies.


Next, the script uses the iex command to execute the output of the DownloadString method of the System.Net.WebClient object. This method downloads the install.ps1 script from the Chocolatey website and executes it, which installs the Chocolatey package manager on the system.


Finally, the script sets the system PATH environment variable to include the %ALLUSERSPROFILE%\chocolatey\bin directory, which allows you to use the Chocolatey command-line tools from any location on the system.


Overall, this script installs the Chocolatey package manager and sets it up for use on your system.

choco install azure-cli --yes

choco install kubernetes-helm --yes

choco install kubernetes-cli --yes

choco install notepadplusplus --yes

choco install vscode --yes

choco install 7zip  --yes

choco install git --yes

choco install terraform --yes

Verification:-

Once the installation is complete, you can verify that Chocolatey is installed and working correctly by running the following command

choco --version

choco list -l azure-cli

choco list -l kubectl

choco list -l kubernetes-helm

choco list -l notepadplusplus

choco list -l vscode

choco list -l terraform

choco list -l git

choco list -l 7zip

No comments: