Monday, October 17, 2011

Windows Batch - Gett Variable with formatted Date

Have just spent some time searching for a way to get my preferred date format into a file name.

Year
Month
Date

http://blog.g-ball.com/2010/08/26/year-month-day-date-batch-script/

Wednesday, September 28, 2011

Burn ISO files via command line !!

My favorite cd burner application also support command line use.
This will help me with a script I am working on.

CD Burner XP

Example, takes folder and burns to iso file:
"C:\Program Files\CDBurnerXP\cdbxpcmd.exe" --burn-data -folder:e:\AVDefs\20111024 -iso:E:\AVDefISO20111024.iso

http://cdburnerxp.se/help/Appendices/commandlinearguments

Tuesday, September 27, 2011

Testing TCP Ports with Powershell

Send-MailMessage is a great addition with Powershell version 2.0, it greatly reduces the complexity of send a test SMTP message, including allowing attachments.

Just found a good script to allow testing TCP ports.
http://www.leeholmes.com/blog/2009/10/28/scripting-network-tcp-connections-in-powershell/
Send-TcpRequest.ps1

I was able ot use that script/ example along with
the notes on this page to test access to a proxy.
http://tuxbaby.blogspot.com/2009/04/testing-squid-proxy-via-telnet.html

Exchange 2010 SP1 - Help File

Microsoft released Exchange 2010 Service Pack 1 Help File


Download Link:
http://www.microsoft.com/download/en/details.aspx?id=1573

Exchange 2010 Visio Stencils

Here is the download link for the Exchange 2010 Stencils
http://www.microsoft.com/download/en/confirmation.aspx?id=6977

Wednesday, December 22, 2010

Exchange 2010 and requirement to export csv multivalue properties

EmailAddresses is a multivalue property.


I found the following page to be a great help in getting the fields I wanted exported to csv file.

https://exchangeshare.wordpress.com/2008/12/10/powershell-export-multivalued-properties/



powershell

Wednesday, November 17, 2010

Copyable Google Search Result URLs

I had issues trying to copy urls from google search resutls....here is how I solved it.

Greese Monkey
with
Google Search Remove Redirection
http://userscripts.org/scripts/show/57679

Followed suggestions at - http://www.consumingexperience.com/2009/10/google-search-results-redirection.html

I am using the HTTPS everywhere add-on for firefox, so I had to select to manage the script then in the gui I added https://encrypted.google.com

Wednesday, October 27, 2010

Windows Updates required by Microsoft Exchange 2010 Service Pack 1

When I recently performed an install of Microsoft Exchange 2010 with Service Pack 1 and Exchange 2010 Service Pack 1 Rollup 1 in the upgrades folder...

I found the following patches were required:
KB977020
KB979744
KB982867
KB983440

Microsoft Exchange Build Number and Release Dates

Microsoft has an outdated technote listing the build numbers and release dates for MS Exchange. It is out of date as the Exchange 2010 Rollups and Service pack are not listed.



How to view the build numbers:
With Exchange Management Shell : get-exchangeserver
With Exchange Management Console : Expand till you see servers, right click , properties.

How to determine the version number, the build number, and the service pack level of Exchange Server
http://support.microsoft.com/kb/152439

Build Numbers:
Exchange 2010 RTM 14.00.0639.21
Exchange 2010 Rollup 1 14.00.0682.1
Exchange 2010 Rollup 2 14.00.0689.0
Exchange 2010 Rollup 3 14.00.0694.0
Exchange 2010 Rollup 4 14.00.0702.1
Exchange 2010 SP 1 14.01.0218.15
Exchange 2010 SP 1 Rollup 1 14.01.0255.2

!!Updated


Exchange 2010 SP 1 Rollup 2 14.1.270.1
Exchange 2010 SP 1 Rollup 3 - was released them pulled.




!!Update
Please post if you see any information missing.


From newest to oldest.

Description of Update Rollup 1 for Exchange Server 2010 Service Pack 1
http://support.microsoft.com/kb/2407028
The following file is available for download from the Microsoft Download Center:
Download the Exchange2010-KB2407028-EN-x64 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=a371fa96-e85b-4a4f-8242-15d56595d0ec)
Release Date: September 30, 2010

Exchange 2010 Service Pack 1
https://www.microsoft.com/downloads/en/details.aspx?FamilyID=50b32685-4356-49cc-8b37-d9c9d4ea3f5b
Exchange2010-SP1-x64.exe
522.2MB
Download
Quick Details
Version:
14.01.0218.015
Date Published:
8/24/2010

Description of Update Rollup 4 for Microsoft Exchange Server 2010 Release To Manufacturing
http://support.microsoft.com/kb/982639
Download the Exchange2010-KB982639-EN-x64 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=09b4973e-3a80-4fb9-9f60-5c6e2b7a2727&displaylang=en)
Release Date: June 10, 2010

Description of Update Rollup 3 for Microsoft Exchange Server 2010 Release to Manufacturing
http://support.microsoft.com/kb/981401
Download the Exchange2010-KB981401-EN package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=7dcf2390-dff7-4e3a-acca-03f4d43fb79a)
Release Date: April 13, 2010


Description of Update Rollup 2 for Exchange Server 2010: February 18, 2010
http://support.microsoft.com/kb/979611
Download
Download the Exchange2010-KB979611-EN-x64 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=6d3ae3e0-3982-46d6-9e9c-7d7d63fae565&displaylang=en)
February 18, 2010

Description of Update Rollup 1 for Exchange Server 2010
http://support.microsoft.com/kb/976573
Download the Exchange2010-KB976573-EN-x64 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyID=371add31-d7a0-4c8b-8325-a6fced2d05e6&displaylang=en)
Release Date: December 9, 2009



Exchange 2010 hits RTM
Microsoft Exchange messaging server due for availability on Nov. 9
Build numbers and release dates for Exchange Server
http://support.microsoft.com/kb/158530

other outdated listings ( as of 10/27/2010 ):
http://www.howexchangeworks.com/2010/05/exchange-server-and-update-rollups.html
http://www.petri.co.il/exchange-server-build-numbers.htm

