Thursday, July 24, 2008

Killing Processes Remotely

Often, people have things running on their computer that they don't even know about. In our infrastructure, we have implemented file screening on our file servers to help control storage use. We have one user that has BitTorrent running on his machine. He obviously isn't actively using it, because it just keeps trying to download and save the same file onto the server. Each time someone attempts to save one of these (unauthorized) files to the server we (the infrastructure team) receive an email notification. I am growing weary of this same notification from this user.

Using the awesome Sysinternal tools (now part of Microsoft's Technet), I was able to easily find the process (bittorrent) that was running and kill it remotely. These two commands (pslist and pskill) are command line tools.

  1. Use pslist to find the name of the process that you want to kill.
    pslist \\machine -u Domain\username
  2. Use pskill to kill it.
    pskill \\machine -u Domain\username Process Name or PID


Wednesday, July 16, 2008

Flock Toolbar

The media bar is one reason why the Flock browser is so great (the other main reason is that it is built on Firefox). The browser is built for social networks. These include Facebook, Digg, and Flickr. The other features are the RSS reader, webmail, and blogging. The built in blog editor is pretty good (there are some limitations). Flock runs all (that I have seen) Firefox add-ons. It has some great address bar features like, showing the feeds on the page, media streams, and a quick access to Digg the story or email a link to the page. This has a lot of the improvements that Firefox is lacking. Flock can be downloaded here: http://www.flock.com/download/


Flockbar Legend (Windows)



Mind Meister - Online Mind Maps

Mind Meister - http://www.mindmeister.com/

I am not a mind map expert, but I have used them for several different brainstorming/project initiation sessions. I'm sure that there are various ways to use these ingenuous documents, I just haven't put enough effort into finding out how to do it. The main reason has been because MindJet's Mind Manager software is $350. My boss is a very generous guy, but I couldn't even justify that to myself for as little as I use it. Now that there is a free tool (actually two that I have found, including Freemind) I am going to try to get a better understanding of how to use this style of diagramming. There are a couple of things I can think of right off the bat, that I could use it for. There are some limitations to Mind Meister's free account and thus, they offer a premium account for $4/month - seriously? $48/year for a pretty cool mind mapping tool. I have used Mind Manager, and although it does have some additional file types for exporting to and some other features, for as limited a user as I am, the free version works just fine.

Sunday, July 13, 2008

Exchange 2007 Mailbox Journaling

For whatever reason, there may be a need to track messages coming in and out of a mailbox. These messages can be to internal recipients, external recipients, or both. Setting this up is easy, but if it isn't done often, it can be easy to forget the steps.

  1. For any journaling, there needs to be a mailbox that receives the "journal reports". A journal report is basically a message with some additional detail and then a copy of the original message as an attachment. As can be expected, these mailboxes can grow quickly as there is no message management done on these mailboxes (unless needed, of course).
  2. After the journaling mailbox has been setup, it is now necessary to create the journal rule. This is done the Exchange console under Organization->Hub Transport->Journaling tab. Right-click, new rule, specify the mailbox to receive the reports, whether internal/external/global messages are journaled, then select the mailbox that is to be journaled (the source mailbox).
  3. Grant appropriate permissions to the users that need access to the mailbox see: http://technet.microsoft.com/en-us/library/aa996343(EXCHG.80).aspx for instructions on how to do this.
  4. To ensure that no other messages (such as mass-mailings, everyone groups, etc) do not end up in the journaling mailboxes, run the following command to set the mailbox delivery restriction policy.

Set-Mailbox <Journaling mailbox to configure> -AcceptMessagesOnlyFrom "Microsoft Exchange" -RequireSenderAuthenticationEnabled $True


Once all of these steps have been completed, some additional items might want to be setup, such as scripting a scheduled report of all of the messages and their subjects with recipients, etc.



Saturday, July 12, 2008

List Groups with Delivery Restrictions

With many distribution groups in our organization having delivery restrictions, ensuring that a user/group the ability to send to all of these groups (such as new management or a notification address) can be cumbersome. With this one command, all of the groups that have restrictions on them are immediately printed to the screen to make certain that each is addressed. Of course, this could also be written out to a text file, CSV, or whatever.

get-distributiongroup | foreach-object{if($_.AcceptMessagesOnlyFrom -ne ""){write-host $_.Name}}

 



Wednesday, July 9, 2008

Flock Browser - The Social Web Browser

Flock Browser - The Social Web Browser

Flock is my latest tool for enhancing my experience on the web. I spend hours and hours on the Internet everyday and this is a great way tool for managing the different social sites that I find myself using.

The browser is based on the Mozilla Firefox code and is similar in the most important ways (e.g. installing extensions, keyboard shortcuts, general settings), but it is better. I find myself wanting to do more with Flickr, Facebook, and Twitter. Of course, it doesn't integrate with LinkedIn, because from what I can tell, no one does. This may end up making LinkedIn irrelevant (not because of Flock, but because it doesn't integrate with other social sites - a post for another day).

Flock has all of the tools needed for an Internet life today; there is a blogging interface, drag and drop image uploading of photos, and sharing of media by dragging to contacts in the sidebar.

The below video is a test for uploading media from Flock to the blog post (all I did was drag the video into the window and it was automatically embedded).




Finding and sharing media with Flock
Blogged with the Flock Browser


