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...

  • Task 2.6 : In this exercise, you will create a script to echo users, based on...

    Task 2.6 : In this exercise, you will create a script to echo users, based on a list of usernames in a file. 1. create a new file called userlist. #vi userlist 2. Insert a short list of usernames, such as the following. Make sure that none are the names of existing users. moe larry curly binny 3. create a script file userscript.sh and type the following lines #!/bin/bash for TheUSER in $(cat userlist) do echo The user is $TheUSER...

  • 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...

  • Can someone help me with a simple C programming problem? How do I make some code...

    Can someone help me with a simple C programming problem? How do I make some code like this into its own function? Currently it's pat of the main function, but I want to be able to call it. If you could help me with the prototype, function call, and definition, I'd really appreciate it. Thanks!    if(some_input=='r'){ someone = 0; } else if(some_input=='p'){ someone = 1; } else if(some_input=='s'){ someone = 2; } else if(some_input=='q' || some_input=='Q'){ break; // Breaks...

  • 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!

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