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 FindProxyForURL(url, host) { | |
// Your proxy server name and port | |
var proxy_yes = "PROXY proxylb.schoolsbroadband.net:31702"; | |
var proxy_no = "DIRECT"; | |
if (isInNet(myIpAddress(), "10.3.0.0", "255.255.0.0")) return proxy_no; | |
// DEFAULT RULE: All other traffic, send direct | |
return proxy_yes; | |
} | |
function FindProxyForURLEx(url, host) { |
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
Import-Module ActiveDirectory | |
$ou = "OU=Office Computers,Dc=CompanyName,Dc=Net" | |
Get-ADComputer -Filter * -SearchBase $ou | | |
ForEach-Object { | |
Restart-Computer -ComputerName $_.name -force | |
} | |
# If you wish to eliminate specific machines from this restart - no problem, you can add a "where" clause using a wildcard to either target an individual or complete OU. |
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
SELECT p.txtschoolid, | |
p.txtsurname, | |
p.txtforename, | |
A.txtcontactssurname, | |
A.txtcontactsforename, | |
AL.tblpupilmanagementaddresslinkid, | |
A.tblpupilmanagementaddressesid, | |
( '(' + Isnull(A.txtrelationtype, '') ) + ')' + Char(13) + Char(10) + | |
( Isnull(A.txtcontactstitle, '') + ' ' | |
+ Isnull(A.txtcontactsforename, '') + ' ' |
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
Private Sub Workbook_AfterSave(ByVal Success As Boolean) | |
'Crude error handling! | |
On Error Resume Next | |
siblingNameField = InputBox("Please enter the heading for the sibling names") | |
If siblingNameField = Empty Then Exit Sub | |
siblingYearField = InputBox("Please enter the heading for the sibling year group") | |
If siblingYearField = Empty Then Exit Sub |
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
Sub Copy() | |
NextLine = 1 | |
TeacherLine = 0 | |
Period = 1 | |
For i = 4 To 46 | |
Worksheets("Main").Range("B" & i & ":BI" & i).Copy | |
Worksheets("Result").Range("B" & NextLine).PasteSpecial Transpose:=True | |
For T = 1 To 60 | |
If Period > 60 Then Period = 1 |
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
####Create an Office 365 session connection | |
$UserCredential = Get-Credential | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection | |
Import-PSSession $Session | |
###Use this Powershell script to disable Clutter across all accounts | |
Get-Mailbox | Set-Clutter -Enable $true | |
###Use this PowerShell script to disable Clutter for an individual (in this example "PTest") |
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.Configuration; | |
@{ | |
string ComplexURLFromWebConfig = ConfigurationManager.AppSettings["ComplexURLQueryString"].ToString().Trim(); | |
@* QueryString sent from url *@ | |
string QueryStringComplexURL = (Request.QueryString["ComplexURLQueryString"] ?? "").ToString().Trim(); | |
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
<appSettings> | |
<add key="ComplexURLQueryString" value="hhqsdc332323vxzcjsdffbfsh12sdfdfgdfgdfgwerktyykfdhgdhjsdfsdfasdffdfww"/> | |
</appSettings> |
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
######################################################################## | |
# Please Configure the following variables - $smtpServer and $from | |
# Leave the $event and $body variables as they are | |
$smtpServer="YOUR SMTP SERVER" | |
$from = "SET FROM EMAIL ADDRESS" | |
$event = Get-EventLog -LogName Security -InstanceId 4740 -Newest 1 | |
$body = $event.Message + "`r`n`t" + $event.TimeGenerated | |
######################################################################## | |
Send-Mailmessage -smtpServer $smtpServer -from $from -to $from -subject "Account Lockout" -body $body -priority High |
NewerOlder