Step 1.
$conn = Get-CrmConnection -InteractiveMode
$conn.BypassPluginExecution = $true
$conn = Get-CrmConnection
InteractiveMode: This command initiates an interactive session to prompt the user for login credentials and establish a connection to Dynamics CRM. Upon successful connection, the connection object is stored in the $conn variable.
$conn.BypassPluginExecution = $true
This line sets the BypassPluginExecution property of the $conn object to $true, indicating that plugin execution should be bypassed for operations performed through this connection.
Step 2. Set-CrmRecordState -conn $conn -EntityLogicalName account -Id 63b5066c-cecf-ee11-904d-6045bdad183f -StateCode 1 -StatusCode 2
Step 3. Set-CrmRecordState -conn $conn -EntityLogicalName account -Id 63b5066c-cecf-ee11-904d-6045bdad183f -StateCode 0 -StatusCode 1
Step 4. Set-CrmRecordState -conn $conn -EntityLogicalName account -Id 63b5066c-cecf-ee11-904d-6045bdad183f -StateCode Inactive -StatusCode Inactive
Step 5. Set-CrmRecordState -conn $conn -EntityLogicalName account -Id 63b5066c-cecf-ee11-904d-6045bdad183f -StateCode active -StatusCode active