Red Posted August 10, 2022 Share Posted August 10, 2022 Hi, The default script "Reset Fortigate Password" to reset passwords on Fortigate firewalls will fail when virtual domains (VDOMs) are enabled on the device. This is due to the wrong starting environment when connected to the firewall. In this case, one can copy the existing powershell script and replace the lines if ($PrivilegedAccountUserName -ne '') { $ResetCommands = "config system admin`redit $UserName`rset password $NewPassword`rend`rexit`r" } else { $ResetCommands = "config system admin`redit $UserName`rset password $NewPassword $OldPassword`rend`rexit`r" } with if ($PrivilegedAccountUserName -ne '') { $ResetCommands = "config global`rconfig system admin`redit $UserName`rset password $NewPassword`rend`rexit`r" } else { $ResetCommands = "config global`rconfig system admin`redit $UserName`rset password $NewPassword $OldPassword`rend`rexit`r" } The new commands start with "config global" to change into the global context of the Fortigate. From that point onward, the commands are the same. Regards, Red support and Mordecai 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now