GCloud powershell命令抛出错误,但在cmd中工作正常

GCloud powershell命令抛出错误,但在cmd中工作正常,powershell,windows-10,gcloud,Powershell,Windows 10,Gcloud,当我通过windows cmd提示符运行GCloud comannds时,它会工作 但是,当我通过powershell运行它们时,它会抛出一个红色的错误,但命令会成功完成 例如: 1)验证 gcloud auth activate-service-account xxx@xxx-xxx.iam.gserviceaccount.com --key-file=C:\xxxxx\cred.json 错误: python.exe : Activated service account credent

当我通过windows cmd提示符运行GCloud comannds时,它会工作

但是,当我通过powershell运行它们时,它会抛出一个红色的错误,但命令会成功完成

例如:

1)验证

gcloud auth activate-service-account xxx@xxx-xxx.iam.gserviceaccount.com --key-file=C:\xxxxx\cred.json 
错误:

python.exe : Activated service account credentials for: [xxxx@xxxx.iam.gserviceaccount.com]
At xxxxxxxxxxxx\gcloud.ps1:117 char:3
+   & "$cloudsdk_python" $run_args_array
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Activated servi...iceaccount.com]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
gsutil : Copying file://N:\out\sqlserver\tag.csv [Content-Type=application/vnd.ms-excel]...
At xxxxxxx\RDS_SQLServer_ExportData_DataWarehouse.ps1:38 char:5
+     gsutil cp $outputFile gs://bucketxxx  | out-null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Copying file://...nd.ms-excel]...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
/ [0 files][    0.0 B/  2.8 MiB]                                                
/ [1 files][  2.8 MiB/  2.8 MiB]                                                
Operation completed over 1 objects/2.8 MiB. 
2)将文件上载到存储桶

gsutil cp $outputFile gs://bucketxxx
错误:

python.exe : Activated service account credentials for: [xxxx@xxxx.iam.gserviceaccount.com]
At xxxxxxxxxxxx\gcloud.ps1:117 char:3
+   & "$cloudsdk_python" $run_args_array
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Activated servi...iceaccount.com]:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
gsutil : Copying file://N:\out\sqlserver\tag.csv [Content-Type=application/vnd.ms-excel]...
At xxxxxxx\RDS_SQLServer_ExportData_DataWarehouse.ps1:38 char:5
+     gsutil cp $outputFile gs://bucketxxx  | out-null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Copying file://...nd.ms-excel]...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
/ [0 files][    0.0 B/  2.8 MiB]                                                
/ [1 files][  2.8 MiB/  2.8 MiB]                                                
Operation completed over 1 objects/2.8 MiB.