google-cloud-powershell icon indicating copy to clipboard operation
google-cloud-powershell copied to clipboard

gcloud components update didn't add new powershell components

Open SurferJeffAtGoogle opened this issue 8 years ago • 3 comments

Specifically, I'm looking for the sql command described here: https://cloud.google.com/tools/powershell/docs/sql/setup

PS C:\Users\root\workspace\dotnet-docs-samples-deploy\appengine\flexible\StaticContent> get-command *sql*
PS C:\Users\root\workspace\dotnet-docs-samples-deploy\appengine\flexible\StaticContent> get-command *gcs*

CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Alias           gcs -> Get-PSCallStack
Cmdlet          Find-GcsObject                                     GoogleCloudPowerShell
Cmdlet          Get-GcsBucket                                      GoogleCloudPowerShell
Cmdlet          Get-GcsObject                                      GoogleCloudPowerShell
Cmdlet          New-GcsBucket                                      GoogleCloudPowerShell
Cmdlet          New-GcsObject                                      GoogleCloudPowerShell
Cmdlet          Read-GcsObject                                     GoogleCloudPowerShell
Cmdlet          Remove-GcsBucket                                   GoogleCloudPowerShell
Cmdlet          Remove-GcsBucketLogging                            GoogleCloudPowerShell
Cmdlet          Remove-GcsBucketWebsite                            GoogleCloudPowerShell
Cmdlet          Remove-GcsObject                                   GoogleCloudPowerShell
Cmdlet          Test-GcsBucket                                     GoogleCloudPowerShell
Cmdlet          Write-GcsBucketLogging                             GoogleCloudPowerShell
Cmdlet          Write-GcsBucketWebsite                             GoogleCloudPowerShell
Cmdlet          Write-GcsObject                                    GoogleCloudPowerShell

PS C:\Users\root\workspace\dotnet-docs-samples-deploy\appengine\flexible\StaticContent> gcloud --version
Google Cloud SDK 145.0.0
beta 2016.01.12
bq 2.0.24
bq-win 2.0.24
bundled-python 2.7.10
core 2017.02.21
core-win 2016.11.07
gcloud
gcloud-deps 2017.02.21
gcloud-deps-windows-x86_64 2017.02.21
gsutil 4.22
gsutil-win 4.20
powershell 1.0.0.3
windows-ssh-tools 2016.05.13

SurferJeffAtGoogle avatar Feb 23 '17 21:02 SurferJeffAtGoogle

This didn't help either:

  gcloud components --help
PS C:\Users\root> gcloud components install powershell

All components are up to date.
PS C:\Users\root>

SurferJeffAtGoogle avatar Feb 23 '17 21:02 SurferJeffAtGoogle

@SurferJeffAtGoogle, can you try running "Get-Command -Module GoogleCloud"?

quoctruong avatar Feb 23 '17 22:02 quoctruong

@SurferJeffAtGoogle One other thing that would be useful, could you show us your $Env:PSModulePath variable?

gcloud components update powershell should give you the latest bits, which should definitely include the Cloud SQL cmdlets. However, assuming you installed one of the first versions of the Cloud SDK with PowerShell, you could be picking up an older module? (e.g. the "GoogleCloudPowerShell" module, not the newer "GoogleCloud" module.) (Yes this is confusion, yes, I feel bad about it.)

Anyways, if you uninstall and reinstall the Cloud SDK that might fix the issue. But it should "just work". So if it isn't, I would like to know why.

chrsmith avatar Feb 25 '17 00:02 chrsmith