Tuesday, July 8, 2008

VBScript to Copy One Attribute to Another in Active Directory

This script was requested by one of our help desk staff. The script gets the value of a specific property in an Active Directory user object and copies it over to the other property. In this instance, the script is using the value it finds in the "physicalDeliveryOfficeName" (Office field in ADUC) and puts that value into the "department" (Department field in ADUC). The script creates a log with all of the user names, date, and properties, before and after the change just in case something goes wrong.


Option Explicit

On Error Resume Next
Dim objUser, objChild, objConnection, objRootDSE, objItem
Dim WshShell, objFSO strRoot, strDNSDomain, strContainer
Dim strphysicalDeliveryOfficeName, strsAMAccountName
Dim strdepartmentAfter, strDirectory, strdepartmentBefore
Dim i, intLogFlag 'no log exists

i=1 intLogFlag = 0

Set WshShell = CreateObject("WScript.Shell")

'Set current directory to Desktop & display on page
strDirectory = WshShell.SpecialFolders("Desktop") & "\"
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
strContainer = strContainer & strDNSDomain
'To do a subcontainer, add it after//ou=OUName, - include comma
Set strRoot =GetObject("LDAP://" & strDNSDomain )
'Start Logging
CreateLog()
'****************************************************************
For each objChild in strRoot
Select Case objChild.class
Case "organizationalUnit","container"
Call DATree
End Select
Next

Sub DATree()
For each objUser in objChild
If objUser.class="user" Then
strphysicalDeliveryOfficeName = objUser.physicalDeliveryOfficeName
strsAMAccountName = objUser.sAMAccountName
strdepartmentBefore = objUser.department
If strphysicalDeliveryOfficeName <> "" Then
objUser.Put "department", strphysicalDeliveryOfficeName
objUser.SetInfo

strdepartmentAfter = objUser.department
WriteLog(strphysicalDeliveryOfficeName), (strsAMAccountName), (strdepartmentBefore), (strdepartmentAfter)
i=i+1
End If
End if
next
End Sub

i = i -1
Wscript.Echo "Accounts = " & i
Wscript.Quit

'****************************************************************

Sub CreateLog()
On Error Resume
Next Dim objFile
Dim strFile, strText

'Create log file
strFile = "UserDepartmentLog_" & Month(Date()) & "_" & Day(Date()) & ".txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(strDirectory & strFile)
Set objFile = Nothing
'Write headers to the log file
strText = "User Name,Date,Office,Department Before, Department After"
Set objFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True)
objFile.WriteLine(strText)
intLogFlag = 1
Set objFSO = Nothing
Set objFile = Nothing
End Sub

'****************************************************************

'Used to append the log for each computer the script is run against

Sub WriteLog(strOfficeName, strAccountName, strDeptBefore, strDeptAfter)
On Error Resume Next
Dim objFile, objTextFile
Dim strFile, strText

strFile = "UserDepartmentLog_" & Month(Date()) & "_" & Day(Date()) & ".txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Check to see if the log exists
If intLogFlag = 1 Then
'Write to the log
strText = strAccountName & "," & Date() & "," & strOfficeName & "," & strDeptBefore & "," & strDeptAfter

Set objFile = objFSO.OpenTextFile(strDirectory & strFile, 8, True)
objFile.WriteLine(strText)
objFile.Close
'Reset strText for later use
strText = ""
Else 'If the log doesn't exist, create it
CreateLog()
'Reset strText for later use
strText = ""
End If
Set objTextFile = Nothing
Set objFile = Nothing
Set objFSO = Nothing
End Sub


Wednesday, July 2, 2008

Cisco TAPI Integration

One advantage my Blackberry has over anything else is that I can dial numbers for my contacts that are stored in Exchange. Now that I have been using my Cisco IP Communicator regularly, this has been a problem - having to look up numbers, copy them, paste them into the communicator and then dialing. I knew that Outlook offered TAPI integration, so there had to be some way to dial out on my IP Communicator using Outlook. After digging around in the Call Manager plugin section I found that Cisco offers a plugin named "Cisco Telephony Service Provider". Although the name isn't super-intuitive to TAPI, the description did explain that this was the purpose. Downloading the plugin and installing it is relatively simple. The installation has great directions. The directions also include how to configure the CTI ports and extensions - a little more than the average user will be able to handle. Simply stated, the following things need to happen to make this work:
  1. Call Manager user profile must have "Enable CTI Application Use" checked
  2. Call Manager CTI Port make the device pool the same as the IP Communicator, give the Port a line that is the same extension number (DN) as IP Communicator
  3. Follow the directions for installing the wave drivers in the CiscoTSP readme file
  4. Once the computer reboots, test the connection with the dialer.exe program. Go to Edit->Options->Line tab and select the Phone radio button. Under Line used for Phone Calls drop down, select the "Cisco Line: [device name](extension number), hit OK. Click the Dial button and enter a number to test. If this works, the device is setup properly.
  5. In Outlook, go to contacts, click on "Call Contact". When the box opens, click on dialing properties, on my location click edit, General tab, "To access an outside line...", enter 9. Enter the carrier code for long distance if desired. Add the appropriate area code rules. Click OK, Ok, then click Dialing Options, click the connect using line and select the "Cisco Line: [device name](extension number), click ok, then close.
Outlook should now be setup to dial through the IP Communicator.