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
Func RunCommand($_sCommand) | |
ConsoleWrite(@CRLF & ">> RunCommand: " & $_sCommand & @CRLF) | |
Local $processId = Run(@ComSpec & " /c " & $_sCommand, "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) | |
ProcessWaitClose($processId) | |
Local $_stdout = StdoutRead($processId) | |
ConsoleWrite(">> STDOUT: " & $_stdout & @CRLF) | |
Return $_stdout | |
EndFunc |
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
Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object { | |
$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID") | |
} | Select-Object -ExpandProperty PSChildName | Out-GridView |
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-ComObject { | |
param( | |
[Parameter(Mandatory=$true, | |
ParameterSetName='FilterByName')] | |
[string]$Filter, | |
[Parameter(Mandatory=$true, | |
ParameterSetName='ListAllComObjects')] | |
[switch]$ListAll |
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
<# | |
.SYNOPSIS | |
Gets the hash value of a file or string | |
.DESCRIPTION | |
Gets the hash value of a file or string | |
It uses System.Security.Cryptography.HashAlgorithm (http://msdn.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm.aspx) | |
and FileStream Class (http://msdn.microsoft.com/en-us/library/system.io.filestream.aspx) | |
Based on: http://blog.brianhartsock.com/2008/12/13/using-powershell-for-md5-checksums/ and some ideas on Microsoft Online Help | |
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
#include <Array.au3> | |
#include <WinAPI.au3> | |
ConsoleWrite("Make your window active!" & @CRLF) | |
Sleep(5000) | |
GetAllWindowsControls(WinGetHandle("[ACTIVE]")) | |
Func GetAllWindowsControls($hCallersWindow, $bOnlyVisible=Default, $sStringIncludes=Default, $sClass=Default) | |
If Not IsHWnd($hCallersWindow) Then |
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
font.base=font:Courier New,size:11,$(font.override) | |
font.monospace=font:Consolas,size:12 | |
selection.fore=#E6E4FA | |
selection.back=#9488C8 | |
selection.alpha=50 | |
style.*.32=style.*.32=$(font.base),back:#F0F4F9 | |
caret.line.back=#FDF268 | |
caret.line.back.alpha=21 | |
style.au3.34=fore:#DC78BB,back:#282A36 | |
style.au3.35=fore:#4F72A4,back:#282A36 |
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.Windows.Forms,System.Drawing | |
$screens = [Windows.Forms.Screen]::AllScreens | |
$top = ($screens.Bounds.Top | Measure-Object -Minimum).Minimum | |
$left = ($screens.Bounds.Left | Measure-Object -Minimum).Minimum | |
$width = ($screens.Bounds.Right | Measure-Object -Maximum).Maximum | |
$height = ($screens.Bounds.Bottom | Measure-Object -Maximum).Maximum | |
$bounds = [Drawing.Rectangle]::FromLTRB($left, $top, $width, $height) | |
$bmp = New-Object System.Drawing.Bitmap ([int]$bounds.width), ([int]$bounds.height) | |
$graphics = [Drawing.Graphics]::FromImage($bmp) |
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
#requires -RunAsAdministrator | |
<#----------------------------------------------------------------------------- | |
Ashley McGlone, Microsoft Premier Field Engineer | |
http://aka.ms/goateepfe | |
February 2016 | |
Install-ADModule | |
For Windows 10 performs the following tasks: | |
- Downloads and installs Windows 10 RSAT for the appropriate system architecture | |
- Enables the RSAT AD PowerShell feature |
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
# edit /etc/default/grub | |
# run update-grub | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet i8042.nomux i8024.noloop" |