- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试通过 azure devops pipeline() 在 PowerShell 脚本下运行,以将新的专用终结点添加到我的 azure Vnet。不幸的是我遇到了以下错误。
错误:Get-AzWebApp:术语“Get-AzWebApp”未被识别为 cmdlet、函数、脚本文件或可操作的名称程序。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试
azure-pipelines.yml
#Starter pipeline
#Start with a minimal pipeline that you can customize to build and deploy your code.
#Add steps that build, run tests, deploy, and more:
#https://aka.ms/yaml
trigger:
- main
pool:
vmImage: 'windows-latest'
steps:
- task: AzureCLI@2
inputs:
azureSubscription: 'Azure subscription 1(XXXXXX)'
scriptType: 'ps'
scriptLocation: 'scriptPath'
scriptPath: 'PrivateEndpointTest.ps1'
PrivateEndpointTest.ps1
$webapp = Get-AzWebApp -ResourceGroupName ENDPOINTTEST -Name anuendpointtest
## Create the private endpoint connection. ##
$pec = @{
Name = 'myConnection'
PrivateLinkServiceId = $webapp.ID
GroupID = 'sites'
}
$privateEndpointConnection = New-AzPrivateLinkServiceConnection @pec
## Place the virtual network you created previously into a variable. ##
$vnet = Get-AzVirtualNetwork -ResourceGroupName 'ENDPOINTTEST' -Name 'VNET_ENDPOINT_TEST'
## Create the private endpoint. ##
$pe = @{
ResourceGroupName = 'VNET_ENDPOINT_TEST'
Name = 'myPrivateEndpoint'
Location = 'North Europe'
Subnet = $vnet.Subnets[0]
PrivateLinkServiceConnection = $privateEndpointConnection
}
New-AzPrivateEndpoint @pe
最佳答案
请尝试Azure PowerShell 任务
并选择最新版本。
Azure CLI 需要以管理员身份运行以下命令:
Install-Module Az
Import-Module Az
如果要使用 Azure CLI,请考虑使用自托管代理。
Similar thread供您引用。
关于azure - Get-AzWebApp : The term 'Get-AzWebApp' is not recognized as the name of a cmdlet, 函数 - Azure Devops,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73880267/
我正在尝试通过 azure devops pipeline() 在 PowerShell 脚本下运行,以将新的专用终结点添加到我的 azure Vnet。不幸的是我遇到了以下错误。 错误:Get-Az
如何修改下面的命令以将订阅名称包含在 CSV 文件中资源组名称之后?我虽然缺少参数是“订阅”,但它返回空白值。谢谢! $Subscriptions = Get-AzSubscription f
我目前正在构建一个脚本来自动创建 Azure Web 应用程序。前端是用 React 构建的并且部署得很好。后端是使用node构建的,发布时不会运行。我认为默认情况下 New-AzWebApp 创建一
我目前正在构建一个脚本来自动创建 Azure Web 应用程序。前端是用 React 构建的并且部署得很好。后端是使用node构建的,发布时不会运行。我认为默认情况下 New-AzWebApp 创建一
我目前正在构建一个 powershell 脚本,该脚本在 azure 中创建 2 个 Web 应用程序服务,然后发布应用程序。第一个应用程序是一个 React 应用程序,已发布。使用 Node.js
如何执行 Azure Powershell 命令 New-AzWebApp 以选择 .NET Core 作为堆栈?我看不到任何可以提供帮助的参数和文档。 https://learn.microsoft
我尝试使用 Get-AzWebApp PowerShell 命令获取 azure 应用服务列表,然后读取每个服务的配置/连接字符串。如果每个应用程序服务的 web.config 将连接字符串存储在单独
这似乎是一个相当简单的任务,我还有许多其他例子,人们以类似的方式实现了它。但不知怎的,这对我不起作用。这是我的脚本。 $webapp = Get-AzWebApp -Name $webappname
出于部署目的,我创建了一个 PowerShell 脚本来设置应用设置。这通过工作正常 $currentAppSettings = $app.SiteConfig.AppSettings $appSet
我是一名优秀的程序员,十分优秀!