Administration CLI Command Line Exchange Server 2007 Exchange Shell Linux Windows Windows 2000 Windows 2003

Exchange 2007 HOW TO: Add Email Addresses To Public Folders

How do we add email addresses to Public Folders?

It should be pretty simple – If Get-Mailbox shows the emailaddresses property for a mailbox, and Set-Mailbox allows you to use the -EmailAddresses switch to add email addresses, one can’t be blamed for believing it’ll work the same way for Public Folders.

Objects other than Public Folders need to be mailbox or mail-enabled to be Exchange recipients, Public Folders do not (Yes, they are mail-enabled by default). To modify mail-related attributes of Public Folders, you use the Set-MailPublicFolder command.

To add additional email address to a (mail-enabled) Public Folder:

$PF = Get-MailPublicFolder “Sales”

$PF.EmailAddresses += “”

$PF | Set-MailPublicFolder

The first line gets mail-related properties of Public Folder “Sales” in a variable called $PF. Next, we add the additional email address, without wiping out the existing ones. Finally, we commit the change using Set-MailPublicFolder.

If you simply use Set-MailPublicFolder “Sales” -EmailAddresses “”, it will replace the existing values in the EmailAddresses property.

Another difference to note between how the Set-PublicFolder and Get-PublicFolder commands work, compared to Set-MailPublicFolder and Get-MailPublicFolder – the former takes a relative path of a Public Folder. For instance, to get the Sales PF if it’s in the root of the Public Folder tree, we would need to add a before the name:

Get-PublicFolder Sales

However, the Get/Set-MailPublicFolder commands work using the alias/display name of the PF. Why the difference? One way to look at it – when using Get/Set-PublicFolder, you’re working with the actual Public Folder. When using Get/Set-MailPublicFolder, you’re working with the Active Directory object created for that Public Folder (which holds mail-related attributes, making it possible for a Public Folder to be mail-enabled).

To change the primary email address of the Public Folder “Sales” from “” to the new address we just entered – “”:

Set-MailPublicFolder “Sales” -EmailAddressPolicyEnabled $false -PrimarySmtpAddress “”

As you may have already figured out, we exempted the Public Folder from getting EmailAddressPolicies applied. In Exchange Server 2003/2000, you could change the default email address of a recipient, without unchecking the checkbox. Result: A few minutes after you completed the change, Recipient Policies would apply and change the primary email address back.

Exchange Server 2007 doesn’t let you change the default email address without exempting the recipient from email address policies.

CLI Command Line Control Panel Linux SERVER Time TIME ZONE Timezone Windows Windows 2000 Windows 2003

Set Time Zone From Command Line in Windows 2003, XP and 2000

Quick and easy way to set timezone from command line in Windows 2003, XP and 2000.

CONTROL.EXE TIMEDATE.CPL,,/Z Eastern Standard Time
CONTROL.EXE TIMEDATE.CPL,,/Z Central Standard Time
CONTROL.EXE TIMEDATE.CPL,,/Z Mountain Standard Time
CONTROL.EXE TIMEDATE.CPL,,/Z Pacific Standard Time

These are a little longer but they do the same thing.

RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Eastern Standard Time
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Central Standard Time
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Mountain Standard Time
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Pacific Standard Time

See also Set Time Zone From Command Line in Windows 7 and Windows 2008

change time zone from command line windows xp
windows 2003 change timezone
command to get time zone in win xp

chat IM Linux SMS teen text message Windows Windows 2000

50 More Acronyms Every Parent Should Know

Parents, do you know what your kids (teen and pre-teen) are saying when they chat? Here are 50 text/SMS/Internet acronyms/shortcuts parents need to know.

Goto our complete list of Internet/Chat acronyms (nearly 2000).

See our original 50 Acronyms Every Parent Should Know.

