Windows 10: Powershell: I need to exit the Switch and Try and continue the Loop

Discus and support Powershell: I need to exit the Switch and Try and continue the Loop in Windows 10 Gaming to solve the problem; I have a condition embedded in a Loop, Try, Switch and if the condition is met, I want to gracefully exit the Loop iteration and go onto the next Loop... Discussion in 'Windows 10 Gaming' started by Julian Mils, Feb 5, 2025.

  1. Powershell: I need to exit the Switch and Try and continue the Loop


    I have a condition embedded in a Loop, Try, Switch and if the condition is met, I want to gracefully exit the Loop iteration and go onto the next Loop value. I’m trying to use the Break however that command is exiting the Switch command not the loop iteration. Please assist.In the following sample of my actual code, Whenever the Orange or Green conditions are met, exit the loop and check the next color- do not execute the rest of the Loop code:$colors = @“Red”,”Orange”,”Yellow”,”Green”,”Blue”,”Indigo”,”Violet”:ExitLoop For $i=0; $i -lt $colors.Length; $i++ { Try {

    :)
     
    Julian Mils, Feb 5, 2025
    #1
  2. Kursah Win User

    PowerShell instead of Commandline in Creators Update

    Interestingly enough my personal laptop just got the update...and still has Command Prompt listed, not PowerShell...

    Edit: Not that it matters...I use both regularly. *Toast :toast:
     
    Kursah, Feb 5, 2025
    #2
  3. Arun B J Win User
    BitLocker permanent loop

    Hi Laura,



    Thank you for posting your query in Microsoft Community.



    I understand your concern and will assist you to resolve this issue.


    • Did you make any changes prior to this issue?

    • Are you connected to Domain?

    • Are you using Windows 10 pro?


    I suggest you to follow the steps given in the article below and check if it helps.

    BitLocker Troubleshooting: Continuous reboot loop with BitLocker recovery on a slate device



    Hope this helps. If the issue remains unresolved, please get back to us and we would be happy to help.
     
    Arun B J, Feb 5, 2025
    #3
  4. Powershell: I need to exit the Switch and Try and continue the Loop

    Black Screen with Mouse Cursor with continual repair loops

    Next I did select volume and list volume X:


    Powershell: I need to exit the Switch and Try and continue the Loop 184867d1523799874t-black-screen-mouse-cursor-continual-repair-loops-selectvolume.jpg



    Powershell: I need to exit the Switch and Try and continue the Loop 184868d1523799874t-black-screen-mouse-cursor-continual-repair-loops-listvolume.jpg
     
    naturalbodz, Feb 5, 2025
    #4
Thema:

Powershell: I need to exit the Switch and Try and continue the Loop

Loading...
  1. Powershell: I need to exit the Switch and Try and continue the Loop - Similar Threads - Powershell need exit

  2. How to exit restart loop

    in Windows 10 Software and Apps
    How to exit restart loop: I updated and restarted my laptop and left it to run, but when I came back, it bluescreened. It was stuck at 100% with the stop code of BAD_SYSTEM_CONFIG_INFO. I shut down the laptop and tried using the advanced options and such. I tried everything. start-up repair doesn't...
  3. How to exit restart loop

    in Windows 10 BSOD Crashes and Debugging
    How to exit restart loop: I updated and restarted my laptop and left it to run, but when I came back, it bluescreened. It was stuck at 100% with the stop code of BAD_SYSTEM_CONFIG_INFO. I shut down the laptop and tried using the advanced options and such. I tried everything. start-up repair doesn't...
  4. Powershell: I need to exit the Switch and Try and continue the Loop

    in Windows 10 Software and Apps
    Powershell: I need to exit the Switch and Try and continue the Loop: I have a condition embedded in a Loop, Try, Switch and if the condition is met, I want to gracefully exit the Loop iteration and go onto the next Loop value. I’m trying to use the Break however that command is exiting the Switch command not the loop iteration. Please...
  5. How to exit bios loop?

    in Windows 10 Gaming
    How to exit bios loop?: I was scrolling around in my taskbar and i saw windows explorer and ended the task then a grey screen showed up and then restarted the pc then i got stuck in bios loop every time i restart or set defult settings i just keep getting back to bios...
  6. How to exit bios loop?

    in Windows 10 Software and Apps
    How to exit bios loop?: I was scrolling around in my taskbar and i saw windows explorer and ended the task then a grey screen showed up and then restarted the pc then i got stuck in bios loop every time i restart or set defult settings i just keep getting back to bios...
  7. Powershell/CMD Exit Code 3221225794

    in Windows 10 Gaming
    Powershell/CMD Exit Code 3221225794: We have an file transfer automation application where it can run different applications if needed i.e. WinSCP, PSFTP.exe Putty, Winzip, etc. We use a lot Powershell in some of the file transfer processes. We have one new file transfer process that needs to transfer a large...
  8. Powershell exits with code 2 0x00000002

    in Windows 10 Gaming
    Powershell exits with code 2 0x00000002: For a couple of days, the built-in Powershell on my Windows 11 21H2 hasn't been working at all. Whenever I launch Powershell in any way, normal, as admin, other stuff like Developer PS for VS 2022, it always exits with code 2 immediately and there is nothing I can do about...
  9. Powershell exits with code 2 0x00000002

    in Windows 10 Software and Apps
    Powershell exits with code 2 0x00000002: For a couple of days, the built-in Powershell on my Windows 11 21H2 hasn't been working at all. Whenever I launch Powershell in any way, normal, as admin, other stuff like Developer PS for VS 2022, it always exits with code 2 immediately and there is nothing I can do about...
  10. Windows exits and then gets back continuously

    in Windows 10 BSOD Crashes and Debugging
    Windows exits and then gets back continuously: This is the 2nd time that this appended to me. The 1st time I reinstalled windows... but it started again... When I'm in a window it exitsbut keps showing the window, if I'm writing something it stops typing and right after that gets back to it and this loops without...