Quote:
Originally Posted by th_mi
I tested it, for me it worked perfectly exactly the way I described. I used the script I posted here and also the exec call. The only thing I did was addeng the path to the powershell.exe and also to the test.ps1.
It worked as expected!
|
Hi th_mi when we are writing with out a function it is working fine but when I create the script as follows it didn't worked for me
function CallMe
{
Param([Parameter(Mandatory=$False)][string]$param1="")
Write-host "Parameter: $param1"
}
This is working fine
Param([Parameter(Mandatory=$False)][string]$param1="")
Write-host "Parameter: $param1"