full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/Schittecatte_PeopleManager-oef-7/PeopleManager/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/Schittecatte_PeopleManager-oef-7/PeopleManager/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/Schittecatte_PeopleManager-oef-7/PeopleManager/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/Schittecatte_PeopleManager-oef-7/PeopleManager/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/satmn_CMDB/CMDB/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/satmn_CMDB/CMDB/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/jbake_Powershell_scripts/Template.ps1
Template.ps1
# Help ############################################################################# <# .SYNOPSIS .DESCRIPTION .PARAMETER SourcePath .INPUTS None. You cannot pipe to this script. .OUTPUTS None. This script does not generate any output. .NOTES AUTHOR: Janne Beate Bakeng, SINTEF DATE: 17.04.20...
PowerShellCorpus/Github/jbake_Powershell_scripts/ITK.ps1
ITK.ps1
# Help ############################################################################# <# .SYNOPSIS Script for downloading, configuring and building ITK. .DESCRIPTION .PARAMETER SourcePath .INPUTS None. You cannot pipe to this script. .OUTPUTS None. This script does not generate any output. .NOTE...
PowerShellCorpus/Github/jbake_Powershell_scripts/Class.ps1
Class.ps1
# Help ############################################################################# <# .SYNOPSIS My first Powershell/C# class. .DESCRIPTION .PARAMETER SourcePath .INPUTS None. .OUTPUTS None. This script does not generate any output. .NOTES AUTHOR: Janne Beate Bakeng, SINTEF DATE: 04.06.2012 ...
PowerShellCorpus/Github/jbake_Powershell_scripts/EnableMVSEnvironment.ps1
EnableMVSEnvironment.ps1
# Help ############################################################################# <# .SYNOPSIS Script for enabling powershell to run MVS 2010 commands. .DESCRIPTION .PARAMETER .INPUTS None. You cannot pipe to this script. .OUTPUTS None. This script does not generate any output. .NOTES AUTHO...
PowerShellCorpus/Github/jbake_Powershell_scripts/Sandbox.ps1
Sandbox.ps1
<# .SYNOPSIS Sandbox for testing Powershell commands. #> . C:\Dev\Powershell\Installer\Config.ps1 . C:\Dev\Powershell\Installer\Utilities.ps1 Clear write-host "===============================" write-host "Playing in the powershell sandbox!" write-host "===============================" $cx_folder = "$sc...
PowerShellCorpus/Github/jbake_Powershell_scripts/GitUtilities.ps1
GitUtilities.ps1
# Git functions # Mark Embling (http://www.markembling.info/) # Is the current directory a git repository/working copy? function isCurrentDirectoryGitRepository { if ((Test-Path ".git") -eq $TRUE) { return $TRUE } # Test within parent dirs $checkIn = (Get-Item .).parent whil...
PowerShellCorpus/Github/jbake_Powershell_scripts/Invoke-BatchFile.ps1
Invoke-BatchFile.ps1
<# .SYNOPSIS Invokes the specified batch file and retains any environment variable changes it makes. .DESCRIPTION Invoke the specified batch file (and parameters), but also propagate any environment variable changes back to the PowerShell environment that called it. .PARAMETER Path Path t...
PowerShellCorpus/Github/jbake_Powershell_scripts/Library/Time.ps1
Time.ps1
$script:StartTime = get-date Function Set-StartTime{ $script:StartTime = get-date } function Get-ElapsedTime { $runtime = $(get-date) - $script:SstartTime $return_string = [string]::format("{0} days, {1} hours, {2} minutes, {3}.{4} seconds", ` $runtime.Days, ` $runtime.Hours, ` ...
PowerShellCorpus/Github/jbake_Powershell_scripts/Library/Console.ps1
Console.ps1
Function Update-WindowBufferSize{ $pshost = Get-Host $pswindow = $pshost.ui.rawui $newsize = $pswindow.buffersize $newsize.height = 32500 $newsize.width = 120 $pswindow.buffersize = $newsize }
PowerShellCorpus/Github/jbake_Powershell_scripts/Installer/Install.ps1
Install.ps1
# Import other scripts ############################ $psScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Definition Push-Location $psScriptRoot . .\Utilities.ps1 . .\Config.ps1 . .\GetTools.ps1 Pop-Location # Global variabels ############################ $script:startTime = get-date <# .SYNOPSIS In...
PowerShellCorpus/Github/jbake_Powershell_scripts/Installer/BuildCustusX.ps1
BuildCustusX.ps1
$psScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Definition Push-Location $psScriptRoot . ./Utilities.ps1 . ./Config.ps1 Pop-Location <# .SYNOPSIS Convenience functions for checking out, configuring and building CustusX. WARNING: Depends on Config.ps1 .NOTES AUTHOR: Janne Beate Bakeng, SINTEF D...
PowerShellCorpus/Github/jbake_Powershell_scripts/Installer/GetTools.ps1
GetTools.ps1
<# .SYNOPSIS Script that prepares a Windows machine for software development. .DESCRIPTION Downloads, installs and sets up environment for: -Microsoft Visual Studio Express -7-zip -CppUnit -jom -git -svn -CMake -Python -Perl -Eclipse -Qt -Boost .INPUTS None. You cannot pipe to this script. .OUT...
PowerShellCorpus/Github/jbake_Powershell_scripts/Installer/Config.ps1
Config.ps1
# Help ############################################################################# <# .SYNOPSIS This file contains globals for the other scripts in the Windows installer .DESCRIPTION .INPUTS None. You cannot pipe to this script. .OUTPUTS None. This script does not generate any output. .NOTES A...
PowerShellCorpus/Github/jbake_Powershell_scripts/Installer/Utilities.ps1
Utilities.ps1
$scriptpath = $MyInvocation.MyCommand.Path <# .SYNOPSIS Check if a network drive is mapped to the system or not. .NOTES AUTHOR: Janne Beate Bakeng, SINTEF DATE: 24.09.2012 .EXAMPLE Test-MappedNetworkDrive "\\medtek.sintef.no\MedTekDisk" #> Function Test-MappedNetworkDrive{ param( ## The netw...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/post-build-restart-services.ps1
post-build-restart-services.ps1
$openstackDir = "C:\Openstack" $scriptdir = "C:\cinder-ci" $configDir = "$openstackDir\etc" $templateDir = "$scriptdir\windows\templates" $cinderTemplate = "$templateDir\cinder.conf" $pythonDir = "C:\Python27" $pythonExec = "python.exe" $pythonArchive = "python27.tar.gz" $lockPath = "C:\Openstack\locks" $remot...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/create-environment.ps1
create-environment.ps1
Param( [Parameter(Mandatory=$true)][string]$devstackIP, [string]$branchName='master', [string]$buildFor='openstack/cinder', [Parameter(Mandatory=$true)][string]$testCase, [Parameter(Mandatory=$true)][string]$winUser, [Parameter(Mandatory=$true)][string]$winPasswd ) $projectName = $buil...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/EnsureOpenStackServices.ps1
EnsureOpenStackServices.ps1
Param( [Parameter(Mandatory=$True)] [string]$serviceUsername, [Parameter(Mandatory=$True)] [string]$servicePassword ) $openstackDir = "C:\OpenStack" $pythonDir = "C:\Python27" $configDir = "$openstackDir\etc" $downloadLocation = "http://dl.openstack.tld/" $scriptdir = "C:\cinder-ci" . "$s...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/utils.ps1
utils.ps1
<# Copyright 2012 Aaron Jensen (Carbon C# code) Copyright 2014 Cloudbase Solutions Srl (PowerShell script) 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.org/licenses...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/iscsi/generateConfig.ps1
generateConfig.ps1
Param( [Parameter(Mandatory=$true)][string]$configDir, [Parameter(Mandatory=$true)][string]$templatePath, [Parameter(Mandatory=$true)][string]$devstackIP, [Parameter(Mandatory=$true)][string]$rabbitUser, [Parameter(Mandatory=$true)][string]$logDir, [Parameter(Mandatory=$true)][string]$lock...
PowerShellCorpus/Github/cloudbase_cinder-ci/windows/scripts/smb3_windows/generateConfig.ps1
generateConfig.ps1
Param( [Parameter(Mandatory=$true)][string]$configDir, [Parameter(Mandatory=$true)][string]$templatePath, [Parameter(Mandatory=$true)][string]$serverIP, [Parameter(Mandatory=$true)][string]$rabbitUser, [Parameter(Mandatory=$true)][string]$logDir, [Parameter(Mandatory=$true)][string]$lockPa...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_Provision_2017_5_14_17_9_49/.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/alexandernyquist_Powershell-Profile/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
. C:\Users\alexander.nyquist\Posh-HG\profile.example.ps1 Set-Alias subl 'C:\Program Files\Sublime Text 2\sublime_text.exe' Function FindRec($filepattern, $pattern) { Get-ChildItem -Recurse -Include $filepattern | Select-String -Pattern $pattern | Group path | Select Name, Count | Sort Count } Function Deskt...
PowerShellCorpus/Github/InfiniteLoopIO_Get-ADGroupMemberEnhanced/Get-ADGroupMemberEnhanced.ps1
Get-ADGroupMemberEnhanced.ps1
#Requires -Modules 'ActiveDirectory' #Requires -Version 3 <# .Synopsis Get detailed AD information about current AD group members including those from trusted domains .DESCRIPTION Create dynamic hashtable containing all trusted domain SIDs and current domain information Returned actual AD object from ...
PowerShellCorpus/Github/terrawheat_MyStuff/newbuild/windows.ps1
windows.ps1
Set-ExecutionPolicy RemoteSigned iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex refreshenv choco install -y git nodejs mongodb.portable rabbitmq nuget.commandline visualstudiocode slack 7zip.install putty curl vim wget refreshenv
PowerShellCorpus/Github/autocloudarc_0007-Set-AclForHomeDrivesInputList/Set-AclForHomeDrivesInputList.ps1
Set-AclForHomeDrivesInputList.ps1
#requires -version 4.0 #requires -RunAsAdministrator #requires -Modules ActiveDirectory <# **************************************************************************************************************************************************************************** PROGRAM : Set-AclForHomeDrivesFromDirectoryListOrU...
PowerShellCorpus/Github/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/colecathey_SafeEats/SafeEats/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/maryvilledev_awswindowsuserdata/awswindowsud.ps1
awswindowsud.ps1
# Used for AWS Windows AMI Userdata. # # Two main functions: # 1. Remap drives based on the EC2 tags "DriveLetter" and "DriveLabel". These # tags are expected on EBS volumes, and "DriveLetter" should end in ":". # For this to work, the instance must be launched with the "readonlyEC2" # role, so it...
PowerShellCorpus/Github/kyle-rf_Scripts/Powershell/Get-UserProfiles.ps1
Get-UserProfiles.ps1
# Get-UserProfiles # Store Desired Information from Built-in cmdlet $Profiles = Get-CIMInstance -ClassName Win32_UserProfile | Select-Object Loaded, Special, LocalPath, SID # Count the number Profiles $ProfCount = $Profiles | Measure-Object # Initilize Variables $Users = @() $Count = 0 # Parse Profiles ...
PowerShellCorpus/Github/kyle-rf_Scripts/Powershell/Get-SystemInfo.ps1
Get-SystemInfo.ps1
# Get-SystemInfo # Initialize HashTable of SystemInfo to Collect $SystemInfo = @() # Collect data from CIM_ComputerSystem $Properties = @( "Name", "Username", "SystemType", "InstallDate", "Manufacturer", ...
PowerShellCorpus/Github/kyle-rf_Scripts/Powershell/Get-NetworkAdapter.ps1
Get-NetworkAdapter.ps1
# Get-NetworkAdapter <# Other Classnames to explore: Get-CimInstance -ClassName Win32_NetworkClient #> # get-ciminstance -classname Win32_NetworkAdapterConfiguration | select-object * # get-ciminstance -classname CIM_NetworkAdapter | select-object * $AdapterInfo = @() $AdapterConfig = Get-CIMInstance -...
PowerShellCorpus/Github/kyle-rf_Scripts/Powershell/Get-Persistence.ps1
Get-Persistence.ps1
# Get-Persistence $CIMStartup = Get-CIMInstance -ClassName Win32_StartupCommand | Select-Object ` Name, Description, Caption, ` Location, Command, User, UserSID Write-Host "From CIM -ClassName Win32_StartupCommand:" $CIMStartup
PowerShellCorpus/Github/prasannaRgenSoft_PocApi/src/TestCoreWebApi/Properties/PublishProfiles/Poc-publish.ps1
Poc-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = 'beafecf7-c8d9-418...
PowerShellCorpus/Github/prasannaRgenSoft_PocApi/src/TestCoreWebApi/Properties/PublishProfiles/api-publish.ps1
api-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = 'beafecf7-c8d9-418...
PowerShellCorpus/Github/XcyTheR101_Tour_of_Heroes/TourOfHeroes.Api/src/TourOfHeroes.Api/Properties/PublishProfiles/TourOfHeroes-publish.ps1
TourOfHeroes-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = 'b81e852b-f6f5-419...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_2_15_59_25/.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/bkpritesh_WebServicesSoftmind/SoftMindSolution/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/bkpritesh_WebServicesSoftmind/SoftMindSolution/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/bkpritesh_WebServicesSoftmind/SoftMindSolution/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/bkpritesh_WebServicesSoftmind/SoftMindSolution/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/MrOggy85_Poker_Blinds_Timer/PokerCounter/AppPackages/PokerCounter_1.1.0.1_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/MrOggy85_Poker_Blinds_Timer/PokerCounter/AppPackages/PokerCounter_1.0.0.0_AnyCPU_Test/Add-AppDevPackage.ps1
Add-AppDevPackage.ps1
# # Add-AppxDevPackage.ps1 is a PowerShell script designed to install app # packages created by Visual Studio for developers. To run this script from # Explorer, right-click on its icon and choose "Run with PowerShell". # # Visual Studio supplies this script in the folder generated with its # "Prepare Package" c...
PowerShellCorpus/Github/adbertram_PSTFS/PSTFS.Tests.ps1
PSTFS.Tests.ps1
#region import modules $ThisModule = "$($MyInvocation.MyCommand.Path -replace '\.Tests\.ps1$', '').psm1" $ThisModuleName = (($ThisModule | Split-Path -Leaf) -replace '\.psm1') Get-Module -Name $ThisModuleName -All | Remove-Module -Force Import-Module -Name $ThisModule -Force -ErrorAction Stop #endregion InModul...
PowerShellCorpus/Github/BornToBeRoot_PowerShell_IPv4PortScanner/Scripts/IPv4PortScan.ps1
IPv4PortScan.ps1
############################################################################################################### # Language : PowerShell 4.0 # Filename : IPv4PortScan.ps1 # Autor : BornToBeRoot (https://github.com/BornToBeRoot) # Description : Powerful asynchronus IPv4 Port Scanner # Repository...
PowerShellCorpus/Github/kyusu_javascript-pre-commit-hook/pre-commit.ps1
pre-commit.ps1
################################################################################# # Inspired by the PHP Syntax Check for Git pre-commit hook for Windows PowerShell # which was written by Vojtech Kusy <wojtha@gmail.com> # See https://gist.github.com/wojtha/1034262 ####################################################...
PowerShellCorpus/Github/smitchel87_PowerShell/Change-ServicePassword.ps1
Change-ServicePassword.ps1
<# .SYNOPSIS Change the userid and password of a service .DESCRIPTION This script loops thru all the Windows Servers found in AD and changes the userid and password of the service specified. .PARAMETER Service Name of the service being changed. .PARAMETER Account The new Userid to be used....
PowerShellCorpus/Github/DmitryShaburov_PSSnippets/Install-WusaUpdate.ps1
Install-WusaUpdate.ps1
# Usage: # 1. Unpack *.msu file of update you want to install # 2. Set the following variables: # $source - Local path to unpacked *.cab files of update # $packages - Array of desired packages, without .cab extension, # order matters (usually set on PkgInstallOrder.txt) # $computers - Arr...
PowerShellCorpus/Github/hrontan_PowerShell-SMARTInformation/Get-SMARTInformation.ps1
Get-SMARTInformation.ps1
function Get-SMARTInformation(){ $attributes=@{ 0x01="Raw Read Error Rate"; 0x02="Throughput Performance"; 0x03="Spin Up Time"; 0x04="Start/Stop Count"; 0x05="Reallocated Sectors Count"; 0x07="Seek Error Rate"; 0x08="Seek Time Performance"; 0x09="Power-On Hours"; 0x0A="Spin Retry Count"; ...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1487295309056/.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/tvsonar_doc-comment-repro/Analyzer1/Analyzer1/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers" ) * -Resolve foreach($analyzersPath in $analyzersPaths) { # Uninstall the language agnostic analyzers. if (Test-Path $analyzersPath) { foreach ($ana...
PowerShellCorpus/Github/tvsonar_doc-comment-repro/Analyzer1/Analyzer1/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) $analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers" ) * -Resolve foreach($analyzersPath in $analyzersPaths) { # Install the language agnostic analyzers. if (Test-Path $analyzersPath) { foreach ($analy...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/WorkItems.ps1
WorkItems.ps1
function Get-VstsWorkItem { Param( [Parameter(Mandatory=$True, Position=0)] [string]$Instance, [Parameter(Mandatory=$True, Position=1)] [string]$Id ) Invoke-VstsGetOperation $Instance "_apis/wit/workItems/$Id" "2.1" }
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/Options.ps1
Options.ps1
function Get-VstsOption { Param( [Parameter(Mandatory=$True)] [string]$Instance, [string]$Area = "*", [string]$ResourceName = "*", [string]$ApiVersion = "1.0" ) (Invoke-VstsOperation $Instance "_apis" $ApiVersion Options).value | Where-Object {...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/Projects.ps1
Projects.ps1
function Get-VstsProject { [CmdletBinding(DefaultParameterSetName="Query")] Param( [Parameter(Position=0, Mandatory=$True)] [string]$Instance, [Parameter(Mandatory=$True, Position=1, ParameterSetName="Instance", ValueFromPipeline=$True, ...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/CredentialStore.ps1
CredentialStore.ps1
function StoreCredentials { Param( [string]$Instance, [PSCredential]$Credentials) $path = "~\AppData\Roaming\PoshVSTS\Instances\$Instance" MakeDirIfNotExists $path $storage = New-Object PSCustomObject -Property @{ UserName = $Credentials.UserName ...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/ArgumentCompletion.ps1
ArgumentCompletion.ps1
Register-ArgumentCompleter ` -CommandName @(Get-Command "*-Vsts*") ` -ParameterName Instance ` -ScriptBlock { param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) Get-VstsCredentials "$w...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/Teams.ps1
Teams.ps1
function Get-VstsProjectTeam { [CmdletBinding(DefaultParameterSetName="Name")] Param( [Parameter(Mandatory=$True, Position=0)] [string]$Instance, [Parameter( Mandatory=$True, Position=1)] [Alias("ProjectName")] [Alias("ProjectId")] ...
PowerShellCorpus/Github/AndrewGaspar_PoshVSTS/PoshVSTS/scripts/Utilities.ps1
Utilities.ps1
function BuildUrl { Param( [string]$Instance, [string]$Path, [hashtable]$Parameters ) $url = "https://$Instance/defaultcollection/$Path" if($Parameters.Count -gt 0) { $url += "?" $url += ($Parameters.Keys | % { "$_=$($Parameters[$_])" }) -join "&"...
PowerShellCorpus/Github/Soverance_Powershell/Windows/SendEmail.ps1
SendEmail.ps1
# Scott McCutchen # www.soverance.com # # This script is a generic email test sent through Powershell # Assuming the user was actually at the terminal, this script would be made better by simply calling Get-Credential # Instead, converting to SecureString and creating a new PSCredential object allows us to modif...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Get-ProductKey.ps1
Get-ProductKey.ps1
# Scott McCutchen # soverance.com # # A small script to retrieve the Windows product key function Get-WindowsKey { param ($targets = ".") $hklm = 2147483650 $regPath = "Software\Microsoft\Windows NT\CurrentVersion" $regValue = "DigitalProductId" Foreach ($target in $targets) { ...
PowerShellCorpus/Github/Soverance_Powershell/Windows/RenameAllFiles.ps1
RenameAllFiles.ps1
# © 2017 Soverance Studios # Scott McCutchen # soverance.com # # Rename all files incrementally in a specified directory. # Run the script with the following options to rename all files in directory # The -recurse parameter is optional, and if specified, will iterate and rename through all sub-folders # The -r...
PowerShellCorpus/Github/Soverance_Powershell/Windows/WindowsUpdate-RenameFolder.ps1
WindowsUpdate-RenameFolder.ps1
# © 2017 Soverance Studios # Scott McCutchen # soverance.com param ( [string]$computer = $(throw "-computer is required. A computer on the local domain network must be specified.") ) # This command starts the WinRM service, sets it to start automatically with your system, and creates a firewall rule that all...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Profiles/Microsoft.PowerShell_profile.ps1
Microsoft.PowerShell_profile.ps1
# Scott McCutchen # soverance.com # # If necessary, test the environment for a pre-existing profile path using the command: Test-Path $Profile # If no profile exists, apply this file as the current profile # This file must not be renamed, and is usually located in the following directory: C:\Users\CurrenUser\D...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Server/AD/AD-ImportOU.ps1
AD-ImportOU.ps1
# © 2017 Soverance Studios, LLC. # Scott McCutchen # www.soverance.com # info@soverance.com # Import Active Directory Organizational Unit structure from CSV $pathofcsvfile = 'somepath.csv' # Provide the path of the csv file $oufile = Import-Csv $pathofcsvfile # loop over CSV foreach ($entry in $oufile)...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Server/AD/AD-DirectorySecurityCheck.ps1
AD-DirectorySecurityCheck.ps1
# © 2017 Soverance Studios # Scott McCutchen # soverance.com # This script recursively pulls information on the NTFS security settings of a specified directory. # Define all paths to scan # These are specific to BKV's environment and must be replaced manually with new paths if/when necessary $PathsToScan = "H...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Server/AD/AD-ExportOU.ps1
AD-ExportOU.ps1
# Š 2017 Soverance Studios, LLC. # Scott McCutchen # www.soverance.com # info@soverance.com # Export Active Directory Organizational Unit structure to CSV $exportpath = $PSScriptRoot $ExportPathWithFileName = $exportpath + "\OU_Export_" + (Get-Date -format yyyy-MM-dd) + ".csv" Get-ADOrganizationalUnit -F...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Server/AD/AD-Report.ps1
AD-Report.ps1
# © 2017 Soverance Studios # Scott McCutchen # Systems Administrator # scott.mccutchen@soverance.com # scott.mccutchen@bkv.com # Export Active Directory information from the specified server into an Excel .xlsx file # This script requires the installation of Windows (KB2693643) Microsoft Remote Server Adminis...
PowerShellCorpus/Github/Soverance_Powershell/Windows/Server/IIS/RecycleAppPools.ps1
RecycleAppPools.ps1
# Scott McCutchen # Soverance Studios # 01/20/2017 # www.soverance.com # # Recycle Application Pools in IIS # Uncomment these lines and run them on a new server to install the IIS Web-Scripting-Tools feature # which is necessary to find the IIS:\ drive #Import-Module ServerManager #Add-WindowsFeature Web-S...
PowerShellCorpus/Github/Soverance_Powershell/Azure/CreateAzureVM_fromVHD.ps1
CreateAzureVM_fromVHD.ps1
# Scott McCutchen # soverance.com # # Creates a new Azure Resource Manager VM from a pre-existing VHD storage disk # You must have the Azure Powershell Module installed, # and have logged into your Azure subscription using the Login-AzureRmAccount command # Initial Configuration $location = "eastus" $resource...
PowerShellCorpus/Github/Soverance_Powershell/Azure/RemoveEmptyResourceGroups.ps1
RemoveEmptyResourceGroups.ps1
# © 2017 Soverance Studios # Scott McCutchen # www.soverance.com # scott.mccutchen@soverance.com # scott.mccutchen@bkv.com # This script will iterate through all available resource groups in your current subscription, and delete any empty ones. # You must have the Azure Powershell Module installed to use this...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/WebApp_MySQL/WebApp_MySQL_Deploy.ps1
WebApp_MySQL_Deploy.ps1
# © 2017 BKV, Inc. # Scott McCutchen # www.bkv.com # scott.mccutchen@bkv.com # You must have the Azure Powershell Module installed to use this script, # and have logged into your Azure subscription using the Login-AzureRmAccount command. #Login-AzureRmAccount # Ensure the correct Azure subscription is curre...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/Backup_NewVault/Backup_NewVault.ps1
Backup_NewVault.ps1
# © 2017 Soverance Studios, LLC. # Scott McCutchen # www.soverance.com # info@soverance.com # You must have the Azure Powershell Module installed to use this script, # and have logged into your Azure subscription using the Login-AzureRmAccount command. #Login-AzureRmAccount # Ensure the correct Azure subscr...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/LAMP_Deploy/LAMP_Deploy.ps1
LAMP_Deploy.ps1
# © 2017 BKV, Inc. # Scott McCutchen # www.bkv.com # scott.mccutchen@bkv.com # You must have the Azure Powershell Module installed to use this script, # and have logged into your Azure subscription using the Login-AzureRmAccount command. #Login-AzureRmAccount # Ensure the correct Azure subscription is curre...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/Backup_ActivatePolicy/Backup_ActivatePolicy.ps1
Backup_ActivatePolicy.ps1
# © 2017 Soverance Studios, LLC. # Scott McCutchen # www.soverance.com # info@soverance.com # You must have the Azure Powershell Module installed to use this script, # and have logged into your Azure subscription using the Login-AzureRmAccount command. #Login-AzureRmAccount # Ensure the correct Azure subscr...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/WindowsServer_ADForest/Create_Soverance_Master.ps1
Create_Soverance_Master.ps1
# © 2017 BKV, Inc. # Scott McCutchen # www.bkv.com # scott.mccutchen@bkv.com # You must have the Azure Powershell Module installed to use this script, # and have logged into your Azure subscription using the Login-AzureRmAccount command. #Login-AzureRmAccount # Ensure the correct Azure subscription is curre...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/WindowsServer_ADForest/DSC/CreateADPDC.ps1
CreateADPDC.ps1
configuration CreateADPDC { param ( [Parameter(Mandatory)] [String]$DomainName, [Parameter(Mandatory)] [System.Management.Automation.PSCredential]$Admincreds, [Int]$RetryCount=20, [Int]$RetryIntervalSec=30 ) Import-DscResource -ModuleName xA...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/WindowsServer_ADForest/DSC/ConfigureADBDC.ps1
ConfigureADBDC.ps1
configuration ConfigureADBDC { param ( [Parameter(Mandatory)] [String]$DomainName, [Parameter(Mandatory)] [System.Management.Automation.PSCredential]$Admincreds, [Int]$RetryCount=20, [Int]$RetryIntervalSec=30 ) Import-DscResource -ModuleNam...
PowerShellCorpus/Github/Soverance_Powershell/Azure/Templates/WindowsServer_ADForest/DSC/PrepareADBDC.ps1
PrepareADBDC.ps1
configuration PrepareADBDC { param ( [Parameter(Mandatory)] [String]$DNSServer, [Int]$RetryCount=20, [Int]$RetryIntervalSec=30 ) Import-DscResource -ModuleName xStorage, xNetworking $Interface=Get-NetAdapter|Where Name -Like "Ethernet*"|Select-Object -Fi...
PowerShellCorpus/Github/Soverance_Powershell/Backups/MSSQL_Backup.ps1
MSSQL_Backup.ps1
# Scott McCutchen # www.soverance.com # # This script is used to backup databases in Microsoft SQL Server. # Run with the following parameters: param( [parameter(Mandatory=$true)] [ValidateNotNull()] $ServerName, [parameter(Mandatory=$true)] [ValidateNotNull()] $BackupDirectory, ...
PowerShellCorpus/Github/Soverance_Powershell/Backups/UploadFTP.ps1
UploadFTP.ps1
# Scott McCutchen # soverance.com # # Script will open an FTP request on a server using the supplied credentials, # then UPLOAD and OVERWRITE the specified file. # This script transmits credentials using insecure protocols. # You should consider encrypting this script for a higher level of security. # Create F...
PowerShellCorpus/Github/Soverance_Powershell/Backups/RunLocalBackup.ps1
RunLocalBackup.ps1
######################################################## # Name: BackupScript.ps1 # Creator: Michael Seidl aka Techguy # CreationDate: 21.01.2014 # LastModified: 09.03.2014 # Version: 1.1 # Doc: http:...
PowerShellCorpus/Github/Soverance_Powershell/Backups/RunWebBackup.ps1
RunWebBackup.ps1
# Scott McCutchen # www.soverance.com # You'll need to run this script using your MySQL login credentials as parameters # Ex: ./RunWebBackup.ps1 -username $user -password $pass param ( [string]$username = $(throw "-username is required."), [string]$password = $(Read-Host "Input password :") ) # Name of ...
PowerShellCorpus/Github/Soverance_Powershell/Unreal/OrbisControl.ps1
OrbisControl.ps1
# © 2017 Soverance Studios # Scott McCutchen # soverance.com # This script navigates to the SCE PS4 Orbis directory, so that you can use the "orbis-ctrl" command # SYNTAX: # orbis-ctrl command [options] # # U./Orbisse orbis-ctrl /? or orbis-ctrl /help to display a list of command line options # # See full do...
PowerShellCorpus/Github/Soverance_Powershell/Unreal/StartFileServer.ps1
StartFileServer.ps1
# © 2017 Soverance Studios # Scott McCutchen # soverance.com # This script starts the Unreal cook server for consoles, and allows it to accept connections for debugging console games via Visual Studio # In Visual Studio, be sure to set up the project Properties correctly # FOR XBOX ONE: # Set the remote IP ad...
PowerShellCorpus/Github/Soverance_Powershell/Unreal/RunEtherealEditor.ps1
RunEtherealEditor.ps1
# Scott McCutchen # soverance.com # # A simple script to open the Ethereal project editor. # You can macro this somewhere for quick access. # The Editor must be set to open the most recent project on startup, # otherwise running this script will launch the UE4 Project Browser. # Navigate to your Engine directo...