I am able to run the below sample script from command line when on the box but facing issues while attempting to run the same script from controlm.
# mailtest.ps1