external help file | online version | schema |
---|---|---|
ClassExplorer.dll-Help.xml |
2.0.0 |
Find .NET classes in the AppDomain.
Find-Type [[-FilterScript] <scriptblock>] [[-Namespace] <string>] [-Name <string>] [-FullName <string>] [-InheritsType <ScriptBlockStringOrType>] [-ImplementsInterface <ScriptBlockStringOrType>] [-Signature <ScriptBlockStringOrType>] [-Abstract] [-Static] [-Sealed] [-Interface] [-ValueType] [-Force] [-RegularExpression] [-InputObject <psobject>] [-Not] [-ResolutionMap <hashtable>] [-AccessView <AccessView>] [-Decoration <ScriptBlockStringOrType>] [<CommonParameters>]
Find-Type [[-Name] <string>] [[-Namespace] <string>] [-FullName <string>] [-InheritsType <ScriptBlockStringOrType>] [-ImplementsInterface <ScriptBlockStringOrType>] [-Signature <ScriptBlockStringOrType>] [-Abstract] [-Static] [-Sealed] [-Interface] [-ValueType] [-FilterScript <scriptblock>] [-Force] [-RegularExpression] [-InputObject <psobject>] [-Not] [-ResolutionMap <hashtable>] [-AccessView <AccessView>] [-Decoration <ScriptBlockStringOrType>] [<CommonParameters>]
The Find-Type cmdlet searches the AppDomain for .NET classes that match specified criteria.
$types = Find-Type
$types.Count
# 5106
Find all the types currently loaded in the AppDomain.
Find-Type -InheritsType System.Management.Automation.Runspaces.RunspaceConnectionInfo
# Namespace: System.Management.Automation.Runspaces
#
# Access Modifiers Name
# ------ --------- ----
# public sealed class WSManConnectionInfo : RunspaceConnectionInfo
# public sealed class NamedPipeConnectionInfo : RunspaceConnection…
# public sealed class SSHConnectionInfo : RunspaceConnectionInfo
# public sealed class VMConnectionInfo : RunspaceConnectionInfo
# public sealed class ContainerConnectionInfo : RunspaceConnection…
Find all types that inherit the class RunspaceConnectionInfo.
Find-Type -Interface -Namespace System.Management.Automation {
Find-Member -InputObject $_ -ParameterType System.Management.Automation.Language.Ast
}
# Namespace: System.Management.Automation
#
# Access Modifiers Name
# ------ --------- ----
# public interface IArgumentCompleter
Find all interfaces in the namespace System.Management.Automation that have a member that takes an AST as a parameter.
Find-Type -Signature { [contains[T[unmanaged]]] }
# Namespace: System.Buffers
#
# Access Modifiers Name
# ------ --------- ----
# public ref struct SequenceReader<T> : ValueType
Find any type with a type parameter with the "unmanaged" constraint.
Specifies a ScriptBlock to invoke as a filter. The variable "$_" or "$PSItem" contains the current type to evaluate.
Type: ScriptBlock
Parameter Sets: ByFilter
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: System.Management.Automation.ScriptBlock
Parameter Sets: ByName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified non-public types will also be matched. This is equivalent to -AccessView This
.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: IncludeNonPublic, f
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the full name including namespace to match.
This parameter uses smart casing. If the pattern specified includes any capital letters, the pattern becomes case sensitive.
Type: System.String
Parameter Sets: (All)
Aliases: fn
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Specifies a interface that the type must implement to match. This can also be a type signature (see about_Type_Signatures).
Type: ClassExplorer.ScriptBlockStringOrType
Parameter Sets: (All)
Aliases: ii, int
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a type that the type must inherit to match. This can also be a type signature (see about_Type_Signatures).
Type: ClassExplorer.ScriptBlockStringOrType
Parameter Sets: (All)
Aliases: Base, it
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a type signature to match. See about_Type_Signatures.
Type: ClassExplorer.ScriptBlockStringOrType
Parameter Sets: (All)
Aliases: sig
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the current object to evaluate.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the name of the type to match. For example, the name of the type "System.Text.StringBuilder" is "StringBuilder".
This parameter uses smart casing. If the pattern specified includes any capital letters, the pattern becomes case sensitive.
Type: System.String
Parameter Sets: ByName
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Type: System.String
Parameter Sets: ByFilter
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Specifies the namespace to match. For exmaple, the namespace of the type "System.Text.StringBuilder" is "System.Text".
This parameter uses smart casing. If the pattern specified includes any capital letters, the pattern becomes case sensitive.
Type: System.String
Parameter Sets: (All)
Aliases: ns
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True
Specifies that this cmdlet should only return types marked as both abstract and sealed. This is equivalent to specifying both -Abstract
and -Sealed
.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: s
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet should only return types marked as abstract that are not sealed (unless -Sealed
or -Static
are also specified) and are not interfaces (unless -Interface
is also specified).
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: a
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet should only return types marked as sealed that are not abstract (unless -Abstract
or -Static
are also specified).
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: se
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet should only return types marked as interfaces.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: i
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet should only return types marked as a value type. If specified, the parameters -Static
, -Abstract
, -Sealed
and -Interface
are ignored.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: vt
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that this cmdlet should only return object that do not match the criteria.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If specified all parameters that accept wildcards will match regular expressions instead.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: Regex, re
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the access perspective (External
, SameAssembly
, Child
and/or This
) or specific modifier (Public
, Internal
, Protected
, Private
) to filter results for.
Type: ClassExplorer.AccessView
Parameter Sets: (All)
Aliases: as
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies that a type must be decorated with this attribute for it to be included in results. This search will be done based on type name rather than strict type identity so it is safe to use for embedded attributes.
This can also be a type signature (see about_Type_Signatures).
Type: Type
Parameter Sets: (All)
Aliases: HasAttr, attr
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a hashtable of name
to ScriptBlockStringOrType
to create your own keywords and/or override type resolution for any signature in this command.
Type: hashtable
Parameter Sets: (All)
Aliases: map
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If you pass assemblies to this cmdlet it will match types from that assembly.
If you pass Type objects as input this cmdlet will return the input if it matches the specified criteria. You can use this to chain Find-Type commands to filter output.
If you pass any other object to this cmdlet it will return the type of that object.
Matched Type objected will be returned to the pipeline.
Find-Member Get-Assembly Get-Parameter Format-MemberSignature