我正在尝试从PowerShell上的Citrix Odata API中提取数据,仅某些用户及其会话的登录和注销时间。
它给了我以下错误:
Invoke-RestMethod : An error occurred while processing this request.
The method 'First' can only be used as a final query operation.
Consider using the method 'FirstOrDefault' in this instance instead.
在下面的代码行上:
$userdata = Invoke-RestMethod -uri "http://localhost/Citrix/Monitor/Odata/v1/Data/Users" -Credential $cred
否,我在脚本上的任何位置都使用任何“ First”方法。非常感谢您的帮助,谢谢!