PS-AutoLab-Env icon indicating copy to clipboard operation
PS-AutoLab-Env copied to clipboard

Common Errors

Open jdhitsolutions opened this issue 4 years ago • 0 comments

Common Errors

This is an ongoing list of frequent errors you might encounter. Please check this list to see if it solves your problem. If not, then please post an issue.

I get an error installing the module

The module has a requirement on an older version of Pester. When you install the PSAutolab module from the PowerShell Gallery, you might get an error about trying to install Pester. You will need to manually install Pester.

Install-Module Pester -RequiredVersion 4.10.1 -SkipPublisherCheck -force

Then install the module again.

Install-Module PSAutolab -force

I get an error trying to update Lability

If you try to run Refresh-Host you might see an error about a certificate mismatch. Between v0.18.0 and v0.19.0 the Lability module changed code signing certificates. If you encounter this problem, run Refresh-Host -SkipPublisherCheck.

I get an error about trying to set an IPAddress

You might see and error about failing got convert a string for xIPAddress. This is most likely due to conflicting installed DSC Resources on your computer. Open a PowerShell prompt and run Get-DSCResource xIPAddress. The configuration will require version 5.7.0.0 or later. If you also have an older version, that is causing the conflict. The only solution appears to be removing the old version. Run the command Uninstall-Module xNetworking -requiredversion X.X.X.X filling in the version number for each old version. You can finally test and verify:

PS C:\> get-dscresource xIpaddress -syntax
xIPAddress [String] #ResourceName
{
    AddressFamily = [string]{ IPv4 | IPv6 }
    InterfaceAlias = [string]
    [DependsOn = [string[]]]
    [IPAddress = [string[]]]
    [PsDscRunAsCredential = [PSCredential]]
}

Delete any error mof files in the configuration folder and try the configuration setup again.

I get an error that the module can't be loaded

Running this module, or even installing it for that matter, assumes you have a script execution policy set to allow running scripts. If you run Get-Executionolicy and the result is either Restricted or AllSigned you won't be able to use this module.

Depending on your situation you might be able to modify the settings in an elevated PowerShell session.

Set-Executionpolicy remotesigned -force

If your corporate policy is to be remote signed, you can try signing the files in the PSAutolab folder and trying again.

jdhitsolutions avatar Sep 10 '19 13:09 jdhitsolutions