Hi @AATester ,
If both scripts are in the same folder maybe this helps.
First script:
# Script-file JustAtest.ps1 with function
function ABCDE{
[CmdletBinding()]
param (
$ComputerName
)
Write-Output $ComputerName
}
Second script calling the fist script:
# Script Call-Script.ps1 calling another script "JustAtest.ps1" in the same folder
# relative path
.\JustAtest.ps1
ABCDE -ComputerName Computer12
# fullpath
C:\Junk\JustAtest.ps1
ABCDE -ComputerName Computer13
# fullpath
& "C:\Junk\JustAtest.ps1"
ABCDE -ComputerName Computer14
# fullpath
. "C:\Junk\JustAtest.ps1"
ABCDE -ComputerName Computer15
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten