How can I call a file from the same folder that I am in (in script)
How about this:
& $pwd\scriptb.ps1
it is possible using $MyInvocation
as follows:
$executingScriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$scriptPath = Join-Path $executingScriptDirectory "scriptb.ps1"
Invoke-Expression ".\$scriptPath"
i use the powershell variable which has an easy name to remember what is it for.
$PSScriptRoot\scriptb.ps1