. source file

Welcome Forums General PowerShell Q&A . source file

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
1 year, 6 months ago.

  • Author
    Posts
  • #71078

    Participant
    Points: 0
    Rank: Member

    Hi,

    I have a master.ps1 that i am using to run 2 scripts sequentially, it currently just contains

    &"$PSScriptroot\credentialgrabber.ps1"
    &"$PSSscriptroot\LoginHistoryFinal.ps1"

    I receive an error when it gets to the second script: "the term '\LoginHistoryFinal.ps1' us not recognized as the name of a cmdlet, function,script file, or operable program...

    I read somewhere that i might have to . source it? But i can't figure out where to place the '.' The first script runs fine and they are in the same directory as master.ps1 also.

    To note, they both run after master.ps1 is triggered by a .bat file, that just calls master.ps1

    Any ideas? 🙂

  • #71080

    Participant
    Points: 0
    Rank: Member

    Just spotted my spelling mistake... Thank you anyway 😀

The topic ‘. source file’ is closed to new replies.