I tried to do a simple API for another system to use where I send in ComputerName and Domain to retreive values from Active Directory (AD).
I think is very simple but if I use ComputerName in my script that is called by the API it does not work.
Any other name for that variable work fine it seems.
This is because Invoke-PSUScript has a -ComputerName parameter on it already. You’ll need to avoid any of the static parameters on Invoke-PSUScript because you can’t have a dynamic parameter with the same name as a static one.