sort-object

PS C:\Users\user> get-process|select-object processname, id, cpu, vm|sort-object cpu -descending

ProcessName                                              Id                           CPU                            VM
———–                                              —                           —                            —
explorer                                               2076                      14.09375                     638275584
powershell                                             2908                      7.234375                     653103104
iexplore                                               4772                      2.390625                     278831104
iexplore                                               5948                      2.265625                     261894144
taskhostex                                             1032                       1.40625                     278933504
iexplore                                               4568                          1.25                     177352704

Posted in powershell, Uncategorized | Leave a comment

Powershell -Get Process and Stop Process

List the process of notepad, but of-course you need to launch notepad first.

PS C:\Users\adminjoe> get-process notepad

Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
——- —— —– —– —– —— — ———–
67 7 1240 6600 89 0.08 1624 notepad

Stop the process by the following:
PS C:\Users\adminjoe> stop-process -name notepad
PS C:\Users\adminjoe> PS C:\Users\adminjoe> get-process notepad

or by the process ID

PS C:\Users\adminjoe> stop-process -ID 1624

Posted in powershell, Uncategorized | Leave a comment

Powershell-Set-execution Policy

You can use the Set-ExecutionPolicy command to control the level of security surrounding PowerShell scripts. In this case I set to unrestricted

PS C:\Users\adminjoe> set-executionpolicy unrestricted

 

To view the execution policy, type:

PS C:\Users\adminjoe> get-executionpolicy
Restricted

Posted in powershell, Uncategorized | Leave a comment

Powershell-To display Windows Feature

PS C:\Users\adminjoe> get-windowsfeature dhcp*

Display Name Name Install State
———— —- ————-
[X] DHCP Server DHCP Installed

Posted in powershell, Uncategorized | Leave a comment

Creating PST, Backup and Restore of PST in Outlook 2013

To backup PST file :

1. Go to outlook client and create a pst file, save it in C:\users\someuser\my documents\outlook\
2. with the new pst folder, move some e-mails to the folder (aka mail archiving). you can drag/right click method

Notes
ost is located at c:\users\profile folder\appdata\local\microsoft\outlook
locate you pst file (user\my documents\outlook files)

Backup of PST/Archive folder
1.Close outlook and office communicator properly.
2. copy pst file (user\my documents\outlook files\some.pst) in desktop
3.with that you can now import  to outlook
4. open outook,file menu->open & export ->select outlook data file->go to the location where you have stored your backup PST file
5. your backup of pst file will be available in outlook.

Posted in Uncategorized, windows | Leave a comment

Using command line to check a process running

To check if a process e.g firefox is running, using command line, type:

C:\Users\adminjoe>tasklist /fi “imagename eq firefox.exe”

Image Name PID Session Name Session# Mem Usage

firefox.exe 1292 Console 1 339,208 K

 

If you use powershell, then it’s

PS C:\Users\adminjoe> get-process firefox

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessN
——-  ——    —–      —– —–   ——     — ——–
679     105   323016     353476   686   404.92   1292 firefox

Posted in Uncategorized, windows | Leave a comment

Extract Images from Video Using ffmpeg

I have this video which I want to extract images from it. To extract images from a video type

For extracting images from a video:

ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg

This will extract one video frame per second from the video and will output them in files named foo-001.jpeg, foo-002.jpeg, etc. Images will be rescaled to fit the new WxH values. You can omit the -s option in case you do not know what size to put.

Posted in ffmpeg, multimedia | Leave a comment

Converting VOB media file to mpeg using ffmpeg

Converting VOB media file to mpeg using ffmpeg

I have a VOB file that is produced from using Imagination. And I want to convert it to mpeg file. This is the command I use.

# ffmpeg -i MyKids.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k mykidsvob2mpeg4.avi

 

Posted in ffmpeg, multimedia | Leave a comment

Install ffmpeg in Ubuntu 14.04

To install ffmpeg on Ubuntu 14.04 LTS type the following:

sudo apt-add-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
Posted in ffmpeg, multimedia | Leave a comment

Viewing DAT Files in DVD or VCD using Mplayer Command LIne

Viewing DAT Files in DVD or VCD using Mplayer Command Line

fb_DATfile

It was about ten years ago that I use command line to watch VCD/DVD. But somehow rather after years of not using VCD/DVD disks, I forgotten the simple command. Sadly last night I had to resort to using the DVD player to play my kids’ childhood videos (as you guessed it, my wife and kids enjoyed the video). So today, I decided to post this  command line for future reference.

Simply pop in the VCD/DVD in the laptop DVD drive and open a terminal console. After that type:

#mplayer vcd://1

to play track 1

or

#mplayer vcd://2

to play track 2

If it is a DVD disk, replace the word vcd with dvd. That’s it. Thanks for reading. 🙂

Posted in Uncategorized | Tagged , | Leave a comment