powershell - What does %{ $_.Key1 } mean? -
while programming hdinsight came across lines like
$storageaccountkey = get-azurermstorageaccountkey -resourcegroupname $resourcegroupname -name $storageaccountname | %{ $_.key1 } i understand $_ refers result of get-azurermstorageaccountkey command. meaning of %{} ?
%{ $_.key1 } ↔ foreach-object { write-output $_.key1 } ↔ each object in pipeline, echo value of property key1.
% alias foreach-object. $_ current object automatic variable.
Comments
Post a Comment