Powershell Best Practices for Custom Action in Microsoft AD SpokeSummaryPowershell best practices for creating custom actions in Microsoft AD Spoke.InstructionsPass -server $computer -credential $cred to all the AD cmdlets so that the credentials are explicitly passed for authentication against the specified host from the connection record.Example:Get-ADUser -Identity $userName -Credential $cred -Server $computer -Properties * -ErrorAction Stop; Do not edit existing Powershell scripts shipped with the spoke especially the ActiveDirectoryMain module as it may hamper the functionality of other actions. These scripts are used by multiple actions across the spoke.Ensure there is an input variable in PowerShell step of the custom action with Name as 'credType' and Value as 'AD'. This will ensure the authentication is performed against AD[Domain Controller] correctly.