Archive for January, 2013

Delete or mark as read all Google Voice messages.

What led me down this path? Well, for some reason the geniuses at Google decided to make it very difficult to delete or select all of your messages. Using a browser, you are only able to select 10 at a time. On a mobile device, using an application, it is even more painful. I did some digging around and found pygooglevoice. It allows you to utilize the Google Voice API via Python. Most these will only operate on 10 messages at a time, however that is easily rectified with multiple calls or some better python programming than I know.

You need to have python installed to execute these scripts. I used these on a CentOS 6 system.

Software: http://code.google.com/p/pygooglevoice/

Installation/Configuration:

# yum install python python-setuptools
# easy_install simplejson
# easy_install -U pygooglevoice
# cd /usr/lib/python2.6/site-packages/pygooglevoice-0.5-py2.6.egg/googlevoice
# vi settings.py

# JGZ – Updated login URL since default did not work
#LOGIN = ‘https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral’
LOGIN = ‘https://accounts.google.com/ServiceLogin?service=grandcentral’

Script samples to use the module:

Delete all read messages from your inbox:

from googlevoice import Voice

voice = Voice()
voice.login(‘GOOGLEVOICELOGIN’, ‘PASSWORD’)

for message in voice.inbox().messages:
if message.isRead:
message.delete()

Delete all read messages from your trash:

from googlevoice import Voice

voice = Voice()
voice.login(‘GOOGLEVOICELOGIN’, ‘PASSWORD’)

for message in voice.trash().messages:
if message.isRead:
message.delete()

Mark all unread messages as read:

from googlevoice import Voice,util

voice = Voice()
voice.login(‘GOOGLEVOICELOGIN’, ‘PASSWORD’)

while True :
folder = voice.search(‘is:unread’)
if folder.totalSize <= 0 : break util.print_(folder.totalSize) for message in folder.messages: util.print_(message) message.delete(1)

Script sample usage:

# python gvscriptname

Transferring Flexible Single Master Operations (FSMO) roles

Since I don’t have to do this very often, but always seem to forget how to transfer the Schema Master and Domain Naming Master, I decided to write it down, when it came up again as I transferred all the roles to my Windows 2012 server.

The following three FSMO roles can be migrated from Active Directory Users and Computers. Right mouse click on the domain and select Operations Masters. There is one tab for each of the three FSMO roles:

PDC
RID Pool Manager
Infrastructure Master

The following FSMO role can be transfered from Active Directory Domains and Trusts. Right mouse click on Active Directory Domains and Trusts, and select Operations Master.:

Domain Naming Master

For the Schema Master FSMO role, you first need to register a dll by executing the following command (Note: This only needs to be done once from an elevated command prompt.):

c:\> regsvr32 schmmgmt.dll

Then, you can add the Active Directory Schema Snap-In to a Microsoft Management Console (MMC). With the Snap-In added, ensure that the targeted domain controller is the one that you want to transfer the Schema Master role to. To change it, right mouse click on Active Directory Schema, under Console Root, and select Change Active Directory Domain Controller.. to select the domain controler you want to transfer the role to. Once that is done, right mouse click on Active Directory Schema, and select Operations Master to change the role.

If you do not have a different domain controller targeted, you will get the following message:

The current Active Directory Domain Controller is the Operations Master. To transfer the Operations Master to a different DC, you need to target Active Directory Schema to that DC.

And when you switch the target domain controller, you get the following, which is okay for what we want to do.:

Active Directory Schema snap-in is not connected to the schema operations master. You will not be able to permform any changes. Schema modification can only be made on the schema FSMO holder.

Return top

INFORMATION