And of course as I completed this I found a completed list:
http://social.technet.microsoft.com/wiki/contents/articles/exchange-server-and-update-rollups-builds-numbers.aspx

Also Blackberry maintains a list, along with some powershell commands to get build numbers from all of the Exchange servers on a network.

How to check the version of a Microsoft Exchange Server
http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB20412

Thursday, September 09, 2010

Great Blog posting with information about Backup Exec 2010 R2

http://blog.lewan.com/2010/08/09/release-backup-exec-2010-r2/

Wednesday, September 08, 2010

BES 5.0 SP2 - just like an outlook user connection

In the past you had to figure additional number of exchange users when you had Blackberry Enterprise Server .... Seems like this is no longer the case.

http://flaphead.com/archive/2010/07/24/bes-5-0-sp2-blackberry-user-exchange-2010-iops-now-equal-to-an-outlook-client.aspx

Wednesday, September 01, 2010

Windows XP unable to get updates - Security Essentials

Had a customer who had a workstation that was killing the DSL Internet connection.
We had run the Malware Bytes / Virpe rescue - it found nothing.

The workstation was running MS Security Essentials, Security Essentials was no longer able to get updates. Also trying to view the Windows Update website you got a page unavailable. I checked the windows hosts file, nothing there. I tried to ping windowsupdate.microsoft.com and saw what I expected.

Windows XP SP 2, running Security Essentials
No longer able to run Windows update website.

Error:
0x80072EFE - ERROR_INTERNET_CONNECTION_ABORTED - The connection with the server has been terminated.

Tried the fixit at-
http://support.microsoft.com/kb/971058/en-us

Here are the issues that Security Essentials had found.
Alert Level Severe for all
Bubnix.gen!A - Removed
Brolocker.A – Quarantined
Gleishug.C – Removed

I suggested the customer reinstall Windows and all apps . Windows Restore Points were not enabled ( unless the virus removed them. )

Just told him the other possible path was to open a case with MS. I think they do some free cases for security issues.

Report a potential malware problem to Microsoft



Submit a Support Case

Some Old Favorites - productivity

Been wanting to change the way I track my times, hours , mileage, etc.

Looked at some Day Planners including the Staples the $40.00 was 8.5x11, there was a smaller one for $16.00.
* Item: 854613
* Model: 12934

they do not seem to sell 2010 online any more.

I looked up Pocket Mod, seems like it maybe a better fix for me anyway.

Also looked up TiddlyWiki which is a real cool way to save certain items. I used the GTD tiddly wiki before and liked it as well.

Tuesday, August 17, 2010

Test which version of Java is installed

http://www.java.com/en/download/help/testvm.xml

Tuesday, June 01, 2010

Cross Exchange Org migration - missing Self permissions

Some users are getting the following errors when trying to share calendars:
This was a cross forest intra-org migration.
I use the prepare script
I had used the Exchange 2010

From calendar view clicking on share calendar:
outlook share permissions could not be displayed. permission information for this folder could not be accessed.

delegates
the delegates is not available unable to access outlook folder



answer is to use
Add-MailboxPermission -Identity 'username' -User 'NT AUTHORITY\SELF' -AccessRights 'FullAccess' -InheritanceType all
or
to run it for all mailboxes:
Get-Mailbox | Add-MailboxPermission -Identity 'username' -User 'NT AUTHORITY\SELF' -AccessRights 'FullAccess' -InheritanceType all

Tuesday, May 11, 2010

Exchange 2010 - Outlook 2003 OAB download error 0x8004010f

Found a great post:
http://blogs.msdn.com/dgoldman/archive/2008/10/01/understanding-why-error-code-0x8004010f-is-thrown-when-trying-to-download-an-oab.aspx


My problem was
The mailbox store your client is residing on does not have an OAB associated with it.

I ran this command which fixed it.
[PS] C:\Windows\system32>Get-MailboxDatabase | Set-MailboxDatabase -OfflineAddressBook "Default Offline Address Book"

Thursday, April 29, 2010

How to Determine AD and Exchange schema versions

There was a MS Technote on how to determine the schema versions and it also listed the versions however the listing didn't include Windows 2008 R2 version and the Exchange 2010 version so I am including them below. Also I am showing command lines to query the specific records.

Article ID: 556086 - Last Review: June 12, 2008 - Revision: 1.0
How to find the current Schema Version
http://support.microsoft.com/kb/556086

13 -> Windows 2000 Server
30 -> Windows Server 2003 RTM, Windows 2003 With Service Pack 1, Windows 2003 With Service Pack 2
31 -> Windows Server 2003 R2
44 -> Windows Server 2008 RTM
47 -> Windows Server 2008 R2

4397 -> Exchange Server 2000 RTM
4406 -> Exchange Server 2000 With Service Pack 3
6870 -> Exchange Server 2003 RTM
6936 -> Exchange Server 2003 With Service Pack 3
10628 -> Exchange Server 2007
11116 -> Exchange 2007 With Service Pack 1
14622 -> Exchange 2010


replace dc=local,dc=domain.
cmdline -
ldifde -d CN=Schema,CN=Configuration,dc=domain,dc=local -f version-schema-ad.txt -r "(objectVersion=*)"
ldifde -d CN=ms-Exch-Schema-Version-Pt,CN=Schema,CN=Configuration,dc=domain,dc=local -f version-schema-exchange.txt -r "(rangeUpper=*)"

Wednesday, March 31, 2010

S.M.A.R.T - Hard drive reporting possible failure



Above is the screenshot from the SMART hard drive monitor tool on my laptop.

Wednesday, March 17, 2010

Multiple WSUS servers and on in the DMZ

I worked in an environment where there were traveling laptops, site to site vpns, and large offices. We wanted all machines to download and update patches for the fastest sources without impacting site to site vpn tunnels. The site to site vpns offices had split tunnel enabled and could download directly from the Internet so there is the configuration that was used:

