Sql-server – DBATools offline install – export-dbainstance was not found

dbatoolspowershellsql server

I followed the instruction at https://dbatools.io/offline/:

  1. download zip & unzip

  2. run $env:PSModulePath to find all the paths.

  3. copy to C:\Program Files\WindowsPowerShell\Modules.

  4. run Get-ChildItem -Recurse "C:\Program Files\WindowsPowerShell\Modules" | Unblock-File

When I try to run Export-DbaInstance -SqlInstance I got below error :

The term Export-DBAInstance is not recognized".

Any help will be appreciated.

Best Answer

You need to import the module using import-module dbatools

See Properly importing the module

Specifying the path to the .psd1 file

hope that helps you !

Also, what Scott commented is documented in the same link you have (just read the page carefully to see if you are not missing any steps):

Once you’ve extracted the folder, make sure you rename it from dbatools-master or dbatools-development to plain o’ dbatools.