-
-
Notifications
You must be signed in to change notification settings - Fork 144
FAQ
Q. How Do I install dbachecks?
Q. I cannot access the PowerShell Gallery. How can I install dbachecks?
Q: I want to unload the dbatools
module but it's complaining about a dbachecks
requirement. What do I do?
Q. When I try to import or update the module I get an error about The required module 'Pester' with version '4.1.1' is not loaded
Q. When I try to import the module I get an error saying "The required module 'Pester' is not loaded. Load the module or remove the module"
A. dbachecks is installed from the PowerShell Gallery from a machine with PowerShell version 4 or above in an elevated prompt using
Install-Module dbachecks
This will install it for all users of the machine. If you are unabel to run as Administrator or only want to install the module for the current user use
Install-Module dbachecks -Scope CurrentUser
A. You will need to use a machine that can access the internet and the PowerShell Gallery and
Save-Module -Name dbachecks, dbatools, PSFramework, Pester -Path C:\temp
Then move them to somewhere in your $env:PSModulePath, perhaps Documents\WindowsPowerShell\Modules or C:\Program Files\WindowsPowerShell\Modules and Import the module.
You can also save the files in a folder and import them using
Import-Module PATHTOFOLDER\dbachecks.psd1 # -Scope CurrentUser # if not admin
but this will not make the module available to you all of the time and you will have to import it every time you wish to use it
Q: I want to unload the dbatools
module but it's complaining about a dbachecks
requirement. What do I do?
A: Just add Remove-Module dbatools -Force
and it'll unload all related modules in memory.
Q. When I try to import or update the module I get an error about The required module 'Pester' with version '4.2.0' is not loaded
A: If you have already installed the module and you update it, you may be required to update the Pester or the PSFramework modules before it will import. To resolve this
Update-Module Pester -SkipPublisherCheck
Import-Module Pester -Force
You may need to do the same thing for the PSFramework or dbatools modules also
Q. When I try to import the module I get an error saying "The required module 'Pester' is not loaded. Load the module or remove the module"
A. Import the module Pester using
Import-Module Pester