r/PowerShell • • Sep 17 '20

PowerShell vs Python Reference

https://blog.ironmansoftware.com/powershell-vs-python/
206 Upvotes

51 comments sorted by

View all comments

5

u/azjunglist05 Sep 17 '20

Really awesome article! Just curious when getting a data type why:

$var = 1
$var | Get-Member

Instead of:

$var = 1
$var.GetType()

The latter, to me at least, more resembles the Python equivalent. Get-Member does a lot more than to just the get the type of the object. It also pulls the methods and properties available to that object.

6

u/[deleted] Sep 17 '20

That’s a good point. I’ll add this snippet as well