Trying to update username/password on a policy with the function stated.I execute the following command:
Set-NessusPolicyWindowsCredential -Index 0 -PolicyID 5 -UserIndex 0 -Credential $cred -Verbose
I do verbose logging and the module will print:
"VERBOSE: Setting crentia on policy 5"
"We got OK on request"
The policy is not updated. Tried to restart daemon and rebuild database, no luck.
I use Nessus 5.2.4 and do not have any problem with other functions regarding policy eg. Show-NessusPolicy,Get-NessusPolicyXML, Copy-NessusPolicy.
Thanks for sharing your code.
Update: 'credentials.Windows+credentials' seem to have changed, baseline in my system is 165 instead of 265.