Wsus1 - stored patches locally
Wsus2 - redirect clients to download from ms download site ( in the DMZ )
Wsus3 - at a large office > 50 machines - pull list of patches and updates from Wsus1
Wsus4 - at a large office > 50 machines - pull list of patches and updates from Wsus1
Wsus5 - at a large office > 50 machines - pull list of patches and updates from Wsus1


On my external DNS I setup
A record - wsusserver.wsus.domain.com - ip x.x.x.x
On my internal dns I setup a delegation for the sub domain wsus.domain.com using Bind on Windows.
Bind lets you have client view which allows you to give different answers depending on the requesting ip address/subnet.
for mask
172.16.1.x - A record - wsusserver.wsus.domain.com - ip y.y.y.y - to point users to Wsus1
172.16.21.x - A record - wsusserver.wsus.domain.com - ip x.x.x.x - to point users to Wsus2 - this was so that any site-to-site offices for our small offices would be directed to use the WSUS server in the DMZ and pull the updates from MS without impacting VPN traffic.
172.16.3.x - A record - wsusserver.wsus.domain.com - ip 172.16.3.y - to point users to Wsus3 that subnet's local wsus with local patches
172.16.4.x - A record - wsusserver.wsus.domain.com - ip 172.16.4.y - to point users to Wsus4 that subnet's local wsus with local patches
172.16.5.x - A record - wsusserver.wsus.domain.com - ip 172.16.5.y - to point users to Wsus5 that subnet's local wsus with local patches

For WSUS1 and WSUS2, I had to approve patches separately, I tried working with some WSUS scripts to export then import the approved patch list but didn't spent to much time trying to get that working and started approving the patches manually.

Friday, February 26, 2010

Recover Password saved in WinSCP

Needed a password that was saved in WinSCP, after a bit of searching I found the application -
Asterisk Logger v1.04 , which worked like a charm.

http://www.nirsoft.net/utils/astlog.html


password , recover , asterisk , windows application , WinSCP

Friday, February 19, 2010

Get updated maps - Garmin nuvi 205W

I just used Google Maps Send function - it saved the destination address to my GPS.

I wished it would send the points between as well. Found a site that has that software for a price. $60.00
http://www.expertgps.com/gps-receivers/Garmin-nuvi-205W.asp

This page had some details on how to register and get newer map updates:
http://www.brighthub.com/electronics/gps/reviews/55477.aspx?p=2

Sunday, January 31, 2010

Powershell and Citrix

Found a great web page with lots of Powershell and Citrix Examples:
http://cibengineering.com/citrix/powershell-logoff-disconnected-user-sessions

Monday, January 25, 2010

ESX Backup

I had written a script a while ago to grab some /etc files from VMware ESX....

I no longer have those scripts handy but found two links to people who have examples:

Backing up ESX ( Service Console )
http://vmetc.com/2008/10/11/how-to-backup-vmware-esx-servers/

http://blog.core-it.com.au/?p=363

Friday, January 08, 2010

PDF Work

Today I had to take a 7 page pdf PDF and fill out the form on the just fist page.

I used "PDFill PDF Tools (FREE)" to split the pages, saving just the first to a new file.

Then I used the "PDF-XChange PDF Viewer" - the Free version and used the typewritter tool to fill out the PDF form. Searching for a tool to annotate PDFs for free was really harder then I thought it should be.

Great tools. While looking at one of the tool's help they company really spelled out how Adobe keeps adding features to PDF and are not really letting it live up to is open standard potential.

I blogged about these tools basically so I can find the names and download them in the future, but if this helpful to anyone else I am glad about that too.

Sunday, August 23, 2009

Accessing MS Access from PowerShell

I was trying to modify some scripts on MS Technet Script Guy's blog for working with PowerShell and MS Access.

Kept getting an error when trying to open the database, the example was using an .mdb file extension. I left my test file with the Office 2007 default of .accdb.

The example had the filename and path in a variable thought that was the problem at first then realized the connection string seemed to be referring to version 4.


I found that the ADO string need to be "Microsoft.ACE.OLEDB.12.0" rather then "Microsoft.Jet.OLEDB.4.0"

Example of the error
***********************************
PS C:\code\examples-powershell\msaccess> $cn.Open("Provider = Microsoft.Jet.OLEDB.4.0;Data Source = C:\code\examples-pow
ershell\msaccess\msaccessdatadb1.accdb")
Exception calling "Open" with "1" argument(s): "Unrecognized database format 'C:\code\examples-powershell\msaccess\msac
cessdatadb1.accdb'."
At line:1 char:9
+ $cn.Open <<<< ("Provider = Microsoft.Jet.OLEDB.4.0;Data Source = C:\code\examples-powershell\msaccess\msaccessdatadb1
.accdb")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation

PS C:\code\examples-powershell\msaccess>



************************************



2008 Winter Scripting Games - Event 9 - MS Access PowerShell
http://blogs.technet.com/heyscriptingguy/archive/2009/08/13/hey-scripting-guy-can-i-query-a-microsoft-access-database-with-a-windows-powershell-script.aspxhttp://blogs.technet.com/heyscriptingguy/archive/2009/08/13/hey-scripting-guy-can-i-query-a-microsoft-access-database-with-a-windows-powershell-script.aspx
The file I was working with - ScriptingGamesBeginnerEvent4.ps1

Other reference:
How to find a record using ADO and Jet OLE DB provider
http://support.microsoft.com/kb/283874

Tuesday, July 28, 2009

Bandwidth Availability

I typed in the address of an office I am working at to see what the results were:

http://riveroffers.com/

Carrier Distance Capability
1 3.17 miles 10 mbps - 1 gbps
2 4.16 miles 10 mbps - 1 gbps
3 4.27 miles 10 mbps - 1 gbps
4 4.49 miles 10 mbps - 1 gbps
5 5.27 miles 10 mbps - 1 gbps
6 5.49 miles 10 mbps - 1 gbps
7 7.22 miles 10 mbps - 1 gbps
8 7.94 miles 10 mbps - 1 gbps

the web page then tells you that cost vary depending if fiber is already run to the building. Also they ask for contact information if you want to go forward.

Some notes about Exchange 2007

Documenting some notes on Microsoft Exchange 2007 High Availability
1) single copy clusters (SCCs) - single data center - must meet clustering hardware specs
2) cluster continuous replication (CCR) - uses MS Clustering and File Share Witness, can be done across data centers.
3) Local Continuous Replication ( LCR ) - lets you make a copy of the Exchange Stores on separate storage (hard drives) attached to the same server.
LCR does not protect against server failure.
4) SCR (Standby Continuous Replication) - 2007 SP1 - uses SQL log shipping like CCR, however the nodes do not have to clustered.

