Writing a powershell script to copy files with certain extension from one folder to another

Posted by the_drow on Server Fault See other posts from Server Fault or by the_drow
Published on 2010-10-26T12:11:22Z Indexed on 2011/01/16 9:54 UTC
Read the original article Hit count: 318

Filed under:

I would like to write a powershell script that gets the following parameters as input:
Folder to copy from, extensions allows, folder to copy to and a boolean indicating if the change should restart IIS, username and password.
What cmdlets should I be looking at considering that I am copying to a remote server?
How do I read the parameters into variables?
How do I restart IIS?

Cosidering that I might want to copy multiple folders, how do I write a powershell script that invokes a powershell script?

© Server Fault or respective owner

Related posts about powershell