So, when we work with the [PowerShell] type accelerator, we know what we are hitting against. To get more of an idea of what lives in this namespace:PS>[PowerShell]IsPublic IsSerial Name BaseType-------- -------- ---- --------True False PowerShell System.ObjectPS>[System.Management.Automation.PowerShell]IsPublic IsSerial Name BaseType-------- -------- ---- --------True False PowerShell System.Object
PS>[powershell].GetMembers() | ft name, membertype -AutoSizeName MemberType---- ----------get_Commands Methodset_Commands Methodget_Streams Methodget_InstanceId Methodget_InvocationStateInfo Methodget_IsNested Methodget_HadErrors Methodget_Runspace Methodset_Runspace Methodset_RunspacePool Methodget_RunspacePool Methodget_HistoryString Methodset_HistoryString MethodCreate MethodCreate MethodCreate MethodCreateNestedPowerShell MethodAddCommand MethodAddCommand MethodAddScript MethodAddScript MethodAddCommand MethodAddParameter MethodAddParameter MethodAddParameters MethodAddParameters MethodAddArgument MethodAddStatement Methodadd_InvocationStateChanged Methodremove_InvocationStateChanged MethodConnect MethodConnectAsync MethodInvoke MethodInvoke MethodInvoke MethodInvoke MethodInvoke MethodInvoke Method
class="MsoNormal">Invoke Method
Invoke Method
Invoke Method
BeginInvoke Method
BeginInvoke Method
BeginInvoke Method
BeginInvoke Method
BeginInvoke Method
EndInvoke Method
Stop Method
BeginStop Method
EndStop Method
Dispose Method
AsJobProxy Method
ToString Method
Equals Method
GetHashCode Method
GetType Method
Commands Property
Streams Property
InstanceId Property
InvocationStateInfo Property
IsNested Property
HadErrors Property
Runspace Property
RunspacePool Property
HistoryString Property
InvocationStateChanged Event
Quite a few things live in here. Eliminating duplicates shows this narrowed down list:[powershell].GetMembers() | select name, membertype -Unique | ft -AutoSize
Name MemberType---- ----------get_Commands Methodset_Commands Methodget_Streams Methodget_InstanceId Methodget_InvocationStateInfo Methodget_IsNested Methodget_HadErrors Methodget_Runspace Methodset_Runspace Methodset_RunspacePool Methodget_RunspacePool Methodget_HistoryString Methodset_HistoryString MethodCreate MethodCreateNestedPowerShell MethodAddCommand MethodAddScript MethodAddParameter MethodAddParameters MethodAddArgument MethodAddStatement Methodadd_InvocationStateChanged Methodremove_InvocationStateChanged MethodConnect MethodConnectAsync MethodInvoke MethodBeginInvoke MethodEndInvoke MethodStop MethodBeginStop MethodEndStop MethodDispose