bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
102 stars 41 forks source link

Support OTP code #117

Closed mjamison7 closed 1 year ago

mjamison7 commented 1 year ago

I have used this script before and it works great. I am in need of using it again but our Cohesity node now is using MFA and I need this script to support the OTP code.

This is the error I get now.

[13]:OTP code validation for user matthew failed with error: Invalid TOTP code for user matthew. Not authenticated to a cohesity cluster

bseltz-cohesity commented 1 year ago

Sure I can add MFA support to any of the scripts. Please let me know which script you are referring to.

mjamison7 commented 1 year ago

expireOldArchives.ps1 is the one that does not look like it has the MFA option.

bseltz-cohesity commented 1 year ago

Updated: https://github.com/bseltz-cohesity/scripts/tree/master/powershell/expireOldArchives you can now specify -mfaCode xxxxxx on the command line

mjamison7 commented 1 year ago

Thank you so much. That is great!!!