Skip to content

Instantly share code, notes, and snippets.

@NicoNekoru
Created July 15, 2020 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NicoNekoru/856169bdeec90644f0b7065cb64034d5 to your computer and use it in GitHub Desktop.
Save NicoNekoru/856169bdeec90644f0b7065cb64034d5 to your computer and use it in GitHub Desktop.
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