I’ve decided to start blogging (at least a little) on Catapult’s service in addition to my personal blog. My intention is to double-post because I like to truly own and control the content I create. Since I’ll be blogging for both SharePoint and a self-hosted WordPress platform I’m trying out a few blog authoring tools for Windows and online/cloud services.

Some blog Authoring / Editing tools to consider: Microsoft Word 2013, Microsoft Windows Live Writer, ScribeFire, Bleezer, W.Blogger, BlogDesk, Post2Blog, etc. as found at AlternativeTo.net, and HongKiat.com [Link1] [Link2].

Microsoft Windows Live Writer

I’m starting with Live Writer because Word’s HTML bloat is just too much to accept.  This post is mostly just testing the features and functionality of Live Writer with with both blogging platforms.

Let’s try out some features

A picture/screen shot

image

a link…

Catapult Systems blogs: https://www.catapultsystems.com

 

Code / scripts

I expect to share a lot of code, scirpts, snippets in PowerShell (PS1), VBScript (VBS, WSF), Windows Batch (CMD, BAT), T-SQL (SQL), AutoIT (AU3), KiXtart (KIX), XML, INI, etc., etc., etc.

After looking at the formatting on the blog, I’ll need to find some solution to make it pretty such as c# code format, SyntaxHighligher, or some other solution.

Update: Matthew Dowst gave me a tip for formatting code in Windows Live Writer when publishing to a SharePoint blog.  The summary is to use a 1×1 table and Paste Special preserving formatting.  The full process is fodder for another post. Smile 

PowerShell code

<#

.Synopsis

    Step-By-Step gathering of files required to install Microsoft System Center 2012 R2 Configuration Manager

#>

 

$global:SourceDir = "D:\SCCM Source"

 

function Download-File {

    <code truncated for space conservation>

}

 

Write-Host "Download ConfigMgr 2012 R2 Prerequisite Components" -ForegroundColor White

Start-Process -FilePath "$SourceDir\SCCM 2012 R2\SMSSETUP\BIN\X64\SetupDL.exe" -ArgumentList "$SourceDir\SCCM 2012 R2 prereqs"

 

Write-Host "Download ConfigMgr 2012 R2 CU3 @ http://support.microsoft.com/kb/2994331"

Download-File "http://hotfixv4.microsoft.com/ConfigMgrV5/nosp/ConfigMgr_2012_R2_CU3_KB2994331_ENU/05.00.7958.1401/free/478583_ENU_x64_zip.exe" "$SourceDir\SCCM 2012 R2 CU3"

 

VBScript code

Set rsObjects     = CreateObject("ADODB.RecordSet") ‘Create an ADO disconnected RecordSet

Set objFSO        = CreateObject("Scripting.FileSystemObject")

Set objShell      = CreateObject("WScript.Shell")

Set objArgs       = wscript.Arguments

strComputerName   = UCase(objShell.ExpandEnvironmentStrings("%ComputerName%"))

strUser           = UCase(objShell.ExpandEnvironmentStrings("%UserName%"))

strUserDomain     = UCase(objShell.ExpandEnvironmentStrings("%UserDomain%"))

strScriptDir      = objFSO.GetParentFolderName(wscript.ScriptFullName)

strScript         = Right(wscript.ScriptFullName, Len(wscript.ScriptFullName) InStrRev(wscript.ScriptFullName, "\"))

If InStr(UCase(WScript.FullName),"WSCRIPT.EXE") Then

   bCScript = 0

Else

   bCScript = 1

End If

‘——————————————————————————

 

IF objArgs.Count > 0 Then strSource = objArgs(0) ‘Set the first argument to the Source

Call GetTargets(strSource) ‘Get the list of targets

 

‘—– Loop through the recordset of objects

DO UNTIL rsObjects.EOF

      iObject = iObject + 1

      strObject = Trim(CStr(rsObjects(0)))

   ‘do something

   rsObjects.MoveNext

LOOP

Windows Batch

:Get_DateTime

::http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us

for /F "usebackq tokens=1,2 delims==" %%i in (wmic os get LocalDateTime /VALUE 2^>NUL) do if ‘.%%i.’==‘.LocalDateTime.’ set ldt=%%j

set YYYYMMDD_HHMM=%ldt:~0,8%_%ldt:~8,4%

set YYYYMMDD=%ldt:~0,8%

set YYYY=%ldt:~0,4%

set MM=%ldt:~4,2%

set DD=%ldt:~6,2%

set hh=%ldt:~8,2%

set nn=%ldt:~10,2%

set ss=%ldt:~12,2%

 

echo the date and time is %YYYYMMDD_HHMM%

Microsoft T-SQL

USE SUSDB

backup database SUSDB to DISK = ‘B:\Backup\WSUS\myWSUSserver_SUSDB.20141015.bak’ with format, medianame = ‘WSUS Backup’, name = ‘WSUS myWSUSserver 2014/10/15’;

 

That’s it for now.