我想做,
https://example.com/dir01/?query=apple¶m=1https://example.com/dir01/?query=apple¶m=1https://example.com/dir01/?query=lemon+juice¶m=1https://example.com/dir01/?query=lemon+juice¶m=0https://example.com/dir01/?query=tasteful+grape+wine¶m=1applelemon+juicetasteful+grape+winehttps://aka.ms/AIAnalyticsDemo
我认为extract或parseurl(url)应该是有用的.我尝试了后者,parseurl(url)但不知道如何将"查询参数"提取为一列.
pageViews
| where timestamp > ago(1d)
| extend parsed_url=parseurl(url)
| summarize count() by tostring(parsed_url)
| render barchart
Run Code Online (Sandbox Code Playgroud)
url
http://aiconnect2.cloudapp.net/FabrikamProd/parsed_url
{"Scheme":"http","Host":"aiconnect2.cloudapp.net","Port":"","Path":"/FabrikamProd/","Username":"","Password":"","Query Parameters":{},"Fragment":""}我想使用Get-AzureRm*Automation Runbook中的命令获取所有属性,但是以下内容返回异常。如何编写代码以正确运行这些命令?
Write-Output $PSVersionTable
$resourceGroupName = "(snipped)"
$appServicePlans = Get-AzureRmAppServicePlan -ResourceGroupName $resourceGroupName
$Cred = Get-AutomationPSCredential -Name "pscred" # works as expected
Add-AzureRmAccount -Credential $Cred
Add-AzureAccount -Credential $Cred
$appServicePlans = `
Get-AzureRmAppServicePlan -ResourceGroupName $resourceGroupName
$appServices = `
Get-AzureRmWebApp -ResourceGroupName $resourceGroupName
$storageAccounts = `
Get-AzureRmStorageAccount -ResourceGroupName $resourceGroupName
Run Code Online (Sandbox Code Playgroud)
通过管理门户中的[测试]
Name Value
---- -----
PSVersion 5.0.10514.2
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.19455
BuildVersion 10.0.10514.2
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
Get-AzureRmAppServicePlan : The …Run Code Online (Sandbox Code Playgroud) 如何传递具有以下消息的异常?
Invoke-RestMethod:{"Message":"ETag不代表资源的最新状态."}
看到参考,我认为"传递If-Match: "*" header"应该是关键,但不知道如何做到这一点.
注意:更新或删除文件时,将应用ETag行为.您可以传递If-Match:"*"标头以禁用ETag检查.
# Kudu auth information creation
$WebSiteName = Get-AutomationVariable -Name 'WebApps_name'
# Example: "WebApps04"
$username = Get-AutomationVariable -Name 'WebApps_deploy_username'
$password = Get-AutomationVariable -Name 'WebApps_deploy_password'
# Above are set by "Asset - Variable" of in Azure Automation account
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
$userAgent = "powershell/1.0"
# Add-content dummy HTML file
$Filename = "sample1.html"
$a = "<HTML><BODY>Sample HTML Data " + $WebSiteName + "</BODY></HTML>"
$a | add-content …Run Code Online (Sandbox Code Playgroud)