question archive I'm having difficulty creating a powershell script that does the following:   Prompts user to enter the following and save to variables a

I'm having difficulty creating a powershell script that does the following:   Prompts user to enter the following and save to variables a

Subject:Computer SciencePrice: Bought3

I'm having difficulty creating a powershell script that does the following:

 

Prompts user to enter the following and save to variables

a.      File Name to be created

b.      File Path to destination directory

c.      The number of files to be created

 

Then use an if statement to test if the number of files to be created is greater than 0.

 

a.      If it is greater than 0, create the files. And if more than 1 file is selected the number 1,2,3, etc should be added to the file name. (use a for loop)

b.      If the count is not greater than 0 than display the message:

"You must select at least one file to be created."

c.      Pause the script

d.      And exit.

 

Then Pass the variables to the cmdlet and create the file or files.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE