PrepAway - Latest Free Exam Questions & Answers

Tag: contoso database scripts sql server

which script will produce the desired list of databases. What script should you use?

You have a server named Contoso with multiple databases.
You have been tasked to write a PowerShell script to determine which databases on the server are larger than 100GB.
You open PowerShell from SQL Server Management Studio. You create two variables as follows:

PS SQLSERVER:SQLContoso> $MultipleOfGB = 1024 * 1024
PS SQLSERVER:SQLContoso> $Server = Get-Item

You need to determine which script will produce the desired list of databases.
What script should you use?