sql server - PowerShell script to list items in collection -


I am new to PowerShell and am trying to query against my SQL server. I get an idea of ​​creating a new psdrive and then navigating to databases etc. and

$ dbs = (get-childitem sqlserver: \ sql \ Server \ INSTANCE \ code as database Is a line)

How do I get the results of collecting database objects when I forward the pipes to $ DBS? I am trying to read the extended practices of my test database.

This single query returns me repeated results for each database.

Set-location DRIVENAME: \ database \ betel_stest \ expanded properties get-balitam |

display name, value

. I do not want SQL Server to try this. Find out the result.

Set-Place DRIVENAME: \ Database

Go-Child Item | % {Gate-child-item $ ("$ _. Name \ extended properties"). DisplayName, Value}


Comments

Popular posts from this blog

linux - Authenticating GTK app to run with root permissions -

Revoke OpenVPN Access -