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
$names = Get-Content c:\temp\gpolist.txt | |
foreach ($name in $names) { | |
set-gppermissions -name "GPOName" -permissionlevel gpoRead -targetname "$name" -targettype computer | |
set-gppermissions -name "GPOName" -permissionlevel gpoapply -targetname "$name" -targettype computer | |
} |
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 WriteLog($info, $errormsg=$false) | |
{ | |
#Funtion will write log entries along with a time and date stamp | |
$nowdate = date -format G | |
if ($errormsg) { | |
Write-Host "[$nowdate] $info" -foregroundcolor Red | |
} | |
else { | |
Write-Host "[$nowdate] $info" |
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 WriteLog($info, $errormsg=$false) | |
{ | |
#Funtion will write log entries along with a time and date stamp | |
$nowdate = date -format G | |
if ($errormsg) { | |
Write-Host "[$nowdate] $info" -foregroundcolor Red | |
} | |
else { | |
Write-Host "[$nowdate] $info" |
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
$pstcount =0 | |
$totalsize=0 | |
$totalsizegb=0 | |
$officepstcount=0 | |
$officepstaverage=0 | |
$officepsttotal=0 | |
$file = new-item -type file -path "c:\temp\pstsearch-stats.txt" -force | |
$detailfile = new-item -type file -path "c:\temp\pstsearch-details.txt" -force | |
##Get List of servers from the input file |
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
# see http://msdn2.microsoft.com/en-us/library/bb201634.aspx | |
# | |
# *NdisDeviceType | |
# | |
# The type of the device. The default value is zero, which indicates a standard | |
# networking device that connects to a network. | |
# | |
# Set *NdisDeviceType to NDIS_DEVICE_TYPE_ENDPOINT (1) if this device is an | |
# endpoint device and is not a true network interface that connects to a network. | |
# For example, you must specify NDIS_DEVICE_TYPE_ENDPOINT for devices such as |
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
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** | |
#AutoIt3Wrapper_Icon=..\Users\ddhahn\Downloads\scb.ico | |
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker | |
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** | |
;Kill Outlooks script | |
$pid = processexists("outlook.exe") | |
while $pid <> 0 | |
MsgBox(1,"Outlook Killed","Outlook.exe (" & $pid & ") has been killed") |
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
#include <winapiex.au3> | |
#include <apiconstants.au3> | |
;+--- switch to the desktop named sparedesktop | |
; Switch to the newly created desktop | |
_WinAPI_SwitchDesktop($hDesktop) | |
$hPrev = _WinAPI_GetThreadDesktop(_WinAPI_GetCurrentThreadID()) | |
$hDesktop = _WinAPI_CreateDesktop('MyDesktop', BitOR($DESKTOP_CREATEWINDOW, $DESKTOP_SWITCHDESKTOP)) | |
If Not $hDesktop Then | |
sgBox(16, 'Error', 'Unable to create desktop.') | |
Exit |
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
#NoTrayIcon | |
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** | |
#AutoIt3Wrapper_Outfile=elevate_this.exe | |
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** | |
;Run a script using shellexecute runas. This will run the application/script | |
;at the highest available privilege level. Depending on UAC settings, this may | |
;cause a UAC prompt. | |
;Examples: |
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
;Generate oeminfo.ini from wmi | |
;WMI stuff taken from: http://cyrusbuilt.net/wordpress/?p=79 | |
$objWMI = ObjGet("winmgmts:\\localhost\root\CIMV2") | |
$wbemFlagReturnImmediately = 0x10 | |
$wbemFlagForwardOnly = 0x20 | |
$objItems = $objWMI.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", 0x10 + 0x20) | |
If IsObj($objItems) Then |
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
ProgressOn("Progress Meter", "Increments every second", "0 percent") | |
For $i = 10 to 100 step 10 | |
sleep(1000) | |
ProgressSet( $i, $i & " percent") | |
Next | |
ProgressSet(100 , "Done", "Complete") | |
sleep(500) | |
ProgressOff() |
OlderNewer