Source:
http://en.wikipedia.org/wiki/Microsoft_Exchange_Server#Clustering_and_high_availability

Another page that had lots of nice diags was:
http://telnetport25.wordpress.com/2007/11/14/exchange-2007-database-clustering-and-high-availability-features/


Question came up today....
Will Exchange 2010 support public folders....


here is a link that has discussion threads from MS MVP's who say....
http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/26d2c23d-136d-4814-b44d-0378a61f0d5c

yes! in a fashion similar to Exchange 2007 SP1.



Exchange 2007 server roles information:
# Edge Transport
# Hub Transport
# Client Access
# Mailbox - only role that can be used on SCC cluster.

Resource - Server Roles
Introduction to Exchange 2007 Server Roles
http://www.msexchange.org/tutorials/Introduction-Exchange-2007-Server-Roles.html

Getting Started with Exchange Server 2007: Server Roles
http://technet.microsoft.com/en-us/library/aa996031(EXCHG.65).aspx


Other Notes:
MS Recommended DAS - direct attached storage, also stating to check with storage vendor, but RAID 10 is recommended, for performance and reliability.

Sunday, July 12, 2009

Simple svn gui for Ubuntu

I looked at several pages and post to find a good answer.

My first attempt was to install Eclipse with Subclipse, the plugin had problems installing. I will re-attempt it again later. In the past I found eclipse sluggish on low memory machines, like the one I was installing it on anyway.

I saw this posting about installing scripts for nautilus in ubuntu.
my version Jaunty 9.04.

Link
http://www.automaticable.com/2008-09-15/easy-subversion-gui-for-nautilus-and-ubuntu/

steps it outlines:
aptitude install nautilus-script-collection-svn

nautilus-script-manager enable Subversion

killall nautilus

next step is for my to switch from file urls to svn urls.
http://www.codeandcoffee.com/2007/06/how-to-setup-a-subversion-server-on-linux/

Tuesday, June 30, 2009

freenx and Nomachine Client on XP - ALT-TAB

I have been using ubuntu 9.04 running freenx and a windows xp client - the alt-tab not working between apps was annoying. Found this article on how to configure the nomachine client to let the session capture the ALT-TAB and Print Screen.

Link to article

Quote:
"Ctrl + Alt + K key combination to enable/disable the catching of Alt+Tab and Print Screen keys within the NX session."

Wednesday, June 24, 2009

Safe to check IP Address

DynDNS.org is well respected and here is a link to their IP address checker.

http://checkip.dyndns.org/


I had heard in the past doing a google search for what is my ip may land you at a page with spyware, virus, etc.

Wednesday, May 20, 2009

Uninstall Perl Module

Found in a Google search that someone who goes by celso has perl script for removing modules.

http://www.celsobarriga.com/2008/01/10/uninstall-perl-module/


I wanted to remove Net::LDAP after I had done a force install of in in my win32 strawberry perl setup and had answered "y" to prompt for installing optional modules. I read on a wiki for strawberry perl the that module installed fine for a user with just the mandatory modules.

Wednesday, May 06, 2009

geen way to get rid of CDs and DVDs

This place in NJ seems to handle hard drives and have links for PCs too.

http://www.cdrecyclingforfree.com

Tuesday, May 05, 2009

Microsoft Active Directory Topology Diagrammer

Microsoft Active Directory Topology Diagrammer
http://www.microsoft.com/downloads/details.aspx?familyid=cb42fc06-50c7-47ed-a65c-862661742764&displaylang=en

Great tool from Microsoft automates creation of a Visio diagram of your Active Directory Layout. With options to include site connections, etc.

Monday, May 04, 2009

Bind 9 on Windows XP

I wanted a DNS server on my workstation to test some perl and powershell dns scripts.

I downloaded Bind and had some trouble then find this page which had great directions.

http://alex.charrett.com/technical/bind-on-windows.html

Thursday, April 23, 2009

Word 2007 - tricky steps to add auto updating filename and path

Select the location,
Insert tab ?(ribbon?),
Quick Parts,
field,
Under Field Names, Select Filename ,
Check add path to filename , ( not sure what that would look like for sharepoint stored documents?)
ok.



Here is a longer write up:
http://tortoiseshell.net/coffeebreak/blog/index.php/67/how-to-add-the-filename-and-path-to-a-word-2007-document.html

Ammo with flavor

For some reason the marketing at this site interest me.

Season Shot - Ammo with flavor.
www.seasonshot.com


tags: hunter funny

Wednesday, March 18, 2009

timestamp - dos batch files

below is a link to a nice doc batch timestamp

http://ings.ca/jim/2008/02/10/adding-timestamps-in-a-dos-batch-file/

Monday, March 09, 2009

svn add via batch

problem
files get added to svn, running a svn commit does not add them to the repro, since I am working to automate pulling config files from servers, etc. I want all the new files to go into the repro.

Here are my research notes and answer.


SVN batch commands for adding or deleting multiple files (Linux)
http://blog.gilluminate.com/2008/10/16/svn-batch-commands/

I am using Windows XP, VisualSVN.
took the svn file from http://unxutils.sourceforge.net/.


"c:\Program Files\VisualSVN Server\bin\svn.exe" status | sed -e "/^?/ !d" -e "s/^?//g" > filestoadd.txt

FOR /F "eol=;" %%i in (filestoadd.txt) do "c:\Program Files\VisualSVN Server\bin\svn.exe" add %%i

Thursday, February 26, 2009

Powershell Encoding - Grep

I was writing something where powershell ran on the remote host and copied files to a second box. On the second box I would run a perl script and take any any lines containing "Time:" "Finished zone:", had trouble.

