How To Export Scheduled Tasks from Windows Task Scheduler Into Excel

I am a consummate network documenter. As such I get all the details. Here’s how I grab all the task scheduler items from remote servers into my master Excel sheet.

This can be run from your workstation and exports the data in CSV format which Excel just loves.

schtasks /query /S SERVERNAME /FO CSV /V >taskscheduler-export.csv

This dumps the CSV into the current directory. Just open in Excel and massage as needed.

Outlook: Can’t create file : XYZ.pdf. Right-click the folder you want to create the file in, and then click properties on the shortcut menu to check your permissions for the folder.

Error in Outlook 2010:

"Outlook: Can't create file : XYZ.pdf. Right-click the folder you want to create the file in, and then click properties on the shortcut menu to check your permissions for the folder."

This is an annoying message. Even after fixing the users profile permissions it made no difference. This is what worked for me:

  1. Open REGEDIT.EXE and go to Edit -> Find… In the Find dialog box type “OutlookSecureTempFolder” without the quotes.
  2. You may also find the key here without searching if you know the users key:  HKEY_USERS\%USER PROFILE ID NUMBER%\Software\Microsoft\Office\14.0\Outlook\Security
  3. When you find it the key will contain the actual folder location, and will look like:
    1. C:\Documents and Settings\%USER_NAME%\Local Settings\Temporary Internet Files\OLK#\ (where # is a random letter or number)
  4. Copy the location of that folder.
  5. Click on Start -> Run… and paste the folder location from step #4 then click OK.
  6. Explorer will open that folder, then delete all files present.
  7. Restart Outlook and you should be able to open your attachments.

Last time I did this I found over 14k files in that location. Yikes!

QNAP NAS SSH Service Commands

I use several QNAP devices from the large 24 drive down to a personal 2 drive. I’ve found that they are pretty good and you can do a lot with them as they’re basically Linux boxes with a pretty web interface.

Here are some useful console commands for restarting specific services.

First, to restart basically everything you can issue this command:

/etc/init.d/services.sh restart

One of the most common ones is to restart smb:

/etc/init.d/smb.sh restart

Here’s a list of other common ones: (They’re all in /etc/init.d)
I believe they will all accept the restart option. They will accept start/stop options.

QMediaService.sh
Qthttpd.sh
StartMediaService.sh
bonjour.sh
crond.sh
ftp.sh
mysqld.sh
network.sh
opentftp.sh
qsyncman.sh
rsyncRR.sh
rsyncd.sh
rsyncd_srv.sh
rsyslog.sh
samba4.sh
services.sh
timemachine.sh
vpn_openvpn.sh
vpn_pptp.sh
webalizer.sh

Ruckus Wireless AP Default Info and User Guides

I’ve used several wireless AP management systems from Motorola and Ruckus. Ruckus is by far my favorite and here’s some useful info for their APs and Managers if you need to wipe them and start over.

One of the things I love about Ruckus is that their hardware warranty is essentially endless. By that I mean hardware is covered in excess of 5 years. Clearly after they have end of life’d a product you can’t get replacements but having only used their warranty twice in a few years I’m very happy with the whole process.

Default Username, Password, IP Address and User Guide for ZoneDirector and ZoneFlex

