First, we need to install PowerShell Microsoft.Xrm.Data.PowerShell module for the current user blow executing the below script.
![]()
Next, we need to run the below lines of script.
![]()
- This command sets the execution policy for PowerShell scripts to RemoteSigned for the current user scope.
![]()
-
This command sets the security protocol used by the .NET framework for network communications to TLS 1.2.
To connect to a specific environment we need to write two lines of script with username and password and environment URL as shown below.
![]()
Once the above script runs successfully to check CRM is connected, we need to run $conn.
If CRM is connected, we will get IsReady as true. Please refer below screenshot.
![]()
Next, to create a record in the CRM Account entity we need fellow below format.
Syntax
Ex
![]()
Thank you..!