WEM Documentation Script Update

A little while ago I put together a script (with the help of George Spiers) to help fill the lack of ability to Document a Citrix Workspace Environment Management deployment

George, was kind of enough to post this on his blog here, and the source code can be found here in my github repository

I am pleased to release an updated version of this script which now caters for the new AppLocker components integrated with the latest WEM 4.5 release. This functionality can now be included in your WEM documentation exports and put into whatever format you see fit

All future code releases will be found here

I am well aware that my PowerShell prowess is somewhat lacking, and I have some really good input coming along from other people far more skilled than I, but if anyone else wants to add to this or help move this into a more useful tool, please feel free

Enjoy

4 thoughts on “WEM Documentation Script Update

Add yours

  1. Hi James,

    First off all, congratulations for you script ! It does the job and it completes a missing feature in WEM.

    If you want, we add a small update to the script to convert the SID to name.

    We add this:

    #Translate SID
    Function Translate-SID {
    [CmdletBinding()]
    Param(
    [Parameter(Mandatory=$True,ValueFromPipeline=$True)]$item
    )

    BEGIN { $result = @() }
    PROCESS {
    if($item.Name -like “S-*”) {
    $item.Name = “$((New-Object System.Security.Principal.SecurityIdentifier($item.Name)).Translate([System.Security.Principal.NTAccount]).Value)”

    }
    elseif ($item.GroupSid -like “S-*”) {
    $item.GroupSid = “$((New-Object System.Security.Principal.SecurityIdentifier($item.GroupSid)).Translate([System.Security.Principal.NTAccount]).Value)”

    }
    $result += $item
    }
    END { $result }
    }

    # Define Info Gathering Function
    function GetInfo {
    Write-Host “Attempting to Export $Text” -ForegroundColor Green
    try { if ($SQLAuth -eq “Y”) {
    (Invoke-Sqlcmd -ServerInstance $DBServer -Username $Username -Password $Password -Database $DataBase -query $Query) `
    | Select-Object $Selection | ConvertTo-HTML -head $a -body “$Text” | Out-File -append $OutFile -Force
    }
    elseif (!($SQLAuth -eq “Y”)) {
    (Invoke-Sqlcmd -ServerInstance $DBServer -Database $DataBase -query $Query) `
    | Select-Object $Selection | Translate-SID | ConvertTo-HTML -head $a -body “$Text” | Out-File -append $OutFile -Force
    }
    }
    catch {
    [string]$ErrorText = $Error[0].CategoryInfo.Reason
    Write-Warning $ErrorText
    }
    }

    Like

    1. Julien – This my friend, is awesome – I just tested and it works perfectly – Thank You! This drove me nuts for a long time. I’d be more than happy to add you to my github repo if you want to add to this with me 🙂

      Like

      1. Thanks James, your script was already great, it’s just a little addon 

        I worked on this function with a friend for one customer that’s wanted to compare two WEM configuration and he thanks you !

        If I make some change on your script in the futur I will send you the update, I prefer processing like this beacause I will not have a lot af time to work on and update the Github repository.

        Julien

        Like

      2. No worries, always welcome to send across any improvements and i will incorporate them – thanks again for the addition – ill add you to the release notes 🙂

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: