Posts Tagged ‘command line’

Command line switches for Microsoft Outlook 2010

Wednesday, April 11th, 2012

Microsoft Outlook 2010 can be opened with a variety of command line options, or switches.  The list below is courtesy of Microsoft.

Available switches

Switch

Description

/a

Creates an item with the specified file as an attachment.

Example:

·      “c:\program files\microsoft office\office14\outlook.exe” /a “c:\my documents\labels.doc”

If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that are not based on Outlook.

/altvba otmfilename

Opens the VBA program specified in otmfilename, instead of %appdata%\microsoft\outlook\vbaproject.otm.

 Note    This command line switch is only available if the following Windows registry DWORD value is set to 1. HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\EnableAltVba

/c messageclass

Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).

Examples:

·      /c ipm.activity creates a Journal entry

·      /c ipm.appointment creates an appointment

·      /c ipm.contact creates a contact

·      /c ipm.note creates an e-mail message

·      /c ipm.stickynote creates a note

·      /c ipm.task creates a task

/checkclient

Prompts for the default manager of e-mail, news, and contacts.

/cleanautocompletecache

Removes all names and e-mail addresses from the Auto-Complete list.

/cleancategories

Deletes any custom category names that you have created. Restores categories to the default names.

/cleanclientrules

Starts Outlook and deletes client-based rules.

/cleanconvongoingactions

Deletes the Conversations Actions Table (CAT). CAT entries for a conversation thread usually expire 30 days after no activity. The command-line switch clears all conversation tagging, ignore, and moving rules immediately stopping any additional actions.

/cleandmrecords

Deletes the logging records saved when a manager or a delegate declines a meeting.

/cleanfinders

Resets all Search Folders in the Microsoft Exchange mailbox for only the first profile opened.

/cleanfreebusy

Clears and regenerates free/busy information. This switch can be used only when you are able to connect to the server that runs Exchange.

/cleanfromaddress

Removes all manually added From entries from the profile.

/cleanmailtipcache

Removes all MailTips from the cache.

/cleanreminders

Clears and regenerates reminders.

/cleanroamedprefs

All previous roamed preferences are deleted and copied again from the local settings on the computer where this switch is used. This includes the roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.

/cleanrules

Starts Outlook and deletes client-based and server-based rules.

/cleanserverrules

Starts Outlook and deletes server-based rules.

/cleansharing

Removes all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings, but leaves all the previously downloaded content on your computer. This is useful if you cannot delete one of these subscriptions within Outlook 2010.

/cleansniff

Overrides the programmatic lockout that determines which of your computers (when you run Outlook at the same time) processes meeting items. The lockout process helps prevent duplicate reminder messages. This switch clears the lockout on the computer it is used. This enables Outlook to process meeting items.

/cleansubscriptions

Deletes the subscription messages and properties for subscription features.

/cleanviews

Restores default views. All custom views that you created are lost.

/embedding

Used without command-line parameters for standard OLE co-create.

/f msgfilename

Opens the specified message file (.msg) or Microsoft Office saved search (.oss).

/finder

Opens the Advanced Find dialog box.

/hol holfilename

Opens the specified .hol file.

/ical icsfilename

Opens the specified .ics file.

/importNK2

Imports the contents of an .nk2 file which contains the nickname list that is used by both the automatic name checking and Auto-Complete features.

/importprf prffilename

Starts Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean start.

/launchtraininghelp assetid

Opens a Help window with the Help topic specified in assetid displayed.

/m emailname

Provides a way for the user to add an e-mail name to the item. Only works together with the /c command-line parameter.

Example:

·      Outlook.exe /c ipm.note /m emailname

/nopreview

Starts Outlook with the Reading Pane off.

/p msgfilename

Prints the specified message (.msg).

/profile profilename

Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (” “).

/profiles

Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.

/promptimportprf

Same as /importprf except that a prompt appears and the user can cancel the import.

/recycle

Starts Outlook by using an existing Outlook window, if one exists.

/remigratecategories

Starts Outlook and starts the following commands on the default mailbox:

·      Upgrades colored For Follow Up flags to Outlook 2010 color categories.

·      Upgrades calendar labels to Outlook 2010 color categories.