Ruckus Wireless ZoneDirector:

  • ZoneDirector 1000
  • ZoneDirector 1100
  • ZoneDirector 3000
    • IP address: 192.168.0.2
    • subnet mask: 255.255.255.0
    • No default username and password after reset

    ZoneDirector User Guide

    Ruckus Wireless ZoneFlex:
    ZoneFlex 7731 802.11n Wireless Bridge
    The default IP addresses for the Root and Non-Root Bridge are as follows:

    • Root Bridge: 192.168.2.1
    • Non-Root Bridge: 192.168.2.254
    • Subnet mask: 255.255.255.0
    • username: super
    • password: sp-admin

    ZoneFlex 7731 Getting Started Guide

    Ruckus Wireless ZoneFlex:
    ZoneFlex 7025 Multimedia Wi-Fi Wall Switch:
    (These are really neat wall outlet mountable APs but I question their reliability, they’re good in small environments but keep your eye on them!)

    Also note that after a hard reset using the hard reset button on the side the default IP is via DHCP.

    • IP address: 192.168.0.1
    • Subnet mask: 255.255.255.0
    • username: super
    • password: sp-admin

    ZoneFlex 7025 User Guide

    Ruckus Wireless ZoneFlex Access Points:

    • ZoneFlex 2942 802.11g Access Point
    • ZoneFlex 2741 802.11g Outdoor Access Point
    • ZoneFlex 7942 802.11n Access Point
    • ZoneFlex 7962 Dual Band 802.11n Access Point
    • ZoneFlex 7762 Dual Band 802.11n Outdoor Access Point
    • ZoneFlex 7762-S Dual Band 802.11n Outdoor Sector Access Point
    • ZoneFlex 7343 2.4GHz 802.11n Smart Wi-Fi Access Point
    • ZoneFlex 7363 Dual Band 802.11n Smart Wi-Fi Access Point
      • IP address: 192.168.0.1
      • Subnet mask: 255.255.255.0
      • username: super
      • password: sp-admin

    ZoneFlex User Guide

I have lots and lots of hands on experience in these devices. If you have questions please ask. I an attest to the fact that Ruckus support is very good too!

Enabling SNMP On CentOS / RHEL

Setting up SNMP (Simple Network Management Protocol) on a CentOS machine is a very quick and easy process and I often forget so here’s a quickie on how.

Install the SNMP daemon by running the following command:

yum install net-snmp

Once SNMP is installed you want to install the configuration utility. I always forget this. It makes it easy to configure SNMP for both the community string,  SNMP version and basic security.

yum install net-snmp-utils

Once the configuration tool is installed, run it:

snmpconf -g basic_setup

As you run through the configuration utility it will present you with many options. Depending on how you have your remote monitoring setup (Cacti/Nagios) you will need to choose the options that work for you.

Once done, you will need to copy the configuration file to the correct directory. In most cases it will need to be moved from “/root/snmpd.conf” to “/etc/snmp/snmpd.conf” – You will need to overwrite the existing conf file in the /etc/snmp/ directory.

mv /root/snmpd.conf /etc/snmp/

Once the configuration file has been moved over you can restart SNMP.

service snmpd restart

The last thing you need to do is have SNMP start at boot time. If you do not run the following command you will need to manually start SNMP after a reboot.

chkconfig snmpd on

At this point you should be set. If for some reason you are running the firewall will need to open port 161 for UDP & TCP traffic to allow SNMP to be accessed remotely.

How To Remove All Printer Drivers In Windows 7

Let me start by saying that HP has some of the worst drivers for their small office printers. Shame on you!

After many rounds with “re-installing”, specifically HP drivers, I found that it was better to just manually wipe them from the computer and start over.

Open a command prompt with administrative privileges and enter:

net stop spooler

