powershell - 如果 PowerShell 中给出了 planName,则查找 Sku

标签 powershell azure powershell-cmdlet sku

我是 AzureAD Powershell 新手。

我有一些ServicePlanName,例如Deskless、SHAREPOINTSTANDARD,我想要对应的SkuID(这里是O365PREMIUM的Skuld)。

我的输入是ServicePlanName,输出应该是SKUID。 我不知道在 PowerShell 中应该使用哪个命令。

谢谢!!

最佳答案

我想您想通过 ServicePlanName 获取 SkuId,请尝试下面的命令,它在我这边工作得很好。

$licenses = Get-AzureADSubscribedSku | Where {$_.ServicePlans.ServicePlanName -eq "yourServicePlanName"}
$licenses.SkuId

enter image description here

关于powershell - 如果 PowerShell 中给出了 planName,则查找 Sku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51265651/

相关文章:

PowerShell Azure Cmdlet 无法识别

azure - 如何在 Azure 云中安装 libvips NetVips - 错误 :Unable to load DLL\ 'libvips-42.dll\' or one of its dependencies

powershell - 检查 URL 状态的脚本

windows - 将 Jenkins 节点暂时离线并使用脚本重新启动 Windows 计算机

SCOM 上的 PowerShell 无法导入模块

c# - 如何确定是否指定了 PowerShell Cmdlet 参数值?

c# - 使用自己的 PowerShell CmdLets 将管理命令发送到我的 C# Windows 服务

Linux 上的 Azure Functions - 没有始终可用的空闲应用程序?

.net - WebRole 和 HttpHandler 中的不同 AppDomain

powershell - 什么是 PowerShell cmdlet?