Script to query Exchange Server Storage Sizes

I’ll go into more detail, later, but I’m grabbing this link for a script that will give me a listing of the Mail & Public Folder sizes.

Reporting Storage Size in Microsoft Exchange 

This will be more efficient that poking around and grabbing my calculator.

Notifications via the terminal

Oh man! This will be a very handy tool to have.

At work I use Apple Remote Desktop to manage the school’s computers.

One of the features of Remote Desktop is the ability to run shell scripts on any or all of the machines.

Sometimes, my shell-script-fu is weak, but I know how to do it with Applescript.

But, Remote Desktop doesn’t allow me to run an Applescript in the same way. That is, I can’t send a string of Applescript commands to a machine over the network, and have it do the bidding of the Applescript.

I have created some Applescripts and I’ve saved them as applications, which I then trigger from Remote Desktop. But, sometimes, I need to just do a one-off task, and don’t want to write the script, save it as an application, copy the application to all the Macs, and then run the application.

In the past, I’ve seen ways to wrap an Applescript in a shell script, but I haven’t used that before.

I have a task now, where I want to have the computers tell me their names. I was thinking of modifying a script that creates a text document, identifying the computer by name, and then sends a print job from each computer.

But, I thought, what about this fancy Notification Center. Can I tap into that?

Turns out the answer is yes!

How can I trigger a Notification Center notification from an AppleScript or shell script?

(Via Ask Different as Stack Exchange.)

Testing PHP code online

There are times where my only tool is my iPad. As such, it limits me for testing code.

When I’m at work or at home, I can connect to a server. In those cases, I use Diet Coda. Or I jump onto my laptop and use Coda.

It looks like WriteCodeOnline gives me a way to test some code. This might be interesting.

Finding the OS Version via the command line

I was working on a user’s MacBook Air, trying to resolve a kernel panic.

I had been working in their account (the only account on the machine). I shifted my attention to something else.

After being unattended, it locked the screen.  The user was not around, and I was trying to figure out the version of the OS. Looking at the logs, it looked like it a networking library was missing or damaged. I suspected that a system update would fix this. But, how to figure out the OS version, when I couldn’t log in?

I thought I could reboot into Single User Mode and find it that way. 

Sure ‘nuff!

Here’s the string: 

sw_vers | grep -0 '[0=9]*\.[0-9]*\.[0-9]*'

It was running 10.9.2. I restarted the system, which then told me it had updates to install. I clicked on “Install Updates and Reboot.” A few minutes later, the Air restarted. I held command-S, and booted back into Single User Mode.

Ran the sw_vers again, and it replied “10.9.4"

Sweet!

(I had discovered the utility of SUM a few years ago, when I trying to troubleshoot lost user accounts. It’s been a very handy tool on some of the more odd or difficult issues, since)

21 July, 2014 05:05

Ulk what a shame tough way to end!

21 July, 2014 05:03

Ooof! PT totally … Something. Game called after 3 innings after MoundTime hangs 15 runs on us. PT couldn’t get anything. That’s the end of our season.

21 July, 2014 03:43

Hey PT fans! Game 2 is about to begin. We’re playing MoundTime. We played them last year, but this is the first time this season. It’s gonna be tough.

21 July, 2014 02:11

PT battles back and ends up winning 8-4.

21 July, 2014 02:10

Jaz started with a couple strikes, but then hits the batter, walking in a run. Bat Co ties game.

21 July, 2014 02:08

Whew! Things got tight! Bat Company tied the game in the 5th. Jaz came in to take over with 1 out & bases loaded.

21 July, 2014 00:18

Andrew took over on the mound. Pitched well. Some hits, a bad bounce & a run scores. After 4 innings, PT up 3-1.

20 July, 2014 23:56

Jaz' first at-bat was a line drive out to center. He was able to get to first on a dropped 3rd strike, the second time.

20 July, 2014 23:55

After 3 innings, PT is up 3-0. Mitch has been pitching well. Jaz was out in right field for the last inning.

20 July, 2014 22:47

Good morning baseball fans! We have a game at 8 vs. The Bat Company. We’re the #5 seed, today.

20 July, 2014 02:22

Jaz zips a hard line drive towards center, bringing in Cole. PT up 4-2 after 3 innings.

20 July, 2014 02:13

He’s been in the mound doing a good job. But he’s hit two batters. Unusual. PT tied 2-2 after 2.

20 July, 2014 02:12

When Jaz was up, he’s smashed the ball down third base line for a triple. But was wrongly called out when he ran home.

20 July, 2014 01:00

Jaz hits a hard line drive up center for a single, driving on a run. PT ends up scoring 12 in the top of the 6th! PT up 18-3.

20 July, 2014 00:33

NW Diamonds start hitting. They score a few. PT still up 6-3 after 5 innings.

20 July, 2014 00:19

Jaz grounds out to shortstop at his third at-bat. Nice hustle to first, but thrown out. PT up 6-0, middle of 5th.

19 July, 2014 23:45

He stole third, but he couldn’t come in. PT up 3-0. BTW, Jaz' double brought in a run.

19 July, 2014 23:44

Jaz was walked at his first at-bat. Eventually called out as he slid into home. (It was close). Hit a hard line drive to fence for his second at-bat.

19 July, 2014 23:34

Good morning from Hillsboro! After 2 innings, PT is up 2-0 over the NW Diamonds

9 July, 2014 22:23

We’re playing The Blast from Wisconsin. Scoreless after 1. Jaz was walked. Playing centerfield, he made a beauty diving catch to end the inning.

9 July, 2014 22:21

Good morning PT fans! We had a 2-hour delay so the fields could dry out. We had huge cloudburst last night.