I've created this basic one-liner PowerShell script which executes if I run the ad cmdlet for AD and then the rest of the query. But trying to run them together in line it only seems to load the cmdlet and doesn't execute the rest of the cmd.
powershell.exe -command "&{Import-Module ActiveDirectory; Get-AdGroup -Server DC.Mydomain.com -filter 'name -eq "xxxx"'| set-Adgroup -Replace @{wWWHomePage='10.24.218.194'}}"
Why doesn't it run all together like this?