Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Brand New to PowerShell

$
0
0

Hi Everyone,

I'm brand new to PowerShell and am looking for guidance/input for my very first script. I'm certain this will be child's play for most of you guys/girls, but will ask anyway.

1. I have a .csv listing about a hundred AD users.

2.These users need to have a new folder created in their desktop folder, which is found on their Z: drive (mapped home drive).

3.Then, an existing folder (also found in their Z: drive) needs to be copied and pasted into this newly created folder.

I've been playing with a couple of cmdlets which I believe are heading in the right direction:

This will create a new folder at the specified path:

New-Item -Path Z:\Desktop\NewFolder -Type Directory


This portion will move one folder into another folder:

Move-Item Z:\Desktop\ExistingFolder Z:\Desktop\NewFolder

I'm pretty sure I'll also have to include the "Import-CSV" to grab the data. However, I'm having difficulty putting this all together to make a nice, clean script. Any guru input you may offer up will be greatly appreciated. I'm really excited about becoming familiar with PowerShell, so please, go easy on me. :)

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles