full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/seb-epsi_projet-GMAO/premier_test_gmao/packages/System.Data.SQLite.EF6.1.0.99.0/tools/net46/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/seb-epsi_projet-GMAO/premier_test_gmao/packages/System.Data.SQLite.EF6.1.0.99.0/tools/net40/install.ps1 | install.ps1 | ###############################################################################
#
# provider.ps1 --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
param($installPath, $toolsPath, $package, ... |
PowerShellCorpus/Github/jdhitsolutions_FormatFunctions/Tests/FormatFunctions.Tests.ps1 | FormatFunctions.Tests.ps1 | None |
PowerShellCorpus/Github/msmith1980_CSharp/ContactsManager/packages/EntityFramework.5.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$importedModule = Get-Module | ?{ $_.Name -eq 'EntityFramework' }
if ($PSVersionTable.PSVersion -ge (New-Object Version @( 3, 0 )))
{
$thisModuleManifest = 'EntityFramework.PS3.psd1'
}
else
{
$thisModuleManifest = 'EntityFramework.psd1'
}
$thisModule... |
PowerShellCorpus/Github/msmith1980_CSharp/ContactsManager/packages/EntityFramework.5.0.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
function Invoke-ConnectionFactoryConfigurator($assemblyPath, $project)
{
$appDomain = [AppDomain]::CreateDomain(
'EntityFramework.PowerShell',
$null,
(New-Object System.AppDomainSetup -Property @{ ShadowCopyFiles = 'true' }))
... |
PowerShellCorpus/Github/tavisca-mshinde_Hotel_Mgmt/HotelBookingSystem/packages/EnterpriseLibrary.Common.6.0.1304.0/Update-EntlibConfiguration.ps1 | Update-EntlibConfiguration.ps1 | # ==============================================================================
# Microsoft patterns & practices Enterprise Library
# ==============================================================================
# Copyright © Microsoft Corporation. All rights reserved.
# THIS CODE AND INFORMATION IS PROVIDED "AS... |
PowerShellCorpus/Github/tavisca-mshinde_Hotel_Mgmt/HotelBookingSystem/packages/EnterpriseLibrary.Common.6.0.1304.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath Utils.psm1)
$relativeInstallPath = Get-RelativePath ([System.Io.Path]::GetDirectoryName($dte.Solution.FullName)) $installPath
$folder = (Join-Path (Join-Path $relativeInstallPath "lib") "NET45")
Add-ToolFolder $folder
... |
PowerShellCorpus/Github/tavisca-mshinde_Hotel_Mgmt/HotelBookingSystem/packages/EnterpriseLibrary.Data.6.0.1304.0/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Import-Module (Join-Path $toolsPath Utils.psm1)
$relativeInstallPath = Get-RelativePath ([System.Io.Path]::GetDirectoryName($dte.Solution.FullName)) $installPath
$folder = (Join-Path (Join-Path $relativeInstallPath "lib") "NET45")
Add-ToolFolder $folder
... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/Monitors_AlertOnState_Settings.ps1 | Monitors_AlertOnState_Settings.ps1 | # --- [Monitors_AlertOnState_Settings] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 05.17.2013
# Last Modified: 05.20.2013
#
# Description: Script that retrieves the AlertOnState Settings on all enabled Monitors in SCOM. This script borrow heavily
# from... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/CreateMP-CustomServiceMonitor.ps1 | CreateMP-CustomServiceMonitor.ps1 | # --- [CreateMP-CustomServiceMonitor] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 08.18.2013
# Last Modified: 08.23.2013
#
# Description: This Script provides an automated method of creating Service Monitors in SCOM that are discovered
# by using Filtere... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/EnableSCOMNotificationSubscriptions.ps1 | EnableSCOMNotificationSubscriptions.ps1 | <# --- [EnableSCOMNotificationSubscriptions] PowerShell Script ---
Author(s): Ryan Irujo
Inception: 01.21.2015
Last Modified: 01.21.2015
Description: This Script provides an automated method of enabling Notification Subscriptions in SCOM.
The list of Notification Subsc... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/ParseXMLFromMP_v1.0.ps1 | ParseXMLFromMP_v1.0.ps1 | # --- [ParseXMLFromMP_v1.0] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 04.21.2014
# Last Modified: 04.21.2014
#
# Description: This Script parses through an Exported SCOM Monitoring Management Pack and returns the results in text format.
# These results... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/Monitors_AutoResolve_Settings.ps1 | Monitors_AutoResolve_Settings.ps1 | # --- [Monitors_AutoResolve_Settings] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 05.17.2013
# Last Modified: 05.20.2013
#
# Description: Script that retrieves the AutoResolve Settings on all enabled Monitors in SCOM. This script borrow heavily
# from t... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/AddToMP-CustomServiceMonitor_v1.0.ps1 | AddToMP-CustomServiceMonitor_v1.0.ps1 | # --- [AddToMP-CustomServiceMonitor_v1.0] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 09.02.2013
# Last Modified: 09.05.2013
#
# Description: This Script provides an automated method of adding Custom Service Monitors in SCOM to an existing
# unsealed Man... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/CreateMP-CustomServiceMonitor_v1.1.ps1 | CreateMP-CustomServiceMonitor_v1.1.ps1 | # --- [CreateMP-CustomServiceMonitor_v1.1] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 08.18.2013
# Last Modified: 09.22.2013
#
# Description: This Script provides an automated method of creating Service Monitors in SCOM that are discovered
# by using Fi... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/CreateMPandCustomGroup_v1.0.ps1 | CreateMPandCustomGroup_v1.0.ps1 | # --- [CreateMPandCustomGroup_v1.0] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 11.23.2013
# Last Modified: 11.26.2013
#
# Description: Creates a Custom Management Pack and a Custom Group. Additionally, it adds as many Monitored Hosts to the Group
# base... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/SCOM_Remove_RegKey_From_Hosts.ps1 | SCOM_Remove_RegKey_From_Hosts.ps1 | ############################################################################################################################
# Powershell Script: SCOM_Remove_RegKey_From_Hosts.ps1
#
# Author: Ryan Irujo
#
# Inception: 08.17.2012
# Last Modified: 08.17.2012
#
# Description: ... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/Monitors_AlertPriority_Settings.ps1 | Monitors_AlertPriority_Settings.ps1 | # --- [Monitors_AlertPriority_Settings] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 05.17.2013
# Last Modified: 05.20.2013
#
# Description: Script that retrieves the AlertPriority Settings on all enabled Monitors in SCOM. This script borrow heavily
# fr... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/SCOM_Add_RegKey_To_Hosts.ps1 | SCOM_Add_RegKey_To_Hosts.ps1 | ############################################################################################################################
# Powershell Script: SCOM_Add_RegKey_To_Hosts.ps1
#
# Author: Ryan Irujo
#
# Inception: 08.16.2012
# Last Modified: 08.16.2012
#
# Description: This ... |
PowerShellCorpus/Github/starkfell_SCOM-PowerShell-Scripts/AddToMP-CustomPortMonitor_v1.0.ps1 | AddToMP-CustomPortMonitor_v1.0.ps1 | # --- [AddToMP-CustomPortMonitor_v1.0] PowerShell Script ---
#
# Author(s): Ryan Irujo
# Inception: 09.22.2013
# Last Modified: 10.10.2013
#
# Description: Code is in progress....
#
#
# Syntax: ./AddToMP-CustomPortMonitor_v1.0 <Management_Server> <Management_Pack_Display_Name> ... |
PowerShellCorpus/Github/PeteCooney_TfsGitMigrate/GitMigrate.ps1 | GitMigrate.ps1 | # Modify these settings based on specific requirements
$baseFolder = "C:\GitMigrate"
$repoList = "Repos.csv"
$tfsBase = "http://tfs"
$teamProjectCollection = "TeamProjectCollection"
$sourceTeamProject = "SourceProject"
$targetTeamProject = "TargetProject"
// Do not modify below this line
$repos = Import-Csv $... |
PowerShellCorpus/Github/mohamedemam0_BinaryToDecimalWin10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wp8/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/mohamedemam0_BinaryToDecimalWin10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/win81/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/mohamedemam0_BinaryToDecimalWin10/packages/Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177/tools/wpa81/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Split-Path $toolsPath -Parent | Join-Path -ChildPath "Microsoft.ApplicationInsights.psm1" | Import-Module
Add-ApplicationInsights $project;
Remove-Module Microsoft.ApplicationInsights;
# SIG # Begin signature block
# MIIaoQYJKoZIhvcNAQcCoIIakjCCGo4CAQExCzAJ... |
PowerShellCorpus/Github/mohamedemam0_BinaryToDecimalWin10/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Pu... |
PowerShellCorpus/Github/mohamedemam0_BinaryToDecimalWin10/packages/Microsoft.ApplicationInsights.0.14.3-build00177/tools/net40/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# Checking if Path exists because the websites don't have a project file
if ([System.IO.File]::Exists($project.FullName))
{
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, Publ... |
PowerShellCorpus/Github/edwcmiller3_Enable-SNMP/Enable-SNMP.ps1 | Enable-SNMP.ps1 | <#
.SYNOPSIS
Enable-SNMP: Script to enable and configure the SNMP service on Windows workstations and servers.
.DESCRIPTION
Enables SNMP service and sets the necessary registry keys to configure SNMP.
#>
$SNMPManagers = Read-Host "Enter SNMP managers separated by a semicolon (;)"
$SNMPManagers = $SNM... |
PowerShellCorpus/Github/pashtet04_Get-User-Group-Membership/Get-User-Group-Membership.ps1 | Get-User-Group-Membership.ps1 | <#
.SYNOPSIS
Simple script to produce a listing of user's group memberships
.DESCRIPTION
Script will create a simple listing of a user's group memberships.
Output is in object format so you can use other Powershell cmdlet's
with the output, such as Export-CSV, Out-File, ConvertTo-HTML, etc.
... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/jQuery.1.10.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName
if (Test-Path $projectIntelliSense... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/jQuery.1.10.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# VS 11 and above supports the new intellisense JS files
$vsVersion = [System.Version]::Parse($dte.Version)
$supportsJsIntelliSenseFile = $vsVersion.Major -ge 11
if (-not $supportsJsIntelliSenseFile) {
$displayVersio... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/jQuery.1.10.2/Tools/common.ps1 | common.ps1 | function Get-Checksum($file) {
$cryptoProvider = New-Object "System.Security.Cryptography.MD5CryptoServiceProvider"
$fileInfo = Get-Item $file
trap { ;
continue } $stream = $fileInfo.OpenRead()
if ($? -eq $false) {
# Couldn't open file for reading
return $null
}
$bytes = $... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Modernizr.2.6.2/Tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Modernizr.2.6.2/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
. (Join-Path $toolsPath common.ps1)
if ($scriptsFolderProjectItem -eq $null) {
# No Scripts folder
Write-Host "No Scripts folder found"
exit
}
# Update the _references.js file
AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileName... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Modernizr.2.6.2/Tools/common.ps1 | common.ps1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) {
try {
$referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js")
}
catch {
# _references.js file not found
return
}
if ($referencesFileProject... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
if ([System.IO.File]::Exists($project.FullName))
{
function MarkItemASCopyToOutput($item)
{
Try
{
#mark it to copy if newer
$item.Properties.Item("CopyToOutputDirectory").Value = 2
}
Catch
{
write-host $_.Exception.ToString()
}... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/EntityFramework.6.1.3/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
if (Get-Module | ?{ $_.Name -eq 'EntityFramework' })
{
Remove-Module EntityFramework
}
Import-Module (Join-Path $toolsPath EntityFramework.psd1)
# SIG # Begin signature block
# MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQ... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/EntityFramework.6.1.3/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'
Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework comma... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/init.ps1 | init.ps1 | param($installPath, $toolsPath, $package, $project)
$compilerPackageName = 'Microsoft.Net.Compilers'
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$libDirectory = Join-Path $installPath 'lib\net45'
$packageDirectory = Split-Path $installPath
$compilerPackage = Get-Chil... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/tools/uninstall.ps1 | uninstall.ps1 | param($installPath, $toolsPath, $package, $project)
$roslynSubFolder = 'roslyn'
if ($project -eq $null) {
$project = Get-Project
}
$projectRoot = $project.Properties.Item('FullPath').Value
$binDirectory = Join-Path $projectRoot 'bin'
$targetDirectory = Join-Path $binDirectory $roslynSubFolder
if (Te... |
PowerShellCorpus/Github/cef39_gym-logger/gym-logger/packages/Newtonsoft.Json.6.0.4/tools/install.ps1 | install.ps1 | param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://james.newtonking.com/json"
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Con... |
PowerShellCorpus/Github/dicko2_Octopus.BranchSubAppDeploy/src/PreDeploy.ps1 | PreDeploy.ps1 | #========================================
Write-Host "Octopus.Action.Package.NuGetPackageId = $OctopusActionPackageNuGetPackageId"
if ( ($OctopusActionPackageUpdateIisWebsiteName -ne $null) -and ($OctopusActionPackageUpdateIisWebsiteName -ne "") )
{
$IISWebSiteName=$OctopusParameters['Octopus.Action.Package.... |
PowerShellCorpus/Github/friism_azure-test/configure-worker.ps1 | configure-worker.ps1 | [CmdletBinding()]
Param(
[switch] $SkipEngineUpgrade,
[string] $DockerVersion,
[string] $DTRFQDN,
[string] $HubUsername,
[string] $HubPassword,
[string] $UcpVersion
)
#Variables
$Date = Get-Date -Format "yyyy-MM-dd HHmmss"
$DockerDataPath = "C:\ProgramData\Docker"
function Disable-RealTimeMo... |
PowerShellCorpus/Github/piroron_FileDLByPowershell/SiteCrawl.ps1 | SiteCrawl.ps1 | #URL形式のチェック
function IsCorrectUrl([string] $url){
return [System.Uri]::IsWellFormedUriString($url, [System.UriKind]::Absolute);
}
$targetUrl = $Args[0];
if (-not (IsCorrectUrl($targetUrl))) {
Write-Output "$targetUrl は正しい形式のURLではありません。"
exit;
}
Write-Output ダウンロード対象
Write-Output $targetUrl
... |
PowerShellCorpus/Github/piroron_FileDLByPowershell/sample_call.ps1 | sample_call.ps1 | powershell -NoPorfile .\SiteCrawl.ps1 "http://~/index.htm" |
PowerShellCorpus/Github/kimizhu_testtips.en-ca/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_1489565138989/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstoragesandbox2.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source u... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/BAMforColumbia.ps1 | BAMforColumbia.ps1 | #========================================================================
# Created on: Feb 6, 2014 13:00:00 EST
# Created by: William Reed, wreed@appirio.com
# Organization: Appirio, Inc.
# Usage: ./BAMforColumbia.ps1
#========================================================================
$xAppName = "BAM!... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-MiniVolStats2EventLog.ps1 | get-MiniVolStats2EventLog.ps1 | $hts = get-exchangeserver |? {$_.serverrole -match "hubtransport"} |% {$_.name}
$startdate = Read-Host "Start Date"
$enddate = Read-Host "End Date"
function time_pipeline {
param ($increment = 1000)
begin{$i=0;$timer = [diagnostics.stopwatch]::startnew()}
process {
$i++
if (!($i % $increment)){Write-ho... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/messageStats.ps1 | messageStats.ps1 | function msgstats {
$startDate = read-host 'Start Date [mm/dd/yyyy]'
$serverFQDN = read-host 'Server FQDN [dex.dev10.net]'
get-messagetrackinglog -Server $serverFQDN -start $startDate -resultsize unlimited | where { ($_.eventID -eq 'DELIVER') -and ($_.source -eq 'STOREDRIVER') } | %{$count++}
write-... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-DailyMailVol.ps1 | get-DailyMailVol.ps1 | $End = Get-Date
$xStart=read-host "How many days back? [default 7 days]"
if($xStart -eq $null){$xStart=7}
if($xStart -eq ""){$xStart=7}
$Start = $End.AddDays(-$xStart)
[Int64] $intSent = $intRec = 0
[Int64] $intSentSize = $intRecSize = 0
[String] $strEmails = $null
# Use this line for testing in production agai... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/restrictDelivery.ps1 | restrictDelivery.ps1 | function createDistro {
write-EventLog -LogName "BAMex" -EventID 666 -Message "Delivery Restriction setup started." -Source "BAMSource" -EntryType Information
$distroName = @()
$distroName=Read-Host "New Distro Name (i.e. NoDelivery)"
$distroOU=Read-Host "(i.e. dev10.net/Restricted Delivery)"
n... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-SendAs.ps1 | get-SendAs.ps1 | Write-Host 'INPUT filename.' -ForegroundColor Cyan -BackgroundColor DarkBlue;
$UserListFile = Read-Host '(i.e. c:\userList.csv or userList.csv)';
$OutData = @()
$UserList = Get-Content $UserListFile
$CurProcMbx = 1
####### Loop 1: Convert smtp to ADIDs
Foreach ($UserID in $UserList) {
write-progress "Processin... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-FullAccess.ps1 | get-FullAccess.ps1 | Write-Host 'INPUT filename.' -ForegroundColor Cyan -BackgroundColor DarkBlue;
$UserListFile = Read-Host '(i.e. c:\userList.csv or userList.csv)';
$OutData = @()
$UserList = Get-Content $UserListFile
$CurProcMbx = 1
####### Loop 1: Query user Mailbox Permissions for Full Access
Foreach ($UserID in $UserList) {
... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/verifyHiddenMailContacts-Ex2010.ps1 | verifyHiddenMailContacts-Ex2010.ps1 | Import-CSV C:\userList.csv |
foreach {
Get-MailContact $_.alias | select HiddenFromAddressListsEnabled,ExternalEmailAddress,DisplayName
}
|
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/BAMexNewFrame.ps1 | BAMexNewFrame.ps1 | $xAppName = "BAM! (Bill's Application Manager) – Version 0.2"
#==============================================================================
# MENU: Special Delivery Menu
#==============================================================================
Function thinkSpecialDelivery {
Function showMe... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/createMailboxes-Ex2010.ps1 | createMailboxes-Ex2010.ps1 | $Password=Read-Host "Enter Password" -AsSecureString
Import-CSV C:\userList.csv |
foreach {
$domainName = '@dex10.net'
$userprincipalname = $_.Firstname + '.' + $_.Lastname + $domainName
$firstandlastname = $_.Firstname + ' ' + $_.Lastname
$OU = 'dex10.net/Staff'
$database = 'Mailbox Database 0155389800'
New-... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/mineForPSTs.ps1 | mineForPSTs.ps1 | # ============================================================================
# Author: Bill Reed 2013
# Powershell: Mine remote computers for PST files
# ============================================================================
strComputer = Get-Content -Path "C:\computernames.txt"
Set objWMIService = GetObje... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/all-in-1-Permissions.ps1 | all-in-1-Permissions.ps1 | #--------------------------------------------------------------#
#------------------- READ CAREFULLY!!! ------------------------#
#
# Step 1: Create a user list with the Active Directory Identity
# Powershell file: "createUserList-ADID.ps1"
# Get-MailboxPermission -Identity * | where {$_.user.tostring() -eq... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/verifyDeliveryOptions-Ex2010.ps1 | verifyDeliveryOptions-Ex2010.ps1 | Import-CSV C:\userList.csv |
foreach {
Get-Mailbox $_.alias | select Name, ForwardingAddress, DeliverToMailboxAndForward
}
|
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/mailboxFolders.ps1 | mailboxFolders.ps1 | Write-Host 'Mailbox Folder Statistics' -ForegroundColor Magenta
Write-Host '-------------------------' -ForegroundColor Green
Import-CSV 'c:\userList-ADID-SMTP.csv' |
# The CSV file contains 2 columns of data:
# "PrimarySmtpAddress","Identity"
# "btester@dex10.net","dex10.net/Staff/Bob Tester"
foreach {
$Email =... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-basicMbxStats.ps1 | get-basicMbxStats.ps1 | function GetMailboxStats {
Write-Host 'INPUT filename.' -Fore Cyan -Back DarkBlue;
$UserListFile = Read-Host '(i.e. c:\userList.csv or userList.csv)';
$OutStatData = @()
$UserList = Get-Content $UserListFile
$CurProcMbxStat = 1
foreach ($UserID in $UserList) {
Write-Host -NoNewLin... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/sendOnBehalf.ps1 | sendOnBehalf.ps1 | Write-Host 'Mailbox Send On Behalf Granted' -ForegroundColor Magenta
Write-Host '------- ----------------------' -ForegroundColor Green
Import-CSV 'c:\userList-ADID-SMTP.csv' |
# The CSV file contains 2 columns of data:
# "PrimarySmtpAddress","Identity"
# "btester@dex10.net","dex10.net/Staff/Bob Tester"
forea... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/createMailContacts-Ex2010.ps1 | createMailContacts-Ex2010.ps1 | Import-CSV C:\userList.csv |
foreach {
$domainAlias = '@galias.dex10.net'
$ExternalEmailAddress = $_.Firstname + '.' + $_.Lastname + $domainAlias
$name = $_.Firstname + ' ' + $_.Lastname + ' (SD)'
$OU = 'dex10.net/Special Delivery'
New-MailContact -ExternalEmailAddress $ExternalEmailAddress -Name $name -Alias $... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-MailboxFolders.ps1 | get-MailboxFolders.ps1 | Write-Host 'INPUT filename.' -ForegroundColor Cyan -BackgroundColor DarkBlue;
$UserListFile = Read-Host '(i.e. c:\userList.csv or userList.csv)';
$OutData = @()
$UserList = Get-Content $UserListFile
$CurProcMbx = 1
####### Loop 1: Query user Mailbox Folder Stats
Foreach ($UserID in $UserList) {
write-progress ... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/setupRestrictedDelivery.ps1 | setupRestrictedDelivery.ps1 | new-Eventlog -LogName "BAMex" -Source "BAMSource"
function createDistro {
write-EventLog -LogName "BAMex" -EventID 666 -Message "Delivery Restriction setup started." -Source "BAMSource" -EntryType Information
$distroName = @()
$distroName=Read-Host "New Distro Name (i.e. NoDelivery)"
$distroOU=Read... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/KillWinAct.ps1 | KillWinAct.ps1 | #==============================================================
# KILLING WINDOWS ACTIVATION: General Instructions
#==============================================================
# 1. Disable SL UI Notification service, THEN REBOOT!
# 2. Take Ownership, Set Full Control Permissions & rename files:
# - c:\Windows\S... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/pstanlv1.ps1 | pstanlv1.ps1 | # ============================================================================
# Author: glenscales@yahoo.com Aug 2010
# Editor: Bill Reed 2014
#
# Download Redemption:
# http://www.dimastr.com/redemption/download.htm
#
# Download Windows Presentation Framework (WPF) Toolkit:
# http://wpf.codeplex.com/relea... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/BAMex.ps1 | BAMex.ps1 | #-------------------------------------------------------------------------------
# GENERAL VARIABLES & CREATION OF WINDOWS APPLICATION EVENT LOG, IF NOT CREATED
#-------------------------------------------------------------------------------
$xAppName = "BAM! (Bill's Application Manager) – Version 0.2"
$createdOn =... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/get-SendOnBehalf.ps1 | get-SendOnBehalf.ps1 | Write-Host 'INPUT filename:' -ForegroundColor Cyan -BackgroundColor DarkBlue;
$UserListFile = Read-Host '(i.e. c:\userList.csv or userList.csv)';
$OutData = @()
$UserList = get-content $UserListFile
$CurProcMbx = 1
###### Function 1: Need to gain understanding
Function RecExpand ($grpn) {
$grpfinal= @()
$grp = ... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/MAPIPermissions.ps1 | MAPIPermissions.ps1 | Write-Host 'Mailbox MAPI Permissions' -ForegroundColor Magenta
Write-Host '------------------------' -ForegroundColor Green
Import-CSV 'c:\userList-ADID-SMTP.csv' |
# The CSV file contains 2 columns of data:
# "PrimarySmtpAddress","Identity"
# "btester@dex10.net","dex10.net/Staff/Bob Tester"
foreach {
$Email = $... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/hideMailContacts.ps1 | hideMailContacts.ps1 | Import-CSV C:\userList.csv |
foreach {
Set-MailContact $_.alias -HiddenFromAddressListsEnabled $True
}
|
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/SearchEmailAddresses.ps1 | SearchEmailAddresses.ps1 | function SearchEmailAddresses {
Write-Host 'Word to search in EmailAddresses' -Fore Cyan -Back DarkBlue;
$SearchCriterion = Read-Host '( i.e. example.com or bob or whatever )';
$SearchResults = get-recipient -ResultSize Unlimited | Where-Object { ($_.RecipientType -eq 'UserMailbox' -and $_.EmailAddresses... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/fullAccess.ps1 | fullAccess.ps1 | Write-Host 'Mailbox___Full Access Granted' -ForegroundColor Magenta
Write-Host '-----------------------------' -ForegroundColor Green
Import-CSV 'c:\userList-ADID-SMTP.csv' |
# The CSV file contains 2 columns of data:
# "PrimarySmtpAddress","Identity"
# "btester@dex10.net","dex10.net/Staff/Bob Tester"
ForEach {
... |
PowerShellCorpus/Github/billreed72_Exchange2010Goodies/buildGoogleAppsSendConnector.ps1 | buildGoogleAppsSendConnector.ps1 |
new-SendConnector
-Name 'GoogleApps Sending'
-Usage 'Internal'
-AddressSpaces 'SMTP:*;1'
-IsScopedConnector $false
-DNSRoutingEnabled $false
-SmartHosts 'smtp.gmail.com'
-SmartHostAuthMechanism 'BasicAuthRequireTLS'
-UseExternalDNSServersEnabled $false
-AuthenticationCredential 'Sy... |
PowerShellCorpus/Github/phwelo_O365_Renamer/AzureAD.ps1 | AzureAD.ps1 | #Try to grab credentials for office 365
Try{
$msolcred = get-credential -message "Enter your Office 365 credentials as Username@levelonebank.com"
connect-msolservice -credential $msolcred -ErrorAction Stop
}
#Since in testing a failure of authentication didn't mean a
#full-on failure of the script there's n... |
PowerShellCorpus/Github/dc401_mixed_scripts/ChaosDeletion.ps1 | ChaosDeletion.ps1 | <#
ChaosDeletion v1.0 02/23/2017
dchow[AT]xtecsystems.com
www.xtecsystems.com
Recusrively selects a file from your input level directory and does the following:
1) Deletes the file
2) Wipes the free space in the folder specified
3) Generates new User (running the script) EFS key
4) Applies new EFS key to the ... |
PowerShellCorpus/Github/dc401_mixed_scripts/eDiscovery_fileShares_r2.ps1 | eDiscovery_fileShares_r2.ps1 | <#
dchow[AT]xtecsystems.com
Visit us online at: www.xtecsystems.com
Xtec Systems is now SCIS Security
This script is licensed under GPLv2
#>
#Warning: This tool is meant to be used as a last resort. Consider eDiscovery specific tools.
#Notice: This tool is limited by the .NET objects of 260 characters within N... |
PowerShellCorpus/Github/dc401_mixed_scripts/email_firstlast_parse.ps1 | email_firstlast_parse.ps1 | <#
Takes line-by-line of a file input of email addresses and delim parses
them into email,first,last into a csv for Metasploit phishing emails
Syntax: phish_emails_list_csv.ps1 -i list.txt -o outputfile.csv
Dennis Chow v1.0 20140402
Some code inspired from:
http://social.technet.microsoft.com/Forums/en-US/c20... |
PowerShellCorpus/Github/dc401_mixed_scripts/eGrep4PS.ps1 | eGrep4PS.ps1 | #20150605 dc - Parses large files line-by-line via the io streamreader
#For when you don't have Gnuwin32 tools or the file is too big for Get-Content
#take in file path
$arg0 = Read-Host "Please enter filename.ext or full path (if file not in same dir) you wish to search"
Write-Host "Will read from: $arg0" -backg... |
PowerShellCorpus/Github/dc401_mixed_scripts/AD_DupSIDFinderPS.ps1 | AD_DupSIDFinderPS.ps1 | #20150603 dc - quick and dirty SID duplicate finder in AD
#dchow[AT]xtecsystems.com
#usage run AD_DupSIDFinder.ps1 -o MyPathOrFileName.csv
Try
{
Import-Module ActiveDirectory -ErrorAction Stop
}
Catch
{
Write-Host "Install RSAT tools"; Break
}
param([string$o])
Write-Host "Writing to $o"
... |
PowerShellCorpus/Github/dc401_mixed_scripts/repeat_string_csv_lookup.ps1 | repeat_string_csv_lookup.ps1 | <# 20141205 dc v1.0 - Checks across multiple files in a specified path for any duplicate strings
Primary usage is for looking up repeat strings based on emails using CSVs.
Import-CSV not used because it combined with a select statement adds too many blank lines and non-print chars
Objects are still created since t... |
PowerShellCorpus/Github/dc401_mixed_scripts/ChkLastAccessMAC_PS.ps1 | ChkLastAccessMAC_PS.ps1 | #20150610 dc - Checks the last access time of a specific directory or file and loops in a monitoring fashion
$oldArr = Get-ChildItem ./ | Select-Object Name, LastAccessTime
$x = 0
DO {
Start-Sleep -s 60
$newArr = Get-ChildItem ./ | Select-Object Name, LastAccessTime
#Compare-Object $oldArr $newArr -In... |
PowerShellCorpus/Github/dc401_mixed_scripts/file_cleanup_ps.ps1 | file_cleanup_ps.ps1 | #20150626 dc looks for files older than a specific 30 days and removes them
#Create array bypass formatting at the end
$oldFilesArr = Get-ChildItem ./ | Select-Object Name, LastWriteTime | `
Where-Object { $_.LastWriteTime -gt (Get-Date).addDays(-30) } | `
ForEach { $_.Name }
#ForEach that isn't piped is consi... |
PowerShellCorpus/Github/dc401_mixed_scripts/FetchWinEvents_Remote.ps1 | FetchWinEvents_Remote.ps1 | #20150204 dc - remotely fetch event logs host list and save to CSV files
#Minimum powershell needed v2.0 or higher
#arguments check
param([string]$i)
#if you want to use multiple args
#param([string]$i , [string]$o)
#ensure output is a valid dir path
IF (Test-Path -isvalid $i)
{
Write-Host "Reading f... |
PowerShellCorpus/Github/dc401_mixed_scripts/check_mal_hash.ps1 | check_mal_hash.ps1 | <#
20150721 dc - Automates the use of sigfind and known malicious exports results to csv
dchow[AT]xtecsystems.com
Dependencies:
SysinternalsSuite SigCheck v2.2 or higher
https://technet.microsoft.com/en-us/sysinternals/bb897441
Usage:
check_mal_hash.ps1 -s "C:\ShareorPathtoScan\" -o "OutputResultsFile.csv"
... |
PowerShellCorpus/Github/dc401_mixed_scripts/entropyCheck.ps1 | entropyCheck.ps1 | <#
20170519 dc - Ransomware Encrypted File Checker v1.0
Recurisvely mows through a unc or file path and inspects entropy against all file types
Any file that is greater than 7/8 scored entropy (randomness) will get passed to file
magic for further inspecting 'unknown' signatures which raise a high suspicion of
po... |
PowerShellCorpus/Github/dc401_mixed_scripts/GetGenderRatioPS.ps1 | GetGenderRatioPS.ps1 | <#
20150911 dc - Compares a list of names fed to known male/female gender names
from two different other lists and does a count and ratio of each
Usage:
GetGenderRatioPS.ps1 -i inPutofNames -m MaleList.txt -f FemaleList.txt
Using multiple Arrays with Switch Statements Ref:
http://serverfault.com/questions/160... |
PowerShellCorpus/Github/dc401_mixed_scripts/ParseLargeFilePS.ps1 | ParseLargeFilePS.ps1 | #20150605 dc - Parses large files line-by-line
#take in file path
$arg0 = Read-Host "Please enter filename.ext or full path (if file not in same dir) you wish to search"
IF (Test-Path -isvalid $arg0)
{
$file = New-Object System.IO.StreamReader -Arg $arg0
while ($line = $file.ReadLine()) `
{
... |
PowerShellCorpus/Github/dc401_mixed_scripts/Email2ADUserInfoCSV_PS.ps1 | Email2ADUserInfoCSV_PS.ps1 | <#
dchow[AT]xtecsystems.com
Interactive PowerShell script to do a lookup of emails from a CSV file and then add in renamed
properties from Get-ADUsers information. It spits out to a new CSV file. Very simple, useful
for 'reverse' searching of other AD attributes for users.
Requirements: PowerShell v3 or higher and... |
PowerShellCorpus/Github/dc401_mixed_scripts/AD_SChannel_VerifyRepairPS.ps1 | AD_SChannel_VerifyRepairPS.ps1 | #20150604 dc
#dchow[AT]xtecsystems.com
#usage run AD_SChannel_Verify.ps1
#Enter your domain admin credentials in DOMAIN\username format as prompted
#Use of nltest https://technet.microsoft.com/en-us/library/cc731935.aspx
#Didn't create an argument pass through; too lazy. Do it yourself.
Try
{
Import-Module... |
PowerShellCorpus/Github/dc401_mixed_scripts/recurseCopyDuplicates.ps1 | recurseCopyDuplicates.ps1 | Enter file contents here<#
20150910 dc - Recursively copy files specified of the same name.ext from various folders
and then write to a new path renamed for each instance with numerical values incrementing
Be careful we use Get-Content which loads the entire file listing into memory. Hint: If the file list
become... |
PowerShellCorpus/Github/dc401_mixed_scripts/email2adinfo.ps1 | email2adinfo.ps1 | <#
20141204 dc - v1.0 Converts emails to various AD attribute outputs and provides basic stats
Parses user to managers/supervisor titles in a sep output
Requires remote admin tools: http://www.microsoft.com/en-us/download/details.aspx?id=7887
Input Requirements: List of emails must be single line by line list in ... |
PowerShellCorpus/Github/colaberry_training/installations/install_apps.ps1 | install_apps.ps1 | #
# Copyright (c) 2016, Colaberry Inc. All rights reserved.
# Copyrights licensed under the New BSD License.
# See the accompanying LICENSE file for terms.
#
#
# Before running the script, set the execution policy
# Set-ExecutionPolicy RemoteSigned
#
#Helper Functions
function Create-Folder {
Param ... |
PowerShellCorpus/Github/colaberry_training/sqlbi/installations/install_apps.ps1 | install_apps.ps1 | #
# Copyright (c) 2014-2017, Colaberry Inc. All rights reserved.
# Copyrights licensed under the New BSD License.
# See the accompanying LICENSE file for terms.
#
#
# Before running the script, set the execution policy
# Set-ExecutionPolicy RemoteSigned
#
#Helper Functions
function Create-Folder {
P... |
PowerShellCorpus/Github/prashantdevpandey_SQl-Database-health-check-report/sqldatabse.ps1 | sqldatabse.ps1 | #################################################################################
## MSSQL Database Health Check Status Report
## Created by Prashant Dev Pandey
## Date : 25 OCT 2016
## Version : 1.0
## Email: pdppandey@hotmail.com
## This scripts check the SQL Services ,No of Users,Buffer... |
PowerShellCorpus/Github/NitramSL_TestVisualStudio/AzureResourceGroup1/Scripts/Deploy-AzureResourceGroup.ps1 | Deploy-AzureResourceGroup.ps1 | #Requires -Version 3.0
#Requires -Module AzureRM.Resources
#Requires -Module Azure.Storage
Param(
[string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
[string] $ResourceGroupName = 'AzureResourceGroup1',
[switch] $UploadArtifacts,
[string] $StorageAccountName,
[string] $StorageAcc... |
PowerShellCorpus/Github/baunegaard_vagrant-vs2017-devbox/provision/install-essentials.ps1 | install-essentials.ps1 | # Installs chocolatey and Boxstarter.
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
cinst -y boxstarter |
PowerShellCorpus/Github/baunegaard_vagrant-vs2017-devbox/provision/install-software.ps1 | install-software.ps1 | choco feature enable -n=allowGlobalConfirmation
# ---- Web Platform Installer ----
cinst webpi
cinst UrlRewrite2 --source webpi
cinst ARRv3_0 --source webpi
# ---- Applications ----
cinst git
cinst python2
cinst nodejs
cinst nuget.commandline
cinst 7zip
cinst p4merge
cinst firefox -packageParameters "l=... |
PowerShellCorpus/Github/baunegaard_vagrant-vs2017-devbox/provision/install-software-visualstudio.ps1 | install-software-visualstudio.ps1 | Write-Host "Installing Visual Studio 2017. This may take a while..."
C:\vagrant\provision\vs_community__1642949039.1496009624.exe --wait --passive --norestart --all |
PowerShellCorpus/Github/baunegaard_vagrant-vs2017-devbox/provision/install-windowsupdates.ps1 | install-windowsupdates.ps1 | Install-BoxstarterPackage -PackageName ~\boxstarter\boxstarter-windowsupdates.txt -DisableReboots |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.