Question: Task: Write a PowerShell script that generates random employee data for a given number of employees. The employee data should include the following fields: First
Task:
Write a PowerShell script that generates random employee data for a given number of employees.
The employee data should include the following fields: First Name, Last Name, Department, and Manager.
Export the generated data to a CSV file named RandomEmployees.csv
Hints:
Use arrays of predefined names for first and last names.
Define a list of departments and randomly assign them to employees.
For managers, randomly select one of the existing employees as the manager.
Use ExportCsv cmdlet to export the data to a CSV file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
