Foreach


hello,

    foreach can access dot properties well? eg:

$boxes = get-process

foreach($box in $boxes.handles) possible? how can access dot properties , there other way?

this work:

$boxes=get-process
foreach($handle in $boxes.handles){$handle}

each element of "$boxes.handles" integer , has no properties.  has no "dots".

$boxes.handles.count
$boxes.handles[0].gettype()

you can properties , methods of integer if needed

$boxes.handles[0].compareto(3)


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...