Get-DbaServerInstallDate

Returns the install date of a SQL Instance and Windows Server, depending on what is passed.

By default, this command returns for each SQL Instance instance passed in:
– SQL Instance install date, formatted as a string
– Hosting Windows server install date, formatted as a string

Screenshots

dbatools - Get-DbaServerInstallDate

Examples

Returns an object with SQL Instance Install date as a string and the Windows install date as string.

Get-DbaServerInstallDate -SqlInstance SqlBox1\Instance2

Returns an object with SQL Instance Install date as a string and the Windows install date as a string for both SQLInstances that are passed to the cmdlet.

Get-DbaServerInstallDate -SqlInstance winserver\sqlexpress, sql2016

Returns an object with only the SQL Server Install date as a string.

Get-DbaServerInstallDate -SqlInstance sqlserver2014a, sql2016

Returns an object with the Windows Install date and the SQL install date as a string.

Get-DbaServerInstallDate -SqlInstance sqlserver2014a, sql2016 -IncludeWindows

Returns an object with SQL Instance install date as a string for every server listed in the Central Management Server on sql2014

Get-DbaRegisteredServerName -SqlInstance sql2014 | Get-DbaServerInstallDate

Author

This command was created by Mitchell Hamann. You can find Mitchell on Twitter and his blog.