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
// Edit Fiddler rules (Rules => Customize Rules) | |
// Added this near the top of the script (one of the first things in the the "class Handlers" section) | |
public static RulesOption("Hide CSS requests") | |
BindPref("fiddlerscript.rules.HideCssRequests") | |
var m_HideCssRequests: boolean = false; | |
// Added this in the "OnBeforeResponse" method | |
if (m_HideCssRequests && oSession.uriContains(".css")) { oSession["ui-hide"] = "true"; } |
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
// Edit Fiddler rules (Rules => Customize Rules) | |
// Added this near the top of the script (one of the first things in the the "class Handlers" section) | |
public static RulesOption("Hide JS requests") | |
BindPref("fiddlerscript.rules.HideJsRequests") | |
var m_HideJsRequests: boolean = false; | |
// Added this in the "OnBeforeResponse" method | |
if (m_HideJsRequests && oSession.uriContains(".js")) { oSession["ui-hide"] = "true"; } |
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
$computer = $env:USERDNSDOMAIN; | |
# Get all the zones | |
$zones = @(Get-DnsServerZone -ComputerName $computer); | |
# Get records from each zone | |
$results = @{}; | |
ForEach ($zone in $zones) { | |
Write-Host "$($zone.ZoneName)" -ForegroundColor Yellow -NoNewline; | |
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
' Copy the item(s) to the monthly report folder | |
Sub SaveToMonthlyReport() | |
' Gotta grab the MAPI namespace to get the folders | |
Set ns = Application.GetNamespace("MAPI") | |
Dim fldRoot As MAPIFolder | |
Set fldRoot = ns.GetDefaultFolder(olFolderInbox) | |
' Start with the root folder (create if necessary) | |
On Error GoTo ErrorHandlerFolderReports | |
Set fldReports = fldRoot.Folders("Monthly Reports") |
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
$([ADSI]"WinNT://$env:COMPUTERNAME").Children | ?{ $_.SchemaClassName -eq 'user' } | Select-Object @{l='name';e={$_.name}}, @{l='LastLogin';e={$_.lastlogin}}, @{l='IsDisabled';e={[bool]($_.userflags.value -band 0x2)}}; |
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
function Check-UserFlagsEnum([int]$int) { | |
# REF: https://msdn.microsoft.com/en-us/library/windows/desktop/aa772300 | |
$result = @(); | |
$flags = @{ | |
0x1 = @{Name = "ADS_UF_SCRIPT"; Description = "The logon script is executed. This flag does not work for the ADSI LDAP provider on either read or write operations. For the ADSI WinNT provider, this flag is read-only data, and it cannot be set for user objects."}; | |
0x2 = @{Name = "ADS_UF_ACCOUNTDISABLE"; Description = "The user account is disabled."}; | |
0x8 = @{Name = "ADS_UF_HOMEDIR_REQUIRED"; Description = "The home directory is required."}; | |
0x10 = @{Name = "ADS_UF_LOCKOUT"; Description = "The account is currently locked out."}; | |
0x20 = @{Name = "ADS_UF_PASSWD_NOTREQD"; Description = "No password is required."}; |
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
#!/bin/sh | |
# Variables | |
LAST_IP_FILE=/tmp/lastip.txt | |
LOGFILE=/var/log/namecheap.log | |
TIME="`date +%Y-%m-%d:%H:%M`" | |
HOST=@ | |
DOMAIN=example.com | |
PASSWORD=0123456789abcdef0123456789abcdef | |
echo "TIME: $TIME" |
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
' Rule execution | |
Sub RunRule(rulename As String) | |
Dim st As Outlook.Store | |
Dim myRules As Outlook.Rules | |
Dim rl As Outlook.Rule | |
Dim RunRule As String | |
Set st = Application.Session.DefaultStore | |
Set myRules = st.GetRules | |
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
Sub MergeAndSaveIndividually() | |
' REF: http://stackoverflow.com/questions/12594828/how-to-split-a-mail-merge-and-save-files-with-a-merge-field-as-the-name | |
' Get desired save folder | |
'REF: http://www.mrexcel.com/forum/excel-questions/294728-browse-folder-visual-basic-applications.html | |
Dim fldr As FileDialog | |
Set fldr = Application.FileDialog(msoFileDialogFolderPicker) | |
With fldr | |
.Title = "Select a Folder" | |
.AllowMultiSelect = False |
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
# | |
# Originally from: "http://sbrickey.com/Tech/Blog/Post/Parsing_IIS_Logs_with_PowerShell" | |
# | |
# Define the location of log files and a temporary file | |
$LogFolder = "C:\inetpub\logs\LogFiles\W3SVC123" | |
$LogFiles = [System.IO.Directory]::GetFiles($LogFolder, "*.log") | |
$LogTemp = "C:\inetpub\logs\LogFiles\W3SVC123\AllLogs.tmp" | |
# Logs will store each line of the log files in an array |