$bootEntries = bcdedit /enum all | Select-String "description" -Context 1,0 foreach ($bootEntry in $bootEntries) { if ($bootEntry -clike '*IP4*') { $boot = $bootEntry.ToString().Split('{') $GUID = $boot[1].Split('}')[0] bcdedit /default "{$GUID}" bcdedit /set "{fwbootmgr}" DISPLAYORDER "{default}" "{bootmgr}" } }