![]() ![]() ![]() $RestartNumber = Read-Host -Prompt 'Input number to restart the script at or to start at the beginning: 'įoreach ($k in is almost an open-ended question since it raises more questions than we can easily answer in short-form. Wondering How we can do it through powershell. In notepad or any other editor, you can simply manually just put "" before & after line to make whole if statement block commented & uncommented. PowerShell scripts is having multiple steps to execute and I want to execute certain steps as per use cases by commenting & uncommenting the block of code.įor Example: In-below PowerShell script I want to comment out second "if " block where string should match as "$RestartNumber -le 1" and get it's line number and put "" after the end of "if statement" curly braces "}". ![]() Un-Comment commented or multiple lines in PowerShell script. Comment multiple lines in PowerShell script.ģ. Problem Statement: I have a PowerShell script and before executing it I want to comment multiple lines using PowerShell commandġ. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |