Howdy,
I've done some searching and found some things about the $args variable, but haven't found something that explains how it works.
I'm simply running these commands:
$AppPool = "defaultpool"
invoke-command -computername Server1 -scriptblock {Import-Module WebAdministration;Restart-WebAppPool $AppPool}
This doesn't work. I know (or think I know) I need to put $args[0] in there where $AppPool is, but then how do I define what $args is? Do I also add -arguementlist $apppool in there somewhere?
Thanks!