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
@{ | |
# MODULE | |
Description = 'LINQ for PowerShell' | |
ModuleVersion = '3.0' | |
GUID = '03BDA80F-0831-406E-B6AE-59E32D73F190' | |
# AUTHOR | |
Author = 'Josh Einstein' | |
CompanyName = 'Einstein Technologies' |
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
Param( | |
[Parameter(Mandatory=$true,Position=0)] $ImportModuleFrom, | |
[Parameter(Position=1)] $LogPath | |
) | |
Function Create-Form | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null | |
# Create the Conatainer Form to place the Labels and Textboxes |
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 Compare-Hashtables { | |
param([hashtable]$primary, | |
[hashtable]$secondary | |
) | |
foreach($key in $primary.Keys) { | |
if($secondary.Contains($key)) { | |
if($primary[$key].GetType() -eq [System.Collections.Specialized.OrderedDictionary] -and | |
$secondary[$key].GetType() -eq [System.Collections.Specialized.OrderedDictionary] ) { | |
$res = Compare-Hashtables -primary $primary[$key] -secondary $secondary[$key] |
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
MIT License | |
Copyright (c) 2016 Xavier Plantefeve | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
#region AD Functions | |
#------------------------------------------------------- | |
function get-servers { | |
param([string[]]$names, | |
[string[]]$props = @('DNSHostName','OperatingSystem') | |
) | |
foreach ($name in $names) { | |
$c = $null | |
$hostname = ($name -split '\.')[0] |
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
Add-Type -AssemblyName System.Security; | |
[Text.Encoding]::ASCII.GetString([Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String((type -raw (Join-Path $env:USERPROFILE foobar))), $null, 'CurrentUser')) |
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-DirectoryContent { | |
<# | |
.SYNOPSIS | |
Function to get directory content | |
.EXAMPLE | |
Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/" | |
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
<# | |
GeneratePrintJobAccountingReports.ps1 | |
ver. 2014-09-26-01 | |
This script reads event log ID 307 and ID 805 from the log "Applications and Services Logs > Microsoft > Windows > PrintService" | |
from the specified server and for the specified time period and then calculates print job and total page count data from these | |
event log entries. | |
It then writes the output to two .CSV files, one showing by-print job data and the other showing by-user print job data. |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Sample Autounattend.xml for Windows 10 media. This has been tested on 1511, 1607, and 1709 - x64 architecture only | |
For more details visit my blog http://blogs.catapultsystems.com/mdowst/archive/2017/12/11/create-zero-touch-windows-10-iso/ --> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> | |
<DiskConfiguration> | |
<Disk wcm:action="add"> | |
<DiskID>0</DiskID> | |
<WillWipeDisk>true</WillWipeDisk> |
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
# No longer used but didn't want to throw it away. | |
function Invoke-WsusDbQuery { | |
[CmdletBinding()] | |
param ( | |
[string]$ComputerName = $script:WsusServer, | |
[PSCredential]$Credential = $script:WsusServerCredential, | |
[string]$Pattern, | |
[string]$UpdateId, | |
[switch]$EnableException | |
) |
OlderNewer