473,230 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

Powershell getting empty subscription info when I login Azure

154 100+
Hi I am trying to login Azure with powershell workflow and I get this result after authentication.

When i run this command in a powershell workflow and login withthe popup window I get the below empty subscription info.

When I do a normal powershell without workflow I get the subscription information back correctly.

Expand|Select|Wrap|Line Numbers
  3. Environment           : 
  4. Account               : 
  5. TenantId              : 
  6. SubscriptionId        : 
  7. SubscriptionName      : 
  8. CurrentStorageAccount : 
  9. PSComputerName        : localhost
I even tried saving the context outside the workflow and tried to use the context but got the error.
Expand|Select|Wrap|Line Numbers
  1. # Setup – First login manually 
  2. Add-AzureRmAccount 
  4. # Now save your context locally (Force will overwrite if there) 
  5.     $ContextLocation=C:\Context\test
  7. $path = "$ContextLocation\ProfileContext.ctx"
  8. Save-AzureRmContext -Path $path -Force 
  10. #Once that’s done, from then on you can use the Import-AzureRmContext to automate the login.
  13. # Once the above two steps are done, you can simply import  
  14. Import-AzureRmContext -Path $path 
  16. I got this error:
  17. Run Login-AzureRmAccount to login.
  18.     + CategoryInfo          : InvalidOperation: (:) [Remove-AzureRmResourceGroup], PSInvalidOperationException
  19.     + FullyQualifiedErrorId : InvalidOperation,Microsoft.Azure.Commands.Resources.RemoveAzureResourceGroupCmdlet
  20.     + PSComputerName        : [localhost]
How can i get this to return the subscription info using powershell workflow? Could someone help please.
Aug 28 '17 #1
0 4687

Sign in to post your reply or Sign up for a free account.

Similar topics

by: ivan_oj28 | last post by:
Hi, I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on...
by: Yoshitha | last post by:
Hi I am working on a web project. I have a InstallerClass in my project. While making setup ( using web setup template) for this web application, I have added a userinterface with 4...
by: kpg | last post by:
Hi All, I have an asp.net project that uses an ActiveX component on the server side and I would like the login page to show the version number of this component. The ActiveX component is...
by: ronchese | last post by:
I'm noticing this since I started developing a website project: my session variables are getting empty! I did a real easy test, and I checked my session variable is getting empty!! What is...
by: =?Utf-8?B?VGRhclRkYXI=?= | last post by:
Hello, I want to get reffering site info like if the way they got to the site is from google, While that is easy enough, of course, but I want to get that info after they have been on the site for...
by: cutlass | last post by:
Need help in thus script. Trying to create the script that uses comparison operators and functions to compare two strings entered by user. When I add in the info in the script section everything...
by: Ghirai | last post by:
On Saturday 16 August 2008 12:16:14 Fredrik Lundh wrote: Thanks, that seems to be getting me very close of what i need. -- Regards, Ghirai.
by: kaushiki sinha | last post by:
My laptop is not getting connected with modem. When connected it produces error "Host process for Windows services stopped working and was closed". please solve my problem.
by: shaliniraji | last post by:
Hi everyone, I'm trying to take print out from C#(winforms) Gridview,when I give print I'm getting empty sheet out not printing data's on the paper and not getting any error too..Can...
by: auhom | last post by:
Sorry for posting an excel problem here I am maintaining an excel sheet using references from other worksheet of a same workbook . I want to save the data as xml data. Problem is when i save is as...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.