简体   繁体   English

使用 PowerShell 从 Dynamics CRM(在线)检索帐户实体名称列表

[英]Retrieve list of account entity names from Dynamics CRM (Online) using PowerShell

I wanted to know if it is possible to retrieve a list of all account names using PowerShell?我想知道是否可以使用 PowerShell 检索所有帐户名称的列表? Basically if you run the following URL in your browser https://OrgURL/api/data/v9.2/accounts?$select=name you will get the below result:基本上,如果您在浏览器 https://OrgURL/api/data/v9.2/accounts?$select=name 中运行以下 URL ,您将得到以下结果:

在此处输入图像描述

Is it possible to get a similar result in PowerShell with the Display names of the account records?是否可以在 PowerShell 中使用帐户记录的显示名称获得类似的结果?

Take a look into Invoke-WebRequest .看看Invoke-WebRequest

In order to connect to a Dynamics 365/Dataverse instance using PowerShell, you have two options:要使用 PowerShell 连接到 Dynamics 365/Dataverse 实例,您有两个选项:

  1. Invoke-WebRequest as the other answer (but you need to provide at least the bearer token in order to authenticate the requests) Invoke-WebRequest 作为另一个答案(但您至少需要提供不记名令牌才能对请求进行身份验证)
  2. this cmdlet: Microsoft.Xrm.Data.PowerShell https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell此 cmdlet:Microsoft.Xrm.Data.PowerShell https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell

Found the issue - the application account did not have the rights to view acc records.发现问题 - 应用程序帐户没有权限查看 acc 记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Powershell的Dynamics CRM Online V 9部署软件包-问题 - Dynamics CRM online V 9 Deploy packages using powershell - issues 通过Powershell与应用程序用户在线连接到Dynamics CRM - Connect with Powershell to Dynamics CRM online with application user 使用 Azure Powershell(AZ 模块)为 Dynamics CRM Online 设置 Azure Ad Api 权限 - Setting Azure Ad Api permission for Dynamics CRM Online using Azure Powershell (AZ Module) 列出Dynamics CRM 2013/2015中的实体关系 - List Entity Relationships in Dynamics CRM 2013/2015 使用Powershell和CSOM检索Sharepoint在线组 - Retrieve Sharepoint online groups using Powershell and CSOM CRM Online - 使用 Powershell 创建电子邮件服务器配置文件 - CRM Online - Create email server profile using Powershell 如何在线连接 PowerShell 与 CRM? - How to connect PowerShell with CRM online? Powershell使用CSOM API从Sharepoint在线获取列表项 - Powershell get list items from Sharepoint online using CSOM API 如何使用PowerShell从Sharepoint Online列表中获取项目? - How to get items from a Sharepoint Online list using PowerShell? 是否可以使用Powershell添加和配置Dynamics CRM工作流程 - Is it possible to add and configure Dynamics CRM workflows with Powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM