full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/leerman_asp/MvcApplication1/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/leerman_asp/MvcApplication1/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/leerman_asp/MvcApplication1/packages/jQuery.UI.Combined.1.8.24/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/leerman_asp/MvcApplication1/packages/jQuery.1.8.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/leerman_asp/MvcApplication1/packages/jQuery.1.8.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/leerman_asp/MvcApplication1/packages/jQuery.1.8.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/isaacsgi_tableau-azure-cluster/scripts/stripedrives.ps1
stripedrives.ps1
Param([string]$MachineName) $PoolCount = Get-PhysicalDisk -CanPool $True $DiskCount = $PoolCount.count $PoolName = "TableauData" $PhysicalDisks = Get-StorageSubSystem -FriendlyName "Storage Spaces*" | Get-PhysicalDisk -CanPool $True New-StoragePool -FriendlyName $PoolName -StorageSubsystemFriendlyName "Storage Spa...
PowerShellCorpus/Github/wdedood_Azure/Start-AzureStorageDirCopy.ps1
Start-AzureStorageDirCopy.ps1
Function Start-AzureStorageDirCopy { <# .SYNOPSIS Copies all files from source - destination directory .DESCRIPTION All files within the source directory are forced copied to the destionation folder This is done in the same storage account context View and copy st...
PowerShellCorpus/Github/wdedood_Azure/Add-AzureFileShare.ps1
Add-AzureFileShare.ps1
function Add-AzureFileShare { <# .SYNOPSIS Creates an Azure file share with default folders .DESCRIPTION Create an Azure file share with some default folders. An Azure Storage Account needs to be created and the usernam and key must be known. .PARAMETER Username ...
PowerShellCorpus/Github/fromthewoods_Write-Log/Write-Log.Tests.ps1
Write-Log.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $moduleName = 'Write-Log' Remove-Module $moduleName -Force -ErrorAction SilentlyContinue Import-Module $here\$moduleName.psd1 -Force #$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".") #. "$here\$sut" Describe 'Write-Log...
PowerShellCorpus/Github/paulelong_Network-Capture-and-Analysis/SearchTrace/SearchTrace.ps1
SearchTrace.ps1
<#   .SYNOPSIS Searches specified files for traces or logs that meet the filter.   .DESCRIPTION Searches specified files for traces or logs that meet the filter. This requires Message Analyzer to be installed as it leverages its CmdLets.   .EXAMPLE SearchTrace *.cap tcp.port==80 Displays all files wihch ha...
PowerShellCorpus/Github/paulelong_Network-Capture-and-Analysis/BuiltInCapture/Stop-SimpleCapture.ps1
Stop-SimpleCapture.ps1
$s = Get-NetEventSession if(($s -eq $null) -or ($s.name -ne "SimpleCaptureScriptTrace")) { echo "Trace not started yet." } else { if($s.SessionStatus -eq "Running") { $s | Stop-NetEventSession } else { echo "Trace is already stopped" } } echo ("Trace is location " + ...
PowerShellCorpus/Github/paulelong_Network-Capture-and-Analysis/BuiltInCapture/Start-SimpleCapture.ps1
Start-SimpleCapture.ps1
$s = Get-NetEventSession if($s -eq $null) { $s = New-NetEventSession -Name SimpleCaptureScriptTrace $p = Add-NetEventPacketCaptureProvider -SessionName SimpleCaptureScriptTrace -TruncationLength 0 } if($s.Name -eq "SimpleCaptureScriptTrace") { Start-NetEventSession -Name SimpleCaptureScriptTrace } ...
PowerShellCorpus/Github/OPSTest_E2E_NewRepo_2017_3_23_11_14_50/.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/ChengYiWu_DomoPann/DomoPann/packages/Microsoft.AspNet.Providers.LocalDB.1.1/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$project...
PowerShellCorpus/Github/ChengYiWu_DomoPann/DomoPann/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/ChengYiWu_DomoPann/DomoPann/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/ChengYiWu_DomoPann/DomoPann/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/ChengYiWu_DomoPann/DomoPann/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/ChengYiWu_DomoPann/DomoPann/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/ChengYiWu_DomoPann/DomoPann/packages/jQuery.UI.Combined.1.8.24/Tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) . (Join-Path $toolsPath common.ps1) # Update the _references.js file Remove-Reference $scriptsFolderProjectItem $juiFileNameRegEx
PowerShellCorpus/Github/ChengYiWu_DomoPann/DomoPann/packages/jQuery.UI.Combined.1.8.24/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 $juiFileNameRegEx ...
PowerShellCorpus/Github/ChengYiWu_DomoPann/DomoPann/packages/jQuery.UI.Combined.1.8.24/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/ChengYiWu_DomoPann/DomoPann/packages/jQuery.1.8.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/ChengYiWu_DomoPann/DomoPann/packages/jQuery.1.8.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/ChengYiWu_DomoPann/DomoPann/packages/jQuery.1.8.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/lucdekens_vSphereDSC/vSphereDSCHelper.ps1
vSphereDSCHelper.ps1
enum VmwFolderType { Yellow Blue } function Enable-PowerCLI { <# .SYNOPSIS Load PowerCLI modules and PSSnapins .DESCRIPTION This function will load all requested PowerCLI modules and PSSnapins. The function will, depending on the installed PowerCLI version, determine what needs to be lo...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/PowerCLI/pcli01-PowerCLI.ps1
pcli01-PowerCLI.ps1
# Configure PowerCLi on vEng # # Tested platform: # Windows 2012 R2 # PowerShell v5 Production Preview # $tgtName = 'vEng.local.lab' $pcliName = 'VMware-PowerCLI-6.3.0-3737840.exe' $configName = $tgtName.Split('.')[0] Configuration $configName { Import-DscResource -ModuleName PSDesiredStateConfigur...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/vmwFolder/cf03-vCenter-Folder.ps1
cf03-vCenter-Folder.ps1
$tgtName = 'vEng.local.lab' $vCenterName = 'vcsa.local.lab' $configName = $tgtName.Split('.')[0] enum Ensure { Absent Present } enum VmwFolderType { Yellow Blue } Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-D...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/vmwFolder/cf01-vCenter-Folder.ps1
cf01-vCenter-Folder.ps1
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'Vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 ...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/vmwFolder/cf02-vCenter-Folder.ps1
cf02-vCenter-Folder.ps1
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'Vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 ...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/VmwDatacenter/cd01-vCenter-Datacenter.ps1
cd01-vCenter-Datacenter.ps1
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 ...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/VmwDatacenter/cd02-vCenter-Datacenter.ps1
cd02-vCenter-Datacenter.ps1
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 ...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Configurations/VmwDatacenter/cd03-vCenter-Datacenter.ps1
cd03-vCenter-Datacenter.ps1
enum Ensure { Absent Present } $tgtName = 'vEng.local.lab' $configName = 'vmw' Configuration $configName { param( [System.Management.Automation.PSCredential]$Credential ) Import-DscResource -ModuleName vSphereDSC Node $AllNodes.NodeName { $number = 0 ...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Tools/vSphereDSC-Module-To-Pull-Server.ps1
vSphereDSC-Module-To-Pull-Server.ps1
$moduleName = 'vSphereDSC' $sourceFolder = "$($env:userprofile)\OneDrive\BitBucket" $pullSrvName = 'pull.local.lab' $srcPath = "$($sourceFolder)\$($moduleName)" $pullSrv = "\\$($pullSrvName)\DscService\Modules" $localPath = $env:PSModulePath.split(';') | where{$_ -like "$($env:userprofile)*"} # Increment Ve...
PowerShellCorpus/Github/lucdekens_vSphereDSC/Tools/Test-DscConfiguration.ps1
Test-DscConfiguration.ps1
$tgtName = 'vEng.local.lab' $configName = $tgtName.Split('.')[0] Start-DscConfiguration -ComputerName $configName -Wait -Verbose -Force -Path .\DSC
PowerShellCorpus/Github/lucdekens_vSphereDSC/Tools/Get-TargetGuid.ps1
Get-TargetGuid.ps1
function Get-TargetGuid { param( [string]$TargetName ) $guidMaster = '\\Pull\Repository\guidMaster.csv' if(Test-Path -Path $guidMaster){ $guids = Import-Csv -Path $guidMaster } else{ $guids = @() } $tgtGuid = $guids | where{$_.target -eq $TargetNam...
PowerShellCorpus/Github/matt-ankerson_azure-sql-viewer/src/AzureSqlViewer.Web/Properties/PublishProfiles/sql-viewer - Web Deploy-publish.ps1
sql-viewer - Web Deploy-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'] = 'a4aed476-46c0-41b...
PowerShellCorpus/Github/mnosenko_scripts_gb/PowerShell/AddNewUser/AddNewUser/old_script.ps1
old_script.ps1
#загружаем необходимые модули Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -passthru Import-Module ActiveDirectory Import-Module Lync #определяем глобальные переменные которые будим использовать при выходе из функции $global:checkFName = 0 # индекс уникольности полного имени $global:c...
PowerShellCorpus/Github/mnosenko_scripts_gb/PowerShell/AddNewUser/AddNewUser/add_user.ps1
add_user.ps1
# # add_user.ps1 # #добавляем необходимые модули: Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -passthru Import-Module ActiveDirectory Import-Module Lync #обявляем глобальные переменные $Global:DC = kv1-dc1-v.gbukr.entp #добавляем функцию добавления групп по проектам function addToGroups ($na...
PowerShellCorpus/Github/mnosenko_scripts_gb/PowerShell/AddNewUser/AddNewUser/add_partners_to_AD.ps1
add_partners_to_AD.ps1
# # add_partners_to_AD.ps1 # Import-Module ActiveDirectory $date = Get-Date -UFormat %d.%m.%y $file1 = D:\Accounting\work\add_partners.xlsx #задаем имя файла, который вычитываем $file2 = "D:\Accounting\Out\partners_$date.xlsx" #задаем имя файла, в который записываем данные по логинам из AD #проверяем наличие ф...
PowerShellCorpus/Github/Zaf97_StudyTime/AppPackages/studytime_1.0.7.0_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/TimVanDorpe_Bierhalle/BierhalleCompleted/packages/Newtonsoft.Json.7.0.1/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://www.newtonsoft.com/json/install?version=" + $package.Version $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) if ($dte2.ActiveWindo...
PowerShellCorpus/Github/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/TimVanDorpe_Bierhalle/BierhalleCompleted/packages/jQuery.2.1.4/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/TimVanDorpe_Bierhalle/BierhalleCompleted/packages/jQuery.2.1.4/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/TimVanDorpe_Bierhalle/BierhalleCompleted/packages/jQuery.2.1.4/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/TimVanDorpe_Bierhalle/BierhalleCompleted/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/jegoodwin3_greybeard/scripts/greybeard.ps1
greybeard.ps1
# Sanity Aliases Set-Alias -name less -value more # Set some paths # Start with definitions for Git Base (MSYS) $env:USER_HOME="C:\Users\jgoodwin3" $env:CYGWIN_HOME="c:\cygwin64\Users\jgoodwin3" $env:GIT_HOME="C:\Users\jgoodwin3" # Prefer Active Tcl if default installation if (Test-Path "c:\Tcl\bin\tcl...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUUninstall.ps1
Get-WUUninstall.ps1
Function Get-WUUninstall { <# .SYNOPSIS Uninstall update. .DESCRIPTION Use Get-WUUninstall to uninstall update. .PARAM KBArticleID Update ID that will be uninstalled. .EXAMPLE Try to uninstall update with specific KBArticleID = KB958830 ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUList.ps1
Get-WUList.ps1
Function Get-WUList { <# .SYNOPSIS Get list of available updates meeting the criteria. .DESCRIPTION Use Get-WUList to get list of available or installed updates meeting specific criteria. There are two types of filtering update: Pre search criteria, Post search criteria. - Pre search works on...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUServiceManager.ps1
Get-WUServiceManager.ps1
Function Get-WUServiceManager { <# .SYNOPSIS Show Service Manager configuration. .DESCRIPTION Use Get-WUServiceManager to get available configuration of update services. .EXAMPLE Show currently available Windows Update Services on machine. PS C:\> Get-WU...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Invoke-WUInstall.ps1
Invoke-WUInstall.ps1
Function Invoke-WUInstall { <# .SYNOPSIS Invoke Get-WUInstall remotely. .DESCRIPTION Use Invoke-WUInstall to invoke Windows Update install remotly. It Based on TaskScheduler because CreateUpdateDownloader() and CreateUpdateInstaller() methods can't be called from a remote computer - E_ACCESSDENIED. ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WURebootStatus.ps1
Get-WURebootStatus.ps1
Function Get-WURebootStatus { <# .SYNOPSIS Show Windows Update Reboot status. .DESCRIPTION Use Get-WURebootStatus to check if reboot is needed. .PARAMETER Silent Get only status True/False without any more comments on screen. .EXAMPLE Check whether restart is necessary...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Update-WUModule.ps1
Update-WUModule.ps1
Function Update-WUModule { <# .SYNOPSIS Invoke Get-WUInstall remotely. .DESCRIPTION Use Invoke-WUInstall to invoke Windows Update install remotly. It Based on TaskScheduler because CreateUpdateDownloader() and CreateUpdateInstaller() methods can't be called from a remote computer - E_ACCESSDENIED. ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Remove-WUOfflineSync.ps1
Remove-WUOfflineSync.ps1
Function Remove-WUOfflineSync { <# .SYNOPSIS Unregister offline scaner service. .DESCRIPTION Use Remove-WUOfflineSync to unregister Windows Update offline scan file (wsusscan.cab or wsusscn2.cab) from current machine. .EXAMPLE Check if Offline Sync Service ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUInstallerStatus.ps1
Get-WUInstallerStatus.ps1
Function Get-WUInstallerStatus { <# .SYNOPSIS Show Windows Update Installer status. .DESCRIPTION Use Get-WUInstallerStatus to show Windows Update Installer status. .PARAMETER Silent Get only status True/False without any more comments on screen. .EXAMPLE Check if Windows Updat...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Remove-WUServiceManager.ps1
Remove-WUServiceManager.ps1
Function Remove-WUServiceManager { <# .SYNOPSIS Remove windows update service manager. .DESCRIPTION Use Remove-WUServiceManager to unregister Windows Update Service Manager. .PARAMETER ServiceID An identifier for the service to be unregistered. .EXAMPLE Try unregister Microsoft...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Add-WUOfflineSync.ps1
Add-WUOfflineSync.ps1
Function Add-WUOfflineSync { <# .SYNOPSIS Register offline scaner service. .DESCRIPTION Use Add-WUOfflineSync to register Windows Update offline scan file. You may use old wsusscan.cab or wsusscn2.cab from Microsoft Baseline Security Analyzer (MSBA) or System Management Server Inventory Tool for Mi...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUHistory.ps1
Get-WUHistory.ps1
Function Get-WUHistory { <# .SYNOPSIS Get list of updates history. .DESCRIPTION Use function Get-WUHistory to get list of installed updates on current machine. It works similar like Get-Hotfix. .PARAMETER ComputerName Specify the name of the computer to the remote connection. ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Hide-WUUpdate.ps1
Hide-WUUpdate.ps1
Function Hide-WUUpdate { <# .SYNOPSIS Get list of available updates meeting the criteria and try to hide/unhide it. .DESCRIPTION Use Hide-WUUpdate to get list of available updates meeting specific criteria. In next step script try to hide (or unhide) updates. There are two types of filtering upd...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Get-WUInstall.ps1
Get-WUInstall.ps1
Function Get-WUInstall { <# .SYNOPSIS Download and install updates. .DESCRIPTION Use Get-WUInstall to get list of available updates, next download and install it. There are two types of filtering update: Pre search criteria, Post search criteria. - Pre search works on server side, like example: ( ...
PowerShellCorpus/Github/tibmeister_POSH-Updater/Add-WUServiceManager.ps1
Add-WUServiceManager.ps1
Function Add-WUServiceManager { <# .SYNOPSIS Register windows update service manager. .DESCRIPTION Use Add-WUServiceManager to register new Windows Update Service Manager. .PARAMETER ServiceID An identifier for the service to be registered. Examples Of ServiceID: Windows Upd...
PowerShellCorpus/Github/dmitrypsc_PharmacyConnect/Source/PharmacyConnectWebApi/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/dmitrypsc_PharmacyConnect/Source/PharmacyConnectWebApi/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/dmitrypsc_PharmacyConnect/Source/PharmacyConnectWebApi/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/YoshikazuOgawa_Azure/configureAzure/configure-azure - コピー.ps1
configure-azure - コピー.ps1
#Requires -Version 4.0 <# .NOTES Author: y-ogawa Created: 9/July/2015 #> # CONSTANT Set-Variable -name LINUX -value 0 -option constant Set-Variable -name WINDOWS -value 1 -option constant Set-Variable -name SINGLE_NIC -value 0 -option constant Set-Variable -name MULTI_NIC -value 1 -option constant Set-Va...
PowerShellCorpus/Github/YoshikazuOgawa_Azure/configureAzure/configure-azure-dev.ps1
configure-azure-dev.ps1
#Requires -Version 3.0 <# .NOTES Author: y-ogawa Created: 9/July/2015 #> # CONSTANT Set-Variable -name LINUX -value 0 -option constant Set-Variable -name WINDOWS -value 1 -option constant Set-Variable -name SINGLE_NIC -value 0 -option constant Set-Variable -name MULTI_NIC -value 1 -option constant Set-Va...
PowerShellCorpus/Github/YoshikazuOgawa_Azure/configureAzure/configure-azure.ps1
configure-azure.ps1
#Requires -Version 4.0 <# .NOTES Author: y-ogawa Created: 9/July/2015 #> # CONSTANT Set-Variable -name LINUX -value 0 -option constant Set-Variable -name WINDOWS -value 1 -option constant Set-Variable -name SINGLE_NIC -value 0 -option constant Set-Variable -name MULTI_NIC -value 1 -option constant Set-Va...
PowerShellCorpus/Github/YoshikazuOgawa_Azure/configureAzure/create-virtualnetwork-xml.ps1
create-virtualnetwork-xml.ps1
#Requires -Version 3.0 Set-Variable -name VNETCONF -value "netcfg.xml" -option constant $input_subnet_name = @("") $input_subnet_prefix = @("") $input_vnet_name = Read-Host "Please enter create Virtual Network name" $input_affinity_group = Read-Host "Please enter your AffinityGroup" $input_address_prefix = Re...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/jobs2.ps1
jobs2.ps1
cls $SQLserver=@("oma-s0") # Array for user input single or mutiple SQL Server instances $SQLserverDB=@("tool") #Array to hold databases per instance $UserInputSQLInstance=Read-Host "Enter SQL Server Instance Name" $JobExeuctions=1 if ($UserInputSQLInstance) #if empty script will exit with error { $UserInput...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/users15.ps1
users15.ps1
Param( $users_ad = "\\172.20.0.151\ps\users\users15days.csv", $path = "\\172.20.0.151\ps\users\Сотрудники за 15 дней.xlsx" ) $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $OU = [ADSI]"LDAP://CN=Users,DC=oma,DC=local" $objSearcher.SearchRoot = $OU $objSearcher.PageSize = 1...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/converterAll.ps1
converterAll.ps1
Param( $csvFile = "\\172.20.0.151\ps\users\allusers.csv", $path = "\\172.20.0.12\User\buch\users\Полный список сотрудников.xlsx" ) If (Test-Path $path){ Write-Host Deleting $path Remove-Item $path } $processes = Import-Csv -Path $csvFile $Excel = New-Object -ComObject excel.application ...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/usersAll.ps1
usersAll.ps1
Param( $users_ad = "\\172.20.0.151\ps\users\allusers.csv", $path = "\\172.20.0.12\User\buch\users\Полный список сотрудников.xlsx" ) $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $OU = [ADSI]"LDAP://CN=Users,DC=oma,DC=local" $objSearcher.SearchRoot = $OU $objSearcher.PageSi...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/converter15.ps1
converter15.ps1
Param( $csvFile = "\\172.20.0.151\ps\users\users15days.csv", $path = "\\172.20.0.12\User\buch\users\Сотрудники.xlsx" ) If (Test-Path $path){ Write-Host Deleting $path Remove-Item $path } $processes = Import-Csv -Path $csvFile $Excel = New-Object -ComObject excel.application $Excel.v...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/JobsFromSQL.ps1
JobsFromSQL.ps1
#Create a new Excel object using COM $Excel = New-Object -ComObject Excel.Application $Excel.visible = $True $Excel = $Excel.Workbooks.Add() $Sheet = $Excel.Worksheets.Item(1) #Counter variable for rows $intRow = 1 #Read thru the contents of the SQL_Servers.txt file foreach ($instance in get-content ...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/111.ps1
111.ps1
$week = (Get-Date).AddDays(-15).Date $users_ad = "\\172.20.0.151\ps\users\users15days.csv" write-Host "Getting users created within a week." If (Test-Path $users_ad){ Write-Host Deleting $users_ad Remove-Item $users_ad } $ADuserInWeek = Get-ADUser -Filter * -Properties * | where ...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/goodScriptUsers.ps1
goodScriptUsers.ps1
Param( $users_ad = "\\172.20.0.151\ps\users\allusers.csv", $path = "\\172.20.0.12\User\buch\users\Сотрудники.xlsx" ) $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $OU = [ADSI]"LDAP://CN=Users,DC=oma,DC=local" $objSearcher.SearchRoot = $OU $objSearcher.PageSize = 1000 $w...
PowerShellCorpus/Github/skortabeast_ps_users_from_ad/scripts/usersAll.ps1
usersAll.ps1
Param( $users_ad = "\\172.20.0.151\ps\users\allusers.csv", $path = "\\172.20.0.12\User\buch\users\Полный список сотрудников.xlsx" ) $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $OU = [ADSI]"LDAP://CN=Users,DC=oma,DC=local" $objSearcher.SearchRoot = $OU $objSearcher.PageSi...
PowerShellCorpus/Github/Ar3sDevelopment_Caelan.Frameworks.Api/Caelan.Frameworks.Api/packages/EntityFramework.6.1.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 # MIIa4AYJKoZIhvcNAQcCoIIa0TCCGs0CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/Ar3sDevelopment_Caelan.Frameworks.Api/Caelan.Frameworks.Api/packages/EntityFramework.6.1.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/Ar3sDevelopment_Caelan.Frameworks.Api/Caelan.Frameworks.Api/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/jasonirwin_ModelErrorVisualizer/packages/EntityFramework.5.0.0-rc/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/jasonirwin_ModelErrorVisualizer/packages/EntityFramework.5.0.0-rc/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/jasonirwin_ModelErrorVisualizer/packages/Microsoft.AspNet.Providers.LocalDB.1.0/tools/Install.ps1
Install.ps1
param($installPath, $toolsPath, $package, $project) try { # Set up variables $timestamp = (Get-Date).ToString('yyyyMMddHHmmss') $projectName = [IO.Path]::GetFileName($project.ProjectName.Trim([IO.PATH]::DirectorySeparatorChar, [IO.PATH]::AltDirectorySeparatorChar)) $catalogName = "aspnet-$projectNa...
PowerShellCorpus/Github/jasonirwin_ModelErrorVisualizer/packages/NuGet.Core.1.6.2/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/jasonirwin_ModelErrorVisualizer/packages/NuGet.Core.1.6.2/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/jasonirwin_ModelErrorVisualizer/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/jasonirwin_ModelErrorVisualizer/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/Corflow_PowerShell/Get-IPInfo.ps1
Get-IPInfo.ps1
function Get-IPInfo { <# .Synopsis Get's IP information from 1 to 50 computers. .DESCRIPTION Use this function to gather the IP Address information on 1 or up to 50 computers. .EXAMPLE PS C:\> Get-IPInfo localhost PSComputerName : 94200-2-9097 IP Address : 10.114.50.90 IP Subnet : 255....
PowerShellCorpus/Github/Corflow_PowerShell/Speak-Text.ps1
Speak-Text.ps1
function Speak-Text { <# .Synopsis Speaks text from a .txt file referenced with the -TextPath switch. .DESCRIPTION Speaks text from a .txt file referenced with the -TextPath switch, this works on one or multiple systems. .EXAMPLE Speak-Text -ComputerName localhost -TextPath C:\Voice\Phrases.txt .EXAMPLE An...
PowerShellCorpus/Github/Corflow_PowerShell/Monitor_HOSTS.ps1
Monitor_HOSTS.ps1
#This is a script that you would schdeule to run every 5 minutes to test the connectivity of one or more systems. #Email Alert Parameters $to = "Steve.Ross@PremiseHealth.com" $from = "Reports@PremiseHealth.com" $smtpserver = "Relay.PremiseHealth.com" ##################################################...
PowerShellCorpus/Github/Corflow_PowerShell/PING-SUBNET.ps1
PING-SUBNET.ps1
[string]$Subnet, [int]$StartIP, [int]$EndIP <# $StartIP..$EndIP | foreach { Test-Connection "$Subnet$_" -Count 1 } #> $StartIP..$EndIP | where { Test-Connection "$Subnet$_" -Count 1 } | foreach { "$Subnet$_" }
PowerShellCorpus/Github/Corflow_PowerShell/Get-Subnet.ps1
Get-Subnet.ps1
Function Get-Subnet { <# .SYNOPSIS Scan subnet machines .DESCRIPTION Use Get-SubNetItems to receive list of machines in specific IP range. .PARAMETER StartScanIP Specify start of IP range. .PARAMETER EndScanIP Specify end of IP ran...