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 883433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:35:17+00:00 2026-05-15T12:35:17+00:00

I have a main script that is calling on several others scripts and I

  • 0

I have a main script that is calling on several others scripts and I need to load the variables from the other scripts into the main script so that I can dump them into a html file. I tried dot sourcing the scripts I am calling on but that did not work or I am doing something wrong. Any help would be appreciated.

Example section of script:

.\get-cluster.ps1

$MyReport += Get-CustomHeader "Clusters not in compliance : $($CapacityInfo.count) ($MyReport += Get-HTMLTable $capacityinfo
$MyReport += Get-CustomHeaderClose

The variable $capacityinfo exists in the get-cluster.ps1 script

  • 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-05-15T12:35:17+00:00Added an answer on May 15, 2026 at 12:35 pm

    Unless your get-cluster.ps1 file is in your root dir, dot source would look more like this:

    . .\Get-Cluster.ps1
    

    This will execute the Get-Cluster.ps1 script in the same scope as the caller making its script level variables available in the caller.

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

Sidebar

Related Questions

Let's assume I have a main script, main.py, that imports another python file with
I have a KornShell (ksh) script that logins into SQL*Plus and executing a script.
I am calling the following script from my main Perl program. The script takes
I have a python script that calls another python script. Inside the other python
The java have a script manager that allow java calling javascript, like this: import
I have a javascript function that I am calling from an image onClick event
In my main script, I am doing some archive manipulation. Once I have completed
I have a vm.py in the same directory as the main() script ( getdata.py
I have a html main.html as given ----- main.html---------------- <title>FlexTrail</title> <script src=main.js></script> <frameset rows='200,200'>
Say I have a PHP script, //main.php -> PID = 1002 <?php exec('ProcessOne'); exec('ProcessTwo');

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.