AutomatedLab / AutomatedLab.Common

PowerShell module for daily administrative tasks and general helper functions
MIT License
65 stars 24 forks source link

Calling 'C:\AL\AzureLabSources.ps1' if path on lab sources cannot be found #124

Closed raandree closed 7 months ago

raandree commented 1 year ago

Description

Sometimes, files on the Azure LabSources share cannot be found. Calling the file C:\AL\AzureLabSources.ps1 fixes that. This workaround should be going to AutomatedLab and not to AutomatedLab.Common, however, calling C:\AL\AzureLabSources.ps1 may be required also when running in a scheduled task. This is why this workaround needs to go into this module.

Type of change

How was the change tested?

Exchange 2019 deployment

raandree commented 1 year ago

@nyanhp, I know that this breaks a rule (see #123) but as the function Install-SoftwarePackage sometimes runs as a schedule job on the lab machine. This AutomatedLab specific behavior is only triggered if the path to install starts with automatedlab*.

Sometimes, the Azure LabSources share is not connected. Calling the script C:\AL\AzureLabSources.ps1 solves the issue. I have also modified the script so it returns data about the status of the Azure LabSources share connection.