我正在尝试在 PowerShell 中执行以下命令,但我不知道如何转义作为 URL 一部分的 & 符号
az rest `
--method GET `
--uri ("https://graph.microsoft.com/v1.0/groups?`$count=true&`$filter=startsWith(displayName,'some+filter+text')&`$select=id,displayName") `
--headers 'Content-Type=application/json'
Run Code Online (Sandbox Code Playgroud)
由于 & 字符用于启动新命令,因此它会破坏 url 并希望执行其余部分。
有没有办法告诉 powershell 不要这样做?
powershell ×1