Few days ago I received a request to restore a dozen of tables because someone have deleted more data than it was supposed. I immediately thought about dbatools for the job!
NOTE: I also thought about SSMS “Import/Export Data”. And this is ok when someone says “it’s to run just once, just now”. When you are in the IT for a while you know that is not only once :-). And what if I need to re-run?
Probably you had the need to script out some objects from a SQL Server instance/database and this is quite easy. You just need to right click on the object (well…not on every single one, try it with an Availability Group :-), no script option available) select “Script XXXX as” and you have it.
But have you realized that this option doesn’t bring all the stuff? Let’s say you are scripting a table and you have a Non-Clustered index or a trigger…using this option some of the objects under the table will not be scripted out.
Every now and again I see some people complaining about not getting the properties they want when using a PowerShell command.
For instance, someone was using the Get-Service command to query what was the “Startup Type” of WinRM service . For that the person used the following command:
Get-Service WinRM which produces the following output: As you can see, the “Startup Type” property that we can find on the user interface does not appear here!
I’m working on a environment where I have to deal with multiple domains. The user’s password needs to be updated each 40/45 days (it depends on the domain).
Can you see the pain? This means that every month and half I have to dedicate like 20 minutes to change my password on 10 different domains by logging in to a host that belongs to that domain to be able to change it.