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
$map = Invoke-MapDomainTrust | |
$domains = (($map | select -ExpandProperty sourcename) + ($map | select -ExpandProperty targetname)) | Select-Object -Unique | |
ForEach ($computer in (gc computers.txt | Sort-Object -Unique)) { | |
ForEach ($domain in $domains) { | |
$fqdn = Get-DomainComputer -SearchBase "GC://$domain" -LDAPFilter "(name=$computer)" -Properties dnshostname | |
if ($fqdn -ne $null) { | |
$fqdn | |
break | |
} |
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
require 'digest/sha1' | |
plain = 'password' | |
salt = 'MBS9ZgZ5r7IGU8O1hfVyajXZkaoSZPbu' | |
answer = 'FxHUyOPwsrulLoacXlrkHN2qJ3M=' | |
i = 100000 | |
sha1 = Digest::SHA1.new | |
sha1.update(salt+plain) | |
(i-1).times do |
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 Get-pwmResponseSet | |
{ | |
<# | |
.SYNOPSIS | |
This function retrieves and decodes the pwmResponseSet attribute for user(s) in Active Directory | |
.DESCRIPTION | |
NetIQ Self Service Password Reset is a user self service password application. Users configure challenege/response | |
questions and answers then later use them to reset their forgotton password. SSPR can be configured to store the | |
user's config as part of the Active Directory schema. The schema is extended and a pwmResponseSet attribute is | |
created and added to user accounts. The attribute is ASCII bytes encoding XML containing the challenge questions |