Add Caption to image in WordPress

Here is a sample post that has text with an image with a caption that is centered below it.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer viverra, orci sit amet mollis cursus, eros mi iaculis neque, non consectetur risus leo at dui. Mauris sit amet scelerisque leo. Donec nunc urna, dictum at massa in, aliquam cursus lectus. Maecenas rhoncus vulputate justo, eget venenatis metus fringilla ac. Suspendisse euismod, tortor quis imperdiet finibus, lectus felis hendrerit erat, ac dignissim

leaf graphicBoy Scouts

tortor tellus nec lectus. Aenean ultrices imperdiet arcu eleifend molestie. Aenean aliquet non urna at rhoncus. Nunc ut aliquet nisl, sit amet pulvinar nisi. Vivamus facilisis urna magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. In et metus sed dolor ornare vehicula vel quis ante. Etiam at malesuada libero, eu scelerisque leo. Mauris tempor sed dui at porttitor. Sed augue odio, luctus at nibh at, aliquam mollis felis. Cras dui urna, aliquet vitae aliquam ut, imperdiet vitae sapien. Maecenas ut congue tellus.

The code that I used came from the https://codex.wordpress.org/Wrapping_Text_Around_Images site.

Here is the code I used:

<div class="wp-caption alignright" style="text-align: center; vertical-align: middle; width: 149px;"><img class="" title="Boy Scouts Logo" src="http://www.polysyncronism.com/wordpress/wp-content/uploads/2017/08/scouts.jpg" alt="leaf graphic" width="225" height="224" />Boy Scouts</div>

Active Directory and SSIS

I was looking into ways to get the owner of an Active Directory user. I looked at VBScript and C#.NET. While searching for code and while looking at the objects available in .NET using the object browser I found this MSDN blog entry by Alex Tcherniakhovski.

Extracting object ownership information from Active Directory into SQL

One fact mentioned near the bottom of the blog entry is yet another testimony to keep the Domain Admins group small.

Yet another reason to keep Domain Admins group small.

VBScript

Option Explicit

Dim sADDN,objUser,objNtSecurityDescriptor

sADDN = "LDAP://YourContextHere"

Set objUser = GetObject (sADDN)
 
Set objNtSecurityDescriptor = objUser.Get("ntSecurityDescriptor")
WScript.Echo "Current owner of this item: " & objNtSecurityDescriptor.Owner

C#.NET

References Used
Name: System.DirectoryServices
Path: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.DirectoryServices.dll
Version: 4.0.0.0
Name: System.DirectoryServices.AccountManagement
Path: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.DirectoryServices.AccountManagement.dll
Version: 4.0.0.0
Name: Active DS Type Library
Path: C:\Windows\System32\activeds.tlb
Version: 1.0
File Version: 6.1.7600.16385(win7_rtm.090713-1255)

using System;
using System.Security.Principal;
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
using System.DirectoryServices.AccountManagement;
using ActiveDs;

namespace ADOwner
{
    class Program
    {
        static void Main(string[] args)
        {

            string ADDomain = "yourdomain.com";
            string ADUser = "youraduser";
            string ADPass = "youradpass";
            string ADsAMAccountName = "YOURDOMAIN\\USERNAMEHERE";

            using (var pc = new PrincipalContext(ContextType.Domain, ADDomain, ADUser, ADPass))
            {

                // get UserPrincipal Object
                UserPrincipal inetPerson = UserPrincipal.FindByIdentity(pc, IdentityType.SamAccountName, ADsAMAccountName);

                // Get Directory Entry Object
                DirectoryEntry de = inetPerson.GetUnderlyingObject() as DirectoryEntry;

                // Get Active Directory Security Object
                ActiveDirectorySecurity ads = de.ObjectSecurity;

                // Get sid Object                                                 
                SecurityIdentifier sid = new SecurityIdentifier(ads.GetOwner((typeof(SecurityIdentifier))).Value);

                // Translate sid to account
                NTAccount account = (NTAccount)sid.Translate(typeof(NTAccount));

                // Get owner string
                Console.WriteLine("Owner: {0}",account.ToString());
                Console.ReadKey();

            }


        }
    }
}

Resources to investigate using Perl