Qual è la differenza tra le variabili $a
e $b
?
$a = (Get-Date).DayOfWeek
$b = Get-Date | Select-Object DayOfWeek
Ho provato a controllare
$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
Ma sembra non esserci alcuna differenza sebbene l'output di queste variabili sia diverso.