In PowerShell 7.x, the Get-WmiObject Cmdlet is no longer available. To achieve similar functionality, you'll need to utilize the Get-CimInstance Cmdlet instead. Example Script: $oldpw = "old123" $newpw = "new123" Get-CimInstance -Namespace root/WMI -ClassName Lenovo_WmiOpcodeInterface | Invoke-CimMethod -MethodName WmiOpcodeInterface -Arguments @{Parameter = "WmiOpcodePasswordType:pap" } | Out-Null