From the course: PowerShell: Scripting for Server Administration
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Import-HotelUsers: Solution - Server Tutorial
From the course: PowerShell: Scripting for Server Administration
Import-HotelUsers: Solution
(electronic splash) - [Instructor] This challenge had a couple of tricky components to it, even though it seemed a lot like the export script done earlier in the course. This import script has its own speed bumps. There are many ways that you could have accomplished this project. We're going to take a look at just three, and they're all based on the same function doing most of the work. This will look very similar to the import function created earlier. We start out by giving the function a name, assigning the OU parameter, and placing it in variables for the location and filenames of the CSV files, and the placement within active directory. Next we need to create the organizational unit. The only three parameters I used here were the name of the OU to be created, which I took from the parameter in the function, the location within active directory, where I want the OU to be created. I chose to place them right in the root of landonhotel.com, and the parameter that I used for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.