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 url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
.tabbrowser-tab:not([selected=true]) .tab-label { color: white !important; } | |
.tabbrowser-tab:-moz-window-inactive .tab-label { color: black !important; } |
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-ADNestedMemberOf ($userName) { | |
# For a specified user get the groups it is a member of recursively. | |
$targetUser = Get-ADUser $userName | |
$results = Get-ADGroup -Filter {member -RecursiveMatch $targetUser.DistinguishedName} | |
return $results | |
} | |
Function Test-ADIsMember ($objectDN, $groupDN) { | |
# params require full DistinguishedName | |
# Generalized for any ADObject and the return is the not null test. This Will produce the same errors as the standard IsMember if either object doesn't exist |
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 Import-Excel { | |
<# | |
.Synopsis | |
Converts an Excel document into an array of objects with the columns as separate properties. | |
.Example | |
Import-Excel -Path .\Example.xlsx | |
This example would import the data stored in the Example.xlsx spreadsheet. | |
.Description | |
The Import-Excel cmdlet converts an Excel document into an array of objects whose property names are determined by the column headers and whose values are determined by the column data. | |
Additionally, you can specify whether this particular Excel file has any headers at all, in which case the objects will be given the property names based on their column. Likewise, if the document has headers, but one column does not, its data will be assigned a Column# property name. |
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-CodeplexDownload { | |
PARAM( | |
[string]$projectName | |
) | |
try { | |
$releaseURI = "http://$projectName.codeplex.com/releases" | |
$response = Invoke-WebRequest -Uri $releaseURI | |
#$version = $response.Links.FindById('fileDownload0').outerText | |
$version = ($response.AllElements | ? {$_.Class -eq 'page_title wordwrap'} | Select -First 1).outerText.Split(' ') | ? {$_ -like "*[0-9]"} | |
$changeSetId = $response.Links.FindById('ChangesetIDAnchor').outerText |
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
$counters = (Get-Counter -ListSet Process).Counter | ? {$_ -like "*Bytes"} | % {$_.Replace('*','Powershell*')} | |
[string[]]$CounterNames = $counters | % {$_.split('\')[-1].ToLower()} | |
[string[]]$itemProperties = @() | |
$itemProperties += 'Timestamp' | |
$itemProperties += $CounterNames | ForEach-Object {$_.Replace('bytes','(MB)')} | |
$blankItem = '' | Select $itemProperties | |
Get-Counter -Counter $counters -SampleInterval 2 -Continuous| % { | |
$item = $blankItem | |
$item.Timestamp = $_.Timestamp | |
$groups = $_.countersamples | Group-Object {Split-Path $_.Path -Leaf} |
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
PARAM ( | |
$domainFQDN = $((Get-WmiObject Win32_ComputerSystem).Domain) | |
) | |
#The XAML Form | |
[string]$formXAML = @" | |
<Window x:Class="MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="Remote Password Reset" Height="300" Width="500" ResizeMode="NoResize" SizeToContent="WidthAndHeight" MinWidth="500" WindowStartupLocation="CenterScreen"> |
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 | |
This script will create a series of SMS TSEnvironment variables with the prefix WUMU_ExcludeKB to tell ZTIWindowsUpdate to skip these updates. | |
.DESCRIPTION | |
This is an adaptation of a script provided by "The Deployment Guys" to exclude updates that cause multiple restarts as document in Microsoft KB2894518. | |
What's (primarily) different in this script: | |
1) Added logic to fallback to a list of known updates that cause this issue if we can't connect to the Microsoft KB. |
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 New-SMSConnection { | |
PARAM( | |
[Parameter(Mandatory=$true)][string]$siteServer, | |
[Parameter(Mandatory=$true)][string]$siteCode | |
) | |
$smsNamespace = "root\sms\site_$siteCode" | |
$Locator = New-Object -com "WbemScripting.SWbemLocator" | |
$Locator.Security_.AuthenticationLevel = 6 | |
$Connection = $Locator.ConnectServer($siteServer, $smsNamespace) | |
Return $Connection |