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
# This script will set up AD, User Directories, Exchange and Lync, using basic data retrived from a CSV file | |
# Requires the Active Directory module for Windows Powershell and appropriate credentials | |
# CSV file with corresponding header and user(s) info: | |
# Office,UserName,FirstName,LastName,Initial,Department,Role,Title,SetupSameAs,Manager,MailboxAccess,Extension,Mobile | |
#LOAD POWERSHELL SESSIONS | |
#------------------------ | |
$exchangeserver = "exchange1.domain.com" | |
$Lyncserver = "lync1.domain.com.au" |
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
# This script manages the process for a departing user, using data retrived from a CSV file | |
# Requires the Active Directory module for Windows Powershell and appropriate credentials | |
# CSV file with corresponding header and user(s) info: | |
# UserName,DisableWindows,ArchiveFiles,DisableVoice,ArchiveMailbox,MailboxAccessTo,DisableEmailAddress,AutoReplyContact,ReminderInDays | |
#LOAD POWERSHELL SESSIONS | |
#------------------------ |
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
<html> | |
<head> | |
<meta http-equiv="Content-Language" content="en-us"> | |
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | |
<!-- Printer Installation --> | |
<title>Printers App</title> | |
<HTA:APPLICATION ID="PrintHta" |
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
# This script will generate a list of all servers in AD, collect inventory items and export to Excel | |
# Requires the Active Directory module for Windows Powershell and appropriate credentials | |
#LOAD POWERSHELL SESSIONS | |
#------------------------ | |
$DC = "dc1.maydomain.com.au" | |
$usercredential= get-credential -credential mydomain\admin | |
$Path = "\\mydomain.com.au\Scripts\Data\" | |
$ExportFile = $Path + "ServerInventory.csv" |
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
' Produces list of process info from a remote computer. Optionally kill a running process based on PID. | |
' Requires PsList and PsKill from PsTools http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx | |
' TheAgreeableCow 2012 | |
dim objShell : Set objShell = WScript.CreateObject ("WScript.shell") | |
dim fileSys : Set fileSys = CreateObject("Scripting.FileSystemObject") | |
dim strComputer, strCMD, strLog, intAnswer, strProcess, strBatchFile, strDate | |
strComputer = InputBox("Enter name of Server/PC to capture process list") |
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 | |
Print server job logs from Event Viewer to csv file | |
.DESCRIPTION | |
This script uses Get-WinEvent and XML queries to retrieve EventID 307 job logs from print servers. | |
Specifically querying the Microsoft-Windows-PrintService/Operational log. | |
Log is extracted to a CSV file and optionally emailed. | |
.PARAMETER FileName |
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
$filterxml = '<QueryList> | |
<Query Id="0" Path="Microsoft-Windows-PrintService/Operational"> | |
<Select Path="Microsoft-Windows-PrintService/Operational">*[System[(EventID=307)]]</Select> | |
</Query> | |
</QueryList>' | |
$EventLog = Get-WinEvent -Filterxml $filterXml |
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
ForEach ($LogEntry in $EventLog) | |
{ | |
$entry = [xml]$LogEntry.ToXml() | |
$docName = $entry.Event.UserData.DocumentPrinted.Param2 | |
} |
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 | |
Find assigned or unassigned numbers in Lync | |
.DESCRIPTION | |
This script uses uses the 'Unassigned Number' ranges in Lync to look number usage, including: | |
- User numbers (including Private Number) | |
- Analogue Devices | |
- Common Area Phones | |
- AutoAttendant numbers |
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
Option Explicit | |
On Error Resume Next | |
Dim Source1, Source2, Source3, Destination1, Destination2, Destination3, BatchFile1, BatchFile2, BatchFile3 | |
'****************************************** | |
'Root Source folders to parse | |
Source1 = "\\server1\c$\folder1" | |
Source2 = "\\server1\share1" | |
Source3 = "\\server1\share2" |
OlderNewer