The first code sample is an example of the Get-StorageGroup command. In the example, the output of the Get-StorageGroup command is piped to the Format-List command so that all the available information is displayed in the result.
The second code sample demonstrates the use of the Status parameter.
Get-StorageGroup -Identity "Storage Group Server\First Storage Group" | Format-List
Get-StorageGroup -Status | FT -Autosize Name, CanEnableLocalCopy, CanRunRestore, CanRunDefaultUpdate