-
Notifications
You must be signed in to change notification settings - Fork 9
Get DscProperty
Returns DSC resource properties that is part of a class-based DSC resource.
Get-DscProperty [-InputObject] <PSObject> [[-Name] <String[]>] [[-ExcludeName] <String[]>]
[[-Attribute] <String[]>] [-HasValue] [<CommonParameters>]
Returns DSC resource properties that is part of a class-based DSC resource. The properties can be filtered using name, attribute, or if it has been assigned a non-null value.
Get-DscProperty -InputObject $this
Returns all DSC resource properties of the DSC resource.
$this | Get-DscProperty
Returns all DSC resource properties of the DSC resource.
Get-DscProperty -InputObject $this -Name @('MyProperty1', 'MyProperty2')
Returns the DSC resource properties with the specified names.
Get-DscProperty -InputObject $this -Attribute @('Mandatory', 'Optional')
Returns the DSC resource properties that has the specified attributes.
Get-DscProperty -InputObject $this -Attribute @('Optional') -HasValue
Returns the DSC resource properties that has the specified attributes and has a non-null value assigned.
Specifies one or more property attributes to return. If left out all property types are returned.
Type: String[]
Parameter Sets: (All)
Aliases: Type
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies one or more property names to exclude.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies to return only properties that has been assigned a non-null value. If left out all properties are returned regardless if there is a value assigned or not.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The object that contain one or more key properties.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies one or more property names to return. If left out all properties are returned.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This command only works with nullable data types, if using a non-nullable type make sure to make it nullable, e.g. [Nullable[System.Int32]].
- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Get-ComputerName
- Get-DscProperty
- Get-EnvironmentVariable
- Get-LocalizedData
- Get-LocalizedDataForInvariantCulture
- Get-PSModulePath
- Get-TemporaryFolder
- Get-UserName
- New-ArgumentException
- New-ErrorRecord
- New-Exception
- New-InvalidDataException
- New-InvalidOperationException
- New-InvalidResultException
- New-NotImplementedException
- New-ObjectNotFoundException
- Remove-CommonParameter
- Set-DscMachineRebootRequired
- Set-PSModulePath
- Test-AccountRequirePassword
- Test-DscParameterState
- Test-DscProperty
- Test-IsNanoServer
- Test-IsNumericType
- Test-ModuleExist