·      Adds all categories used on non-mail items into the Master Category List

 Note    This is the same command as Upgrade to Color Categories in each Outlook mailbox properties dialog box.

/resetfolders

Restores missing folders at the default delivery location.

/resetfoldernames

Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.

For example, if you first connect to your mailbox in Outlook by using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language, such as Japanese or English, you can use this switch to reset the default folder names after you change the user interface language or install a different language version of Outlook.

/resetformregions

Empties the form regions cache and reloads the form region definitions from the Windows registry.

/resetnavpane

Clears and regenerates the Navigation Pane for the current profile.

/resetquicksteps

Restores the default Quick Steps. All user-created Quick Steps are deleted.

/resetsearchcriteria

Resets all Instant Search criteria so that the default set of criteria is shown in each module.

/resetsharedfolders

Removes all shared folders from the Navigation Pane.

/resettodobar

Clears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.

/restore

Attempts to open the same profile and folders that were open prior to an abnormal Outlook shutdown.

/rpcdiag

Opens Outlook and displays the remote procedure call (RPC) connection status dialog box.

/safe

Starts Outlook without the Reading Pane or toolbar customizations. Both native and managed Component Object Model (COM) add-ins are turned off.

/safe:1

Starts Outlook with the Reading Pane off.

/safe:3

Both native and managed Component Object Model (COM) add-ins are turned off.

/select foldername

Starts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar, use: “c:\program files\microsoft office\office14\outlook.exe” /select outlook:calendar.

/share feed://URL/filename

/share stssync://URL

/share web://URL/filename

Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a SharePoint list to Outlook.

/sniff

Starts Outlook, forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.

/t oftfilename

Opens the specified .oft file.

/v vcffilename

Opens the specified .vcf file.

/vcal vcsfilename

Opens the specified .vcs file.

Enabling the real administrator account in Windows Vista and Windows 7

Friday, January 21st, 2011

There will occasionally be times when you want unfettered administrative access to your machine without the risk inherent to simply disabling UAC. This can be accomplished quite easily by enabling the real administrator account which is disabled by default in Windows Vista and Windows 7. It is important to remember, however, that this account should not be used as your default account since it being compromised would be tantamount to allowing bad guys complete control of your PC.

The process is identical for both Vista and Windows 7 users.  First, open a command prompt. Type “compmgmt.msc” and hit enter. When the Computer Management console opens, expand Local Users and Groups and select Users as shown right.

Before you get all excited, right-click on the administrator account, uncheck the disabled box and start to celebrate your newly acquired administrative powers, you should set a password. Right-click on the account and input your desired password, selecting one as secure/obscure as possible. The warning that appears (see right) is due to the fact that you’re changing the password of the admin account from within another account. You can proceed without any worries because you will be enabling the real administrator account for the first time.

Finally, right click on the account again and select Properties. Now you can uncheck the “Account is disabled” box and activate your real administrator account. Hit OK, log out of the current account and log into your new administrator account with the password you just set. To disable the account, simply recheck the box to disable the account.

For those who prefer the simplicity of the command line UI, the same operation can be performed with the following command:

net user administrator /active:yes

The operation can be undone with this command:

net user administrator /active:no


Kill rogue processes with taskkill in Microsoft Windows

Tuesday, January 11th, 2011

There are times, regardless of your operating system, when you will need to manually kill a rogue process. Most of the time, this can easily be done with the help of the Microsoft Windows 7 Task Manager. There are times, however, when that tool doesn’t seem to have the ability to kill a rogue process. I have seen this plenty of times when trying to kill an Acronis process that has gone astray. When this happens, I have to employ a more powerful tool, taskkill, which is used from the command line.

Note: In order to run the taskkill command, you will have to open the command window. To do this, click Start | Run and type cmd in the text field or just enter cmd in the Run dialog box (access Run dialog box by clicking Win+R) (Figure A).

Figure A

Open the command window.

Using taskkill

The general syntax of the command looks like this:

taskkill [OPTIONS] [PID]

