Kelly Garcia
asked on
Powershell Code
Hi All,
I am trying to understand this line of code
what is the function of the @ symbol in @(get-wmiobject win32_desktop) ??
thank you in advance
I am trying to understand this line of code
function ScreenPassword($instance)
{
if (!($instance.screensaversecure)) {return $instance.name}
<additional statements>
}
foreach ($a in @(get-wmiobject win32_desktop)) { ScreenPassword($a) }
what is the function of the @ symbol in @(get-wmiobject win32_desktop) ??
thank you in advance
It casts the result of the get-wmiobject result as an array/list
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
@Kay
Did you mean to accept the footech comment as the solution? You have endorsed my comment.
Did you mean to accept the footech comment as the solution? You have endorsed my comment.
ASKER
yes, as footech gave the best answer, hope this is ok??