¿Cuál es la diferencia entre las variables $a
y $b
?GetType utilizado en PowerShell, diferencia entre las variables
$a = (Get-Date).DayOfWeek
$b = Get-Date | Select-Object DayOfWeek
Me trataron de comprobar
$a.GetType
$b.GetType
MemberType : Method
OverloadDefinitions : {type GetType()}
TypeNameOfValue : System.Management.Automation.PSMethod
Value : type GetType()
Name : GetType
IsInstance : True
MemberType : Method
OverloadDefinitions : {type GetType()}
TypeNameOfValue : System.Management.Automation.PSMethod
Value : type GetType()
Name : GetType
IsInstance : True
Pero no parece haber ninguna diferencia a pesar de la salida de estas variables se ve diferente.