Terraform Remote-Exec for Windows devices

Terraform remote-exec for windows devices are failing to copy PowerShell file and execute in newly created device but the fact here Terraform continued after execution it indicates that the remote system reported that the script executed successfully.
After successful Execution we checked the device and it shows no file in it.
### Expected Behavior

[null_resource.remote-exec[0] (remote-exec):[C:\Users***>powershell -ExecutionPolicy Unrestricted -File “c:/Users/AppData/Local/Temp/JoinDomain.ps1” “Domain.local” “Testuser@Domain.local” “10.*..
[null_resource.remote-exec[0]: Still creating… [2m50s elapsed][0m
[1mnull_resource.remote-exec[0] (remote-exec):[0mWARNING: The changes will take effect after you restart the computer AUT-7580.
[1mnull_resource.remote-exec[0] (remote-exec):[0mVERBOSE: Performing the operation “Test-ComputerSecureChannel” on target “AUT-7580”.
[1mnull_resource.remote-exec[0] (remote-exec):[0mTrue
[1mnull_resource.remote-exec[0] (remote-exec):[0mVERBOSE: The secure channel between the local computer and the domain ***.local is in good condition.
[1mnull_resource.remote-exec[0]: Creation complete after 3m0s [id=6099486594879622166][[32m
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
### Actual Behavior

[1mnull_resource.remote-exec[0] (remote-exec):[0mC:\Users\nable>powershell -ExecutionPolicy Unrestricted -File “c:/Users//AppData/Local/Temp/JoinDomain.ps1" “Domain.local” “Testuser@Domain.local” "10.
[1mnull_resource.remote-exec[0]: Still creating… [1m50s elapsed][0m
[1mnull_resource.remote-exec[0]: Still creating… [2m0s elapsed][0m
[1mnull_resource.remote-exec[0]: Creation complete after 2m2s [id=406568817569139061][0m
[32m
Apply complete! Resources: 2 added, 0 changed, 0 destroyed

##Configuration block we used in Terraform
resource “null_resource” “remote-exec” {
count = “${var.instances}” # this is the number of VMs i provision

connection {
type = “winrm”
user = var.admin_user
password = var.admin_password
host = one(vra7_deployment.Windows_Desktop[count.index].resource_configuration)[“instances”][count.index][“ip_address”]
}
provisioner “file” {
source = “JoinDomain.ps1”
destination = “c:/Users/***/AppData/Local/Temp/JoinDomain.ps1”
}

provisioner “remote-exec” {
inline = [
“powershell -ExecutionPolicy Unrestricted -File "c:/Users//AppData/Local/Temp/JoinDomain.ps1" "Domain.local" "Testuser@Domain.local" "10..**."”
]
}
What can we do to fix this issue?
We changed the path of the location to store file we mentioned but no luck.