Created
July 15, 2020 00:19
-
-
Save NicoNekoru/856169bdeec90644f0b7065cb64034d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Global:Get-Properties | |
{ | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true, | |
ValueFromPipeline = $true, | |
Position = 0 | |
)]$InputObject | |
) | |
$stuff = $InputObject | Get-Member -MemberType Property | |
$stuff = $stuff.Name | |
$stuff | ForEach-Object {Write-Host $_`: $InputObject.$_} | |
} | |
Function Global:Get-Method | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, | |
ValueFromPipeline = $true, | |
Position = 0 | |
)]$InputObject | |
) | |
$stuff = $InputObject | Get-Member -MemberType Method | |
$stuff = $stuff.Name | |
$stuff | ForEach-Object {Write-Host $_`: $InputObject.$_} | |
} | |
Function Global:Get-EventMember | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, | |
ValueFromPipeline = $true, | |
Position = 0 | |
)]$InputObject | |
) | |
$stuff = $InputObject | Get-Member -MemberType Event | |
$stuff = $stuff.Name | |
$stuff | ForEach-Object {Write-Host $_`: $InputObject.$_} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment