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
# | |
# Need this | |
# http://www.microsoft.com/en-ie/download/confirmation.aspx?id=35585 | |
# | |
Add-Type -Path "c:\folder\Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "c:\folder\Microsoft.SharePoint.Client.Runtime.dll" | |
$siteUrl = "https://tenant.sharepoint.com/sites/things" | |
$credentials = (Get-Credential) | |
$ClientContext = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) |
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 ArinPortableAPI | |
{ | |
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Xml.Serialization; | |
public class ArinLookup | |
{ | |
public static string ApiUrl = "http://whois.arin.net/rest"; |
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 script will configure the local machine for the SQL MP | |
Low Privilege Environment | |
We need to set the following items on the server | |
Add SQLDefaultAction account and SQLMonitor account to | |
Performance Monitor Users | |
Add SQLDefaultAction account and SQLMonitor account to |
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 AD ACL Rules | |
# | |
param | |
( | |
$adPath, | |
$secPrincipal, | |
$newPrincipal | |
) |
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 Get-WinEventTail | |
{ | |
<# | |
.SYNOPSIS | |
A tail cmdlet for Eventlogs | |
.DESCRIPTION | |
This function will allow you to tail Windows Event Logs. You specify | |
a Logname for either the original logs, Application, System and Security or | |
the new format for the newer logs Microsoft-Windows-PowerShell/Operational | |
.PARAMETER LogName |
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
<# | |
.SYNOPSIS | |
A custom command channel to generate emails from Office 365 Alert Context data | |
.DESCRIPTION | |
This script is used as a command channel to generate alert emails from the data | |
stored in the Alert Context tab of the Office 365 Message Center alerts. There | |
is no simple way to retrieve this data as that tab is more or less free form, | |
so the data is pulled from SCOM, filtered for New resolution state and then | |
send to the lsit of email addresses. | |
.PARAMETER SmtpHost |
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 Reset-HealthState | |
{ | |
param | |
( | |
$AlertName, | |
$ResolutionState | |
) | |
$Criteria = "Name like '$($AlertName)' and ResolutionState != $($ResolutionState)" | |
$Alerts = Get-SCOMAlert -Criteria $Criteria |
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 Set-UserPhoto | |
{ | |
<# | |
.SYNOPSIS | |
Set the thumbnailPhoto property for a user | |
.DESCRIPTION | |
This function uses the ActiveDirectory Module to get and set | |
user properties. Specifically it replaces whatever is in the | |
thumbnailPhoto property with a photo. | |
.PARAMETER sAMAccountName |
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
# | |
# Enable-WSManCredSSP -Role Client -DelegateComputer localhost | |
# Enable-WSManCredSSP -Role Server | |
# | |
Try{ | |
$ErrorActionPreference = "Stop"; | |
$WinRMUser = "\`d.T.~Ed/{34846A7C-5BC4-4C23-A22A-D21C1DC99DF8}.{5408AD4E-3052-4F73-B45E-7DADBB999FE4}\`d.T.~Ed/"; | |
$WinRMPass = ConvertTo-SecureString -String "\`d.T.~Ed/{34846A7C-5BC4-4C23-A22A-D21C1DC99DF8}.{98301C29-F4AF-4A43-88D3-851520744C6B}\`d.T.~Ed/" -AsPlainText -Force; | |
$Credential = New-Object System.Management.Automation.PSCredential ($WinRMUser, $WinRMPass); | |
# |