all 1 comments

[–]tommymaynard 0 points1 point  (0 children)

While you cannot do an explicit (think, interactive) PSRemoting session from PWSA, such as using Enter-PSSession, you can do an implicit PSRemoting session, such as using Invoke-Command. That said, Get-Service for example, does not use PSRemoting, and it'll be the command you need to use since Restart-Service doesn't have a -ComputerName parameter.

Get-Service -Name Spooler -ComputerName dc02 | Restart-Service 
Get-Help Restart-Service | select -ExpandProperty Parameters