full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/ConstantineK_tsql-snippets/powershell-sql/export-reports/export-reports.ps1
export-reports.ps1
<# Idea: Make it easy to export reports and get dependent stored procedures exported as well 1. Take a path and a report server as params 2. Get the XML data for the report and save it as an RDL file into a folder 4. Scan the XML data for the command text and find the stored procedure 5. Check the ...
PowerShellCorpus/Github/ConstantineK_tsql-snippets/powershell-sql/deepdive/deepdive.ps1
deepdive.ps1
# Going to try and make a deep dive inspector of one database param ( $dbname = ("TSQL2012", "AdventureWorks2012"), $badListFile = "$home\Dropbox\github\tsql-snippets\powershell-sql\deepdive\badlist.txt" ) cls add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyTok...
PowerShellCorpus/Github/ConstantineK_tsql-snippets/powershell-sql/console_menu/run_console.ps1
run_console.ps1
# coding a simple menu interface to run the powershell scripts # simple example I am adapting from http://mspowershell.blogspot.co.uk/2009/02/cli-menu-in-powershell.html?m=1 function Draw { param ( $items, $position, $title ) $foreground = $Host.UI.RawUI.ForegroundColor $background = $Host.UI.RawU...
PowerShellCorpus/Github/JBRodney_JB-Infra-Jenkins/VMWareDeployment/DeployTemplateVM.ps1
DeployTemplateVM.ps1
# Append the PowerCLI module path to the PSModulesPath for the Jenkins Runspace $env:psmodulepath += ";C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules" # Import VMware Modules Get-Module -ListAvailable VMware* | Import-Module # ------vSphere Targeting Variables tracked below------ $vCente...
PowerShellCorpus/Github/RichiePhoebix_CobaltDb/CobaltDb/CobaltDb/DeployDatabaseWithDacFx.ps1
DeployDatabaseWithDacFx.ps1
#create some params param([string]$targetConnectionString, [string]$Dacpac, [string]$targetDatabaseName, [string]$Profile, [bool] $deploy, [bool] $script, [bool] $azure) #where the patest dacFx is if you have installed Visual Srudio 2015 version. For VS 2013 alter '14.0' to '13.0' $dacfxPath = 'C:\Program Files...
PowerShellCorpus/Github/RichiePhoebix_CobaltDb/CobaltDb/CobaltDb/DeployDatabaseWithSqlPackage.ps1
DeployDatabaseWithSqlPackage.ps1
param ([string] $Option,[string] $location) #it's really easy to select the action you want as we can output the files created using the new parameters # DeployScriptPath # DeployReportPath #enter either "publish" or "script" $Option = "publish" #set to either local or azure and update the $sqlconnec...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_26_10_53_37/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/SecretPizzaProject_Pizza/Pizza1/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/NVDonchev_OtherWorks/TimeTest/TimeTest/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/NVDonchev_OtherWorks/TimeTest/TimeTest/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/NVDonchev_OtherWorks/TimeTest/TimeTest/packages/EnterpriseLibrary.Logging.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/NVDonchev_OtherWorks/TimeTest/TimeTest/packages/EnterpriseLibrary.Logging.Database.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/NVDonchev_OtherWorks/TimeTest/TimeTest/packages/EntityFramework.6.0.1/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 # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/NVDonchev_OtherWorks/TimeTest/TimeTest/packages/EntityFramework.6.0.1/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/NVDonchev_OtherWorks/TimeTest/TimeTest/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/NVDonchev_OtherWorks/TimeTest/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/NVDonchev_OtherWorks/TimeTest/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/NVDonchev_OtherWorks/TimeTest/packages/EnterpriseLibrary.Logging.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/NVDonchev_OtherWorks/TimeTest/packages/EnterpriseLibrary.Logging.Database.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/NVDonchev_OtherWorks/TimeTest/packages/EntityFramework.6.0.1/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 # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/NVDonchev_OtherWorks/TimeTest/packages/EntityFramework.6.0.1/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/NVDonchev_OtherWorks/TimeTest/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/NVDonchev_OtherWorks/SimpleSurveyWebsite/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/NVDonchev_OtherWorks/SimpleSurveyWebsite/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/NVDonchev_OtherWorks/SimpleSurveyWebsite/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/tboyce_packer-windows-dev/scripts/openssh.ps1
openssh.ps1
$is_64bit = [IntPtr]::size -eq 8 # setup openssh $ssh_download_url = "http://www.mls-software.com/files/setupssh-6.6p1-1.exe" if ($is_64bit) { Write-Host "64 bit OS found" $ssh_download_url = "http://www.mls-software.com/files/setupssh-6.6p1-1(x64).exe" } if (!(Test-Path "C:\Program Files\OpenSSH\bin...
PowerShellCorpus/Github/khuntsr_Restsharp/Restsharp/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/khuntsr_Restsharp/Restsharp/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/khuntsr_Restsharp/Restsharp/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/khuntsr_Restsharp/Restsharp/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/khuntsr_Restsharp/Restsharp/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/khuntsr_Restsharp/Restsharp/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/deluxghost_configs4windows/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
clear Set-Alias ll Get-ChildItem Remove-Item alias:cd function cd { if ($args.length -eq 0) { Set-Location "$($env:homedrive)$($env:homepath)" } else { Set-Location ($args -join " ") } } function ping { if ($args.length -eq 0) { ping.exe } else { p...
PowerShellCorpus/Github/timothywarner_ittransformation2017/laptop-lcm.ps1
laptop-lcm.ps1
[DSCLocalConfigurationManager()] configuration LCMConfig { Node localhost { Settings { RefreshMode = 'Push' ConfigurationMode = 'ApplyAndAutoCorrect' ConfigurationModeFrequencyMins = '15' } } } LCMConfig
PowerShellCorpus/Github/timothywarner_ittransformation2017/UpdateLCM.ps1
UpdateLCM.ps1
Configuration UpdateLCM { node localhost { LocalConfigurationManager { ConfigurationMode = "ApplyAndAutocorrect" } } } UpdateLCM Set-DscLocalConfigurationManager -Path 'C:\UpdateLCM' -Verbose
PowerShellCorpus/Github/timothywarner_ittransformation2017/dsc-metaconfig-onboard.ps1
dsc-metaconfig-onboard.ps1
# The DSC configuration that will generate metaconfigurations [DscLocalConfigurationManager()] Configuration DscMetaConfigs { param ( [Parameter(Mandatory=$True)] [String]$RegistrationUrl, [Parameter(Mandatory=$True)] [String]$RegistrationKey, [Parameter(M...
PowerShellCorpus/Github/timothywarner_ittransformation2017/laptop-dsc.ps1
laptop-dsc.ps1
Configuration FileResourceDemo { Node "localhost" { File DirectoryCopy { Ensure = "Present" # You can also set Ensure to "Absent" Type = "Directory" # Default is "File". Recurse = $true # Ensure presence of subdirectories, too SourcePath ...
PowerShellCorpus/Github/timothywarner_ittransformation2017/round-trip-dsc.ps1
round-trip-dsc.ps1
break # ############################################################################# # TITLE: ROUND-TRIP DESIRED STATE CONFIGURATION (DSC) # FILENAME: round-trip-dsc.ps1# # AUTHOR: Timothy L. Warner # DATE: 2017-05-22 # EMAIL: timothy-warner@pluralsight.com # TWITTER: @TechTrainerTim # ######################...
PowerShellCorpus/Github/timothywarner_ittransformation2017/dsc-configuration.ps1
dsc-configuration.ps1
Configuration SetTimeZone { Param ( [String[]]$NodeName = $env:COMPUTERNAME, [Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [String]$SystemTimeZone ) Import-DSCResource -ModuleName xTimeZone Node $NodeName { xTimeZone TimeZoneExample ...
PowerShellCorpus/Github/timothywarner_ittransformation2017/laptop-tshoot.ps1
laptop-tshoot.ps1
Set-Location -Path 'C:\Users\Tim\Desktop\REPO\ittransformation2017' Get-DscLocalConfigurationManager Set-DscLocalConfigurationManager -Path '.\LCMConfig' -Verbose Get-DscConfiguration Start-DscConfiguration -Path '.\FileResourceDemo' -Wait -Verbose Test-DscConfiguration -Verbose Remove-DscConfiguratio...
PowerShellCorpus/Github/hashfunktion_Office-365_PowerShell/Office-365-license-assignment/O365-remove-license-disabled-user.ps1
O365-remove-license-disabled-user.ps1
# O365-remove-license-disabled-user # This Script query disabled users with Office 365 license and remove the license. # # Jesse Reppin (C) - 2017 # V1.0 - First Release # # CHANGES # #NOTE - Connect to the MSOL Service Connect-MsolService #Note - Attriutes $ASID = "TENANTNAME:ENTERPRISEPACK" $UL = "DE" ...
PowerShellCorpus/Github/hashfunktion_Office-365_PowerShell/Office-365-license-assignment/O365-assign-license.ps1
O365-assign-license.ps1
# Script to enable O365 Licenses to a list of user, that is create with O365-user-query.ps1 # !- Run first --> O365-user-query.ps1 to create the userlist! -! # # Jesse Reppin (C) - 2017 # V1.0 - First Release # # Options to edit: # Replace "TENANTNAME" with your TENANTNAME. # Replace "ENTERPRISEPACK" with y...
PowerShellCorpus/Github/hashfunktion_Office-365_PowerShell/Office-365-license-assignment/O365-user-query.ps1
O365-user-query.ps1
# Script to query users to apply Office 365 licenses. # # Jesse Reppin (C) - 2017 # V1.0 - First Release # # Options: # -EnabledFilter EnabledOnly --> The script query only enabled user # $_.isLicensed -ne "TRUE" --> The script query only user without Office 365 license # Connect-MsolService Get-MsolUser...
PowerShellCorpus/Github/KMcodeKY_MVC_Basics/src/ComicBooksGallery/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/KMcodeKY_MVC_Basics/src/ComicBooksGallery/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/KMcodeKY_MVC_Basics/src/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $srcFiles = Join-Path $installPath "lib\net40\*.dll" $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $destDirec...
PowerShellCorpus/Github/KMcodeKY_MVC_Basics/src/packages/Microsoft.Web.Infrastructure.1.0.0.0/tools/Uninstall.ps1
Uninstall.ps1
param($installPath, $toolsPath, $package, $project) if ($project.Type -eq 'Web Site') { Import-Module (Join-Path $toolsPath VS.psd1) $projectRoot = Get-ProjectRoot $project if (!$projectRoot) { return; } $binDirectory = Join-Path $projectRoot "bin" $srcDirectory = Join-Path $...
PowerShellCorpus/Github/KMcodeKY_MVC_Basics/src/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/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/KMcodeKY_MVC_Basics/src/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3/tools/install.ps1
install.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' $projectRoot = $project.Properties.Item('FullPath').Value $binDirectory...
PowerShellCorpus/Github/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/veNqus_NaukaMVC/vidly/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/ehime_PowerShell-Tools/iis-setup.ps1
iis-setup.ps1
# -------------------------------------------------------------------- # Checking Execution Policy # -------------------------------------------------------------------- #$Policy = "Unrestricted" $Policy = "RemoteSigned" If ((get-ExecutionPolicy) -ne $Policy) { Write-Host "Script Execution is disabled. Enabling...
PowerShellCorpus/Github/ehime_PowerShell-Tools/iis-create.ps1
iis-create.ps1
# -------------------------------------------------------------------- # Checking Execution Policy # -------------------------------------------------------------------- #$Policy = "Unrestricted" $Policy = "RemoteSigned" If ((get-ExecutionPolicy) -ne $Policy) { Write-Host "Script Execution is disabled. Enabling...
PowerShellCorpus/Github/ehime_PowerShell-Tools/iis-kill.ps1
iis-kill.ps1
# -------------------------------------------------------------------- # List available IIS sites. # -------------------------------------------------------------------- Import-Module "Webadministration" Get-ChildItem -Path IIS:\Sites | Format-Table -AutoSize Write-Host '' # ------------------------------------...
PowerShellCorpus/Github/andmos_Windows-Scripts/FindCertificatePath.ps1
FindCertificatePath.ps1
#requires -Version 2.0 # # Example 1: # Get-PrivateKeyPath CN=DO_NOT_TRUST_FiddlerRoot -StoreName My -StoreScope CurrentUser # Example 2: # Get-PrivateKeyPath D359ECDC338CFDDCE86DDDA99BE36286BAE2018A function Get-PrivateKeyPath { param ( ...
PowerShellCorpus/Github/terryjintry_yungezprovstagetest1_pt-BR/.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/CuCoGai_QLThuVien/QLTV/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/CuCoGai_QLThuVien/QLTV/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/CuCoGai_QLThuVien/update Form/QLTV/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/CuCoGai_QLThuVien/update Form/QLTV/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/infosec-intern_WMIAlert/wmialert.ps1
wmialert.ps1
[CmdletBinding]
PowerShellCorpus/Github/KirkMunro_LanguagePx/samples/Excel document creation sample.ps1
Excel document creation sample.ps1
# This example is using the first release of Doug Finke's ImportExcel module. # You can download that module here: https://github.com/dfinke/ImportExcel # The pipeline approach to creating an Excel document: Get-Process | Export-Excel -Path "$([Environment]::GetFolderPath('MyDocuments'))\test.xlsx" -Force -Show -A...
PowerShellCorpus/Github/KirkMunro_LanguagePx/scripts/Export-BinaryModule.ps1
Export-BinaryModule.ps1
<############################################################################# DESCRIPTION Copyright 2015 Kirk Munro Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache....
PowerShellCorpus/Github/tempestparr_MVA-Csharp-Fundamentals/ConsoleApplication2/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/tempestparr_MVA-Csharp-Fundamentals/ConsoleApplication2/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/OPS-E2E-PPE_E2E_D_NewRepo_2017_4_20_29_58_29/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/bgelens_cWAPack/cWAPackModuleCreation.ps1
cWAPackModuleCreation.ps1
Import-Module xDSCResourceDesigner $BuildDir = 'C:\' New-xDscResource -ModuleName cWAPack -Name 'BG_WAPackVMRole' -FriendlyName 'WAPackVMRole' -ClassVersion '1.0.0.0' -Path $BuildDir -Property @( New-xDscResourceProperty -Name Name -Type String -Attribute Key -Description 'Cloud Service and VM Role Name' ...
PowerShellCorpus/Github/bgelens_cWAPack/SampleConfig.ps1
SampleConfig.ps1
#New Deployment configuration WAPVMRole { param ( [PSCredential] $Credential ) Import-DscResource -ModuleName cWAPack Import-DscResource -ModuleName PSDesiredStateConfiguration node $AllNodes.NodeName { WAPackVMRole DSCClient { VMSize = 'Medium' Na...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Get-EVItems2.ps1
Get-EVItems2.ps1
[CmdletBinding()] Param( [Bool]$SearchDC = $false, [String]$Computer = "", [String]$Log = "", [String]$Data = "", [Int]$SpanOfHours = 0, [Int]$ID = 0, [Bool]$Debug = $false ) Import-Module .\EmailHelper\EmailHelper.psm1 ###################### ###################### Function New-Cus...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Check-For-Vulnerability.ps1
Check-For-Vulnerability.ps1
#=============================================================================# # # # Check-For-Vulnerability.ps1 # # Powershell Script to search for a service and # ...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Friday-After-Patch-Tuesday.ps1
Friday-After-Patch-Tuesday.ps1
#=============================================================================# # # # Friday-After-Patch-Tuesday.ps1 # # Powershell Script to reboot servers to apply patches. # # Autho...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Get-ServicesRunByCustomUsers.ps1
Get-ServicesRunByCustomUsers.ps1
Param( [String]$Computer = "localhost", [String]$CSVFile = "", [String]$Username = "", [String]$Password = "", [String]$EmailTo = "me@mail.here", [String]$EmailFrom = "CustomServices@mail.here", [String]$EmailSubject = "Custom Services", [String]$EmailServer = "mail.mail.here", [Bool...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Update-Primary-SMTP-Address.ps1
Update-Primary-SMTP-Address.ps1
[CmdletBinding()] Param( [String]$SearchBase = "CN=Users,DC=contoso,DC=com", [String]$EmailDomain = "CONTOSO.COM", [Bool]$ReportOnly = $true ) Add-Type -TypeDefinition @" public struct OurUser { public string Username; public string PrimarySMTPAddress; public string NewPrimarySMTPAddres...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Get-EVItems.ps1
Get-EVItems.ps1
Function Get-EVItems() { [CmdletBinding()] Param( [String]$ComputerName = "", [String]$Log = "Security", [String]$Data = "10.10.10.10", [Int]$SpanOfHours = 6, [Int]$ID = 4625 ) $StartTime = (Get-Date).AddHours(-$SpanOfHours) Try{ ## Find the domain controlle...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Get-DHCPLeaseAvailability.ps1
Get-DHCPLeaseAvailability.ps1
#====================================================# # # # Get-DHCPLeaseAvailability.ps1 # # Powershell script to send an email alert if the # # lease availability for a particular scope is # # nearly full with the ability to exclud...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Get-Logged-In-User.ps1
Get-Logged-In-User.ps1
#=============================================================================# # # # Get-Logged-In-User.ps1 # # Powershell Script to determine who is logged in. ...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/Update-ComputerDescription.ps1
Update-ComputerDescription.ps1
#=============================================================================# # # # Update-ComputerDescription.ps1 # # Powershell Script which updates a computer's description. # # A...
PowerShellCorpus/Github/jamiekowalczik_powershell-scripts/IOSScripter/Get-IOSData.ps1
Get-IOSData.ps1
#=============================================================================# # # # Get-IOSData.ps1 # # Powershell Script automate SSH sessions to IOS Network Devices. # ...
PowerShellCorpus/Github/bkrastev95_MyTestRepo/MyTestApplication/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/bkrastev95_MyTestRepo/MyTestApplication/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/MicrosoftDocs_nav-content.nl-be/.openpublishing.build.ps1
.openpublishing.build.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.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 url: ...
PowerShellCorpus/Github/DamianFlynn_PSProfile/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
## GLOBAL VARIABLES ############################################################ $ProfilePath = $PROFILE.Substring(0,$PROFILE.IndexOf('\Microsoft.')) if (! ( [Environment]::GetEnvironmentVariable("PSModulePath", "User") ) ) { [Environment]::SetEnvironmentVariable("PSModulePath", $ProfilePath + "\Modules", "User...
PowerShellCorpus/Github/DamianFlynn_PSProfile/Microsoft.PowerShellISE_profile.ps1
Microsoft.PowerShellISE_profile.ps1
ÔĽŅ## GLOBAL VARIABLES ############################################################ $ProfilePath = $PROFILE.Substring(0,$PROFILE.IndexOf('\Microsoft.')) if (! ( [Environment]::GetEnvironmentVariable("PSModulePath", "User") ) ) { [Environment]::SetEnvironmentVariable("PSModulePath", $ProfilePath + "\Modules", "User"...