Run ps1 on secondary domain

I need a way to run some scripts in a child domain. I launch scripts using a batch file like below.

@echo off
Powershell.exe -windowstyle hidden -executionpolicy bypass -File .\script.ps1

I can shift + right click the batch file and use creds from 2nd domain but get an error “Logon failure: the user has not been granted the requested logon type at this computer”

How can I run scripts in a secondary domain?

I think, there is some group policy blocking you in doing this. You may try disabling all policies if feasible to verify this.

Tried that but it still ran on the parent domain not the child domain.

Using which user are you trying to execute it on child domain ? This is of course some because of policies.