This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
This is a BoxStarter script for paving BLU machines | |
#> | |
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
#Should we create domain users and groups? or assume their existence? | |
#Perhaps for now just assume their existence, but add the users to the local groups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ms = new MemoryStream(secureEnvelopeBytes); | |
var xRdr = new XmlTextReader(ms); | |
var message = Message.CreateMessage(xRdr, int.MaxValue, MessageVersion.Soap12); | |
var securityHeader = message.Headers.FirstOrDefault(x => x.Name == "Security"); | |
if (securityHeader != null) | |
{ | |
var securityElement = XElement.Parse(securityHeader.ToString()); | |
var binarySecurityToken = securityElement.Descendants( | |
XName.Get("BinarySecurityToken", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")).Single(); |
NewerOlder