As you might expect, there are plenty of options available for this command. Some of the more helpful options are:

  • /s COMPUTER — (Where COMPUTER is the IP or address of a remote computer). The default is the local computer, so if you’re working with a command on the local machine, you do not have to use this option.
  • /u DOMAIN\USER — (Where DOMAIN is the domain and USER is the username you authenticate to). This option allows you run taskkill with the account permissions of the specified USERNAME or DOMAIN\USERNAME.
  • /p — If you use the /u option, you will also need to include the /p option, which allows you to specify the user password.
  • /fi — Allows you to run the taskkill command with filters.
  • /f — Forces the command to be terminated.
  • /IM — Allows you to use an application name instead of the PID (Process ID number) of the application.

One of the most useful options is the help switch (Figure B):

taskkill /?

Figure B

Use the help switch for the taskkill command.

Killing with application name

The simplest way to kill a rogue application with taskkill is using the /IM option. This is done like so:

taskkill /IM APPLICATION_NAME

Where APPLICATION_NAME is the name of the application you want to kill. Say, for example, Outlook is refusing to close. To close this with taskkill, you would execute the command:

taskkill /IM outlook.exe

Killing with PID

Let’s say you do not know the name of the application, but instead you know the PID of the application. To kill a process with a PID of, say, 572, you would issue the command:

taskkill /PID 572

Killing all processes owned by a particular user

What if you want to kill all processes owned by a single user? This can come in handy if something has gone awry with a user account or if the user has logged out, but some of the processes owned by that user will not go away. To manage this you would issue the taskkill command like so:

taskkill /F /FI “USERNAME eq username”

In this case, the username is the actual username that owns the processes. Note: The USERNAME option must be used in order to tell the taskkill command a username will be specified.

Killing processes on a remote machine

This one is very handy. Say something has locked up your desktop and you know exactly what application is the culprit. Let’s stick with our Outlook example from earlier. You can hop onto another machine and remotely kill that application like so:

taskkill /s IP_ADDRESS /u DOMAIN\USERNAME /IM Outlook.exe

Where IP_ADDRESS is the address of the remote machine (Note: The hostname can be substituted if the machines are able to see one another by hostname), DOMAIN is the domain (if applicable), and USERNAME is the username used to authenticate to the remote machine.

Final thoughts

The ability and power that comes with the taskkill command can be a very valuable tool that might save you from having to forcibly reboot a machine. Having a solid grasp of this tool, in conjunction with using the Windows Task Manager, will help to keep your Windows machines enjoying longer uptime and, should the occasion strike, the ability to manage a task when a virus, rootkit, or trojan has taken over your machine.

 

Source:  techrepublic.com

Linux and FreeBSD hardware info

Tuesday, January 11th, 2011

Switching between open source OSs can sometimes be confusing, since they may have different ways of doing things. A common task that may confuse some users when switching systems is getting hardware information. In the case of Linux-based OSs and FreeBSD, the following cheat sheet for figuring out how to do the same things on two different systems can ease some of the pain.

CPU and memory information

Because Linux-based systems use the proc device filesystem to provide access to information about hardware devices in the system, getting specific information about the hardware sometimes involves finding it in files using the grep command. The same information is normally accessed on FreeBSD via the sysctl command.

To get information about your CPU model . . .

  • Linux:
    grep model /proc/cpuinfo
    
  • FreeBSD:
    sysctl hw.model
    

To get information about total system memory . . .

  • Linux:
    grep MemTotal /proc/meminfo
    
  • FreeBSD:
    sysctl hw.realmem
    

Device listings

Information about many other devices might be needed as well. For these, each system has tools designed to provide listings of devices connected to various system buses.

To get information about PCI devices . . .

  • Linux:
    lspci -v
    
  • FreeBSD:
    pciconf -lv
    

To get information about USB devices . . .

  • Linux:
    lsusb -v
    
  • FreeBSD:
    usbconfig
    

To get other connected device information . . .

  • Linux:
    dmidecode
    

    This command shows DMI/SMBIOS hardware information.

    lshal
    

    This command shows all devices managed by the HAL subsystem.

  • FreeBSD:
    atacontrol list
    

    This command shows all ATA devices.

    camcontrol devlist -v
    

Notes

Some of the above commands may work from a normal, unprivileged user account. Others may be restricted to root access.