Navigate to (Paste one of these paths into the run command:

%systemroot%\system32\spool\drivers\

NOTE: %systemroot% is usually C:\Windows, but it might be “winnt” or something else; this is set when the OS is installed. Most systems are like this C:\Windows\system32\spool\drivers\w32x86 but also note that if you’re using a 64-bit version of windows the drivers will be in the folder called x64

Inside the w32x86/x64 folder there will be other folders and files. Delete the contents of these folders but do not delete them.

Restart the computer and re-install the printer.

Make sure you turn off or unplug the printer if it’s directly attached. If you don’t Windows will try and be smart and reinstall it for you.

Fixing Mac OS X Permissions from Terminal

I support a lot of Macs and it’s much easier to work on them remotely via SSH to do things like permission fixes, ACL repairs and other sneaky things. Here’s how to repair permissions from SSH/Terminal:

diskutil repairPermissions /

Of course you may need to sudo or use the su command to do this.

You can also do a repair disk this way too but that may dismount the users active drive so use with caution:

diskutil repairdisk /

 

Mac OS Log and Crash Report Locations for OS X 10.7, 10.8, 10.9

Within Mac OS X, crash reports are saved in various locations depending on which version of Mac OS X you have installed.

Since I work with 10.7.x and greater here are the ones I’m most interested in:

Mac OS X 10.7/10.8/10.9

In Mac OS X 10.7, 10.8, 10.9 crash logs are saved in the ‘Library’ folder which is hidden by default. To locate the Library folder, choose ‘Go to Folder’ from  Finder’s ‘Go’ menu and type:

~/Library/Logs/DiagnosticReports/

TIP: To make the Library folder permanently visible in Mac OS X 10.7/10.8/10.9, type the following command in Terminal:

chflags nohidden ~/Library

A look in there will look like this. Notice that Indesign has been a bad program lately:

Adobe Illustrator_2014-06-23-151424_NY05-0020.crash	
Adobe InDesign CS6_2014-07-03-193002_NY05-0020.crash	
Adobe InDesign CS6_2014-07-04-162801_NY05-0020.crash
Adobe InDesign CS6_2014-06-23-170943_NY05-0020.crash	
Adobe InDesign CS6_2014-07-03-193036_NY05-0020.crash	
Adobe InDesign CS6_2014-07-04-162943_NY05-0020.crash
Adobe InDesign CS6_2014-07-03-154725_NY05-0020.crash	
Adobe InDesign CS6_2014-07-03-193510_NY05-0020.crash	
Adobe InDesign CS6_2014-07-04-163221_NY05-0020.crash
Adobe InDesign CS6_2014-07-03-155019_NY05-0020.crash	
Adobe InDesign CS6_2014-07-03-193829_NY05-0020.crash	
Adobe InDesign CS6_2014-07-04-163312_NY05-0020.crash
Adobe InDesign CS6_2014-07-03-155534_NY05-0020.crash
Google Chrome Helper_2014-06-07-094200_NY05-0020.crash

If you’re logged on from SSH and you’re not the user in question you can use sudo to see the users logs, just use the path below with the user name:

~/Users/username/Library/Logs/DiagnosticReports

Happy troubleshooting!

 

 

 

 

Mac OS X Screen Shot Commands

I started like with a Mac Classic running System 5, then slowly moved to newer Macs running System 6, 7 , 8 and 9. Then I started working mostly on Windows. I take it for granted that Windows has a single key for screenshots and now an app to do partials.
Naturally I now support lots of Macs and I finally need to learn the Mac versions. So here they are:

Command-Shift-3

This captures a screenshot of your entire screen/screens.

Command-Shift-4

This turns the cursor into a crosshair, which you can drag to select a portion of your screen to capture. Release the mouse button or trackpad to take the shot.

Command-Shift-4, then space bar, then click on a window

Hitting the space bar turns the crosshair into a little camera icon, which you can move over any open window. Click on your desired window to take a screenshot of it. A screenshot captured by this method features a white border around the window with a bit of a drop shadow.

All screenshots are dropped on the desktop as an image file.

And if you happen to be using Log Me In to make the screenshots on the remote computer the screen shots won’t appear on the remote desktop…they show up on your local desktop….

Sending Syslog logs from Ubuntu to a remote syslog server

I don’t know why I didn’t have notes on this already. I’ve done it dozens of times. So here’s the write up.

I use Ubuntu and it uses the syslog facility/daemon called rsyslogd. Its configuration file is located here:

/etc/rsyslog.d/50-default.conf

This file tells the deamon where to log each type of message. For example the follow entry means that all cron message are sent to /var/log/cron.log:

cron.* /var/log/cron.log
Continue reading “Sending Syslog logs from Ubuntu to a remote syslog server”