<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reborn Digital Blog</title>
	<atom:link href="http://www.reborndigital.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.reborndigital.com</link>
	<description>Just the ramblings of an IT professional...</description>
	<lastBuildDate>Tue, 31 Jan 2012 20:52:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Exchange 2010 Prerequisite Install Script for Windows Server 2008 SP2/R2</title>
		<link>http://www.reborndigital.com/?p=220</link>
		<comments>http://www.reborndigital.com/?p=220#comments</comments>
		<pubDate>Tue, 31 Jan 2012 20:52:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=220</guid>
		<description><![CDATA[Great powershell script for getting all the pre reqs installed:
http://www.flobee.net/script-to-install-all-exchange-2010-prerequisites/
&#160;

#Installs prerequisites necessary to install Exchange 2010 on
#Windows 2008 SP2 or Windows 2008 R2.
#Version 1.3
#Last modified: June 28, 2010
 
#Set installation source to same directory as script execution
$sourcePath = Split-Path -Parent $MyInvocation.MyCommand.Path
 
Write-Host 'Using ' -NoNewline
Write-Host $sourcePath -ForegroundColor DarkGreen -NoNewline
Write-Host ' as the installation source.'
 
# Detect correct OS<a href="http://www.reborndigital.com/?p=220">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[<p>Great powershell script for getting all the pre reqs installed:</p>
<p><a href="http://www.flobee.net/script-to-install-all-exchange-2010-prerequisites/">http://www.flobee.net/script-to-install-all-exchange-2010-prerequisites/</a></p>
<p>&nbsp;</p>
<pre>
#Installs prerequisites necessary to install Exchange 2010 on
#Windows 2008 SP2 or Windows 2008 R2.
#Version 1.3
#Last modified: June 28, 2010
 
#Set installation source to same directory as script execution
$sourcePath = Split-Path -Parent $MyInvocation.MyCommand.Path
 
Write-Host 'Using ' -NoNewline
Write-Host $sourcePath -ForegroundColor DarkGreen -NoNewline
Write-Host ' as the installation source.'
 
# Detect correct OS here and exit if no match
if ((Get-WMIObject win32_OperatingSystem).Version -eq '6.1.7600')
    {$os = 'R2'}
elseif ((Get-WMIObject win32_OperatingSystem).Version -eq '6.0.6002')
    {$os = 'R1'}
else
    {
    Write-Host 'This script requires Windows Server 2008 with SP2, or R2, which this is not.' -ForegroundColor Red -BackgroundColor Black
    break
    }
 
#Installation files and properties (filename, shortname, displayname, download URL, size)
$fileWinRM = ('Windows6.0-KB968930-x64.msu','WinRM','Windows Remote Management Framework','http://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msu','14MB')
$fileNET35 = ('dotnetfx35.exe','.NET 3.5','.NET 3.5 SP1','http://download.microsoft.com/download/2/0/E/20E90413-712F-438C-988E-FDAA79A8AC3D/dotnetfx35.exe','235MB')
$fileNET35HF = ('NDP35SP1-KB958484-x64.exe','.NET 3.5 hotfix','.NET 3.5 hotfix','http://download.microsoft.com/download/B/4/2/B42197BD-AEE1-4FE6-8CB3-29D60D0C3727/Windows6.0-KB958483-x64.msu','1.4MB')
$fileOFP = ('2010FilterPack64bit.exe','Office 2010 Filter Pack','Office 2010/2007 Filter Pack','http://download.microsoft.com/download/0/A/2/0A28BBFA-CBFA-4C03-A739-30CCA5E21659/FilterPack64bit.exe','4MB')
 
Function InstallApp($app)
    {
    switch ($app)
        {
        'WinRM'
            {
            $appArray = $fileWinRM
            $kb = 'KB968930'
            }
        'NET35'
            {
            $appArray = $fileNET35
            $checkExpression = "test-path 'HKLM:Software\Microsoft\NET Framework Setup\NDP\v3.5'"
            }
        'NET35HF'
            {
            $appArray = $fileNET35HF
            $checkExpression = "test-path 'HKLM:SOFTWARE\Wow6432Node\Microsoft\Updates\Microsoft .NET Framework 3.5 SP1\SP1\KB958484'"
            }
        'OFP'
            {
            $appArray = $fileOFP
            $checkExpression = "test-path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\{95140000-2000-0409-1000-0000000FF1CE}'"
            }
        }
    trap
        {
        Write-Host ''
        Write-Host "There was a problem downloading or installing $($appArray[1])." -ForegroundColor Red
        Write-Host ''
        break
        }
    #Check for existing installation
    Write-Host "Verifying $($appArray[2]) is installed..." -NoNewline
    if ($app -eq 'WinRM')
        {
        $hfInst = Get-WMIObject Win32_QuickFixEngineering | where {$_.HotFixID -eq $kb}
        if ($hfInst)
            {
            $bInstalled = $true
            }
        else
            {
            $bInstalled = $false
            }
        }
    else
        {
        if (Invoke-Expression $checkExpression)
            {
            $bInstalled = $true
            }
        else
            {
            $bInstalled = $false
            }
        }
    if ($bInstalled)
        {
        Write-Host "$($appArray[2]) is installed." -ForegroundColor Green
        return
        }
    Write-Host "$($appArray[2]) is not installed." -ForegroundColor Red
    Write-Host "Installing $($appArray[2])..." -NoNewline
 
    #Install app:  Check for existing installation file.
    $fullPath = $sourcePath+"\$($appArray[0])"
    if (!(Test-Path $fullPath))
        {
        Write-Host ''
        Write-Host "$($appArray[0]) not found in source path." -ForegroundColor Yellow
        $dl = Read-Host "Do you want to download it now? ($($appArray[4]))(Y/N)"
        if ($dl -ne 'y')
            {
            Write-Host "You have chosen to not download the $($appArray[1]) installation file."
            Write-Host "Put $($appArray[0]) in the source directory and run the script again."
            break
            }
        else
            {
            Write-Host "Downloading $($appArray[1])..." -NoNewline
            $dlClient = New-Object System.Net.WebClient
            $dlClient.DownloadFile($appArray[3],$fullPath)
            if (!(Test-Path $fullPath))
                {
                Write-Host ''
                Write-Host "There was a problem downloading $($appArray[1])." -ForegroundColor Red
                Write-Host ''
                }
            else
                {
                Write-Host 'done.' -ForegroundColor Green
                }
            }
        }
 
    #Install app: Run installation.
    if ($app -eq 'WinRM')
        {
        $expression = "wusa $fullPath /quiet"
        Invoke-Expression $expression
        Write-Host 'External update process started...Be patient, it takes time.' -ForegroundColor Yellow
        Write-Host ''
        Write-Host 'When the WinRM installation is complete, the system will automatically reboot.'
        Write-Host 'Then you can rerun the script to continue.  This script will now end.'
        break
        }
    else
        {
        if ($app -eq 'NET35HF')
            {$arguments = '/passive /norestart'}
        else
            {$arguments = '/quiet /norestart'}
        $process = [System.Diagnostics.Process]::Start($fullPath,$arguments)
        $process.WaitForExit()
        Write-Host "$($appArray[1]) installation complete." -ForegroundColor Green
        }
    }  
 
Function InstallNET35()
    {
    InstallApp('NET35')
    InstallApp('NET35HF')
    }
 
Function SetTCPSharing()
    {
    trap
        {
        Write-Host ''
        Write-Host 'There was problem setting the NET TCP Port Sharing service to Automatic startup.' -ForegroundColor Red
        Write-Host 'The service must be set to Automatic for Exchange setup to be successful.' -ForegroundColor Red
        Write-Host ''
        return
        }
    #Set NETTCPPortSharing to Automatic
    Write-Host 'Configuring the NET TCP Port Sharing service...' -NoNewline
    Set-Service NetTcpPortSharing -StartupType Automatic
    Write-Host 'done.' -ForegroundColor Green
    }
 
Function EnableRemoting()
    {
    trap
        {
        Write-Host ''
        Write-Host 'There was problem configuring the system for remote PowerShell.' -ForegroundColor Red
        Write-Host ''
        return
        }
    #Enable Remote PowerShell for Exchange administration from workstations
    Write-Host 'Enabling system for remote PowerShell connections...'
    Enable-PSRemoting -force
    Write-Host 'Remote PowerShell configuration is done.' -ForegroundColor Green
    }
 
Function EnableFirewall()
    {
    trap
        {
        Write-Host ''
        Write-Host 'There was problem starting the Windows Firewall service.' -ForegroundColor Red
        Write-Host 'The firewall service must be running during Exchange setup.  It can be stopped after it completes.' -ForegroundColor Red
        Write-Host ''
        return
        }
    #Ensure Windows Firewall is running or Exchange install will fail
    Write-Host 'Starting the Windows Firewall service...' -NoNewline
    Set-Service 'MpsSvc' -StartupType Automatic -Status Running
    Write-Host 'done.' -ForegroundColor Green
    }
 
if ($os -eq 'R1')
    {
    $ht = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-Hub.xml'
    $cas = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-CAS.xml'
    $mbx = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-MBX.xml'
    $um = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-UM.xml'
    $edge = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-Edge.xml'
    $typical = '. ServerManagerCmd.exe -ip '+$sourcePath+'\Exchange-Typical.xml'
    }
elseif ($os -eq 'R2')
    {
    $ht = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -restart'
    $cas = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -restart'
    $mbx = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server -restart'
    $um = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -restart'
    $edge = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -restart'
    $typical = 'Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -restart'
    Import-Module ServerManager
    }
$opt = 'None'
 
InstallApp('WinRM')
 
clear
if ($opt -ne 'None') {write-host 'Last command: '$opt -foregroundcolor Yellow}
write-host
write-host 'Exchange Server 2010 Prerequisites Installation'
write-host 'Please select which role you are going to install:'
write-host
write-host '1)  Hub Transport'
write-host '2)  Client Access Server'
write-host '3)  Mailbox'
write-host '4)  Unified Messaging'
write-host '5)  Edge Transport'
write-host '6)  Typical (CAS\HT\Mailbox)'
write-host '7)  Client Access and Hub Transport'
write-host
write-host '9)  Configure NetTCP Port Sharing service'
write-host '    Required for the Client Access Server role' -foregroundcolor yellow
write-host '    Automatically set for options 2,6, and 7' -foregroundcolor yellow
write-host '10) Install 2010 Office System Converter: Microsoft Filter Pack'
write-host '    Required if installing Hub Transport or Mailbox Server roles' -foregroundcolor yellow
write-host '    Automatically set for options 1,3,6, and 7' -foregroundcolor yellow
Write-Host '11) Enable PowerShell Remoting'
Write-Host '    Automatically set for options 1,2,3,4,6, and 7' -ForegroundColor Yellow
write-host
write-host '13) Restart the Server'
write-host '14) End'
write-host
Write-Host 'Note: Using ' -NoNewline
Write-Host $sourcePath -ForegroundColor DarkGreen -NoNewline
Write-Host ' as the installation source.'
$opt = Read-Host 'Select an option.. [1-14]? '
 
switch ($opt)
    {
    1{
        InstallNET35; InstallApp('OFP'); EnableFirewall; EnableRemoting
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $ht
        }
    2{
        InstallNET35; EnableFirewall; EnableRemoting
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $cas
        SetTCPSharing
        }
    3{
        InstallNET35; InstallApp('OFP'); EnableFirewall; EnableRemoting
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $mbx
        }
    4{
        InstallNET35; EnableRemoting; EnableFirewall
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $um
        }
    5{
        InstallNET35; EnableFirewall
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $edge
        }
    6{
        InstallNET35; InstallApp('OFP'); EnableFirewall; EnableRemoting
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $typical
        SetTCPSharing
        }
    7{
        InstallNET35; InstallApp('OFP'); EnableFirewall; EnableRemoting
        Write-Host 'Beginning Windows components installation...'
        Invoke-Expression $cas
        SetTCPSharing
        }
    9 { SetTCPSharing }
    10 { InstallApp('OFP') }
    11 { EnableRemoting }
    13 { Restart-Computer }
    14 {write-host 'Exiting...'}
    default {write-host "You haven't selected any of the available options."}
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=220</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBS rename computer and join domain</title>
		<link>http://www.reborndigital.com/?p=214</link>
		<comments>http://www.reborndigital.com/?p=214#comments</comments>
		<pubDate>Mon, 10 Oct 2011 19:20:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=214</guid>
		<description><![CDATA[            
The below script can be used to rename a computer and join it to a domain and specific OU without any reboots, except one reboot to complete the changes locally on the machine.
This script will popup a message box asking what you want<a href="http://www.reborndigital.com/?p=214">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
<p>The below script can be used to rename a computer and join it to a domain and specific OU without any reboots, except one reboot to complete the changes locally on the machine.</p>
<p>This script will popup a message box asking what you want to change the computer name to, then pop up message boxes with completed notifications or errors.</p>
<p>Be sure the change the domain, username and password at the top; as well change the OU further down, look for the comments in the code for where to change the information.</p>
<p><pre class="brush: vb">Const JOIN_DOMAIN = 1
Const ACCT_CREATE = 2
Const ACCT_DELETE = 4
Const WIN9X_UPGRADE = 16
Const DOMAIN_JOIN_IF_JOINED = 32
Const JOIN_UNSECURE = 64
Const MACHINE_PASSWORD_PASSED = 128
Const DEFERRED_SPN_SET = 256
Const INSTALL_INVOCATION = 262144
Dim message
Dim IP

'Change domain, username and password here
strDomain = &quot;domain.com&quot;
strUser = &quot;usernamewithdomainprivs&quot;
strPassword = &quot;password&quot;
 
Set objNetwork = CreateObject(&quot;WScript.Network&quot;)
strComputer = objNetwork.ComputerName
 
Set objWMIService = GetObject (&quot;winmgmts:&quot; &amp; &quot;!\&quot; &amp; strComputer &amp; &quot;rootcimv2&quot;)
Set colAdapters = objWMIService.ExecQuery (&quot;Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True&quot;)

title = &quot;Join computer to domain&quot;
message = &quot;Please enter computer name. Leave blank or press cancel to quit.&quot; &amp; vbCrLf &amp; vbCrLf &amp; &quot;Generated name: &quot; &amp; generatedName
newComputerName = InputBox(message, title)


If newComputerName = &quot;&quot; Then
    Wscript.quit
End If

areYousure = MsgBox(&quot;Are you sure you want t0 add computer to domain with name:&quot; &amp; vbCrLf &amp; vbCrLf &amp; newComputerName, vbYesNo + vbQuestion,&quot;Add computer to domain&quot;)

If areYouSure = &quot;7&quot; Then
    MsgBox &quot;Exiting script.&quot;,vbInformation
    Wscript.quit
End If 

Set objComputer = GetObject(&quot;winmgmts:{impersonationLevel=Impersonate}!\&quot; &amp; _
    strComputer &amp; &quot;rootcimv2:Win32_ComputerSystem.Name='&quot; &amp; _
        strComputer &amp; &quot;'&quot;)

'Change OU here (Default is &quot;OU=Computers,DC=domain,DC=com&quot;)
ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, strPassword, strDomain &amp; &quot;&quot; &amp; strUser, &quot;OU=My Computers,OU=Computers,DC=domain,DC=com&quot;, _
        JOIN_DOMAIN + ACCT_CREATE)
        
If ReturnValue = 0 Then
    MsgBox &quot;Computer added to domain under old name without error. proceeding to change computer name. &quot;
Else
    MsgBox &quot;Computer not added to domain successfully. Return value: &quot; &amp; ReturnValue
End If

strComputer = &quot;.&quot;
Set objWMIService = GetObject(&quot;winmgmts:&quot; _
    &amp; &quot;{impersonationLevel=impersonate}!\&quot; &amp; strComputer &amp; &quot;rootcimv2&quot;)

Set colComputers = objWMIService.ExecQuery _
    (&quot;Select * from Win32_ComputerSystem&quot;)


For Each objComputer in colComputers
    MsgBox &quot;About to rename computer to: &quot; &amp; newComputername
        ErrCode = objComputer.Rename(newComputerName, strPassword, strUser)
    If ErrCode = 0 Then
        MsgBox &quot;Computer renamed correctly.&quot;
    Else
        MsgBox &quot;Eror changing computer name. Error code: &quot; &amp; ErrCode
    End If

Next</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=214</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Copy First Name and Last Name to DisplayName in Active Directory in bulk using Powershell</title>
		<link>http://www.reborndigital.com/?p=207</link>
		<comments>http://www.reborndigital.com/?p=207#comments</comments>
		<pubDate>Thu, 18 Aug 2011 22:25:32 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=207</guid>
		<description><![CDATA[            
After a bulk import of users I needed to set the displayname property for all 2k+ ad users based off the ad objects givenname and sn.
Add-PSSnapin Quest.ActiveRoles.ADManagement
Connect-QADService -Service &#34;domain.com&#34;

Get-QADUser -SizeLimit 0 -SearchRoot &#34;domain.com/Users&#34; &#124; ForEach-Object{$_&#124;Set-QADUser -DisplayName &#34;$($_.givenname+' '+$_.sn)&#34;}
]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
<p>After a bulk import of users I needed to set the displayname property for all 2k+ ad users based off the ad objects givenname and sn.</p>
<p><pre class="brush: vb">Add-PSSnapin Quest.ActiveRoles.ADManagement
Connect-QADService -Service &quot;domain.com&quot;

Get-QADUser -SizeLimit 0 -SearchRoot &quot;domain.com/Users&quot; | ForEach-Object{$_|Set-QADUser -DisplayName &quot;$($_.givenname+' '+$_.sn)&quot;}</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=207</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Clonezilla and Gparted to image/clone to a smaller drive</title>
		<link>http://www.reborndigital.com/?p=202</link>
		<comments>http://www.reborndigital.com/?p=202#comments</comments>
		<pubDate>Thu, 02 Jun 2011 15:51:38 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Imaging]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=202</guid>
		<description><![CDATA[            
Things Needed for Project:

- Clonezilla live CD (free, open source)
- Gparted live CD (free, open source)
- External Hard Drive (just to copy the compressed image to)

&#160;
 
 
 
 
 
 
 
 
 
 
 
 
GParted
Step 1: Donwload the GParted live CD
Step<a href="http://www.reborndigital.com/?p=202">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
<p><strong>Things Needed for Project:</strong></p>
<div>
<p>- <a href="http://clonezilla.org/">Clonezilla live CD</a> (free, open source)</p>
<p>- <a href="http://gparted.sourceforge.net/livecd.php">Gparted live CD</a> (free, open source)</p>
<p>- External Hard Drive (just to copy the compressed image to)</p>
</div>
<p>&nbsp;</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>GParted</strong></p>
<p><strong>Step 1</strong>: <strong>Donwload the GParted live CD</strong></p>
<p><strong>Step 2</strong>: Once GParted has finished booting, <strong>follow the steps in the picture down below.</strong></p>
<p>1 – Click on “<strong>Resize/Move</strong>” and a new window will appear.<br />
2 – Drag the right side of the partition bar to the left until the desired size is reached.<br />
3 – Click on “<strong>Resize/Move</strong>” (the one on your current window)<br />
4 – Click on “<strong>Apply</strong>” when done.</p>
<p>&nbsp;</p>
<p><strong>Operating System</strong></p>
<p>Now that we have finished resizing our partition, let the computer boot so it can check the filesystem and fix any possible errors before we start to clone hard drive.</p>
<p><strong> </strong></p>
<p><strong>Clonezilla Backup</strong></p>
<p>I am displaying detailed Clonezilla instructions because some people tend to panic when they  see text based menus.</p>
<p><strong>Step 1</strong>: Download the Clonezilla Live CD and boot your computer with it, click on “<strong>Start_Cloenzilla</strong>” at the first screen of the wizard and click “<strong>Ok</strong>” to continue.</p>
<p><strong>Step 2</strong>: Choose “<strong>Device-Image</strong>” and click “<strong>Ok</strong>“</p>
<p><strong>Step 3</strong>: Choose “<strong>local-dev</strong>” and click “<strong>Ok</strong>“, make sure you have your USB external hard drive plugged in. If it was not, then plug it in now.</p>
<p><strong>Step 4</strong>: <strong>Select you external hard drive</strong> from the list of available ones and click “<strong>Ok</strong>“</p>
<p><strong>Step 5</strong>: Choose “<strong>top_directory_in_the_local_device</strong>“, this just means that you do not want to save your image inside any of the directories already created in the hard drive. Clonezilla will create a directory and store all image files there. Click “<strong>Ok</strong>“</p>
<p><strong>Step 6</strong>: Select “<strong>saveparts</strong>” to save only the desired partition and not the entire drive. Click “<strong>Ok</strong>“</p>
<p><strong>Step 7</strong>: <strong>Give the image a name and start cloning</strong>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Clonezilla Restore</strong></p>
<p>To restore the image, follow the same steps as in the “<strong>Clonezilla Backup</strong>” section in this tutorial and when you get to “<strong>step 6</strong>” select “<strong>restoreparts</strong>“, choose the hard drive image containing the partition you would like to restore and start the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=202</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable/Setup LDAP over SSL (LDAPS) on Windows Server 2008/Active Directory</title>
		<link>http://www.reborndigital.com/?p=200</link>
		<comments>http://www.reborndigital.com/?p=200#comments</comments>
		<pubDate>Thu, 12 May 2011 16:50:55 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=200</guid>
		<description><![CDATA[            
I needed to enable LDAP over SSL (LDAPS) for some web apps I was writing for my local org.  I wanted to allow LDAPS not force it, so I was able to do it by completing the steps below.

Setup Active Directory Certificate Services<a href="http://www.reborndigital.com/?p=200">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
<p>I needed to enable LDAP over SSL (LDAPS) for some web apps I was writing for my local org.  I wanted to allow LDAPS not force it, so I was able to do it by completing the steps below.</p>
<ul>
<li>Setup Active Directory Certificate Services on a domain member server, not a DC.</li>
<li>Open up the Server Manager and expand out to Roles -&gt; Active Directory Certificate Services.</li>
<li>Expand the tree till you see the Certificate Templates folder and look for the Domain Controller Authentication the default existing template.</li>
<li>Then expand the CA server and check if its listed under its Certificate Templates folder as well. If the Domain Controller Authentication is listed in both places then it exists and is enabled. If it isn&#8217;t under the CA&#8217;s Folder then we need to enable the Domain Controller Authentication Certificate Template.
<ul>
<li>Right click Certificate Templates under the CA, Click New, then and Click Certificate Template to Issue. Select the Domain Controller Authentication and then click OK.</li>
</ul>
</li>
</ul>
<p>At this point you should be good to go and the CA should be setup and ready to do it&#8217;s thing.</p>
<p><strong>Note:</strong> If you want to change how long the certificate is valid for or other values. You can edit the template before we enroll the Domain Controllers.</p>
<p><strong>Obtain the &#8220;Domain Controller Authentication&#8221; Certificate on the Domain Controller</strong></p>
<p><strong></strong>We need to enroll our Domain Controllers with the CA to obtain the new Domain Controller Authentication certificate. This will have to be configured on all of the Domain Controllers. But to start should tested on just one of them before continuing to configure it on all of them.</p>
<ul>
<li>Login into the Domain Controller you want to test the LDAP over SSL.</li>
<li>Open a command prompt as an administrator. To open a command prompt as an administrator, click Start. In Start Search, type Command Prompt. At the top of the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.</li>
<li>To open Microsoft Management Console (MMC), type mmc, and then press ENTER.</li>
<li>Click File, click Add/Remove Snap-in, select Certificates from the available snap-ins, and then click Add.</li>
<li>In the Certificates snap-in, click Computer Account, and then click Next.</li>
<li>In the Select Computer, click Local Computer, and then click Finish and then OK.</li>
<li>In the console tree, expand Certificates &#8211; Local Computer, expand Personal, and then expand Certificates.</li>
</ul>
<p><strong>Note: </strong>Trying to do this on a remote computers Cert store didn&#8217;t work as the options to enroll wasn&#8217;t there.</p>
<ul>
<li>Right Click and choose All Task, Click Request New Certificate. A Before You Begin window will prompt you. Click Next.</li>
<li>Check Domain Controller and Domain Controller Authentication and click Next.</li>
<li>In the Certificate Enrollment, a status window should show the Domain controller enrolling and then Status: Succeeded. Click Finish.</li>
</ul>
<p>To test that LDAPS is working, follow these steps:</p>
<ul>
<li>Open the Ldp snap-in. To open Ldp, click Start. In Start Search, type ldp. Right-click the Ldp icon on the Start menu, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.</li>
<li>Click the Ldp Connection menu, and then click Connect. In Server, type the host name of the server to which you want to connect. Ensure that Port is set to 636, the Connectionless check box is cleared, and the SSL check box is selected, and then click OK. If you receive a message that says “Cannot open connection,” LDAP-over-SSL binding is not configured properly.</li>
<li>Click the Connection menu, click Bind, and then click OK.</li>
<li>The command output should display the user name and domain name that you used for binding, if LDAP over SSL is configured properly.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=200</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Swap Space/File Linux</title>
		<link>http://www.reborndigital.com/?p=189</link>
		<comments>http://www.reborndigital.com/?p=189#comments</comments>
		<pubDate>Wed, 26 Jan 2011 17:05:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=189</guid>
		<description><![CDATA[            
First, create a large empty file:
sudo dd if=/dev/zero of=/swap_file bs=1M count=1000
Replace 1000 with the size of the swap file desired, in MB. You can also put the swap_file in a different location if desired.
Next, we&#8217;ll secure the swapspace, so ordinary users cannot read<a href="http://www.reborndigital.com/?p=189">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
<p>First, create a large empty file:</p>
<blockquote><p>sudo dd if=/dev/zero of=/swap_file bs=1M count=1000</p></blockquote>
<p>Replace 1000 with the size of the swap file desired, in MB. You can also put the swap_file in a different location if desired.</p>
<p>Next, we&#8217;ll secure the swapspace, so ordinary users cannot read the contents (potential security breach):</p>
<blockquote><p>sudo chown root:root /swap_file</p>
<p>sudo chmod 600 /swap_file</p></blockquote>
<p>Then, turn it into swap space:</p>
<blockquote><p>sudo mkswap /swap_file</p></blockquote>
<p>Next, turn it on:</p>
<blockquote><p>sudo swapon /swap_file</p></blockquote>
<p>To make it turn on at every bootup, open up /etc/fstab:</p>
<blockquote><p>sudo nano /etc/fstab</p></blockquote>
<p>Add this line to the end of the file:</p>
<blockquote><p>/swap_file       none            swap    sw              0       0</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=189</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log user logon and logoff events to database, get current logged on user to a computer</title>
		<link>http://www.reborndigital.com/?p=183</link>
		<comments>http://www.reborndigital.com/?p=183#comments</comments>
		<pubDate>Wed, 19 Jan 2011 21:18:00 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=183</guid>
		<description><![CDATA[            
            
In some of my previous posts I talk about logging user events such as logon and logoff to a database for history and an archive.
Below are very basic examples of a<a href="http://www.reborndigital.com/?p=183">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>In some of my previous posts I talk about logging user events such as logon and logoff to a database for history and an archive.</p>
<p>Below are very basic examples of a working VB Script that can be run via logon and logoff user GPO policies that simply gets some variables and passes them to a php page residing on a local web server via GET parameters.  The php script takes those GET parameters and writes them to a mysql DB.  This method is simple, effective and allows you to do whatever you want with your data.</p>
<p><strong>PHP</strong><br />
<pre class="brush: php">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;User Log Audit&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php

error_reporting(E_ALL);

$dbhostname = &quot;1.1.1.1&quot;;
$dbdatabase = &quot;db&quot;;
$dbusername = &quot;un&quot;;
$dbpassword = &quot;pass&quot;;

$conn = mysql_connect($dbhostname, $dbusername, $dbpassword) or die('Error connecting to database');
$db = mysql_select_db($dbdatabase, $conn) or die('Error connecting to defined database');

if(isset($_GET['submit']))
{
	if(!isset($_GET['u']) or !isset($_GET['c']) or !isset($_GET['e']))
	{
		die('u,c or e not set');
	}
	else
	{
		if(strlen($_GET['u']) &lt;= 0 or strlen($_GET['c']) &lt;= 0 or strlen($_GET['e']) &lt;= 0)
		{
			die('u,c or e strlen&lt;=0');
		}
		else
		{
			$username	=	$_GET['u'];
			$ip			=	$_GET['i'];
			$computer	=	$_GET['c'];
			$event		=	$_GET['e'];
	
			$iquery = &quot;INSERT INTO auditlog (username, date, time, ip, computer, event) 
						VALUES (
						'&quot;.mysql_real_escape_string($username).&quot;',
						CURDATE(),
						CURTIME(),
						'&quot;.mysql_real_escape_string($ip).&quot;',
						'&quot;.mysql_real_escape_string($computer).&quot;',
						'&quot;.mysql_real_escape_string($event).&quot;'
						)&quot;;
			mysql_query($iquery, $conn) or die(mysql_error());
			exit;
		}
	}
}
else
{
	if(isset($_POST['submit']))
	{
		if(strlen($_POST['subusername']) &gt; 0)
		{
			$subusername = &quot;username = '&quot;.$_POST['subusername'].&quot;' &quot;;
		}
		else
		{
			$subusername = null;
		}
		
		if(strlen($_POST['subcomp']) &gt; 0)
		{
			if($subusername == null)
			{
				$subcomputer = &quot;computer = '&quot;.$_POST['subcomp'].&quot;' &quot;;
			}
			else
			{
				$subcomputer = &quot;AND computer = '&quot;.$_POST['subcomp'].&quot;' &quot;;
			}
		}
		else
		{
			$subcomputer = null;
		}

		if(strlen($_POST['subdate']) &gt; 0)
		{
			if($subcomputer == null and $subusername == null)
			{
				$subdate = &quot;date = '&quot;.$_POST['subdate'].&quot;' &quot;;
			}
			else
			{
				$subdate = &quot;AND date = '&quot;.$_POST['subdate'].&quot;' &quot;;
			}
		}
		else
		{
			$subdate = null;
		}
		
		if(isset($_POST['event']))
		{
			$subevent = &quot;AND event = '&quot;.$_POST['event'].&quot;' &quot;;
		}
		else
		{
			$subevent = null;
		}
		
		if($subusername == null and $subcomputer == null and $subdate == null)
		{
			if($subevent == null)
			{
				$query = &quot;SELECT * FROM auditlog ORDER BY date, time ASC&quot; or die('Error: '.mysql_error());
			}
			else
			{
				$query = &quot;SELECT * FROM auditlog WHERE event = '&quot;.$_POST['event'].&quot;' ORDER BY date, time ASC&quot; or die('Error '.mysql_error());
			}
		}
		else
		{
			$query = &quot;SELECT * FROM auditlog WHERE &quot;.$subusername.$subcomputer.$subdate.$subevent.&quot;ORDER BY date, time ASC&quot; or die('Error '.mysql_error());
		}
	}	
	else
	{
		$query = &quot;SELECT * FROM auditlog ORDER BY date, time ASC&quot; or die('Error: '.mysql_error());
	}
	$res = mysql_query($query, $conn);

	if(mysql_num_rows($res) &gt; 0)
	{
?&gt;
		&lt;a href=&quot;index.php&quot;&gt;No Filter&lt;/a&gt;
		
		&lt;br /&gt;&lt;br /&gt;
		
		&lt;b&gt;Filter by username(eg. username):&lt;/b&gt;&lt;br /&gt;
		&lt;form method=&quot;post&quot; action=&quot;&lt;?php $_SERVER['PHP_SELF']; ?&gt;&quot;&gt;
			&lt;?php if(isset($_POST['subusername']) and strlen($_POST['subusername']) &gt; 0){$unv = $_POST['subusername'];}else{$unv = null;} ?&gt;
			&lt;input type=&quot;text&quot; size=&quot;40&quot; value=&quot;&lt;?php echo $unv; ?&gt;&quot; name=&quot;subusername&quot; maxlength=&quot;80&quot; /&gt;
		&lt;br /&gt;
		&lt;b&gt;Filter by computer (eg. pc01):&lt;/b&gt;&lt;br /&gt;
			&lt;?php if(isset($_POST['subcomp']) and strlen($_POST['subcomp']) &gt; 0){$unv = $_POST['subcomp'];}else{$unv = null;} ?&gt;
			&lt;input type=&quot;text&quot; size=&quot;40&quot; value=&quot;&lt;?php echo $unv; ?&gt;&quot; name=&quot;subcomp&quot; maxlength=&quot;80&quot; /&gt;
		&lt;br /&gt;
		&lt;b&gt;Filter by date(yyyy-mm-dd):&lt;/b&gt;&lt;br /&gt;
			&lt;?php if(isset($_POST['subdate']) and strlen($_POST['subdate']) &gt; 0){$unv = $_POST['subdate'];}else{$unv = null;} ?&gt;
			&lt;input type=&quot;text&quot; size=&quot;40&quot; value=&quot;&lt;?php echo $unv; ?&gt;&quot; name=&quot;subdate&quot; maxlength=&quot;80&quot; /&gt;
			&lt;br /&gt;
			&lt;input type=&quot;radio&quot; name=&quot;event&quot; value=&quot;logon&quot; &lt;?php if(isset($_POST['event']) and $_POST['event'] == &quot;logon&quot;){echo &quot;checked&quot;;} ?&gt; /&gt;Logon Only
			&lt;br /&gt;
			&lt;input type=&quot;radio&quot; name=&quot;event&quot; value=&quot;logoff&quot; &lt;?php if(isset($_POST['event']) and $_POST['event'] == &quot;logoff&quot;){echo &quot;checked&quot;;} ?&gt; /&gt;Logoff Only
			&lt;br /&gt;
			&lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
		&lt;/form&gt;				
		&lt;?php echo &quot;&lt;b&gt;QUERY:&lt;/b&gt; &quot;.$query; ?&gt;
		&lt;br /&gt;&lt;br /&gt;
		
		&lt;table border=&quot;1&quot;&gt;
		&lt;thead&gt;
		&lt;tr&gt;					
			&lt;th&gt;Username&lt;/th&gt;
			&lt;th&gt;Date&lt;/th&gt;
			&lt;th&gt;Time&lt;/th&gt;
			&lt;th&gt;IP&lt;/th&gt;
			&lt;th&gt;Computer&lt;/th&gt;
			&lt;th&gt;Event&lt;/th&gt;
		&lt;/tr&gt;
		&lt;/thead&gt;
		&lt;tbody&gt;
		
&lt;?php
		while ($list = mysql_fetch_assoc($res))
		{
			echo &quot;&lt;tr&gt;
				&lt;td&gt;&quot;.$list['username'].&quot;&lt;/td&gt;
				&lt;td&gt;&quot;.$list['date'].&quot;&lt;/td&gt;
				&lt;td&gt;&quot;.$list['time'].&quot;&lt;/td&gt;
				&lt;td&gt;&quot;.$list['ip'].&quot;&lt;/td&gt;
				&lt;td&gt;&quot;.$list['computer'].&quot;&lt;/td&gt;
				&lt;td&gt;&quot;.$list['event'].&quot;&lt;/td&gt;		
			&lt;/tr&gt;&quot;;
		}
	}
	else 
	{
		echo $query;
		echo &quot;&lt;br /&gt;No results.&quot;;
	}
}
?&gt;
	&lt;/tbody&gt;
	&lt;/table&gt;		
&lt;/body&gt;
&lt;/html&gt;</pre></p>
<p><strong>VBS</strong><br />
<pre class="brush: vb">On Error Resume Next

Set WshShell = CreateObject(&quot;WScript.Shell&quot;)
Set objExplorer = CreateObject(&quot;InternetExplorer.Application&quot;)
Set WshNetwork = CreateObject(&quot;WScript.Network&quot;)

strUN = WshNetwork.UserName
strCOMPUTER = WshNetwork.ComputerName

strcomputer2=&quot;.&quot;
Set objWMIService = GetObject(&quot;winmgmts:&quot; &amp; strComputer2 &amp; &quot;rootcimv2&quot;)
 
Set colItems = objWMIService.ExecQuery(&quot;select * from win32_networkadapterconfiguration WHERE IPEnabled='TRUE' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'AsyncMac' &quot; _ 
   &amp; &quot;AND ServiceName&lt;&gt;'VMnetx' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'VMnetadapter' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'Rasl2tp' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'msloop' &quot; _ 
   &amp; &quot;AND ServiceName&lt;&gt;'PptpMiniport' &quot; _ 
   &amp; &quot;AND ServiceName&lt;&gt;'Raspti' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'NDISWan' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'NdisWan4' &quot; _ 
   &amp; &quot;AND ServiceName&lt;&gt;'RasPppoe' &quot; _
   &amp; &quot;AND ServiceName&lt;&gt;'NdisIP' &quot; _ 
   &amp; &quot;AND ServiceName&lt;&gt;'' &quot; _ 
   &amp; &quot;AND Description&lt;&gt;'PPP Adapter.'&quot;,,48)
 
For Each objItem in colItems
   count_all = count_all + 1
 
   if objItem.IPAddress(0) &lt;&gt; &quot;0.0.0.0&quot; then
     count = count + 1
     if count = 1 then
        net_ip_address = objItem.IPAddress(0)
        'objOutputFile.WriteLine date &amp; &quot; &quot; &amp; time &amp; &quot; IP: &quot; &amp; net_ip_address
        net_mac_address = objItem.MACAddress
     end if
   end if
next

strIP = net_ip_address

objExplorer.Navigate &quot;http://site.com?submit&amp;u=&quot; &amp; strUN &amp; &quot;&amp;i=&quot; &amp; strIP &amp; &quot;&amp;c=&quot; &amp; strCOMPUTER &amp; &quot;&amp;e=LOGON&quot;
objExplorer.Visible = False

Do While objExplorer.Busy Or (objExplorer.READYSTATE&lt;&gt; 4)
	WScript.Sleep 100
Loop

objExplorer.Quit</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=183</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write Last User Logon to Active Directory Computer Description</title>
		<link>http://www.reborndigital.com/?p=181</link>
		<comments>http://www.reborndigital.com/?p=181#comments</comments>
		<pubDate>Wed, 19 Jan 2011 18:34:03 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=181</guid>
		<description><![CDATA[            
            
So basically I was looking for a simple yet effective way to find what computer a user is logged into.  Now theres tons of ways this can be done, in one<a href="http://www.reborndigital.com/?p=181">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>So basically I was looking for a simple yet effective way to find what computer a user is logged into.  Now theres tons of ways this can be done, in one of my previous posts I describe a way to do it with a MySQL DB and some other trickery which works but is not reliable especially with the MySQL DSN installation via GPO.  Using a DB is great because then you have a log, using something similar to the MySQL DB method I have done is instead of having the script write to the DB, simply have the script call a php page and pass params to it via GET or POST and then the php script can write to the DB, would work much better.</p>
<p>Theres also things like True Last Login and the built in auditing in Windows Server which logs to the Security event viewer and that can be parsed using custom views in event viewer.</p>
<p>One of the things I do now is have a script run at user logon via GPO that writes the date, time, username and current ip to the AD computer objects&#8217; description.  This requires creating a custom delegation for computer objects to allow authenticated user to write description which is not an issue in my org.  Works well, gives a quick and filter/sortable view for current information but provides not history or logging; thats where something like a script that runs at user logon that calls a php page and passes params to it and that writes to a DB.</p>
<p><pre class="brush: vb">On Error Resume Next

Set objSysInfo = CreateObject(&quot;ADSystemInfo&quot;) 'Bind to AD
Set objNet = CreateObject(&quot;WScript.Network&quot;)

strCompDN = objSysInfo.ComputerName 'DN for computer, e.g. &quot;CN=VISTAWORKSTATION,OU=Child OU Name,OU=Parent OU Name,DC=domain,DC=com&quot;
Set objComp = GetObject(&quot;LDAP://&quot; &amp; strCompDN) 'IADsComputer object

strUserDN = objSysInfo.UserName 'DN for user, e.g. &quot;CN=John Smith,OU=Child OU Name,OU=Parent OU Name,DC=domain,DC=com&quot;
Set objUser = GetObject(&quot;LDAP://&quot; &amp; strUserDN) 'IADsUser object

strUsrLogin = LCase(objNet.UserName)

strNow = Now
strDateStamp = DatePart(&quot;yyyy&quot;,strNow) &amp; _
    Right(&quot;0&quot; &amp; DatePart(&quot;m&quot;,strNow), 2) &amp; _
    Right(&quot;0&quot; &amp; DatePart(&quot;d&quot;,strNow), 2) &amp; _
    &quot;@&quot; &amp; _
    Right(&quot;0&quot; &amp; DatePart(&quot;h&quot;,strNow), 2) &amp; _
    Right(&quot;0&quot; &amp; DatePart(&quot;n&quot;,strNow), 2)

'RegExp object used to perform a simple match on IP address
Set objRE = New RegExp
objRE.IgnoreCase = True
'Note this regexp pattern isn't &quot;correct&quot; for matching an IPv4 address properly, but since WMI will return an
'array of IP addresses, this is sufficient to distinguish IPv4 vs IPv6
objRE.Pattern = &quot;^d+.d+.d+.d+$&quot;

strIP = &quot;&quot;

'Connect to WMI and retreive all network adapters
Set objWMI = GetObject(&quot;winmgmts:&quot;)
Set colNICs = objWMI.ExecQuery(&quot;SELECT * FROM Win32_NetworkAdapterConfiguration&quot;)

'Get the IP(s) assigned to whichever network adapter has our default gateway
If colNICs.Count &gt; 0 Then
    For Each objNIC in colNICs
    	If IsArray(objNIC.DefaultIPGateway) Then
    		arrIP = objNIC.IPAddress
    		For i = 0 To UBound(arrip)
    			If objRE.Test(arrIP(i)) Then strIP = strIP &amp; &quot; &quot; &amp; arrIP(i)
    		Next
    		strMAC = objNIC.MACAddress
    	End If	
    Next
End If

strIP = Trim(strIP)

objComp.Description = strDateStamp &amp; &quot; &quot; &amp; strUsrLogin &amp; &quot; &quot; &amp; strIP
objComp.Put &quot;extensionAttribute1&quot;, strUsrLogin
objComp.Put &quot;extensionAttribute2&quot;, strIP
objComp.Put &quot;extensionAttribute3&quot;, strMAC

objComp.SetInfo</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=181</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Uninstall Microsoft Security Essentials Remotely or via Group Policy</title>
		<link>http://www.reborndigital.com/?p=177</link>
		<comments>http://www.reborndigital.com/?p=177#comments</comments>
		<pubDate>Wed, 19 Jan 2011 18:25:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Anti-Virus]]></category>
		<category><![CDATA[MSSE]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=177</guid>
		<description><![CDATA[            
            
So recently I needed to remove MSSE from our entire organization to deploy a real solution.  Instead of touching EVERY computer, and since it was installed manually I could not use software deployment<a href="http://www.reborndigital.com/?p=177">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
<p>So recently I needed to remove MSSE from our entire organization to deploy a real solution.  Instead of touching EVERY computer, and since it was installed manually I could not use software deployment via GPO, I created a vbs script to run at user logon to uninstall silently.</p>
<p>Prior to V2 of MSSE the program file is &#8220;Microsoft Security Essentials&#8221; where as in V2 is &#8220;Microsoft Security Client&#8221; so the script can be easily modified for either or simple checking for one or the other ect, I just didn&#8217;t need that.</p>
<p><pre class="brush: vb">On Error Resume Next

Dim objShell
Set objShell = WScript.CreateObject (&quot;WScript.shell&quot;)

objShell.run &quot;&quot;&quot;%ProgramFiles%/Microsoft Security Essentials/setup.exe&quot;&quot;&quot; &amp; &quot;/x /s&quot;

Set objShell = Nothing</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=177</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Event ID 12014 source MSExchangeTransport</title>
		<link>http://www.reborndigital.com/?p=173</link>
		<comments>http://www.reborndigital.com/?p=173#comments</comments>
		<pubDate>Tue, 11 Jan 2011 16:39:44 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://www.reborndigital.com/?p=173</guid>
		<description><![CDATA[            
            
            
Microsoft Exchange couldn&#8217;t find a certificate that contains the domain name mail.domainname.com in the personal store on the local<a href="http://www.reborndigital.com/?p=173">&#160;&#160;[ Read More ]</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushVb.js"></script>
            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushPhp.js"></script>
            <script type="text/javascript" src="http://www.reborndigital.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><em>Microsoft Exchange couldn&#8217;t find a certificate that contains the domain name mail.domainname.com in the personal store on the local computer. Therefore, it is unable to offer the STARTTLS SMTP verb for any connector with a FQDN parameter of mail.domainname.com.  Verify the connector configuration and the installed certificates to make sure that there is a certificate with a domain name for every connector FQDN.</em></p>
<p>This issue is typically just a simple certificate mismatch, often caused by the EMC itself when setting external domain names for services or when changing certificated on your Exchange server.  The way to fix this is to ensure you have a proper certificate on your Exchange server and then run the following powershell command using the EMS (Exchange Management Shell):</p>
<p><pre class="brush: vb">get-ExchangeCertificate</pre></p>
<p>Copy down the thumbprint from the output of the above command, and then run the next command and substitute in your thumbprint for your cert:</p>
<p><pre class="brush: xml">Enable-ExchangeCertificate -Thumbprint 2afd26617915932ad096c48eb3b847fc7457662 -Services &quot;SMTP&quot;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.reborndigital.com/?feed=rss2&#038;p=173</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

