Skip to main content

Posts

Showing posts with the label Command Prompt

How to check office version from command line

The are quite a few ways to check office version it can be done via registry, PowerShell or VBScript and of course, good old command line can also do it.
Checking Windows office version whether it is Office 2010, Office, 2013, Office 2016 or other version is quite important to check compatibility of documents; or just a part of software inventory.
For PowerShell this simple snippet can check the office version:
$ol=New-Object-ComObjectExcel.Application $ol.Version
The command line option will tell you where’s the path located; the result will also tell whether office is 32-bit, 64-bit and of course the version of the office as well.
Here’s the command that will check the office version and which program directory the file is located which will tell whether it’s 32-bit or 64-bit.
Command to search for Excel.exe:
DIR C:\ /s excel.exe | find/i "Directory of" 
Above command assumes that program files is on  C: drive.
Sample Output, if 64-bit version:
Directory of C:\Program Files\…

WMIC command get CPU Load Percentage

Getting CPU load percentage is quite helpful in determining whether the server or computer is on a heavy performance, this would also indicate whether there is a need to increase the memory or add another CPU to the machine.

Of course, when the CPU has a lot of load, performance will be impacted directly. Which basically means that the machine will not be working perfectly.
Checking the CPU load will also help to troubleshoot, if the services on the machine or server is experiencing slow performance.
Here’s the wmic command line which check the CPU Load Percentage.
wmic cpu list status

Sample output: AvailabilityCpuStatusCurrentVoltageDeviceIDErrorCleared 319CPU0
ErrorDescriptionLastErrorCodeLoadPercentageStatusStatusInfo 15OK3

The command can be used to monitor remote servers or computers to check the load percentage and just save the output to a text file for review or monitoring purposes.

Cheers..Till next time. Hope it helps. 😊

================================ Free Android Apps:
Clic…

Copying files in AWS S3 bucket

Learning to copy files to S3 bucket or from S3 bucket to local folder is a must thing to learn when administering S3 bucket.
S3 bucket is an object storage.See details on this link: https://aws.amazon.com/s3/features/
An S3 policy called WORM (write-once read-many) policy can be enforced to S3 bucket.
WORM is ideal for log files.Backup or write the log file once and read it many times if someone needs to read or review the logs.
Let’s get into business, how to copy files to S3 bucket?
S3 is an acronym for Simple Storage Service.
S3 accepts Linux command, so if you are running Windows be careful when typing S3 commands.
A simple mistake of running Capital letters can ruin your day since the command will not work and the error won’t be friendly to tell you that it was just a simple mistake that you just type in capital letter.
Copying is plain simple, so here’s a basic and simple example:
aws s3 cp test_bucket.txt s3://thes3bucket
s3 – is small letter it’s not S3. If S3 is typed on the command l…

Check if 32 bit or 64 bit processor from command line

How to check processor architecture whether its 32bit or 64bit?
One method is to query the registry from the command line.
Here’s a one liner command line that will check whether the PC processor is 32bit or 64bit.
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" | find “ARCHITECTURE”
If the output is something like this:
PROCESSOR_ARCHITECTUREREG_SZAMD64

Then it’s a 64bit, if it shows x86 then it’s a 32 bit.
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" | find “IDENTIFIER”
Above query can also identify, the output shows Intel64 for 64bit.
Sample Output: PROCESSOR_IDENTIFIERREG_SZIntel64 Family 6 Model 142 Stepping 10, GenuineIntel

Omitting the find option from the “reg query” command will show quite a few information.
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
This query command works in Windows 7, Windows 8 and Windows 10. I believe this will also work in Windows s…