This file contains hidden or 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
$assembly = [System.Reflection.Assembly]::LoadFrom("$env:systemroot\system32\inetsrv\Microsoft.Web.Administration.dll") | |
$manager = new-object Microsoft.Web.Administration.ServerManager | |
# load appHost config | |
$config = $manager.GetApplicationHostConfiguration() | |
Write-Host "Unlocking system.webServer/handlers" | |
$section = $config.GetSection('system.webServer/handlers') | |
$section.OverrideMode = 'Allow' | |
$manager.CommitChanges() | |
Write-Host "Unlocked system.webServer/handlers" |
This file contains hidden or 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
namespace Serene.Administration | |
{ | |
using Serene.Administration.Entities; | |
using Serenity; | |
using Serenity.Abstractions; | |
using Serenity.Data; | |
using System; | |
using System.Collections.Generic; | |
using System.Web.Security; // added by abelal to support AD role based authentication |
This file contains hidden or 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
Add-Type -Path "$PSScriptRoot\SevenZipSharp.dll" | |
function Compress-TextToZipStream | |
{ | |
############################## | |
#.SYNOPSIS | |
#Short description | |
# | |
#.DESCRIPTION | |
#Long description | |
# |
This file contains hidden or 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
# this was used to get around vmware network card being set to public which powershell remoting does not like | |
$domain = 2 | |
$workHome = 1 | |
$public = 0 | |
$nlm = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")) | |
$connections = $nlm.getnetworkconnections() | |
foreach ($connection in $connections) { | |
if ($connection.getnetwork().getcategory() -eq $public) |