Question

Can someone help me create a script in PowerShell along with a csv file for 5...

Can someone help me create a script in PowerShell along with a csv file for 5 users. I will really appreciate.

Please explain in step by step because i am new to this.

the csv should contain 5 user.

i want to create 5 users .
0 0
Add a comment Improve this question Transcribed image text
Answer #1

This is an example to achieve that. Use this as a reference code to build yours.

Add-Content -Path C:\Employees.csv -Value '"FirstName","LastName","UserName"'

$employees = @(
'"Adam","Bertram","abertram"'
'"Joe","Jones","jjones"'
'"Mary","Baker","mbaker"'
)
$employees | foreach { Add-Content -Path C:\Employees.csv -Value $_ }

Add a comment
Know the answer?
Add Answer to:
Can someone help me create a script in PowerShell along with a csv file for 5...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Powershell Script

    Create a powershell script that will prompt user to enter the following information:Please choose your selection:1. Enter Grade Information2. Write File3. ExitIf user choose 1) then the script should ask the user for their course number (ex. ABC-123), course name and letter grade received.If user choose 2) then the script should generate a CSV file to save all dataIf user choose 3) the script should stop

  • I am trying to write a Powershell script that will automate the deletion process of certain...

    I am trying to write a Powershell script that will automate the deletion process of certain files. These files are older than 6 months old, and need to be deleted. If my $Path = "C:\Users\username\Documents\Test\", what would be the Powershell script to DELETE every file and directory older than 6 months old in the 'Test' directory. I am new to Powershell, please explain the parts of the script as well.

  • Need help with writing a Windows PowerShell script that will perform the following functions: Sea...

    Need help with writing a Windows PowerShell script that will perform the following functions: Search your computer for files ending with a .doc, .docx, .xls, or .xlsx file extension. Output the filenames and sizes (in groups by file extension) to a text file named “File_Summary.txt”. The output should also conclude with a total of the number of files and total file size for each file extension. Include comments in the script code to document the functionality of the script. I...

  • Hi I beed this assignment to be in a script in linux from codio. Can someone...

    Hi I beed this assignment to be in a script in linux from codio. Can someone please help me step by step thank you. Overview: In this milestone, you will demonstrate your ability to create a basic script in Linux. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for the scripting portion of the project. You will perform this milestone in Codio in the unit called “Milestone 2: Scripting.” You will create...

  • Hello, I am attempting to write a basic shell script using bash. It will need to...

    Hello, I am attempting to write a basic shell script using bash. It will need to print the user, host, time, and date. It will need to take user input for a txt file to be searched and create a new file to save the results. It must print the number of lines and characters in the text. The user will need to enter three words to be searched, and the number of occurrences of those words in the text...

  • Can someone help me with a c++ program Create a program that displays a measurement in...

    Can someone help me with a c++ program Create a program that displays a measurement in either inches or centimeters. If necessary, create a new project named Introductory 18 Project, and save it in the Cpp8\Chap09 folder. The program should allow the user the choice of converting a measurement from inches to centimeters or vice versa. Use two program-defined functions: one for each different conversion type. Enter your C++ instructions into a source file named Introductory 18.cpp Also enter appropriate...

  • Hi can someone please help me with this chemistry problem? I really appreciate it. The following...

    Hi can someone please help me with this chemistry problem? I really appreciate it. The following data was collected for the volume of the O2 produced in the decomposition of H2O2 Calculate the average rate of reactoion for each of the given time interval. Time mL O2 0.0 0.0 45.0 2.0 88.0 3.9 175.0 6.8 I would really appreciate steps on how to solve this, so I can finish the rest of the similar problems. Thank you!

  • Task 12: Working with Windows PowerShell ISE You can use the Windows PowerShell Integrated Scripting Environment...

    Task 12: Working with Windows PowerShell ISE You can use the Windows PowerShell Integrated Scripting Environment (ISE) to create, run, and debug commands and scripts. The Windows PowerShell ISE consists of the menu bar, Windows PowerShell tabs, the toolbar, script tabs, a script pane, a console pane, a status bar, a text-size slider and context-sensitive Help. It works for both local and remote scripts. Using the Windows PowerShell ISE gives you many different advantages when creating scripts. Although it can...

  • Are you able to help me by explaining how to import data from a .csv file...

    Are you able to help me by explaining how to import data from a .csv file into MATLAB using the import data wizard? I need to use the 'Generate Function' option in the import data wizard. How do I then call this data in MATLAB? Please help me Thank you

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT