in this project will be all of PhoSend LLC top level registered domains. Each domain has a 'bent' toward subjects and products related to the domain name, we use all .com classic sites, GoDaddy registrar, and currently all are pointed to a common server, awaiting deployment to separate contexts. I have to use this project to organize and transport data among the domain arenas. So i need to have full-control service accounts that can build the individual buckets for both a public facing branch and a private branch of that bucket, i need a set of powershell scripts that can set up the domain's bucket, the current project is phomaster-main, the first bucket is for that, so the bucket i would like to have is phomaster-main, and then i can decide how to branch that bucket into one for a particular domain. please start with the powershell script that uses an environment variable to identify the service acct and creates bucket phomaster-main --authenticate gcloud gcloud auth login gcloud config set project phomaster-main --focus on the project gcloud auth activate-service-account deployer-sa@phomaster-main.iam.gserviceaccount.com --key-file="path/to/key.json" gcloud config set project phomaster-main will allow me to deploy a new domain oriented bucket with a 'Pho-{domain name}' identity and it's 'Pen' name. A Pen name is a 'subject' within our structure, Pens and bucket names have a many to many mapping between them, a Pen (subject) might be affected by several domains, and a domain may affect several Pens. So, can you make me a set of Powershell scripts that will do cloud storage movement for working with that hierarchy? That also involves IAM policies, to start with i need loose policies so i can create what i need, then i would invoke later more restrictive policies once there is production data. (New-Object Net.WebClient).DownloadFile("https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe", "$env:Temp\GoogleCloudSDKInstaller.exe") & $env:Temp\GoogleCloudSDKInstaller.exe https://docs.cloud.google.com/sdk/docs/install-sdk#latest-version Launch the installer and follow the prompts. The installer is signed by Google LLC. Google Cloud CLI requires Python; supported versions are Python 3.10 to 3.14. By default, the Windows version of Google Cloud CLI comes bundled with Python 3. To use Google Cloud CLI your operating system must be able to run a supported version of Python. The installer installs all necessary dependencies, including the needed Python version. While Google Cloud CLI installs and manages Python 3 by default, you can use an existing Python installation if necessary by unchecking the option to Install Bundled Python. See gcloud topic startup to learn how to use an existing Python installation. After installation is complete, the installer gives you the option to create Start Menu and Desktop shortcuts, and start the Google Cloud CLI shell. Uncheck the option to start the shell. You will run and configure the gcloud CLI in the next steps. After you install the gcloud CLI, initialize it to authorize access to Google Cloud and set up a default configuration. For more information, see gcloud init. Run gcloud init to initialize the gcloud CLI: gcloud init By default, this command opens a web browser to authorize access. To authorize from the command line instead, add the --console-only flag. For non-interactive authorization, create a service account with the appropriate scopes in the Google Cloud console, and then use gcloud auth activate-service-account with its JSON key file. Follow the prompts to authorize and configure: When prompted to sign in, accept and then sign in to your Google Account in your browser. Click Allow to grant permission to access resources. From the list of projects for which you have Owner, Editor, or Viewer permissions, select a project. If you have only one project, gcloud init selects it for you. If you have more than 200 projects, you are prompted to enter a project ID, create a project, or list projects. If you choose to create a project, you must also enable billing on it. If you have the Compute Engine API enabled, select a default Compute Engine zone. Welcome to the Google Cloud CLI! Run "gcloud -h" to get the list of available commands. --- Welcome! This command will take you through the configuration of gcloud. Your current configuration has been set to: [default] You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics Network diagnostic detects and fixes local network connection issues. Checking network connection...done. Reachability Check passed. Network diagnostic passed (1/1 checks passed). You must sign in to continue. Would you like to sign in (selecting "Y" will open your browser to the sign-in page where you complete authentication) (Y/n)? ------------------------ md The authentication flow has completed successfully. You may close this window, or check out the resources below. ## Information about command-line tools and client libraries To learn more about Google Cloud CLI commands, see the [gcloud CLI guide](https://docs.cloud.google.com/sdk/gcloud). To learn more about the command-line tools for App Engine, Compute Engine, Cloud Storage, BigQuery, Cloud SQL, and Cloud DNS (which are all bundled with the gcloud CLI), see [Accessing services with the gcloud CLI](https://docs.cloud.google.com/sdk/cloudplatform). If you're a client application developer and want to find out more about accessing Google Cloud services with a programming language or framework, see [Client Libraries Explained](https://docs.cloud.google.com/apis/docs/client-libraries-explained). ## Tutorials Here are some links to help you get started with Google Cloud services: - **Build and deploy a web service to Cloud Run.** To get started, follow the [walkthrough in Cloud Shell Editor](https://ide.cloud.google.com/?walkthrough_tutorial_id=cloud_run_quickstart_index). - **Launch large compute clusters on Compute Engine.** To get started, follow a [Compute Engine quickstart](https://docs.cloud.google.com/compute/docs/quickstart). - **Store vast amounts of data on Cloud Storage.** To get started, follow the [`gcloud storage` tool quickstart](https://docs.cloud.google.com/storage/docs/discover-object-storage-gcloud). - **Analyze Big Data in the cloud with BigQuery.** To get started, follow the [BigQuery command-line tool quickstart](https://docs.cloud.google.com/bigquery/bq-command-line-tool-quickstart). - **Store and manage data using a MySQL database with Cloud SQL.** To get started, see [Managing instances using the gcloud CLI](https://docs.cloud.google.com/sql/docs/mysql/cloud-sdk). - **Make your applications and services available to your users with Cloud DNS.** To get started, see [Getting started with Cloud DNS](https://docs.cloud.google.com/dns/docs/set-up-dns-records-domain-name). ## Feedback Have a question? Ask on [StackOverflow using the "gcloud" tag](http://stackoverflow.com/questions/tagged/gcloud) or check out our [groups page](https://groups.google.com/forum/?fromgroups#!forum/google-cloud-dev). Found a bug? File it in our [issue tracker](https://issuetracker.google.com/issues/new?component=187143) site. ------------------------ md activate the cloud shell on this page, eventually: Cloud Shell Manage your infrastructure and develop your applications from any browser with Cloud Shell. Cloud Shell comes with Cloud SDK gcloud, Cloud Code, an online Code Editor and other utilities pre-installed, fully authenticated and up-to-date. Learn more. Cloud Shell is free for all users. Continue on the page, Welcome to Cloud Shell! Type "help" to get started, or type "gemini" to try prompting with Gemini CLI. To set your Cloud Platform project in this session use `gcloud config set project [PROJECT_ID]`. You can view your projects by running `gcloud projects list`. info@cloudshell:~$ in the separate cmd launched Welcome to the Google Cloud CLI! Run "gcloud -h" to get the list of available commands. --- Welcome! This command will take you through the configuration of gcloud. Your current configuration has been set to: [default] You can skip diagnostics next time by using the following flag: gcloud init --skip-diagnostics Network diagnostic detects and fixes local network connection issues. Checking network connection...done. Reachability Check passed. Network diagnostic passed (1/1 checks passed). You must sign in to continue. Would you like to sign in (selecting "Y" will open your browser to the sign-in page where you complete authentication) (Y/n)? y Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=32555940559.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice.login+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&state=d6tJeFOADRGYe0xi3J8WFIWeYvPY9y&access_type=offline&code_challenge=G2EpWiDLbVWWV26j4K1HWqxaOuHaIQSHIh9oTGNDakI&code_challenge_method=S256 You are signed in as: [info@phosend.com]. Pick cloud project to use: [1] phomaster-main [2] storied-galaxy-485801-c2 [3] Enter a project ID [4] Create a new project Please enter numeric choice or text value (must exactly match list item): choose phomaster-main Your current project has been set to: [phomaster-main]. Not setting default zone/region (this feature makes it easier to use [gcloud compute] by setting an appropriate default value for the --zone and --region flag). See https://cloud.google.com/compute/docs/gcloud-compute section on how to set default compute region and zone manually. If you would like [gcloud init] to be able to do this for you the next time you run it, make sure the Compute Engine API is enabled for your project on the https://console.developers.google.com/apis page. Created a default .boto configuration file at [C:\Users\Administrator\.boto]. See this file and [https://cloud.google.com/storage/docs/gsutil/commands/config] for more information about configuring Google Cloud Storage. The Google Cloud CLI is configured and ready to use! * Commands that require authentication will use info@phosend.com by default * Commands will reference project `phomaster-main` by default Run `gcloud help config` to learn how to change individual settings This gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects. Run `gcloud topic configurations` to learn more. Some things to try next: * Run `gcloud --help` to see the Cloud Platform services you can interact with. And run `gcloud help COMMAND` to get help on any gcloud command. * Run `gcloud topic --help` to learn about advanced features of the CLI like arg files and output formatting * Run `gcloud cheat-sheet` to see a roster of go-to `gcloud` commands. C:\___Fire\Gcloud> Gemini CLI is available in Cloud Shell terminal! Type gemini to try it.