The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

chrisjonesaz (4) [Avatar] Offline
#1
PS> $servers | foreach{copy-item -Path c:sites*.* -Destination \$_c$ -
recurse}

I am unable to get this to work in powershell, it does not error out but nothing gets copied. I have some older IIS7.5 boxes that are not using our CIFS shares and I'd like to automate deployments to these. Any help is appreciated
jason.helmick (63) [Avatar] Offline
#2
Re: Ch. 16.1.1 Sharing content using PowerShell
Hi Chris!

Yes, this was an error in the book that has been corrected. Let me show you.

PS> $Servers = ‘Web1’, ‘Web2’

PS> $servers | foreach{Copy-Item -Path c:sites* -Destination \$_c$sites -Recurse -Force}

Did this help?

Jason
chrisjonesaz (4) [Avatar] Offline
#3
Re: Ch. 16.1.1 Sharing content using PowerShell
That worked! Thanks for replying so quickly!
jason.helmick (63) [Avatar] Offline
#4
Re: Ch. 16.1.1 Sharing content using PowerShell
smilie Glad it worked! I'm in the middle of final edits for the book so it just happens on was correcting that code line.

Cheers!
chrisjonesaz (4) [Avatar] Offline
#5
Re: Ch. 16.1.1 Sharing content using PowerShell
Thanks again, would love it if you wrote an advanced book that expanded on the last few chapters and covered mostly large enterprise. I took your class over at interface and this book has been a great reference.
jason.helmick (63) [Avatar] Offline
#6
Re: Ch. 16.1.1 Sharing content using PowerShell
Awesome! Thank you. Well, after the dust settles on this one perhaps Manning might want a "Part 2" version. It becomes so challange to write about enterprise stuff becuase everyone is doing something different but with the strong push towards Public cloud and Azure there is certainly some amazing benefits. I'll have to how much material I can some with.
chrisjonesaz (4) [Avatar] Offline
#7
Re: Ch. 16.1.1 Sharing content using PowerShell
If you ever need a 'contributor' let me know. smilie