Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8287849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:09:21+00:00 2026-06-08T12:09:21+00:00

I am new to Powershell and having trouble calling a function contained within a

  • 0

I am new to Powershell and having trouble calling a function contained within a script file.

Can anyone tell me how to do this please.

I have a function defined as follows:

    function Install-BizTalkApplicationTest
{

 param(
  [Parameter(Position=0,Mandatory=$true,HelpMessage="Msi file should be existing")]
  [ValidateScript({Test-Path $_})]
  [Alias("msi")]
  [string]$MsiFile,

  [Parameter(Position=1,HelpMessage="Path wherein the resource file will be installed")]
  [Alias("path")]
  [string]$ApplicationInstallPath,

  [Parameter(Position=2,Mandatory=$true,HelpMessage="Only valid parameters are Local,Dev,Test and Prod")]
  [Alias("env")]
  [ValidateSet("Local","Dev","Prod","Test")]
  [string]$Environment,

  [bool]$BTDeployMgmtDB=$true,
  [bool]$SkipUndeploy=$true
  )

  Write-Host "param MsiFile = {0}" -f $MsiFile

 }

This function is contained in a file called TestScript.ps1

I open a Powershell command window and enter .\Testscript1.ps1. I don’t get any feedback, just taken to the next PS> line.

So I try to execute by entering the function name Install-BizTalkApplicationTest. I then get the error “The term ‘.\Install-BizTalkApplicationTest’ is not recognized as the name of a cmdlet, function, sxript file, or operable program”

Could anyone please advise how to call a function (with params) that is contained within a script file?

Thanks, Rob.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:09:22+00:00Added an answer on June 8, 2026 at 12:09 pm

    To load a script file, you have to prepend with a .. So, in full, . .\Testscript1.ps1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having issues calling the ReportingService2005.FindItems() method from within powershell v2. $rs = New-WebServiceProxy -Uri
I am very new to PowerShell scripting and was experimenting with Function . This
I am pretty new to Powershell and having trouble checking if a number in
I'm rather new to Powershell and am working on setting up my profile.ps1 file.
I'm having a problem here trying to upload a file with powershell. What I'm
I am new to powershell and was trying to use the example script posted
I´m totally new to Powershell and wanted to write a script that deletes all
If I find (or create) a new PowerShell cmdlet (or function), how do I
I'm new to powershell and this question will prove that point. I'm trying a
I'm having trouble figuring out how to get Powershell to call an indexer on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.