Azure Automation access to VM vs DevOps Winrm Access

We have a VM that prevents us from running File copy commands or PowerShell execution from DevOps(WindowsMachineFileCopy@2, PowerShellOnTargetMachines@3). As Winrm is disabled. But it allows azure automation to run scripts inside the VM. How is Azure automation different in accessing the VM than Azure DevOps? Is it possible to use the same feature in Azure DevOps Automation?