commands

^

Get-DbaComputerSystem

Author Shawn Melton (@wsmelton), wsmelton.github.io
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Get-DbaComputerSystem on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaComputerSystem.

Synopsis

Gets computer system information from the server.

Description

Gets computer system information from the server and returns as an object.

Syntax

Get-DbaComputerSystem
    [[-ComputerName] <DbaInstanceParameter[]>]
    [[-Credential] <PSCredential>]
    [-IncludeAws]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaComputerSystem

Returns information about the local computer's computer system

Example: 2
PS C:\> Get-DbaComputerSystem -ComputerName sql2016

Returns information about the sql2016's computer system

Example: 3
PS C:\> Get-DbaComputerSystem -ComputerName sql2016 -IncludeAws

Returns information about the sql2016's computer system and includes additional properties around the EC2 instance.

Optional Parameters

-ComputerName

Target computer(s). If no computer name is specified, the local computer is targeted

Alias cn,host,Server
Required False
Pipeline true (ByValue)
Default Value $env:COMPUTERNAME
-Credential

Alternate credential object to use for accessing the target computer(s).

Alias
Required False
Pipeline false
Default Value
-IncludeAws

If computer is hosted in AWS Infrastructure as a Service (IaaS), additional information will be included.

Alias
Required False
Pipeline false
Default Value False
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False