Found out that
cmd - "dnscmd /zoneprint zonename.com > zone-zonename.com.txt "
powershell - "dnscmd /zoneprint zonename.com > zone-zonename.com.txt "

give files with different encoding.

I ended up using | Out-file -Encoding utf8 zone-zonename.com.txt

Getting the path of a running Batch file

Found on this blog, the trick
echo %~dp0.

Vmware ESX 3.5 unable to mount DVD ISO

I was trying to mount a Windows 2008 DVD ISO file that someone else had downloaded, it was giving an error.

Found one some other blog the answer could be one of two things, shorten the name (MS downloads have really long names, or change the .ISO to lowercase .iso.( this is what worked for me.)

Monday, February 02, 2009

custom command prompt

Found a great article.

How to Create a Custom Windows Command Prompt
http://www.wikihow.com/Create-a-Custom-Windows-Command-Prompt



I went searching for this as the path is too long and then the command line is hard to read.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"PROMPT"="$P$_$G"

Tuesday, January 27, 2009

error with ms excel and powershell 0x800A03EC

Searched for answer and found other people who had the issue but no answer.
Answer for me was I needed to use qoutes, I guess that way powershell does not send a blog but just the qouted string.

here are more details.



$strextensionattribute1 = $objUser.extensionattribute1
$strextensionattribute12 = $objUser.extensionattribute12
$strextensionattribute13 = $objUser.extensionattribute13
$strextensionattribute14 = $objUser.extensionattribute14






Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:55 char:15
+ $c.Cells.Item <<<< ($strExcelRow,6) = $strextensionattribute1
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:56 char:15
+ $c.Cells.Item <<<< ($strExcelRow,7) = $strextensionattribute12
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:57 char:15
+ $c.Cells.Item <<<< ($strExcelRow,8) = $strextensionattribute13
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:58 char:15
+ $c.Cells.Item <<<< ($strExcelRow,9) = $strextensionattribute14


answer was to use qoutes , I guess that way it gets passed as a string rather then a blob?"
$c.Cells.Item($strExcelRow,6) = "$strextensionattribute1"
$c.Cells.Item($strExcelRow,7) = "$strextensionattribute12"
$c.Cells.Item($strExcelRow,8) = "$strextensionattribute13"
$c.Cells.Item($strExcelRow,9) = "$strextensionattribute14"

Friday, January 23, 2009

Microsoft Access 2007 Unknown Errror

I had a database with several tables, all linked to Excel xlsx files.

It was csv converted to xlxs files from the adfind tool, issue was trying to use a like with wildcard when running vbcript, then I found same issue existinged when I tried to query the database from within access. I am not sure if this was a no primary key issue or something else, however I know that once I imported the data and give a primary key the error didn't return.

SELECT [adfind-users].*, [adfind-smg].proxyAddresses
FROM [adfind-users]
WHERE ((([adfind-users].proxyAddresses) Like "*math*"));

Friday, December 12, 2008

Advanced Registry Tracer

Advanced Registry Tracer
http://www.elcomsoft.com/art.html

Stores registry to database to allow for changes and review.
Seems interesting.

Wednesday, November 19, 2008

pop3 and MS Exchange 2007

Looked here to see how to test via telnet
file:///c:/leddymj/research/exchange2007/testing-pop3-access-using-telnet.html

Got error
"Command is not valid in this state" after supplying credentials.
found answer here:
http://msexchangetips.blogspot.com/2007/11/exchange-2007-pop3-err-command-is-not.html

need to use exchange shell command
Set-PopSettings -LoginType PlainTextLogin
then restart the service.

I used
Get-PopSettings -LoginType PlainTextLogin | fl > before.txt
and
Get-PopSettings -LoginType PlainTextLogin | fl > after.txt

when did a Active Directory User Last Logon

first let me say I think Novel Netware user login, I think Windows users Logon.

With several DCs it used to be a bear to get the real last logon, as you would have to check the lastlogon timestamp on each DC, with Windows 2003 Native mode this has been changed.

Details:


lastLogon – old style not replicated to other DCs
lastLogonTimestamp – replicated for each user if the user’s lastlogonTimestamp is older then 14 days ( This is the one to go by for the report. )

http://www.microsoft.com/technet/scriptcenter/topics/win2003/lastlogon.mspx

http://addicted-to-it.blogspot.com/2008/09/ad-how-to-determine-last-logon-time-of.html

I included a hist01.txt which has the command line used to generate the report. The adfind tool is a command line utility, already on corpadmints1.
Also found at http://www.joeware.net/freetools/tools/adfind/.

adfind -b "base dn"
-f filter - all user objects except disabled accounts
-csv csv export
-tdc time date change - changed ldap time date into readable format
then attributes DisplayName samaccountname lastLogon lastLogonTimestamp

Thursday, November 13, 2008

Godo site with Lots of AD info and vbscript examples

good site they have vbscript examples and more

http://www.computerperformance.co.uk/vbscript/

they have great pages on using ldifde and csvde

Sunday, September 21, 2008

hid security app

ossec is a host based intrusion detection. The sever only runs on unix, there is a windows agent.

Free helpdesk apps

rt and otis. Otis looks great, what can I say it seems like all you would want. A customer interface, ldap , email built in.

http://otrs.org/index/

Thursday, August 14, 2008

Multi-Value attributes and Exchange 2007

Some notes, I am putting up . After search I some one guy delete with a lines and another one say you had to loop through everything.


To set a multi-value attribute with the Exchange Management Shell
Set-ContentFilterConfig -BypassedSenderDomains "faker1.com","faker2.com"
Get-ContentFilterConfig

You will see both "faker1.com" and "faker2.com" listed.

*************************************************
to remove one item at a time:
$foo = Get-ContentFilterConfig
$foo.BypassedSenderDomains -="faker2.com"
$foo | Set-ContentFilterConfig


*********************************************************
To clear the entries:
Set-ContentFilterConfig -BypassedSenderDomains $Null
Get-ContentFilterConfig


**************************************************
You can also add an value
$foo = Get-ContentFilterConfig
$foo.BypassedSenderDomains +="faker4.com"
$foo | Set-ContentFilterConfig

Wednesday, August 13, 2008

Active Directory Last Logon

Good info and scripts on Last Logon time, seems like the Windows 2003 DC replicate some info if the logon date is less then 14 days old.


http://www.rlmueller.net/Last%20Logon.htm

Tuesday, August 05, 2008

Perl Encode Decode strings

So I a file SetACL dump that I was trying to parse with Perl, found that the file encoding was UCS2-Little Endian. I was reading the file into perl and wanted to standardize the formatted output I would generate.

$line = decode('UCS-2LE',$oldline);

#answers found here
#http://perldoc.perl.org/Encode.html
#and
#http://coderepos.org/share/browser/lang/perl/Encode/trunk/t/Unicode.t
#also saw possible answers here
#perl -MEncode -le "print for Encode->encodings(':all')"

Thursday, July 31, 2008

cacls and subinacl

I am trying to work with cacls and got this error:

The data area passed to a system call is too small.

I saw a post that said to use subinacl instead. The syntax is different.

Also working on getting the SetACL command to work, so far I have it dumping the info.

Saturday, July 26, 2008

Sorting IP addresses with Excel

What I did was paste the list of ip into A1, select that column and performed text to column, specificying a "." delimiter.
Then sort by a,b,c,d highest to lowest.

then in F or another column I put the following formula.
=A1&"."&B1&"."&C1&"."&D1

I had seen some other post which had more complex answers and thought this method was better.

Openssl convert from iis format to pem

openssl pkcs12 - in -out filename.pem -nodes


then to get the crt and the key open save multiple copies and remove the private key from the .crt and then remove the certificate for the .key file.


***********************************************************************
Username@Hostname /cygdrive/c/username/projects-reoccuring/check-ssl/ssl-certs
$ openssl pkcs12 -in iiscertexport.pfx -out filename.pem -nodes
Enter Import Password:
MAC verified OK

Username@Hostname /cygdrive/c/username/projects-reoccuring/check-ssl/ssl-certs
$ ls
***************************************************************************

Google Code Search

http://www.google.com/codesearch

Google Code Search Link

Wednesday, July 09, 2008

AD - Group Policy Processing Speeds

Active Directory Group Policy
Hands down this is one of the biggest wins for Microsoft int he enterprise. Yes, I love Linux and am a big Linux fan, but this is something Microsoft got right. It wasn't great management in Windows 2000, but with the Group Policy Management Console that they released added a lot.

Here is an article from Mitch Tulloch that discusses Optimizing Group Policy Performance
http://www.windowsnetworking.com/articles_tutorials/Optimizing-Group-Policy-Performance.html

Monday, July 07, 2008

my favorite editor

I opened the file with my favorite editor:
http://www.scintilla.org/SciTE.html

Wednesday, July 02, 2008

PGP resources

I am sometimes asked to explain PGP to co-workers, here are a list of refences that I felt were good.

http://en.wikipedia.org/wiki/Public_key_cryptography

http://www.networkworld.com/news/64452_05-17-1999.html

better
http://www.pgpi.org/doc/pgpintro/

Tuesday, July 01, 2008

Perl modules

I needed XML::LibXML and found that the University of Winnipeg has a repository.
Added the repro to my ppm tool and when then able to install the package and get running.

(Active State osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread version 5.8.8)

http://theoryx5.uwinnipeg.ca/ppms/

Friday, June 20, 2008

Openssl check if certificate chain is available from web server

Sometime you SSL provider maybe change the certificate chain for certificates you get from them. GoDaddy has changed in the last year, and a few years ago Network Solutions had changed because of a renewal date. When you get a SSL certificate from a provider you are often given the option to get the certificate chain. This is so that your web servers can make available to visiting clients the root and intermediate certificates so that the visiting client can confirm if the certificates are trusted.

using the following openssl command line will display the certificate depth, you want greater then 0, as well as the certificates.
openssl s_client -connect server:port -showcerts

Hope this help someone.

Thursday, June 19, 2008

Keeping Track of Virtual Macines

Found this handy method so a virtual machine can detect if it is running in MS environment or a VMware environment. I would like to find out if there is a method from the Guest OS to tell the servername of the Virtual Host/Server it is running on.

I know for MS Virtual Server vbscript to list the guest info:
http://www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx


detect from guest os if in a MS Virtual Server Environment or a VMWare:
http://x86virtualization.com/intel/vbscript-checking-for-virtual-host.html

Friday, May 30, 2008

Compile dmidecode on Cygwin

http://freshmeat.net/projects/dmidecode/


dmidecode - Default branch
Section: Unix

Click here to find out more!

Click here to find out more!
Added: Mon, Jan 20th 2003 14:01 PDT (5 years, 4 months ago) Updated: Tue, Feb 27th 2007 07:13 PDT (1 year, 3 months ago)

From Freshmeat:
About:
Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard. This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag, and a lot of other details of varying level of interest and reliability, depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots and memory module slots, and the list of I/O ports.

Directions to get this to compile under cygwin.

I had to run cygwin setup and select gcc ( I selected all of them ) and make, also I selected automake but I am not sure if that was necessary.

Then
make
Then I will take the EXE to another system along with Cygwin1.dll.

This resulted in an error, I think the answer is here:
http://www.cygwin.com/ml/cygwin/2007-04/msg00458.html

with Windows 2003 only kernel process have access to physical memory.

But then read this
http://lists-archives.org/cygwin/34232-dev-mem-permission-denied.html

Will have to revisit another day to see if I can get this working for Windows 2003.


************************
More details:


Error Messages on Windows 2003 Server
# dmidecode 2.9
/dev/mem: Permission denied

Here are the files, cygwin is nto installed locally.
biosdecode.exe
cygwin1.dll
dmidecode.exe
ownership.exe
vpddecode.exe


cygwin1.dll version - 1005.25.0.0

Here is information from the workstation I used to build dmidecode.
$ cat /proc/version
CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2007-12-14 19:21

Thursday, May 29, 2008

VMWare ESX / Infrastructure Enabling Root SSH

Enable SSH access to VMware ESX server

To allow the root user to login to a VMware ESX Server over the network using SSH, do the following:

1. Go to the service console on the physical server & login
2. vi /etc/ssh/sshd_config
3. Change the line that says PermitRootLogin from “no” to “yes”
4. Restart sshd with command /etc/init.d/sshd restart

Source:
http://www.kreslavsky.com/2007/12/enable-ssh-access-to-vmware-esx-server.html

Friday, May 09, 2008

Network

Rate my network diagram -
Cool site which has several network diagrams so you can review what others are doing:
http://www.ratemynetworkdiagram.com/


Site which discusses Network Documentation and Network Mapping - free.
http://www.networkdocumentation.com/

Monday, May 05, 2008

Learning some HTML and ASP

I like some of the quick references and examples on this site.

http://www.w3schools.com/

Monday, April 28, 2008

Perl Script into EXE

App::Packer - is a Perl Module to help get your script into a free running program - no dependencies. Its worked with a ntp time check script I have. Now I have a script that will pull a list of the OUs in AD and create a batch file to dsacls is run for each OU.


This link has more details on running p2e.pl the script that runs to create the exe:
http://www.perlmonks.org/?displaytype=print;node_id=215299

Thursday, April 17, 2008

Mysql Cheat Sheet

I was having some problems using the LOAD DATA INFILE.

This guy's cheatsheet helped me out.

http://www.nparikh.org/unix/mysql.php

Tuesday, April 15, 2008

Windows 2003 SP2 install with no backup

Just a reminder that this is the way to run a Windows 2003 SP2 install choosing not to backuup the files.

i386\update\update.exe /nobackup

Monday, April 07, 2008

Cheap diag tool

I like Visio, and I like DIA (GPL - I think ) - here is edraw.


http://www.edrawsoft.com/Network-Diagrams.php

Thursday, April 03, 2008

Some Good Cheat Sheets

Some good cheat sheets from sloppycode.net

I like the programming cheat sheet here lets you see perl next to php, vbscript.
http://www.sloppycode.net/tools/language-reference.aspx

the unix one seems handy as well.
http://www.sloppycode.net/Tools/unix-cheat-sheet.aspx

Friday, March 21, 2008

Nortel VPN Device and Passive FTP problems

We have some site with problematic FTP trasnfers, found that Active FTP was working, Passive FTP was not working. Found IE and FileZilla both have ways to change default behavior. We needed to get FTP working.

Found a note on Nortel's site known issues with specific firmware and passive FTP.

Here is my test file, first line is active, second is passive - the second line was failing. The test downloads a 3 meg file from Microsoft.

I also found this guide:
Active FTP vs. Passive FTP, a Definitive Explanation

ftptesting.cmd
curl ftp://anonymous:wow@ftp.microsoft.com/PSS/Tools/NetMon/netmon2.zip > netmon2-norm.zip
curl --disable-epsv ftp://anonymous:wow@ftp.microsoft.com/PSS/Tools/NetMon/netmon2.zip > netmon2-disable.zip


After the firmware it worked as expected.

Tuesday, March 11, 2008

Reloading Laptop After some Problems

Step 1. Pull down corporate apps
Step 2. Install Office 2007 (team thing)

Installed 7.10 Ubuntu Desktop, tried to update the network with Wicd, had some failures will need to redo. The install was nice, I just told it the new size of the ntfs partition during the Ubuntu install.



Here is a program I love - Tea Timer
http://users.adelphia.net/~dceubank/

I am trying to add it to my GTD work.



Other apps
Putty
WinSCP
SongBird
Juice
Cygwin
Hotkeys ( trying to force myself to do this more )

Friday, November 09, 2007

resolv.conf and inetd and telnet and reverse dns

Interesting I recently had seen on a unix box after the resolv.conf was changed, telnet sessions were taking 20 seconds to initiate.

I told the unix guys to change the name servers for their machines as we were decommissioning a dns name server. After they made the change name resolution was working as expected, however there was a 20 second delay for telnet sessions and rlogon sessions. I was able to connect via ssh without a delay. I went to troubleshoot dns with nslookup and found the expected results without delay.

My first question was how do you get unix to re-read the manually edited resolv.conf - answer is the file is read on each dns request - most unix systems I have read about linux, freebsd, and hpux all are configured like this. The idea is the operating file system cache will have the file in memory and the file is quite small. So it is true that it is read on each request.

So telnet was configured to be called from inetd, the answer for this was to restart the inet daemon. I should state rather then a restart or reload, one of the admins had found many suggested simple killing and restarting the inetd deamon.

Friday, October 12, 2007

Tuesday, September 11, 2007

ajaxWindows

I just signed up for this website, ajaxWindows another webos - seems pretty impressive so far. I just saw the slashdot posting on it.

the cons - mainly security, may not be available from "every" machine I touch.
the pros - a quick way to be able to browse the web and save notes on most machines I touch.

Here is the YouTube video demo of the site/service

they also recommend and let you open a gmail account for online storage, cool.

Mark

Thursday, August 23, 2007

Getting Started with DD-WRT

A friend asked me how about getting started with DD-WRT, so here is the list:

Step 1: See if your device is supported
http://www.dd-wrt.com/wiki/index.php/Supported_Devices

Step 2: Read up
FAQ
http://www.dd-wrt.com/wiki/index.php/Index:FAQ
Installation
http://www.dd-wrt.com/wiki/index.php/Installation

Here is a link to the forums
http://www.dd-wrt.com/phpBB2/

Step 3: Download
DD-WRT
Download
http://www.dd-wrt.com/dd-wrtv2/downloads.php

Step 4:
Look at some Tutorials
http://www.dd-wrt.com/wiki/index.php/Tutorials

Step 5:
Why he was interested in dd-wrt is the ability to use ssh tunnels with Putty, here are the links for that.

Putty
http://www.chiark.greenend.org.uk/~sgtatham/putty/


Tunneling VNC over SSH with PuTTY
http://martybugs.net/smoothwall/puttyvnc.cgi

Wednesday, August 08, 2007

Making ScITE even better - Part 1

Things I want in my ScITE
svn?
code complete
code snippents

http://caladbolg.net/scite_snippets.php

CentOS5 running VMware Server

this page was helpful -
http://fosswire.com/2007/04/21/installing-vmware-server-on-centos-5/

I didn't have to load the any-any vmware patch??


[root@BOX ~]# uname -r
2.6.18-8.1.8.el5xen

Friday, August 03, 2007

Openssl tips and tricks

convert an apache type ssl cert to IIS:

openssl pkcs12 -export -in myssl.crt -inkey myssl.key -out myssl.p12

you will be prompted for the password.

Friday, July 20, 2007

perl files under subversion with keywords

To set keywords for all files, (well only for those under version control)
"c:\Program Files\svn-win32-1.4.2\bin\svn.exe" ps svn:keywords "URL Rev Author Date Id" *.*

Then add the following to your perl file:

#/* $URL$
# $Rev$
# $Author$
# $Date$
# $Id$

I know there is a way to change this to be default behavior, maybe I think.

vbscript top get modification date of file


getmoddate.vbs
'cscript getmoddate.vbs filename
'output filename#datemodified

strFilename=Wscript.Arguments(i)
Set filesys = CreateObject("Scripting.FileSystemObject")
Set demofile = filesys.GetFile(strFilename)
wscript.echo strFilename & "#" & demofile.DateLastModified

Wednesday, July 11, 2007

Map WebDAV folder as drive letter under XP

net use * http://webdav.domain.com/subfolder1/ password /user:domainname\username

found this should work great for those sharepoint sites as well.

I wish I didn't need to use sharepoint.

Thursday, June 28, 2007

use perl and forget sed

perl one liner that will replace all strings in a text file.

perl -pi -e "s/searchForText/replacewithThis/g;" *.txt

ok, the above sucks but it was what I found before.

Here is what is needed
perl -pi.bak -e "s/searchForText/replacewithThis/g" testf.txt

tested on 5.8 win32 - from activestate

Monday, June 18, 2007

Great collection of Windows VBScripts

I found a great collection of scripts, this covers some things the scripting guys miss.

http://www.windows-management.com/scripting/wmi/

I found under the networking section two dns scripts that I found helpful.

Wednesday, June 06, 2007

GTD - a new d3 is on the way

I started playing with GTD, I checked out MonkeyGTD and d3, as well as others (one with a Ruby on Rails backend).

I like d3 for the simpleness, however there are some things I would look at changing.
http://www.dcubed.ca/

Google Group Discussion
http://groups.google.com/group/GTD-TiddlyWiki

I want to get to a point where GTD is my main area for journal, tasks, project list, etc.

Some things I want to add:
checkbox for common tags such as estimated time,15min, 20min.

Also I want to customize the RSS options as there are pocketmod templates which can read rss.

Wednesday, May 09, 2007

PocketMod

PocketMod is a great tool
http://www.pocketmod.com/

There is an easy way to add items to pocket mod offline version.

Here is a page a lot of useful pocket mods.

http://www.fairlyuseless.com/tag/pocketmod


Here is anther page:
http://www.wedothat.com/pocketmods


And a third - lots of cool calendar stuff:
http://sfmnet.fortunecity.com/Pocket/addons.htm

Tuesday, May 01, 2007

make your vhd files smaller

Virtual Server and Virtual PC make use of VHD files, here is a link to a MS KB also the basic steps on making them smaller.

check ms kb note -
http://support.microsoft.com/kb/888760
1. run defrag
2. Virtual Disk Precompactor tool The Virtual Disk Precompactor tool is available in Microsoft Virtual PC 2004 Service Pack 1 (SP1).
3. for virtual server virtual disk menu on the master screen selected inspect.
4. click compact vhd (virtual guest must be offline for this to run.)


I am going to attempt to script part or all of this.

Thursday, April 12, 2007

Kick Butt way to save / restore / change NTFS permissions

http://setacl.sourceforge.net/

The command line options took a bit to figure out but it was much better then cacls.exe and it also lets you backup and restore the permissions.

Saturday, February 10, 2007

Setting time on 4.5.x BIG IP 520 units

After installing the Daylight Savings Time patch for some F5....
Had some issues with the clocks being off an hour on two BigIP 520 units, F5 has a complex solution of booting into single user mode (these are based on BSD) to change the clock. I found what worked without booting into single user mode was changing the time zone to GMT then setting it back. I did this while the unit I was working on was in standby. Also another F5 tech note said to look at the redundant properties screen and to disable the gateway failsafe (that was not enabled for me anyway.)

"ntpdc" - this is the interactive mode
then "peers" - shows clocks of the time servers you configured.

Thursday, January 25, 2007

Windows NT XP 2003 DOS Batch Get Date as Variables

I use the following dos batch file, this is helpful when generating log files, that you want time stamped.


get-date-as-variable.txt
rem works with windows 2003 and xp
@echo off
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set weekday=%%a& set month=%%b& set day=%%c& set year=%%d)

echo day = %day%
echo month = %month%
echo year = %year%

echo %year%%month%%day%

Friday, September 08, 2006

Talk to a human

Here is a cool site that list what to do when calling companies with long menus and you want to speak to someone. It does not say what to do when the person you talk to wants transfer you to another person who said hold while I transfer you.. nice idea here.


http://www.gethuman.com/us/

Tunneling / port knocking / etc

It has been a while since I learned and tried tunneling over ssh adn looked at the port knocking docs. Listening to binrev (162) I learned that you can tunnel over dns. I googled for this and saw quite a while ago it was story on slashdot.

I just read another article that said people are also using ICMP messages as a tunnel. I thought this was pretty cool. Here is the link to the story:

http://blogs.zdnet.com/Ou/?p=261

Tuesday, March 07, 2006

date command with unix and utils

date.exe +%Y%m%d%H%M%S

C:\>c:\unxutils\usr\local\wbin\date.exe +%Y%m%d%H%M%S
20060307134035

I use this often in scripts and wanted to put it here so I can always find it.