On both of these OS types, a lot more information can be had by means similar to those described above. For instance, the /proc/cpuinfo and /proc/meminfo files contain a lot more information than just the CPU model and total memory. There is a sysctl command on Linux-based systems as well as on FreeBSD and other BSD Unix systems, but it is not as broadly useful as on FreeBSD, nor does it offer as comprehensive coverage of the system, because Linux-based systems default to other means of accessing and configuring system configuration values (such as the proc filesystem). On either system type, a picture of sysctl capabilities can be seen by viewing the utility’s manpage.

If you are feeling curious and have some time to spend exploring, sysctl -a outputs all information sysctl has to provide.

 

Source:  techrepublic.com

Alphabetical command line list (Microsoft)

Tuesday, July 13th, 2010

The following list of Microsoft commands may come in handy for the post DOS generation (definitions sold separately…):

Arp
Assoc
At
Atmadm
Attrib
Batch files
Bootcfg
Break
Cacls
Call
Change
Chcp
Chdir
Chkdsk
Chkntfs
Cipher
Cls
Cmd
Cmstp
Color
Command shell overview
Comp
Compact
Convert
Copy
Cprofile
CScript overview
Date
Defrag
Del
Dir
Diskcomp
Diskcopy
DiskPart
Doskey
Driverquery
Echo
Endlocal
Eventcreate
Eventquery
Eventtriggers
Evntcmd
Exit
Expand
Fc
Filter commands
Find
Findstr
Finger
Flattemp
For
Format
Fsutil
Ftp
Ftp subcommands
Ftype
Getmac
Goto
Gpresult
Gpupdate
Graftabl
Help
Helpctr
Hostname
If
Ipconfig
Ipseccmd
Ipxroute
Irftp
Label
Lodctr
Logman
Lpq
Lpr
Macfile
Mkdir (md)
Mmc
Mode
More
Mountvol
Move
MS-DOS subsystem configuration commands
Msiexec
Msinfo32
Nbtstat
Net services overview
Net services commands
Netsh command overview
Netsh commands for AAAA
Netsh commands for DHCP
Netsh diagnostic (diag) commands
Netsh commands for Interface IP
Netsh commands for RAS
Netsh commands for Routing
Netsh commands for WINS
Netstat
Nslookup
Nslookup subcommands
Ntbackup
Ntcmdprompt
Ntsd
Openfiles
Pagefileconfig
Path
Pathping
Pause
Pbadmin
Pentnt
Perfmon
Ping
Popd
Print
Prncnfg
Prndrvr
Prnjobs
Prnmngr
Prnport
Prnqctl
Prompt
Pushd
Query
Rasdial
Rcp
Recover
Redirection operators
Reg
Regsvr32
Relog
Rem
Rename
Replace
Reset session
Rexec
Rmdir
Route
Rsh
Rsm
Runas
Sc
Schtasks
Secedit
Set
Setlocal
Shift
Shutdown
Sort
Start
Subst
Systeminfo
System File Checker (sfc)
Taskkill
Tasklist
Tcmsetup
TCP/IP utilities and services
Telnet commands
Terminal Services commands
Tftp
Time
Title
Tracerpt
Tracert
Tree
Type
Typeperf
Unlodctr
Ver
Verify
Vol
Vssadmin
W32tm
Winnt
Winnt32
WMIC overview
Xcopy

 

 

Outlook 2007 Extensions

