Portproxy error on Metasploit

-] Post failed: NoMethodError undefined method cmd_exec' for #<Msf::Modules::Post__Windows__Manage__Portproxy::MetasploitModule:0x0000560fc4f05878> [-] Call stack: [-] /usr/share/metasploit-framework/modules/post/windows/manage/portproxy.rb:65:in enable_portproxy’
[-] /usr/share/metasploit-framework/modules/post/windows/manage/portproxy.rb:46:in `run’

any idea why this error coming up?

Hello,

Seems to me that you are missing some options here. Also, what kind of session do you have?

Regards,