2nite Tonight
AWGTHTGTTA Are We Going To Have To Go Through This Again
banana code word for penis
B4YKI Before You Know It
BRB Be Right Back
BRT Be Right There
CWYL Chat With You Later
CYT See You Tomorrow
DIAF Die In A Fire
DOC Drug Of Choice
E123 Easy as One, Two, Three
EM Excuse Me
EOD End Of Day -or- End Of Discussion
FAH F***ing A Hot
FB F*** Buddy
FOAF Friend Of A Friend
GLBT Gay, Lesbian, Bisexual, Transgender
HBU How Bout You?
HUYA Head Up Your Ass
I&I Intercourse & Inebriation
IDGI I Don’t Get It -or- I Don’t Get Involved
IMEZRU I Am Easy, Are You?
IMNSHO In My Not So Humble Opinion
J/C Just Checking
kitty code word for vagina
L8R Later
LD Long Distance -or- Later Dude
LMK Let Me Know
LOL Laughing Out Loud -or- Lots of Love
N-A-Y-L In A While
NAZ Name, Address, Zip (also means Nasdaq)
NM Never Mind -or- Nothing Much -or- Nice Move
OLL OnLine Love
OMW On My Way
OTP On The Phone
QT Cutie
RN Right Now
ROTFL Rolling On The Floor Laughing
RU Are You?
SITD Still In The Dark
SMEM Send Me E-Mail
SMIM Send Me an Instant Message
SO Significant Other
SOHF Sense Of Humor Failure
SWDYT So What Do You Think?
TOM Tomorrow
TS Tough Sh** -or- Totally Stinks
TTFN Ta Ta For Now
ur you are
WFM Works For Me
XOXO Hugs and Kisses
chat IM Internet Linux SMS teen text message Windows Windows 2000 WPA

Top 50 Internet Acronyms Parents Need to Know

Parents, do you know what your kids (teen and pre-teen) are saying when they chat? Here are 50 text/SMS/Internet acronyms/shortcuts parents need to know.

Goto our complete list of Internet/Chat acronyms (nearly 2000).

8 Oral sex
1337 Elite -or- leet -or- L337
143 I love you
182 I hate you
1174 Nude club
420 Marijuana
459 I love you
ADR Address
AEAP As Early As Possible
ALAP As Late As Possible
ASL Age/Sex/Location
CD9 Code 9 – it means parents are around
C-P Sleepy
F2F Face-to-Face
GNOC Get Naked On Cam
GYPO Get Your Pants Off
HAK Hugs And Kisses
ILU I Love You
IWSN I Want Sex Now
J/O Jerking Off
KOTL Kiss On The Lips
KFY -or- K4Y Kiss For You
KPC Keeping Parents Clueless
LMIRL Let’s Meet In Real Life
MOOS Member Of The Opposite Sex
MOSS Member(s) Of The Same Sex
MorF Male or Female
MOS Mom Over Shoulder
MPFB My Personal F*** Buddy
NALOPKT Not A Lot Of People Know That
NIFOC Nude In Front Of The Computer
NMU Not Much, You?
P911 Parent Alert
PAL Parents Are Listening
PAW Parents Are Watching
PIR Parent In Room
POS Parent Over Shoulder -or- Piece Of Sh**
pron porn
Q2C Quick To Cum
RU/18 Are You Over 18?
RUMORF Are You Male OR Female?
RUH Are You Horny?
S2R Send To Receive
SorG Straight or Gay
TDTM Talk Dirty To Me
WTF What The F***
WUF Where You From
WYCM Will You Call Me?
WYRN What’s Your Real Name?
zerg To gang up on someone
FREE Freeware Jam Software Linux Utility Windows Windows 2000

TreeSize Free – ever want to know how big various folders are?

Every hard disk is too small if you just wait long enough. TreeSize Free tells you where precious space has gone. TreeSize Free can be started from the context menu of a folder or drive and shows you the size of this folder, including its subfolders. You can expand this folder in Explorer-like style and you will see the size of every subfolder. Scanning is done in a thread, so you can already see results while TreeSize Free is working. The space, which is wasted by the file system, can be displayed and the results can be printed in a report. TreeSize Free is freeware for Windows 2000/XP/Vista.

Download TreeSize Free (here you can find the more powerful TreeSize Professional as well)

Linux SQL Time Windows Windows 2000

SQL SERVER – Get Time in Hour:Minute Format from a Datetime – Get Date Part Only from Datetime

Get Current Date & Time

select GetDate()

SQL Server 2000/2005

CONVERT(VARCHAR(8),GETDATE(),108) AS HourMinuteSecond,

SQL Server 2008


CLI Command Line Grep Linux Win 7 Win7 Windows Windows 2000 Windows 7 Windows Vista Windows7

Windows Command Line Tricks

Here are a few Windows command line tricks that might make your life easier.

Save A List of Files to a Text File by Extension

dir *.ext /s /b > files.txt

This command line will create a file called files.txt. When you open this file, there will be a complete list of all the files in that directory and all subdirectories with the .ext extension. You can then open up this text file in any text editor and work this the information.By changing the ext part, you can select different files. For example, if you wanted to list all of the PDF documents, you would type:

dir *.pdf /s /b > files.txt

Get Your IP Address Information

ipconfig /all

This will retrieve a pile of information about your network connection and IP information. From this command, you can get:

