CURD (Create, Update, Retrieve and Delete) Operation in D365 using Power Shell Script
Connect D365 using below details: Install-Module Microsoft.Xrm.Data.PowerShell -Scope CurrentUser Set-ExecutionPolicy –ExecutionPolicy RemoteSigned –Scope CurrentUser [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 $Username ="APY***@Trailcrm.com" $Password ="apy****" $pwd = ConvertTo-SecureString $Password -AsPlainText -Force $credentials = New-Object System.Management.Automation.PSCredential($Username, $pwd) $conn = Connect-CrmOnline -Credential $credentials -ServerUrl "https://apytrailcrm****.crm.dynamics.com/" -ForceOAuth Create a record using powershell Syntax: New-CrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Fields] <Hashtable> [<CommonParameters>] Ex: $parentId = New-CrmRecord account @{"name"="parent account name"} $parentReference = New-CrmEntityReference -EntityLogicalName account -Id $parentId New-CrmRecord -conn ...