microsoft / MSLab

Azure Stack HCI, Windows 10 and Windows Server rapid lab deployment scripts
MIT License
1.2k stars 288 forks source link

Include 0_Shared.ps1 fails #376

Closed hhulsman closed 4 years ago

hhulsman commented 4 years ago

Hi, happy using WSLab!

I got an error executing Prereq.ps1 at line 19: . .\0_Shared.ps1 I got it working changing line 19 to: . "$PSScriptRoot\0_Shared.ps1" (similar to line 38) Working with Windows PowerShell 5.1, not sure if this has something to do.

hhulsman commented 4 years ago

Ah, the same happens in CreateParentDisks, Deploy and Cleanup

machv commented 4 years ago

Hi, thank you for pointing this out. It should be fixed now and you can run scripts in the Scripts folder also when the repo is downloaded (or cloned) from a Github.

But I'd like use this issue to mention that a better way (and also our intention) to run WSLab scripts is via a zip archive that is built from this git repository. In the past, this ZIP file was stored in the git repository, and recently we switched to using a native Releases feature of Github, where all releases are available at https://github.com/microsoft/WSLab/releases. Also, we have a static direct link to the latest WSLab release on http://aka.ms/wslab/download which is updated automatically when we create a new version.

This built ZIP file is more optimized, e. g. the file 0_Shared.ps1 is in-lined to the rest of the scripts to keep the number of WSLab files as low as possible. Compared to the git repository where I tend to split those scripts to multiple independent files for a better supportability on our side.

Vladimír

hhulsman commented 4 years ago

Hi Vladimir,

thank you for that information. However, I have a need to customize the scripts, since I'm using the spanish version of Windows Server 2016. The scripts have some fixed values, for example 'Administrator' that I need to convert to it's spanish value 'Administrador'.

I am modifying this by adding values in LabConfig, and their corresponding changes to the code. In case you would be interested in adding localization to WSLab, I'd be happy to share the code.

Cheers, Harmen

El mar., 28 jul. 2020 a las 17:26, Vladimír (notifications@github.com) escribió:

Hi, thank you for pointing this out. It should be fixed now and you can run scripts in the Scripts folder also when the repo is downloaded (or cloned) from a Github.

But I'd like use this issue to mention that a better way (and also our intention) to run WSLab scripts is via a zip archive that is built from this git repository. In the past, this ZIP file was stored in the git repository, and recently we switched to using a native Releases feature of Github, where all releases are available at https://github.com/microsoft/WSLab/releases. Also, we have a static direct link to the latest WSLab release on http://aka.ms/wslab/download which is updated automatically when we create a new version.

This built ZIP file is more optimized, e. g. the file 0_Shared.ps1 is in-lined to the rest of the scripts to keep the number of WSLab files as low as possible. Compared to the git repository where I tend to split those scripts to multiple independent files for a better supportability on our side.

Vladimír

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/WSLab/issues/376#issuecomment-665106890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZIDD6RY64FVOETGOTXQGTR53UYXANCNFSM4PKP7JAA .