Remote powershell to a VM in a different domain/network

Hello,
title is pretty much it. I have a VM hosted on a machine in different network/domain and im having trouble getting the correct syntax/procedure. To be more specific, the server hosts a VM which serves as the DC, i’d like to manage the activedirectory on that DC remotely. Can i powershell to the VM correctly? Or do i need to remote to the host first and then to the VM?
For what its worth, we have a VPN that enables me to remote-desktop directly to the VM via ip, but im dont know how to incorporate that into the shell.

Thanks in advance for any recommendation/ideas!

You can directly connect to and manage the VM via ‘Enter-PSSession’.
What have you tried?

To clarify, im on my PC in domain A. The VM - lets call it VM1 is located on a hyperV host on Server B in domain B. We have a site-to-site trust/vpn established between domain A and domain B.

So my syntax goes:
Enter-PsSession -computername VM1 -credential domainB\adminaccountofdomainB

i get this erorr : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: We can’t sign you in with this credential because your domain isn’t available. Make sure your device is connected to your organization’s network and try again. If you previously signed in on this device with another credential, you can sign in with that credential.

Have you tried adding:

-Authentication 'Negotiate"

I ran into the same issue with Invoke-Command and that was the fix.

I get the following error: WinRM cannot process the request. The following error with error code 0x8009030e occurred while using Negotiate authentication: A specified logon session does not exist. It may already have been terminated.
This can occur if the provided credentials are not valid on the target server, or if the server identity could not be verified. If you trust the server identity, add the server name to the TrustedHosts list, and then retry the request. Use winrm.cmd to view or edit the TrustedHosts list. Note that computers in the TrustedHosts list might not be authenticated. For more information about how to edit the TrustedHosts list, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.

Sorry for the late reply. You did check the Trusted Hosts entry did you not? Sounds like that is now your issue.