* Host Name
* Primary DNS Suffix
* Node Type
* IP Routing Enabled
* WINS Proxy Enabled
* DNS Suffix Search List
* Connection-specific DNS Suffix
* Network Adapter Description
* Physical (MAC) Address
* DHCP Enabled
* IP Address
* Subnet Mask
* Default Gateway
* DNS Servers

Get Installed Driver Information


It can be very useful when troubleshooting to know what drivers are installed on a system. This command will give you a complete listing of the drivers and when they were installed.

Find Files Opened By Network Users

openfiles /query

If you are running a system and you want to know who has files open on your computer, this command will provide you a list of those users and the files that they have open.

Note: If you get an error saying The system global flag ‘maintain objects list’ needs to be enabled to see local opened files, you can fix this issue by typing openfiles /local on. You will have to reboot the system but it will resolve the issue.

Monitor Port Activity

netstat -a 30

This will show you all of the TCP/IP ports that are being used on your system and what they are connecting to (or being connected from). It will continue to monitor these ports and refresh the information every 30 seconds. You can change the refresh rate by changing the number at the end of the command.

Recover Information From A Corrupt File

recover filename.ext

If you have a disk with damaged sectors, you can attempt to recover as much information as possible from the damaged file. Data that is not damaged can be retrieved but data in damaged sectors will be lost.

Defragment Remote Computer

rexec remotePC defrag C: /F

This command used the rexec command to force a defragment of the C: drive on the computer named remotePC. You can use whatever you want to for the command (I just used defrag C: /F as an example). This is very useful for remote maintenance.

Retrieve Detailed System Information


With this command, you can retrieve the following information:

* Host Name
* OS Name
* OS Version
* OS Manufacturer
* OS Configuration
* OS Build Type
* Registered Owner
* Registered Organization
* Product ID
* Original Install Date
* System Up Time
* System Manufacturer
* System Model
* System type
* Processor(s)
* BIOS Version
* Windows Directory
* System Directory
* Boot Device
* System Locale
* Input Locale
* Time Zone
* Total Physical Memory
* Available Physical Memory
* Virtual Memory Max Size
* Virtual Memory Available
* Virtual Memory In Use
* Page File Location(s)
* Domain
* Logon Server
* Hotfix(s)
* NetWork Card(s)

Schedule Defrag to Defragment C: Daily

schtasks /create /tn “Defrag C” /tr “defrag c: /f” /sc daily /st 02:00:00 /ru “System”

This will set your computer to automatically perform a complete defrag of the C: drive each day at 11:00:00 PM (23:00:00). It does this by creating a scheduled task called Defrag C. It will run this command under the computer’s system account.

Map A Drive Letter to a Folder

subst W: C:windows

Sometimes, your directory structure can get pretty deep and complicated. You can simplify this a bit by mapping a drive letter to commonly used folders. In the example that I have given, this will create a drive letter W: and map it to the C:windows directory. Then, whenever you go into My Computer, you will see a W: drive and when you browse to it, it will automatically take you to the contents of the C:windows folder.

You can do this with any unused drive letter and any folder that exists on your system.

List All Tasks Running On The Computer


It’s always good to know what is running on your system. This is the command line version of the processes tab in Taks Manager.

Kill A Program

taskkill /im programname.exe /f

If, when using the tasklist command, you discover that there is something running you just want killed. This is the way to do it! Just note the program name and use it in place of programname.exe.

Reboot a Remote Computer

shutdown -r -f -m \remotePC -c “System will be rebooted in 30 seconds”

Sometimes, you just need to reboot a system. This will do it remotely and give the user a 30 second warning.

Schedule computer reboot

schtasks /create /tn “Reboot” /tr “shutdown /r /t 1” /sc once /st 01:00:00 /sd 08/18/2009 /ru “System”

cmd /c – Carries out the command specified by string and then terminates
&& – concatenates commands together

This way you can create a shortcut for short scripts without creating batch files.
e.g. a shortcut for stopping and starting the print spooler.

%windir%System32cmd.exe /c “net.exe stop Spooler && net start Spooler”

No sleep command in Windows 2000/XP (AFAIK) unless you have the Resource Kit, and then you have to move extra files around with your scripts.
Simply use the ping command to wait predefined times. In this example it’s 10 seconds.

ping -n 10 > NUL 2>&1

Windows answer to grep. Not as powerful but still useful.

e.g. In conjunction with systeminfo above to find out the Virtual Memory on the PC.

systeminfo find “Virtual Memory”

