In this article we are going to cover Download google cloud sdk for windows, install Google Cloud CLI on windows step by step in detailed explaination.
Table of Contents
What is CLI in Google Cloud ?
The Google Cloud CLI (Command Line Interface) is a command-line tool provided by Google Cloud Platform (GCP) that allows you to manage and interact with various services and resources on the Google Cloud platform.
You can use the CLI to perform tasks such as deploying and managing applications, configuring virtual machines, managing storage buckets, working with databases, and more.
Pre-requisite :-
- Windows 8.1 and later and Windows Server 2012 and later
Installation steps of Google cloud CLI on Windows:-
Step #1:Download Google CLI for Windows
The Cloud SDK is the package that includes the Google Cloud CLI. You can download it from the following link based on your operating system:
Google Cloud SDK download page
OR
open power shell terminal and run the below command.
(New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe") & $env:Temp\GoogleCloudSDKInstaller.exe
Step #2:Install Google Cloud CLI on Windows
Launch the downloaded installer and follow the instruction for installing packages. The installer will install all required dependencies including Python 3. (Note: If you already have Python 3 installed, uncheck the “Install Bundled Python” checkbox. Check the “Turn on screen reader mode” checkbox if you use a screen reader.)
Follow the instructions provided by the installer to install the Cloud SDK on your machine. Make sure to select the appropriate components during the installation process.
Click on next until you did not get finish to close setup.
After the click on finish opens a terminal window to execute the command.
Step #3:Authenticate Google Cloud CLI with Gmail
You get message like you must log in to continue? Then enter y.
After your page navigate to sign in google. Choose an account or email id
Click on allow.
You will get authentication message like below
Once the installation is complete, you need to initialize the SDK by running the following command in your terminal or command prompt:
gcloud init
This command will guide you through the process of setting up your GCP account, selecting a project, and configuring authentication.
After initializing the SDK, you’ll need to authenticate by running the following command:
gcloud auth login
- This will open a browser window where you can log in to your Google Cloud account and grant the necessary permissions to the CLI.
Once you have completed the setup, you can start using the Google Cloud CLI by running various commands. The general syntax for executing commands is:
gcloud <service> <command> <flags>
For example, to list the instances in your Compute Engine project, you would run:
gcloud compute instances list
The gcloud
command provides a wide range of services and commands, and you can get detailed help on any command by appending the --help
flag. For example:
gcloud compute instances list --help
This will display the documentation and available options for the specified command.
Note that the Google Cloud CLI supports tab completion, so you can press the Tab key while typing commands to auto-complete them or display available options.
I hope this helps you get started with the Google Cloud CLI! If you have any further questions, feel free to ask.
We have covered Google Cloud CLI on windows Step by step in detailed explaination
Conclusion:
We have covered Download Google CLI for Windows, install Google Cloud CLI on windows, Authenticate Google Cloud CLI with Gmail
Related Articles: