Solved Starting to use dbatools utility

October 12, 2018 at 14:54:33
Specs: Windows 7, 4 GB
Hello Folks,

I just need some good advice.

I am using SQL Server and perform kind of 'basic' queries and etc. Recently I hit dbatools utility and wanted to play with it. I downloaded it on my Desktop ( I don't have admin privilege on it) , I used zip method and placed it at W:\My Documents\WindowsPowerShell\Modules\dbatools\dbatools which is inside $env:PSModulePath.

Now I want to start but I'm stuck :). First I'm not sure that I installed it properly and it will work as expected. Hence I'd like to do some 'sanity' test or etc. Note: I am familiar with unix, scripting and etc. I'm not familiar with Powershell.

Again: my goal is to play with dbatools and see if it could help me or it's not my 'tool'.

Could someone guide me with a simple set of instructions e.g. how to verify that it installed properly, how to run simple command and etc. Maybe you could point me to some 'simple' tutorial or youtube demo or etc. I mean not the book but something just to get the feeling of it.

Appreciate it ...


See More: Starting to use dbatools utility

Reply ↓  Report •

✔ Best Answer
October 12, 2018 at 17:27:18
In that case, I'm not entirely sure what you're asking for.
- Get-Module will tell you if PS knows it's there. (I.e. if it's installed correctly.)
- Getting started topics are at the bottom of mmcconaghy's linked page. (I.e. how to use it.)

That seems to cover your request? Unless you need it in video format? In which case, YouTube has a search function.

How To Ask Questions The Smart Way



#1
October 12, 2018 at 15:04:45
Have you looked here:

https://dbatools.io/start/

Near the bottom of the page.

MIKE

http://www.skeptic.com/

message edited by mmcconaghy


Reply ↓  Report •

#2
October 12, 2018 at 16:25:44
Hi.
Yes. I checked that link. It’s not what I am looking.
I am interested in 'basic ' sanity type of tutorial or demo or instructions for the beginners
Thanks anyway

Reply ↓  Report •

#3
October 12, 2018 at 16:32:05
So you're asking for a tutorial on the Get-Module command?

How To Ask Questions The Smart Way


Reply ↓  Report •

Related Solutions

#4
October 12, 2018 at 16:39:07
No.
I am asking for tutorial or instructions or demo how to verify that dbtools is installed properly and how to use dbtools. Like some simple example because I want just have a feeling of this module

Reply ↓  Report •

#5
October 12, 2018 at 17:27:18
✔ Best Answer
In that case, I'm not entirely sure what you're asking for.
- Get-Module will tell you if PS knows it's there. (I.e. if it's installed correctly.)
- Getting started topics are at the bottom of mmcconaghy's linked page. (I.e. how to use it.)

That seems to cover your request? Unless you need it in video format? In which case, YouTube has a search function.

How To Ask Questions The Smart Way


Reply ↓  Report •

#6
October 12, 2018 at 19:59:40
well ... by link you meant this one? http://www.skeptic.com/ ??
I've run Get-Module and it returned me 3 rows with Manifest. What it means? That PS is working or dbatools is working

Reply ↓  Report •

#7
October 12, 2018 at 21:02:57
by link you meant this one? http://www.skeptic.com/ ??

No, this one: https://dbatools.io/start/

MIKE


http://www.skeptic.com/

message edited by mmcconaghy


Reply ↓  Report •

#8
October 12, 2018 at 21:06:19
susja: by link you meant this one? http://www.skeptic.com/ ??
No, that's the signature block. The link was https://dbatools.io/start/

susja: I've run Get-Module and it returned me 3 rows with Manifest.
By itself, the command only lists currently loaded modules. Modules are loaded on demand. You need to use the -ListAvailable switch to see the list of known modules. Check Get-Module's documentation for more details.

How To Ask Questions The Smart Way


Reply ↓  Report •

#9
October 13, 2018 at 11:15:25
Well ... I ran Get-DbaDbTable <instance-name> and get a whole list of data of all tables in the instance.
This tells me that dbtools is installed and functioning, correct?
I also ran -ListAvailable and it showed that dbtools was installed. Hence..no problem with dbtools.
Thanks for that.
Now my question more generic :) I'm using SSMS and run various queries when needed and etc.
I expected that dbtools will help to get some data in different or easier way especially when I don't know some stuff. Also likely I'll get it in form of text file, I could use some text parsing utility ... like grep, awk or etc. But that's not the major goal. My major goal is get data easier than compiling myself sql query. E.g. when I ran Get-DbaDbTable I've got data for all tables but let say I need only from one table from the instance and etc. Could you advice how to 'navigate' for more specific task.
Thanks again for your help. Appreciate it.
Regards

Reply ↓  Report •

#10
October 13, 2018 at 23:21:47
Look, I work in industries that don't let me readily use third party code, and I don't intend to spin up an SQL Server at home just to play around with this library. When I want to interact with a DB in PS, I have to use the .NET objects directly. That said, I notice Get-DbaDbTable has a -Table param.

How To Ask Questions The Smart Way


Reply ↓  Report •

#11
October 13, 2018 at 23:49:19
- Razor2.3
I did not get your last comment
My industry is also against using third party tool.
Hence results of using dbtools will be my responsibility.
I only thought that if I could use any tool that improves my performance it will benefit industry
Not sure what’s wrong instead of writing some complex sql query to accomplish some task I could spend less time and get the same results by using dbtools.
Welll in general I agree with you and always try to comply with companies rules and regulations but sometimes just want to explore something more
I do appreciate your advice and help
Thanks

Reply ↓  Report •

#12
October 14, 2018 at 07:16:40
I'm saying I'm not an expert on the library, and there's no reason to believe I'll become one.

How To Ask Questions The Smart Way

message edited by Razor2.3


Reply ↓  Report •

#13
October 14, 2018 at 12:05:11
Thanks
You helped me a lot

Reply ↓  Report •

Ask Question