CLI Command Line Grep Linux Win 7 Win7 Windows Windows 2000 Windows 2003 Windows 7 Windows Vista Windows7

Windows (XP, Vista, Windows 7, 2003, 2008) Commands

Here is a great list Windows XP/2000 commands that will make any Linux user feel at home at the command prompt. A lot of these commands are intended for administrating a network, but they are great for savvy home users as well.

  • at – Windows Scheduling utility
  • bootcfg – This utility allows you to set up your boot options, such as your default OS and other loading options
  • cacls – Changes the ACLs (security Settings) of files and folders. Very similar to chmod in Linux.
  • comp – This utility is very similar to diff in Linux. Use the /? switch to get examples of command usage.
  • defrag – Yes, XP comes with a command line disk defrag utility. Here’s an example of how to create a scheduled task to defrag every day:

    schtasks /create /tn “Defrag C” /tr “defrag c: /f” /sc daily /st 04:30:00 /ru “System”

  • diskpart – Use this command to manage your disk partitions. This is the text version for the GUI Disk Manager.
  • driverquery – Produces a list of drivers, their properties, and their versions. Great for computer documentation.
  • eudcedit (unpublished) – Private Character editor. Yes with this program built into Windows XP you can create your own font!
  • findstr – Find String – similar to Linux’s Grep.
  • fsutil (unpublished) – This is a utility with a lot of capability. Come back soon for great examples.
  • getmac – This command gets the Media Access Control (MAC) address of your network cards.
  • gpresult – This generates a summary of the user settings and computer group policy settings.
  • gpupdate – Use this utility to manually apply computer and user policy from your windows 2000 (or newer) Active Directory domain.
  • ipconfig – This handy tool displays IP settings of the current computer and much more.
  • MMC – Microsoft Management Console. This is the master tool for Windows, it is the main interface in which all other tools use starting primarily in Windows 2000 and newer systems.
  • more- Utility used to display text output one screen at a time. Example:

    more c:windowswin.ini

  • msconfig – The ultimate tool to change the services and utilities that start when your Windows machine boots up. You can also copy the executable from XP and use it in Win2k.
  • msinfo32 – An awesome diagnostic tool. With it you can get a list of running processes, including the residing path of the executable (great for manually removing malware) and get detailed information about hardware and system diagnostics.
  • narrator – Turns on the system narrator (can also be found in accessibility options in control panel). Will will allow your computer to dictate text to you.
  • netsh – A network configuration tool console. At the ‘netsh>’ prompt, use the ‘?’ to list the available commands and type “exit” to get back to a command prompt.
  • netstat – A local network port tool – try netstat -ano.
  • nslookup – A DNS name resolution tool.
  • openfiles – Allows an administrator to display or disconnect open files in XP professional. Type “openfiles /?” for a list of possible parameters.
  • Pathping – A cross between the ping and traceroute utilities. Who needs Neotrace when you can use this? Type “pathping ” and watch it go.
  • recover – This command can recover readable information from a damaged disk and is very easy to use.
  • reg – A console registry tool, great for scripting Registry edits.
  • sc – A command line utility called the Service Controller. A power tool to make service changes via a logon/logoff or startup/shutdown script.
  • schtasks – A newer version of the AT command. This allows an administrator to schedule and manage scheduled tasks on a local and remote machines.
  • secedit – Use this utility to manually apply computer and user policy from your windows 2000 (or newer) domain. Example to update the machine policy: secedit /refreshpolicy machine_policy /enforce
    To view help on this, just type secedit.
    NOTE: In Windows XP SP1 and news, this command is superceded by: gpupdate /force
  • sfc – The system file checker scans important system files and replaces the ones you (or your applications) hacked beyond repair with the real, official Microsoft versions.
  • shutdown – With this tool, You can shut down or restart your own computer, or an administrator can shut down or restart a remote computer.
  • sigverif – With the sigverif tool you can have all driver files analyzed to verify that they are digitally signed. Just type ‘sigverif’ at the command prompt.
  • systeminfo – Basic system configuration information, such as the system type, the processor type, time zone, virtual memory settings, system uptime, and much more. This program is great for creating an inventory of computers on your network.
  • sysedit – System Configuration File Editor. An old tool that was very handy for the Windows 9X days. msconfig is what you want to use now.
  • tasklist – Tasklist is the command console equivalent to the task manager in windows. It is a must have when fighting malware and viruses. Try the command:

    tasklist /svc to view the memory resources your services take up.

  • taskkill – Taskkill contains the rest of the task manager functionality. It allows you to kill those unneeded or locked up applications.
  • tree – This command will provide a ‘family tree’ style display of the drive/folder you specify.
  • WMIC – Windows Management Instrumentation Command tool. This allows you to pull an amazing amount of low-level system information from a command line scripting interface.

