我有以下脚本代码
#[string]$password = $( Read-Host "Input password, please" )
param (
[string]$ReleaseFile = $(throw "-ReleaseFile is required"),
[string]$Destination = $(throw "-Destination is required")
)
function unzipRelease($src, $dst)
{
$shell = new-object -com shell.application
$zip = $shell.NameSpace($src)
foreach($item in $zip.items())
{
$shell.Namespace($dst).copyhere($item)
}
}
# .\deployrelease.ps1 -ReleaseFile ".\deploy.zip" -Destination "."
unzipRelease –Src '$ReleaseFile' -Dst '$Destination'
Run Code Online (Sandbox Code Playgroud)
我运行脚本:.\ deployrelease.ps1 -ReleaseFile".\ deploy.zip"-Destination"."
但我一直这样说:
PS C:\Users\Administrator\Documents\Tools> .\deployrelease.ps1 -ReleaseFile ".\deploy.zip" -Destination
The string starting:
At C:\Users\Administrator\Documents\Tools\deployrelease.ps1:19 char:16
+ unzipRelease â? <<<< "Src '$ReleaseFile' -Dst '$Destination'
is …Run Code Online (Sandbox Code Playgroud) 我使用Azure Active Directory PowerShell V2编写了我的Azure Active Directory应用程序的脚本,并尝试在单页应用程序(SPA)中使用委派权限,使用隐式流来调用定义了应用程序角色的API.
我需要使用什么PowerShell命令来复制"应用程序设置"下Azure门户中的"授予权限"按钮:
根据文件:
使用ADAL.js的单页面应用程序(SPA)当前需要使用"授予权限"按钮授予显式同意,因为在未经同意提示的情况下请求访问令牌,如果尚未授予同意,则会失败.
另外,您如何判断是否已授予权限?按钮始终可点击?如果你问我,可怕的用户体验.
powershell azure azure-active-directory azure-ad-powershell-v2
尝试使用Powershell自动执行Azure应用注册过程
在使用powershell分配api权限后,需要一些帮助来为应用授予授予权限,任何人都可以帮我这个忙。
除了Powershell之外,还有没有其他更好的方法来自动化Azure App reg流程?
permissions powershell automation azure azure-active-directory