尝试使用Invoke-RestMethod

问题描述

我正在尝试从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”方法。非常感谢您的帮助,谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)