mattmcspirit / azurestack

Azure Stack Resources
80 stars 41 forks source link

Error while running the script #76

Closed rathishrms closed 5 years ago

rathishrms commented 5 years ago

I get the below error, any help is much appreciated.

C:\ConfigASDK\ConfigASDK.ps1 : The term '.\Scripts\GetJobStatus.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

mattmcspirit commented 5 years ago

What do you see in your C:\ConfigASDK\Scripts folder? Can you list the files in there?

Have you tried re-running the script?

Was this a clean system?

Can you provide more of your launch command?

Please email me your zipped log files to asdkconfigurator @ outlook .com and I’ll try to take a look sometime this week.

mattmcspirit commented 5 years ago

Also, is this failure on the 1st run, or a subsequent run?

The reason I ask is, I've seen this error when someone has run the script the first time, then moved the ConfigASDK.ps1 file to another folder/location, and then rerun the script.

When you first run the script, it checks where the ConfigASDK.ps1 file is being run, and saves this location as $scriptLocation. Later, the script downloads a number of additional scripts from GitHub, that it stores in $scriptLocation\Scripts. If the script later fails, and then you change the location of the ConfigASDK.ps1 file, then rerun, the script doesn't download those additional files again, as it assumes you would have just left the ConfigASDK.ps1 file where it was.

If this is the case, you have 2 options:

1) Rerun your script, but make sure you’re using the ConfigASDK.ps1 file from your first run or 2) Find your \Scripts folder from the ConfigASDK.ps1 file location, and copy it to C:\ConfigASDK\ then rerun the script from C:\ConfigASDK\ConfigASDK.ps1

rathishrms commented 5 years ago

i think it was the change in location. Manually copied the scripts folder and now its running. Thanks Matt, appreciate the assistance.