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
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue | |
Get-QADUser * -OrganizationalUnit "ou=Your Sub-OU,ou=Your OU,dc=Your LDAP,dc=Your LDAP" | | |
?{$_.TsAllowLogon -ne $true} | | |
Set-QADUser -TsAllowLogon $true |
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
C:\SCHEDULE\SBGroups\CreateADGroups.exe "DC=St-Stephens, DC=Local" "OU=SBGroups" "OU=Students, OU=St Stephens Users" "Art|Photo" "UCAS" |
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
namespace CreateADGroups | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string activeDirPath = args[0]; | |
string activeDirOU = args[1]; | |
string usersLocation = args[2]; | |
string filterIn = args[3]; |
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
Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', $_.AccessRights)}} | Export-Csv -NoTypeInformation mailboxpermissions.csv |
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
<ul class="nav navbar-nav"> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Recent Articles <b class="caret"></b></a> | |
<ul class="dropdown-menu"> | |
@foreach (var postTitle in Storage.GetAllPosts().Where(pub => pub.IsPublished == true).Where(pubDate => pubDate.PubDate <= DateTime.Now).Take(10)) | |
{ | |
<li><a href="@postTitle.AbsoluteUrl">@postTitle.Title</a></li> | |
} | |
</ul> | |
</li> |
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
//cdn fallback for Bootstrap css | |
<div id="bootstrapCssTest" class="hide"></div> // (HTML in _Layout.cshtml) | |
if ($('#bootstrapCssTest').is(':visible') === true) { | |
$('<link href="\css/bootstrap.min.css" rel="stylesheet" type="text/css" />').appendTo('head'); | |
} | |
//cdn fallback for Bootstrap js | |
if (typeof ($.fn.modal) === 'undefined') { | |
$('<script src="\scripts/bootstrap.min.js">\x3C/script>').appendTo('head'); | |
} |
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
@if (Blog.GetPosts(Blog.PostsPerPage).Count() > Blog.PostsPerPage) |
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
@if (Blog.GetPosts(Blog.PostsPerPage * 2).Count() > Blog.PostsPerPage) |
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
Clear-Host | |
$hsg = Invoke-WebRequest -Uri http://www.stmarys.eu/sitemap.aspx | |
$links = $hsg.Links | Where class -eq 'rmLink' | select href | |
$linksWithDomain = $links | Foreach-Object{"http://www.stmarys.eu/" + $_.href} | |
$linksWithDomain | foreach{ | |
$webClient = new-object System.Net.WebClient | |
$webClient.Headers.Add("user-agent", "PowerShell Script") | |
$output = "" | |
$output = $webClient.DownloadString($_.toString()) | |
if ($output -like "*supportLists*") { |
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
<br/> | |
<h3>Most recent visitors</h3> | |
<script> | |
(function doPoll() { | |
var count = 0; | |
$.ajax({ | |
url: "http://YOUR_DOMAIN_NAME/plugins/clientaspxfiles/stmwhoonline.aspx", | |
dataType: "json", | |
success: function (json) { | |
var strHtml = '<ul>'; |