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 -version 2 | |
<# | |
.SYNOPSIS | |
Linux nmap for PowerShell (almost). | |
Ping sweeps and scans a network for specified open ports. Can also perform DNS lookups. | |
Port connect timeout is custom (milliseconds). | |
Multithreaded with a default of 32 concurrent threads. |
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 | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> |
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
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> | |
<Obj RefId="0"> | |
<TN RefId="0"> | |
<T>Selected.System.Management.Automation.PSCustomObject</T> | |
<T>System.Management.Automation.PSCustomObject</T> | |
<T>System.Object</T> | |
</TN> | |
<MS> | |
<S N="@odata.id">https://outlook.office365.com/api/v1.0/Users('mailbox@contoso.com')/Events('AAMkADc4NzFlMDc2LTdkNWMtNDg4MC04NmRmLTY5OTJmMmFhZjM2ZABGAAAAAAAyuDCxGFp8Q67E2z04c8bHBwAiBP0V5eP-QJuC8Y_Cu-MHAAAAAAENAAAiBP0V5eP-QJuC8Y_Cu-MHAABWVS42AAA=')</S> | |
<S N="@odata.etag">W/"IgT9FeXj/0CbgvGPgrvzBwAAWpeqCw=="</S> |
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 is the actual call, but for this scripts focus it should be commented out | |
#$CalEvents = Invoke-RestMethod -Uri "https://outlook.office365.com/api/v1.0/users/me/calendarview?startDateTime=$(Get-Date)&endDateTime=$((Get-Date).AddDays(7))&`$top=10" -Credential $cred | |
#You an grab this from here: https://gist.github.com/MSAdministrator/bb18fa1d764aaaa64368edcdb36af35c | |
$CalEvents = Import-CliXML 'C:\users\$($env:username)\Desktop\CalEventsObject.xml' | |
$i = $(Get-Date) | |
foreach ($item in $CalEvents) |
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 Main { | |
<# | |
.SYNOPSIS | |
The Main function starts the project application. | |
.PARAMETER Commandline | |
$Commandline contains the complete argument string passed to the script packager executable. | |
.NOTES | |
Use this function to initialize your script and to call GUI forms. |
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 -Version 1 | |
Function Write-LogEntry | |
{ | |
param ( | |
[string]$type, | |
[string]$message, | |
[string]$Folder, | |
[string]$CustomMessage | |
) | |
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
################################################################################ | |
# Script: Generate-RandomUsersAndComputers.ps1 | |
# Purpose: Creates random user and/or computer accounts in Active Directory | |
# with somewhat realistic properties in the top-level OU of your | |
# choice. If the OU does not exist, it will be created; the OU | |
# defaults to "NewEmployees" if another target OU is not given. | |
# Requires: PowerShell 2.0 or later, Server 2008-R2 or later domain controller, | |
# and you must run the script on the controller as a Domain Admin | |
# for the domain in the forest where you want the accounts created. | |
# Version: 1.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
<# | |
.Synopsis | |
A PowerShell function to expand IP Ranges with dashes | |
.DESCRIPTION | |
This function will take an array of IP address ranges and | |
split them out into single IP addresses | |
.EXAMPLE | |
Expand-IPRange -Range '192.0.0.1-192.0.0.100','192.0.0.150-192.0.10.1' | |
.EXAMPLE | |
Expand-IPRange -Range '192.0.0.1-192.0.0.100','192.0.0.140','172.0.0.1-172.0.1.240' |
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 | |
This function will convert a Saba CSV for University Campus | |
.DESCRIPTION | |
This function will import a CSV, modify the values, and export it to a new CSV. | |
We rename the following headers: | |
Person EMPID to EMPID | |
Completed Courses (Transcript) Ended/Completed On Date to Completed On Date | |
Course Course ID to Course ID | |
.EXAMPLE |
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 | |
This function will convert a Saba CSV for University Campus | |
.DESCRIPTION | |
This function will import a CSV, modify the values, and export it to a new CSV. | |
We rename the following headers: | |
Person EMPID to EMPID | |
Completed Courses (Transcript) Ended/Completed On Date to Completed On Date | |
Course Course ID to Course ID | |
.EXAMPLE |