Today when installing SQLServer module on one system I got the below error. This happens because the TLS setting for PowerShell is not compatible with PSGallery. Use the below script to set the session TLS version to 1.2 for the session Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Once doing this you will be able to install any module […]
Sharing a simple PS script which goes through the servers stored into csv file, and run Invoke-Sqlcmd and run queries to capture the relevant information and store it into excel sheet. We are using SQLServer module and ImportExcel module for doing this task. GitHub link.
For one of my project we had to daily run some scripts on CMS and copy paste that information into an Excel sheet and then send it across to the different stakeholders providing them the status of current health of the environment. This being manual process was error prone and time consuming. To overcome this […]
Being a dba I need to (and wish to) automate everything possible when it’s about SQL Server. And for doing that I use PowerShell alot. Working for different clients I need to setup the environment for the PS scripts to work, which involves installing different modules and changing the execution policy. Below are the things […]