Help me write a simple script that opens the Powershell console as an administrator and alternately executes the following commands:
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKeyDescription
Get-WmiObject win32_bios | select Serialnumber
I need to get the results of these commands quickly, if it is not possible to make them written in a Powershell window then at least to a .txt file
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.