Thursday, May 6th, 2010
Available switches
Switch Description
/a Creates an item with the specified file as an attachment.
Example:
“c:\program files\microsoft office\office12\outlook.exe” /a “c:\my documents\labels.doc”
If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that are not based on Outlook.
/altvba otmfilename Opens the VBA program specified in otmfilename, rather than %appdata%\microsoft\outlook\vbaproject.otm.
/c messageclass Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).
Examples:
/c ipm.activity creates a Journal entry
/c ipm.appointment creates an appointment
/c ipm.contact creates a contact
/c ipm.note creates an e-mail message
/c ipm.stickynote creates a note
/c ipm.task creates a task
/checkclient Prompts for the default manager of e-mail, news, and contacts.
/cleancategories Deletes any custom category names that you have created. Restores categories to the default names.
/cleanclientrules Starts Outlook and deletes client-based rules.
/cleandmrecords Deletes the logging records saved when a manager or a delegate declines a meeting.
/cleanfinders Resets all Search Folders in the Microsoft Exchange mailbox for only the first profile opened.
/cleanfreebusy Clears and regenerates free/busy information. This switch can be used only when you are able to connect to the server running Exchange.
/cleanprofile Removes invalid profile keys and re-creates default registry keys where applicable.
/cleanreminders Clears and regenerates reminders.
/cleanroamedprefs All previous roamed preferences are deleted and copied again from the local settings on the computer where this switch is used. This includes the roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.
/cleanrules Starts Outlook and deletes client-based and server-based rules.
/cleanserverrules Starts Outlook and deletes server-based rules.
/cleansharing Removes all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings, but leaves all the previously downloaded content on your computer. This is useful if you are unable to delete one of these subscriptions within Office Outlook 2007.
/cleansniff Overrides the programmatic lockout that determines which of your computers (when running Outlook simultaneously) processes meeting items. The lockout process helps prevent duplicate reminder messages. This switch clears the lockout on the computer it is used, enabling Outlook to process meeting items.
/cleansubscriptions Deletes the subscription messages and properties for subscription features.
/cleanviews Restores default views. All custom views that you created are lost.
/embedding Used without command-line parameters for standard OLE co-create.
/f msgfilename Opens the specified message file (.msg) or Microsoft Office saved search (.oss).
/finder Opens the Advanced Find dialog box.
/firstrun Starts Outlook as if it were run for the first time.
/hol holfilename Opens the specified .hol file.
/ical icsfilename Opens the specified .ics file.
/importprf prffilename Starts Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean start.
/launchtraininghelp assetid Opens a Help window with the Help topic specified in assetid displayed.
/m emailname Provides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.
Example:
Outlook.exe /c ipm.note /m emailname
/nocustomize Starts Outlook without loading outcmd.dat (customized toolbars).
/noextensions Starts Outlook with extensions turned off, but listed in the Add-In Manager.
/nopreview Starts Outlook with the Reading Pane off.
/p msgfilename Prints the specified message (.msg).
/profile profilename Loads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (” “).
/profiles Opens the Choose Profile dialog box regardless of the Options setting on the Tools menu.
/recycle Starts Outlook by using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.
/remigratecategories Starts Outlook and and initiates the following commands on the default mailbox:
Upgrades colored For Follow Up flags to Office Outlook 2007 color categories.
Upgrades calendar labels to Office Outlook 2007 color categories.
Adds all categories used on non-mail items into the Master Category List.
Note  This is the same command as Upgrade to Color Categories in each Outlook mailbox properties dialog box.
/resetfolders Restores missing folders at the default delivery location.
/resetfoldernames Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.
For example, if you first connect to your mailbox in Outlook by using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language, such as Japanese or English, you can use this switch to reset the default folder names after you change the user interface language or install a different language version of Outlook.
/resetformregions Empties the form regions cache and reloads the form region definitions from the Windows registry.
/resetnavpane Clears and regenerates the Navigation Pane for the current profile.
/resetsearchcriteria Resets all Instant Search criteria so that the default set of criteria is shown in each module.
/resetsharedfolders Removes all shared folders from the Navigation Pane.
/resettodobar Clears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.
/rpcdiag Opens Outlook and displays the remote procedure call (RPC) connection status dialog box.
/safe Starts Outlook without Microsoft Exchange Client Extensions (ECE), the Reading Pane, or toolbar customizations. Component Object Model (COM) add-ins are turned off.
/safe:1 Starts Outlook with the Reading Pane off.
/safe:3 Starts Outlook with Microsoft Exchange Client Extensions (ECE) turned off, but listed in the Add-In Manager. Component Object Model (COM) add-ins are turned off.
/safe:4 Starts Outlook without loading outcmd.dat (customized toolbars).
/select foldername Starts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar, use: “c:\program files\microsoft office\office12\outlook.exe” /select outlook:calendar.
/share feed://URL/filename Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a Microsoft Windows SharePoint Services 3.0 list to Outlook.
/share stssync://URL
/share web://URL/filename
/sniff Starts Outlook, forces a detection of new meeting requests in the Inbox, and then adds them to the calendar.
/t oftfilename Opens the specified .oft file.
/v vcffilename Opens the specified .vcf file.
/vcal vcsfilename Opens the specified .vcs file.
/x xnkfilename Opens the specified .xnk file.