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
$virtualPath = "vdir" | |
$physicalPath = "\\server\share" | |
$parentSite = "Default Website" | |
$username = "share_user" | |
$password = "share_password" | |
Add-PSSnapin WebAdministration -ErrorAction SilentlyContinue | |
Import-Module WebAdministration -ErrorAction SilentlyContinue | |
Write-Host "Getting web site $parentSite." |
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
$Username = "su" | |
$Password = "password" | |
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME" | |
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } | |
if ($existing -eq $null) { | |
Write-Error "User $Username does not exist" | |
return | |
} |
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
$Username = "su" | |
$Password = "password" | |
$group = "Administrators" | |
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME" | |
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } | |
if ($existing -eq $null) { |
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
using System.Collections.Generic; | |
using System.IdentityModel.Tokens; | |
using System.Linq; | |
using Web.Models; | |
namespace Web.Utils | |
{ | |
public class InMemoryIssuerNameRegistry : ValidatingIssuerNameRegistry | |
{ | |
public class TenantData |
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
function Set-UmbracoPermissions($SitePath, $AppPoolAccount, $PathOverrides) | |
{ | |
$readExecute = $AppPoolAccount,"ReadAndExecute","ContainerInherit, ObjectInherit","None","Allow" | |
$read = $AppPoolAccount,"Read","ContainerInherit, ObjectInherit","None","Allow" | |
$modify = $AppPoolAccount,"Modify","ContainerInherit, ObjectInherit","None","Allow" | |
$fileModify = $AppPoolAccount,"Modify","Allow" | |
$objects = @{} | |
$objects["App_Browsers"] = $readExecute | |
$objects["App_Code"] = $modify |
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
$environment = $OctopusParameters['Octopus.Environment.Name'] | |
$releaseNumber = $OctopusParameters['Octopus.Release.Number'] | |
$packages = @( | |
@{ | |
"Id" = $OctopusParameters['Octopus.Action[Update Database].Package.NuGetPackageId']; | |
"Version" = $OctopusParameters['Octopus.Action[Update Database].Package.NuGetPackageVersion'] | |
}, | |
@{ | |
"Id" = $OctopusParameters['Octopus.Action[Deploy Website].Package.NuGetPackageId']; | |
"Version" = $OctopusParameters['Octopus.Action[Deploy Website].Package.NuGetPackageVersion'] |
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
$OctopusThumbprint = "YOUR_THUMBRPRINT" | |
$OctopesServer = "http://your.octopusserver.com" | |
$ApiKey = "YOUR_API_KEY" | |
$Role = "a-role" | |
$Environment = "UAT" | |
$TentacleDownloadUrl = "http://octopusdeploy.com/downloads/latest/OctopusTentacle64" | |
$InstallDirectory = "C:\Program Files\Octopus Deploy\Tentacle" | |
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Http; | |
using MongoDB.Bson; | |
using MongoDB.Driver; | |
using MongoDB.Driver.Builders; | |
namespace Web.Core | |
{ | |
public abstract class MongoApiController<T> : ApiController |
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
using Newtonsoft.Json.Converters; | |
namespace Web.Core | |
{ | |
public class CamelCaseStringEnumConverter : StringEnumConverter | |
{ | |
public CamelCaseStringEnumConverter() | |
{ | |
CamelCaseText = true; | |
} |