BSA job using PowerShell (this is a simple update to IPaddress of a known NIC):
Create the job as normal. To call PowerShell commands the following format works. I haven't found a useful way to line-wrap the commands yet.
Code: Select all
nexec -e cmd /c `echo . | PowerShell.exe -InputFormat none -ExecutionPolicy bypass \" netsh interface ip set address name= $name source=static addr= $ip_addr mask= $mask \" `
Things to consider - escape special characters; ensure that the command is wrapped in the ` character; give a space before using variables else they do not get interpreted.
Hope this helps