Question: The homework is in powershell script, i have to make a menu that takes input from the user and makes a file, if the user

The homework is in powershell script, i have to make a menu that takes input from the user and makes a file, if the user inputs 2, 3 or bigger number, then makes multiple files like file file1 file2....., I made the program but cant fix the loop to make multiple files, how i will make the loop make multiple files ????

 The homework is in powershell script, i have to make a

$filename = Read-Host "Name File" $desti Read-Host "File Path" $number = Read-Host "Number of files" 5 6 7 8 9 10 11 for ($number -lt Snumber; $number++){ if( $number -ge "1" ) { New-Item -Path $desti -Name $filename$number -ItemType "file"} elseif ($number -eq "0") {Write-Host "You must select at least one file to be created"} elseif ($number -gt "0" ) {New-Item -Path $desti -Name $filename ItemType "file"} else {pause

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!