Calling all PowerShell gurus!
I'm trying to use the Get-AzureRmDataFactoryV2ActivityRun cmdlet in the azurerm PowerShell Module.
When I attempt a query, it says:
Get-AzureRmDataFactoryV2ActivityRun : HTTP Status Code: NotFound
Error Code: NotFound
Error Message: Operation returned an invalid status code 'NotFound'
Request Id: aea5f9c5-fced-4b03-929f-e071eaeb0d9e
Timestamp (Utc):10/25/2017 19:56:43
At line:1 char:1
+ Get-AzureRmDataFactoryV2ActivityRun -DataFactoryName nwmovdatafactory ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmDataFactoryV2ActivityRun], ErrorResponseException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryActivityRunCommand
If I try and use the previous implementation of this cmdlet, Get-AzureRmDataFactoryRun it works just fine. HOWEVER, it will ALSO throw the same error as above if I do not first Select-AzureRMSubscription.
Furthermore, Select-AzureRMSubscription before running Get-AzureRMDataFactoryV2ActivityRun DOES NOT resolve the issue. Is there a different way I should be setting my active subscription? Or is just just a fake solution?
EDIT:
Login-AzureRMAccount -SubscriptionID SUBID
Get-AzureRmDataFactoryRun -DataFactoryName DATAFACTORY -DatasetName DATASET -StartDateTime 2017-10-25T19:34:18+00:00 -ResourceGroupName RESGROUP
Will work.
Login-AzureRMAccount -SubscriptionID SUBID
Get-AzureRmDataFactoryV2ActivityRun -DataFactoryName DATAFACTORY -ResourceGroupName RESGROUP -PipelineRunId PIPELINENAME -RunStartedAfter 2017-10-25T19:34:18+00:00 -RunStartedBefore 2017-10-26T19:34:18+00:00
Will not work.
It appears the answer to this question is that DataFactoryv2 is an entirely different resource.
https://learn.microsoft.com/en-us/azure/data-factory/introduction
Related
I'm trying to create a new AzureAD application by using the Azure Active Directory Powershell 2.0 module, however after calling the New-
AzureADApplication I get a HTTP Bad requset with the following error.
+ New-AzureADApplication -DisplayName "Umbraco-domea" -IdentifierUris $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADApplication], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.NewApplication
I found the following github issue with a bit of googling, however even by including the -IdentifierUris in my cmdlet call I still get the error.
New-AzureADApplication -DisplayName $displayName -IdentifierUris $URIs -GroupMembershipClaims "SecurityGroup" -ReplyUrls #($Live",$Dev,"http://localhost:4198/")
The following script works for me, maybe you could test.
$displayName="shuitest"
$URIs="http://mynewapp.contoso.com"
$Live="https://localhost:8080"
$Dev="https://localhost:8081"
New-AzureADApplication -DisplayName $displayName -IdentifierUris $URIs -GroupMembershipClaims "SecurityGroup" -ReplyUrls #($Live,$Dev,"http://localhost:4198/")
If you also get same error log, begin your script add $DebugPreference="Continue" to produce additional debugging information.
I am trying to Access my Azure AD using Powershell I am getting the below error
Powershell Error screenshot as below
Any one please help me to understand why i am getting this error.
Thanks in advance.
Error Message :
PS C:\Users\YYYYY> Connect-MsolService -Credential $password
Connect-MsolService : Authentication Error: Unable to complete
authentication request (potentially a proxy issue) At line:1 char:1
+ Connect-MsolService -Credential $password
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.Online.Administration.Automation.ConnectMsolService
I am working with classic resources in Azure. I am running Azure powershell version 2.0.1 (updated it to see if that solved the issue below).
I was wanting to check my list of VIPS, and am running some script I had for this in powershell.
$deployment = Get-AzureDeployment -ServiceName servicenamehere
$deployment.VirtualIPs
I am now getting the error
Get-AzureDeployment : Account with name '' does not exist.
Parameter name: accountName
At line:1 char:15
+ $deployment = Get-AzureDeployment -ServiceName servicenamehere
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureDeployment], ArgumentException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.GetAzureDeploymentCommand
A variety of other statements return with the same error "Account with name '' does not exist." This was all executed after logging in and selecting my subscription, which works fine:
Add-AzureAccount
Select-AzureSubscription -SubscriptionName "subscriptionnamehere"
Any ideas on what is occurring on the statements that makes them fail with this accountName issue? Unsure if this has to do with resource manager changes or anything else new added in the last few months in Azure.
Other statements fail with the same error. Example
Add-AzureVirtualIP -VirtualIPName newvipname -ServiceName servicenamehere
Gives the same error
Add-AzureVirtualIP : Account with name '' does not exist.
Parameter name: accountName
You need to add the qouteation mark when adding a string.
Select-AzureSubscription -SubscriptionName "subnamame" -Account "acname"
This is typically required, especially when you have more then 1 parameter.
I want to automate creation of an Azure Website and am using the following PowerShell command:
New-AzureWebsite -Git -Location "West US" -Name mynewsite -PublishingUsername myuser
It creates the website just fine, but at the end it throws the following error:
New-AzureWebsite : Invalid URI: The hostname could not be parsed.
At line:1 char:1
+ New-AzureWebsite -Git -Location "West US" -Name crmp-ebb-uat -PublishingUsername ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureWebsite], UriFormatException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Websites.NewAzureWebsiteCommand
I can just ignore this error, but it seems messy. Does anyone know what might be causing this?
UPDATE: This error seems to be related to the -Git parameter. If I leave off the -Git parameter, it succeeds without the error. With the -Git parameter, even though I get the error, the Git repository is still setup correctly. Since there doesn't seem to be a way to setup the Git repository outside of the New-AzureWebsite cmdlet, I still have to live with this error.
When I run the following Powershell cmdlet (from the Azure Management Tools Snapin):
get-osversions -subscriptionId **** -certificate (get-item cert:\CurrentUser\MY\******)
I get the following error message:
Get-OSVersions : The remote server returned an unexpected response: (407) Proxy Authenti
cation Required.
At line:1 char:15
+ get-osversions <<<< -subscriptionId * -certificate
(get-item cert:\CurrentUser\MY*****)
+ CategoryInfo : CloseError: (:) [Get-OSVersions], ProtocolException
+ FullyQualifiedErrorId : Microsoft.Samples.AzureManagementTools.PowerShell.HostedS
ervices.GetOSVersionsCommand
Get-OSVersions : Object reference not set to an instance of an object.
At line:1 char:15
+ get-osversions <<<< -subscriptionId * -certificate
(get-item cert:\CurrentUser\MY***)
+ CategoryInfo : CloseError: (:) [Get-OSVersions], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.Samples.AzureManagementTools.PowerShell.HostedS
ervices.GetOSVersionsCommand
It seems that the internet proxy server here is denying the script the access it requires.
I've had a good look around on the internet and it seems that there is no easy way around this problem since this cmdlet does not have a valid "-credentials" or proxy server parameter.
I know there is a 'Get-Credential' cmdlet but I don't think it helps. How would you pass the credential to the Azure cmdlet?
Can anyone think of any way to get around this issue?..
...other than using a different non-proxied internet connection?
I'm stumped.
Many Thanks for your time.
Easier:
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
A few customers I know were successful using the method outlined here (Supporting Basic Auth proxies). If you need other proxy types, it follows the same pattern. The nice thing about this is it does not require changing the cmdlets.