Of course this list in note exhaustive, I just wanted to focus on tools that are particularly helpful that everyone might use. For the official list, please visit Microsoft Windows XP Pro Command Reference.

Environment Variables Linux Windows Windows 2000

What environment variables are available in Windows?

List of the environment variables callable in windows 2000. e.g. Open a cmd prompt and type echo %appdata% which should return the full path to your profile’s Application Data directory. If calling from a batch file remember to quote the %variable% e.g.

IF EXIST “%appdata%”workravehistorystats. (mkdir D:AllMyFilesWorkrave.) ELSE echo Workrave. missing

Here’s the list with correct syntax:

ALLUSERSPROFILE %ALLUSERSPROFILE% Local returns the location of the All Users Profile.
APPDATA %APPDATA% Local returns the location where applications store data by default.
CD %CD% Local returns the current directory string.
CMDCMDLINE %CMDCMDLINE% Local returns the exact command line used to start the current cmd.exe.
CMDEXTVERSION %CMDEXTVERSION% System returns the version number of the current Command Processor Extensions.
COMPUTERNAME %COMPUTERNAME% System returns the name of the computer.
COMSPEC %COMSPEC% System returns the exact path to the command shell executable.
DATE %DATE% System returns the current date. This variable uses the same format as the date /t command. Cmd.exe generates this variable. For more information about the date command, see the Date command.
ERRORLEVEL %ERRORLEVEL% System returns the error code of the most recently used command. A non-0 value usually indicates an error.
HOMEDRIVE %HOMEDRIVE% System returns which local workstation drive letter is connected to the user’s home directory. This variable is set based on the value of the home directory. The user’s home directory is specified in Local Users and Groups.
HOMEPATH %HOMEPATH% System returns the full path of the user’s home directory. This variable is set based on the value of the home directory. The user’s home directory is specified in Local Users and Groups.
HOMESHARE %HOMESHARE% System returns the network path to the user’s shared home directory. This variable is set based on the value of the home directory. The user’s home directory is specified in Local Users and Groups.
LOGONSERVER %LOGONSERVER% Local returns the name of the domain controller that validated the current logon session.
NUMBER_OF_PROCESSORS %NUMBER_OF_PROCESSORS% System specifies the number of processors installed on the computer.
OS %OS% System returns the OS name. Windows XP and Windows 2000 display the OS as Windows_NT.
PATH %PATH% System specifies the search path for executable files.
PATHEXT %PATHEXT% System returns a list of the file extensions that the OS considers to be executable.
PROCESSOR_ARCHITECTURE %PROCESSOR_ARCHITECTURE% System returns the processor’s chip architecture. Values: x86, IA64.
PROCESSOR_IDENTIFIER %PROCESSOR_IDENTIFIER% System returns a description of the processor.
PROCESSOR_LEVEL %PROCESSOR_LEVEL% System returns the model number of the computer’s processor.
PROCESSOR_REVISION %PROCESSOR_REVISION% System returns the revision number of the processor.
Program Files %PROGRAMFILES% returns the location of the default install directory for applications.
PROMPT %PROMPT% Local returns the command-prompt settings for the current interpreter. Cmd.exe generates this variable.
RANDOM %RANDOM% System returns a random decimal number between 0 and 32767. Cmd.exe generates this variable.
SYSTEMDRIVE %SYSTEMDRIVE% System returns the drive containing the Windows root directory (i.e., the system root).
SYSTEMROOT %SYSTEMROOT% System returns the location of the Windows root directory.
TEMP %TEMP% System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.
TMP %TMP% System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.
TIME %TIME% System returns the current time. This variable uses the same format as the time /t command. Cmd.exe generates this variable. For more information about the time command, see the Time command.
USERDOMAIN %USERDOMAIN% Local returns the name of the domain that contains the user’s account.
USERNAME %USERNAME% Local returns the name of the user currently logged on.
USERPROFILE %USERPROFILE% Local returns the location of the profile for the current user.
WINDIR %WINDIR% System returns the location of the OS directory
Registry SourceForge Win 7 Win7 Windows Windows 2000 Windows 7 Windows Vista Windows7

RegShot – Windows Registry Compare Utility

Regshot is an open-source (GPL) Windows (2000, Windows XP, Windows Vista, Windows 7, Windows 2008) registry compare utility that allows you to quickly take a snapshot of your registry and then compare it with a second one – done after doing system changes or installing a new software product.