-
Notifications
You must be signed in to change notification settings - Fork 76
Cannot index into a null array. #194
Comments
Can you run Get-PSAutolabSetting and post the result? Is this a new install of the module or did you have older versions installed? For some reason the DSC resources aren't being download which causes everything else to fail. Are you running in an elevated Power Shell session? I am finishing up a conference in India and then flying back to the US so any other responses will be delayed. I don't have an easy answer. I have built that lab several times on different systems so it should work. We need to figure out where you are different. |
It is a new install but i had older versions on the pc. PS G:\AutoLab\Configurations\PowerShellLab> Get-PSAutolabSetting PSVersion : 5.1.17763.592 |
working on an update. |
I think I found the problem. Updated the code to better handle checking DSC resource module versions. Update to 4.2.0 which I just published to the PowerShell Gallery and try again. Run |
It works fine now, thanks. |
If i run the script after installing the module en setting up the host on my g: drive i get the following:
PS G:\AutoLab\Configurations\PowerShellLab> unattend-lab
Starting the lab environment
Installing required DSCResource modules from PSGallery
You may need to say "yes" to a Nuget Provider
Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\PSAutoLab\4.1.1\functions\public.ps1:230 char:13
Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\PSAutoLab\4.1.1\functions\public.ps1:230 char:13
Build the .Mof files from the configs
At G:\AutoLab\Configurations\PowerShellLab\VMConfiguration.ps1:26 char:5
Could not find the module '<xComputerManagement, 2.0.0.0>'.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ModuleNotFoundDuringParse
Building the lab environment for PowerShellLab
Name Value
Password System.Security.SecureString
NoSnapshot True
WarningAction SilentlyContinue
Path G:\AutoLab\Configurations\PowerShellLab
IgnorePendingReboot True
ConfigurationData G:\AutoLab\Configurations\PowerShellLab*.psd1
Cannot locate node 'DOM1' file and no DSC configuration can be applied. Ensure the DSC configuration has been run succe
ssfully.
At line:114 char:13
onfiguration has been run successfully.
PS G:\AutoLab\Configurations\PowerShellLab>
What do i have to do to make the script run without errors?
The text was updated successfully, but these errors were encountered: