Skip to content

Instantly share code, notes, and snippets.

@jkbryan
jkbryan / samplexml-mt-wf-set-mpr-creation.xml
Created October 2, 2018 22:37
samplexml-mt-wf-set-mpr-creation.xml
<?xml version="1.0" encoding="utf-8" ?>
<Lithnet.ResourceManagement.ConfigSync>
<Variables>
<Variable name="#domain#" value="%userdomain%"/>
<Variable name="#PATH#" value =".\" />
</Variables>
<Operations>
<!-- Create Reference to Recipient -->
<ResourceOperation operation="None" resourceType="Person" id="myRecipient1">
<AnchorAttributes>
@jkbryan
jkbryan / samplexml-mt-wf-mail-recipient.xml
Last active October 2, 2018 22:37
samplexml-mt-wf-mail-recipient.xml
<ResourceOperation operation="None" resourceType="Person" id="myRecipient1">
@jkbryan
jkbryan / xoml-sample.xoml
Created October 2, 2018 22:32
xoml-sample.xoml
To="##xmlref:myRecipient1:ObjectID##;##xmlref:myRecipient2:ObjectID##" CC="{x:Null}" EmailTemplate="##xmlref:---Create:ObjectID##"
@jkbryan
jkbryan / template-job-list.xml
Created October 2, 2018 22:31
template-job-list.xml
<!-- Create --- Create Email Template -->
<ResourceOperation operation="Add Update" resourceType="EmailTemplate" id="---Create">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MT:---Create</AttributeOperation>
<AttributeOperation operation="replace" name="Description">--- User Creation Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailTemplateType">Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailBody" type="file">#PATH#Templates\---USERCREATED.HTML</AttributeOperation>
@jkbryan
jkbryan / Lithnet-Wrapper.xml
Created October 2, 2018 22:29
Lithnet-Wrapper.xml
<?xml version="1.0" encoding="utf-8" ?>
<Lithnet.ResourceManagement.ConfigSync>
<Variables>
<Variable name="#domain#" value="%userdomain%"/>
<Variable name="#PATH#" value =".\" />
</Variables>
<Operations>
<!-- Create Reference to Recipient1 -->
<ResourceOperation operation="None" resourceType="Person" id="myRecipient1">
<AnchorAttributes>
@jkbryan
jkbryan / LegalText.vbs
Created October 2, 2018 22:26
LegalText.vbs
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~ SCRIPT NAME: LEGALNOTICE.VBS
'~ WRITTEN BY: JON BRYAN - March 2010
'~
'~ This script should be applied as a machine startup script that applies to all machines in a Domain.
'~
'~ It applies the Legal Text to all machines except those in the "AUTO_BOOT_PC" security group. This is a Security Group in your own Domain.
'~
'~ Before applying this script, remember to remove the 'normal' GPO settings found in:
'~ Computer Configuration/Windows Settings/Local Policies/Security Options -
@jkbryan
jkbryan / mailbox-delegation.ps1
Created October 2, 2018 22:24
mailbox-delegation.ps1
# Main juicy bit of this script that actually does the delegation work with EWS was taken from here:
# http://gsexdev.blogspot.com/2009/04/add-delegates-to-mailbox-with.html
# The rest cobbled together by Jon Bryan 19/07/11
# Tasks, Notes and Contacts delegation added to the EWS script bit - note that Journal delegation is not provided, but can be quickly added!
$SavedEA=$Global:ErrorActionPreference
$Global:ErrorActionPreference="SilentlyContinue"
write-host "Exchange management snap-in loading... if not already loaded"
write-host ""
Add-PSSnapin -Name Microsoft.Exchange.Management.Powershell.E2010
write-host "Exchange management snap-in loaded"
@jkbryan
jkbryan / DriveMappingScript.vbs
Created October 2, 2018 21:32
DriveMappingScript.vbs
OPTION EXPLICIT
ForceScriptEngine("cscript")
Const ForAppending = 8
Dim fso, WSHNetwork, strComputer, CScolItems, objItem, strCompDom, strComputerDomain, strLogPath, strFileDate, objTextFile, objWMIService, colDriveType, objDrive
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHNetwork = CreateObject("WScript.Network")
strComputer = WSHNetwork.ComputerName
Set objWMIService = GetObject( "winmgmts://" & strComputer & "/root/cimv2" )
Set CScolItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objItem in CScolItems
@jkbryan
jkbryan / DriveMappingScript-Case.vbs
Last active October 2, 2018 21:31
DriveMappingScript-Case.vbs
Option Explicit
ForceScriptEngine("cscript")
Const ForReading = 1
Const ForAppending = 8
Dim from_sv, to_sv, OldSharePath, DriveLetter, NewSharePath,Loop_Counter,WshNet,WS_NetworkDrives,shellApp
Dim objFSO,objFile,strComputer,intLenOldSharePath,intFromLen,intRightLen,strRightPath,WSHNetwork,strLogPath,strFileDate,objTextFile, strResult, strMatching
Set WshNet = CreateObject("WScript.Network")
strComputer = WshNet.ComputerName
Set shellApp = CreateObject("Shell.Application")
Set objFSO=CreateObject("Scripting.FileSystemObject")
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Existing Account Moved out of the ROE OU</title>
</head>
<body>
<h1 style="padding-left: 30px; font-family: verdana; font-size: 150%">Existing Account Moved out of the ROE OU</h1>
<h2 style="padding-left: 30px; font-family: verdana; font-size: 150%">Attributes:</h2>