Thursday, May 24, 2018

PowerShell commands using SQL Server Management Studio v17.7

PowerShell is very well supported in SQL Server and it is true with the latest version as well.

What you begin with in Power Shell depends on from where it is invoked in the SQL Server Management Studio.

You can invoke (or start) PowerShell from various objects and it will be contextual in relation to the object.

If you right click the Server as shown you poup-up a mneu from which you can access PowerShell as shown.


PS_0

When you click Start PowerShell, the PowerShell window gets displayed as shown.


PS_1

Similarly the next image shows PowerShell being invoked in other contexts.

PS_2

These are not the only objects to invoke PowerShell, many more objects can be used to invoke PowerShell contextually.

Once you get to the object you want to review, the database can be accessed like folder/files using windows commands as shown.


PS_3

Read many more related PowerShell posts here.

No comments:

DMCA.com Protection Status