full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/Seix_Rep/DWS/UF1/Web 0 - Peticio/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 1/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 1/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 1/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 1/Solucion/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 1/Solucion/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2/Solucion/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2/Solucion/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2 v2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2 v2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2 v2/Solucion/packages/jQuery.2.1.1/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2 v2/Solucion/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/Seix_Rep/DWS/UF1/Web 1 - Usuarios parte 2 v2/Solucion/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/Seix_Rep/DWS/Identity/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/Seix_Rep/DWS/Identity/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/OPS-E2E-PPE_E2E_D_Provision_2017_6_1_31_58_28/.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/jlhuston_Install_PowerShell/Source/040-EnsureAdminPrivleges.ps1
040-EnsureAdminPrivleges.ps1
# Be sure that we're running as an elevated admin account; if not, elevate us. # Get the ID and security principal of the current user account $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) # Get the se...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/970-main-HandleInstalled.ps1
970-main-HandleInstalled.ps1
# Handle the case where a version of the app is already installed. if ($TestVer -ne $null) { if ($Uninstall) { # Uninstall the installed version myLogThis -EventId 12 -Message 'Calling out to myUninstallOldApplication' $UninstallResult = myUninstallOldApplication $InstallResult = $UninstallResul...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/990-main-FinalResult.ps1
990-main-FinalResult.ps1
# Determine the final exit code to be returned. if ($UninstallResult -eq 3010) { $FinalResult = 3010 } else { $FinalResult = $InstallResult } Write-Host "`r`n`r`nFinal result being returned is code $FinalResult" myLogThis -EventId 9 -Message "Final result being returned is $FinalResult" Start-Sleep -Sec...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/050-EnsureWorkingDirectory.ps1
050-EnsureWorkingDirectory.ps1
# Make sure that we're in the same directory as our script to start Set-Location (Get-Item -Path $myInvocation.MyCommand.Path).DirectoryName
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/290-myCompareVersionStrings.ps1
290-myCompareVersionStrings.ps1
# This function parses two dotted version strings and returns a value, -1, 0, 1, depending if the values are less, equal, or greater than each other. # -1 = A newer version is installed # 0 = The same version is installed # 1 = An older version is installed; should upgrade in this instance. Function myCompareVers...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/220-myGetCurrentVersionFromMSI.ps1
220-myGetCurrentVersionFromMSI.ps1
# This function returns the version string from the MSI registry database. If not found to be installed, returns $null. Function myGetCurrentVersionFromMSI { param ([Parameter(Mandatory=$True)][String]$Query, [Parameter(Mandatory=$True)][String]$VersionValue) $FunctionTop = "myGetCurrentVersionFromMSI`r`n`r`n" ...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/010-Parameters.ps1
010-Parameters.ps1
param ([switch] $Install, [alias("Upgrade")][switch] $Update, [switch] $Uninstall, [switch] $CheckVersion) # The switches above are used to control program execution flow and instruct the script on what to do
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/060-LoggingFunctions.ps1
060-LoggingFunctions.ps1
$EventMessageTop = ($AppName + ' ' + $AppVersion + "`r`n`r`n") Function myEnsureLogExists { if ((Get-EventLog -List | where { $_.Log -eq ($CompanyName + ' Mgmt') }).Length -eq 0) { New-EventLog -LogName ($CompanyName + ' Mgmt') -Source 'Install' Limit-EventLog -LogName ($CompanyName + ' Mgmt') -Overflow...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/200-myVersionCleanup.ps1
200-myVersionCleanup.ps1
# This function cleans up version strings into decimal separated sections. Function myVersionCleanup { param ([Parameter(Mandatory=$True)][String]$Version) $FunctionTop = "myVersionCleanup`r`n`r`n" myLogThis -EventId 21 -Message ($FunctionTop + 'Version : ' + $Version) myLogThis -EventId 22 -Message 'Con...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/210-myGetCurrentVersionFromRegistry.ps1
210-myGetCurrentVersionFromRegistry.ps1
# This function gets the version string from the registry. If not found to be installed, returns $null Function myGetCurrentVersionFromRegistry { param ([Parameter(Mandatory=$True)][String]$KeyName, [Parameter(Mandatory=$True)][String]$VersionValue) $FunctionTop = "myGetCurrentVersionFromRegistry`r`n`r`n" my...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/960-main-HandleNotInstalled.ps1
960-main-HandleNotInstalled.ps1
# Handle the case where the app isn't already installed. if ($TestVer -eq $null) { # The app doesn't appear to be installed # NOTE: If further tests for other locations are necessary, perform them here until we get the version data myLogThis -EventId 3 -Message 'No application version currently installed'...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/920-main-Defaults.ps1
920-main-Defaults.ps1
# Set our return values to 0 to start off with so that we have something definitive to return at the end. $UninstallResult = 0 $InstallResult = 0
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/900-main-Preliminaries.ps1
900-main-Preliminaries.ps1
# Toss up a banner and retitle the main window. $Host.UI.RawUI.WindowTitle=($CompanyName + ' Management of ' + $AppName + ' ' + $AppVersion) Clear-Host Write-Host Write-Host -ForegroundColor Blue (' Computer Management Script for ' + $CompanyName + ' computers') Write-Host Write-Host -ForegroundColor Green (' **'...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/910-main-DetermineAction.ps1
910-main-DetermineAction.ps1
# If no options are specified (or more than one were specified), ask the user what to do if (($Install.ToBool() + $Update.ToBool() + $Uninstall.ToBool() + $CheckVersion.ToBool()) -ne 1) { # Force all switches to $False $Install = $False; $Update = $False; $Uninstall = $False; $CheckVersion = $False myLogThi...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source/300-myStampRegistry.ps1
300-myStampRegistry.ps1
# This function stamps the registry to indicate that this script has been run. # Use this stamp with SCCM when targeting blanket -Update runs. Function myStampRegistry { $FunctionTop = "myStampRegistry`r`n`r`n" myLogThis -EventId 70 -Message ($FunctionTop + 'Start of function') $Path = ("HKLM:\SOFTWARE\Pri...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/120-myConfigureApplication.ps1
120-myConfigureApplication.ps1
# This function configures the application; only called if the install succeeded. Function myConfigureApplication { $FunctionTop = "myConfigureApplication`r`n`r`n" myLogThis -EventId 60 -Message ($FunctionTop + 'Starting function') Write-Host "`r`nConfiguring $AppName..." # Add policy to prevent upda...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/110-myInstallNewApplication.ps1
110-myInstallNewApplication.ps1
# This function installs the new application. Function myInstallNewApplication { $FunctionTop = "myInstallNewApplication`r`n`r`n" myLogThis -EventId 50 -Message ($FunctionTop + 'Starting function') # Ensure that we can get to the actual installer file if ((Test-Path -Path $InstallPackage) -eq $False) { ...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/950-main-GetExistingInstallVersion.ps1
950-main-GetExistingInstallVersion.ps1
# Get the version number of the currently installed app. If this isn't installed, we'll get $null back myLogThis -EventId 10 -Message 'Calling out to myGetCurrentVersionFromMSI to get currently installed version' $TestVer = myGetCurrentVersionFromMSI -Query "*Java*Update*" -VersionValue "DisplayVersion"
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/100-myUninstallOldApplication.ps1
100-myUninstallOldApplication.ps1
# This function handles the uninstallation of the old version(s) of the application. Function myUninstallOldApplication { $FunctionTop = "myUninstallOldApplication`r`n`r`n" myLogThis -EventId 40 -Message ($FunctionTop + 'Starting function') Write-Host "`r`nUninstalling old version of $AppName..." # Termi...
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/020-GlobalVariables.ps1
020-GlobalVariables.ps1
# Update these global variables, used throughout. $AppName='Application Name' $AppVersion='Application Version for Comparison' $CompanyName='My Company'
PowerShellCorpus/Github/jlhuston_Install_PowerShell/Source2/030-CalculatedVariables.ps1
030-CalculatedVariables.ps1
# Calculated variables. These are created from the above global variables. $AppMainVersion = $AppVersion.split('.') $InstallPackage=("jre1." + $AppMainVersion[0] + "." + $AppMainVersion[1] + "_" + $AppMainVersion[2].substring(0,($AppMainVersion[2].Length-1)) + ".msi")
PowerShellCorpus/Github/dmuegge_MTSIsilon/Examples/Isilon_Quota_Report.ps1
Isilon_Quota_Report.ps1
# Load Modules Import-Module MTSIsilon Import-Module MTSMSExcel Import-Module MTSGeneral # Ignore certificate errors Disable-CertificateValidation # Set required connection information $PWDFile = 'C:\Users\dmuegge\Dropbox\DTools\Scripts\PS\!Passwords\MLABDEV10-dmuegge-ISI-Admin.txt' $DeptFolderFile = 'C:\...
PowerShellCorpus/Github/rogergm92_WSSA/WebApplicationSA/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/rogergm92_WSSA/WebApplicationSA/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/g0t4_cdd-workshop/MSSQL/examples/Restore dev from before.ps1
Restore dev from before.ps1
Import-Module sqlps -DisableNameChecking $databaseName = "payroll" $restoreFrom = join-path (Get-Location) "$databaseName-before.bak" $serverPath = "SQLSERVER:\SQL\localhost\Default" Restore-SqlDatabase -Path $serverPath -Database $databaseName -BackupFile $restoreFrom -ReplaceDatabase
PowerShellCorpus/Github/g0t4_cdd-workshop/MSSQL/examples/Create compare from before.ps1
Create compare from before.ps1
Import-Module sqlps -DisableNameChecking $databaseName = "payroll_compare" $restoreFrom = join-path (Get-Location) "payroll-before.bak" $serverPath = "SQLSERVER:\SQL\localhost\Default" if(Test-Path (join-path $serverPath "Databases\$databaseName")) { Invoke-SqlCmd "Drop database $databaseName" } Invoke-Sql...
PowerShellCorpus/Github/g0t4_cdd-workshop/MSSQL/examples/Backup dev to before.ps1
Backup dev to before.ps1
Import-Module sqlps -DisableNameChecking $databaseName = "payroll" $backupTo = join-path (Get-Location) "$databaseName-before.bak" $serverPath = "SQLSERVER:\SQL\localhost\Default" Backup-SqlDatabase -Path $serverPath -Database $databaseName -BackupFile $backupTo
PowerShellCorpus/Github/g0t4_cdd-workshop/MSSQL/examples/Backup dev to after.ps1
Backup dev to after.ps1
Import-Module sqlps -DisableNameChecking $databaseName = "payroll" $backupTo = join-path (Get-Location) "$databaseName-after.bak" $serverPath = "SQLSERVER:\SQL\localhost\Default" Backup-SqlDatabase -Path $serverPath -Database $databaseName -BackupFile $backupTo
PowerShellCorpus/Github/g0t4_cdd-workshop/MSSQL/examples/Restore dev from after.ps1
Restore dev from after.ps1
Import-Module sqlps -DisableNameChecking $databaseName = "payroll" $restoreFrom = join-path (Get-Location) "$databaseName-after.bak" $serverPath = "SQLSERVER:\SQL\localhost\Default" Restore-SqlDatabase -Path $serverPath -Database $databaseName -BackupFile $restoreFrom -ReplaceDatabase
PowerShellCorpus/Github/ashbyca_pstoolbox/Disable_SMBv1_W10.ps1
Disable_SMBv1_W10.ps1
echo "Disable/Remove SMBv1 Server/Client:" echo " -------------------------------------------------" echo "... Audit SMBv1 Traffic" Set-SmbServerConfiguration –AuditSmb1Access $true Get-WinEvent -LogName Microsoft-Windows-SMBServer/Audit echo " -------------------------------------------------" echo "... Ge...
PowerShellCorpus/Github/BrendanSturges_setExtensionAttribute/setADExtensionAttributes.ps1
setADExtensionAttributes.ps1
Function Get-FileName($initialDirectory){ [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog $OpenFileDialog.initialDirectory = $initialDirectory $OpenFileDialog.filter = "All files (*.*)| *.*" $OpenFileDialo...
PowerShellCorpus/Github/ddarwent_PShell/FixLicensing.ps1
FixLicensing.ps1
$servers = Get-Content "C:\Servers.txt" $warn = 0 Write-Host "Starting Check" foreach ($s in $servers) { ## Check for the update folder if(Test-Path \\$s\d$\update){ Write-Host "Update folder exists"} else{new-item \\$s\d$\update -itemtype directory Write-Host "Update folder created"} ## Copy the files Cop...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/MusicAppPart2a-publish.ps1
MusicAppPart2a-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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/barhoum - Web Deploy-publish.ps1
barhoum - 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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/MusicManager20161214055047 - Web Deploy-publish.ps1
MusicManager20161214055047 - 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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/BarhoumMusicAppPart2a-publish.ps1
BarhoumMusicAppPart2a-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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/barhoum - Web Deploy (3)-publish.ps1
barhoum - Web Deploy (3)-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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/MusicManager20161214033605 - Web Deploy-publish.ps1
MusicManager20161214033605 - 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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/barhoum - Web Deploy (2)-publish.ps1
barhoum - Web Deploy (2)-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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/Monzor_MusicManager2017/src/MusicFall2016/Properties/PublishProfiles/MohanadBarhoumMusicApp2a - Web Deploy-publish.ps1
MohanadBarhoumMusicApp2a - 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'] = 'bd7a40c3-8a61-46b...
PowerShellCorpus/Github/ajdinaliu_powershell/PSScript.ps1
PSScript.ps1
#TEST
PowerShellCorpus/Github/fzed51_les_breves_du_design_et_du_web/Publish-It.ps1
Publish-It.ps1
<# .SYNOPSIS Publie la brève en cours et prépare la brève suivante .EXAMPLE Publish-It #> [CmdletBinding()] [OutputType([Void])] Param ( [switch] $NoNewVersion ) begin { [string]$FileInfo = "./info.json" [psobject]$info = get-content $FileInfo | ConvertFrom-Json $git = Get-Comm...
PowerShellCorpus/Github/achalddave_Desktop-Cleanup/DesktopCleanup.ps1
DesktopCleanup.ps1
$OriginalLocation = Get-Location $ErrorActionPreference = 'SilentlyContinue' Set-Location ${env:USERPROFILE}\Desktop $arr_types = @('Folders','Docs','Images','Code','Executables','Audio','Video') $available = ls | where {$_.name -ne 'AutoOrganized' -and $_.name -notMatch '^ign' } $Folders = $available | wher...
PowerShellCorpus/Github/achalddave_Desktop-Cleanup/UndoClean.ps1
UndoClean.ps1
$origLoc = Get-Location cd ${env:USERPROFILE}\Desktop\ if (!(Test-Path AutoOrganized)) { exit } cd AutoOrganized foreach ($subfolder in Get-ChildItem) { cd $subfolder foreach ($file in Get-ChildItem) { mv $file ${env:USERPROFILE}\Desktop } cd .. } cd ${env:USERPROFILE}\Desktop\ rm -r AutoOrganized cd...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/install.ps1
install.ps1
[CmdletBinding()] param ( [string]$Path ) $localpath = $(Join-Path -Path (Split-Path -Path $profile) -ChildPath '\Modules\dbareports') try { if ($Path.length -eq 0) { if ($PSCommandPath.Length -gt 0) { $path = Split-Path $PSCommandPath if ($path -match "github") { $path = $loca...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/tests/Estate.Tests.ps1
Estate.Tests.ps1
# Runs a quick check against the servers returned from the $query # ONLY CHECKS DEFAULT INSTANCES $CentralDBAServer = '' $CentralDatabaseName = '' $Query = " SELECT [ServerName] ,[InstanceName] ,[Port] FROM [dbo].[InstanceList] Where Inactive = 0 AND NotContactable = 0 " try { $AlltheServers = Invoke-Sqlcm...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/tests/InModule.Help.Tests.ps1
InModule.Help.Tests.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.119 Created on: 4/12/2016 1:11 PM Created by: June Blender Organization: SAPIEN Technologies, Inc Filename: *.Help.Tests.ps1 =======...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/TestAccess.ps1
TestAccess.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .NOTES dbareports Po...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/Shared.ps1
Shared.ps1
# This needs to be here becuse it's not part of a module. $null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") Function Connect-SqlServer { <# .SYNOPSIS Internal function that creates SMO server object. Input can be text or SMO.Server. #> [CmdletBinding()] param ( [P...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/LogFileErrorMessages.ps1
LogFileErrorMessages.ps1
<# .SYNOPSIS Script to scrape the PowerShell log files and enter into DBA Database for Reporting .DESCRIPTION This script will scrape the log files int eh log folder and add errors and warnings to the dbareports database for easy reporting .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAW...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/DiskSpace.ps1
DiskSpace.ps1
<# Hopefully fixed please check # This currently doesn't work so well with clusters. Will have to slightly reorg database? # I dont know if the above is still true. Plz evaluate. I think it is. #> <# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Windows In...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/ServerOSInfo.ps1
ServerOSInfo.ps1
<# Hopefully this fixes this bit # This currently doesn't work so well with clusters. Will have to slightly reorg database? # I dont know if the above is still true. Plz evaluate. I think it is. Other useful things $system.Manufacturer $system.Model Lots of stuff in OS ...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/SuspectPages.ps1
SuspectPages.ps1
<# .SYNOPSIS .DESCRIPTION .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/CleanLogs.ps1
CleanLogs.ps1
<# .SYNOPSIS .DESCRIPTION .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/Databases.ps1
Databases.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .NOTES dbareports Po...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/AgentJobServer.ps1
AgentJobServer.ps1
<# # ROB IS THIS SUPPOSED TO KEEP HISTORICAL INFORMATION? IF SO $UPDATE WILL ALWAYS BE FALSE .SYNOPSIS Adds data to the DBA database for agent job results in a server list .DESCRIPTION Connects to a server list and iterates though reading the agent job results and adds data to the DBA Database - Thi...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/SQLInfo.ps1
SQLInfo.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather SQL Configuration Info and save to the Info.SQLInfo table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather SQL Configuration Info and save to the Info.SQLInfo table .NOTES...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/setup/powershell/AgentJobDetail.ps1
AgentJobDetail.ps1
<# .SYNOPSIS Adds data to the DBA database for agent job results in a server list .DESCRIPTION Connects to a server list and iterates though reading the agent job results and adds data to the DBA Database - This is run as an agent job on LD5v-SQL11n-I06 .NOTES dbareports PowerShell module (https:/...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/New-DbrSqlAlias.ps1
New-DbrSqlAlias.ps1
Function New-DbrSqlAlias { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU G...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Add-DbrCredential.ps1
Add-DbrCredential.ps1
Function Add-DbrCredential { <# .SYNOPSIS Adds a credential and proxy for SQL Agent Jobs to the dbareports server .DESCRIPTION This will create a credential and a proxy on the dbareports server using the install configuration and add the PowerShell and CmdExec subsystems .PARAMETER JobCredential The Userna...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Install-DbaReportsClient.ps1
Install-DbaReportsClient.ps1
Function Install-DbaReportsClient { <# .SYNOPSIS .DESCRIPTION Installs the following on the local client: Config file at Documents\WindowsPowerShell\Modules\dbareports\dbareports-config.json The config file is pretty simple. This is for Windows (Trusted) Auth { "Username": null, "Sql...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Template.ps1
Template.ps1
Function Verb-SqlNoun { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrInstanceList.ps1
Get-DbrInstanceList.ps1
Function Get-DbrInstanceList { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the G...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrNewJob.ps1
Get-DbrNewJob.ps1
Function Get-DbrNewJob { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gen...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrAllinfo.ps1
Get-DbrAllinfo.ps1
Function Get-DbrAllInfo { <# .SYNOPSIS Gets all of the information in the dbareports database about an instance .DESCRIPTION Gets all of the information in the dbareports database about an instance and displays it the screen or into a text file .PARAMETER SQLInstance The Server\Instance name to gather info...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Set-DbrInstanceInactiveInInventory.ps1
Set-DbrInstanceInactiveInInventory.ps1
Function Set-DbrInstanceInactiveInInventory { <# .SYNOPSIS For Instances that have been decommisioned but you still want to report on .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbarepo...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Show-SqlServerFileSystem.ps1
Show-SqlServerFileSystem.ps1
Function Show-SqlServerFileSystem { <# .SYNOPSIS Shows file system on remote SQL Server and returns the directory name of the directory you select. .DESCRIPTION Similar to the remote file system popup you see when browsing a remote SQL Server in SQL Server Management Studio, this command allows you to traverse...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrAgentJob.ps1
Get-DbrAgentJob.ps1
Function Get-DbrAgentJob { <# .SYNOPSIS Gets all of the dbareports SQL Agent Job information using the config file .DESCRIPTION Gets all of the dbareports SQL Agent Job information using the config file .PARAMETER Force Displays all of the information rather than the default information .NOTES dbarep...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/DynamicParams.ps1
DynamicParams.ps1
<# These are all the functions for tab completion (auto-population of params) To use, place this after params in a function DynamicParam { if ($source) { return (Get-ParamSqlXyz -SqlServer $Source -SqlCredential $SourceCredential) } } #> Function Get-ParamSqlServerConfigs { <# .SYNOPSIS Internal ...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Remove-DbrServerFromInventory.ps1
Remove-DbrServerFromInventory.ps1
Function Remove-DbrServerFromInventory { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Uninstall-DbaReports.ps1
Uninstall-DbaReports.ps1
Function Uninstall-DbaReports { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free sof...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrDetailedInfo.ps1
Get-DbrDetailedInfo.ps1
Function Get-DbrDetailedINfo { <# .SYNOPSIS Gets all of the information in the dbareports database about the estate .DESCRIPTION .PARAMETER ToScreen Outputs results to screen default parameter .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithA...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrConfig.ps1
Get-DbrConfig.ps1
Function Get-DbrConfig { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gen...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Add-DbrAgentJob.ps1
Add-DbrAgentJob.ps1
Function Add-DbrAgentJob { <# .SYNOPSIS Creates a singel step SQL Agent job using the dba configuration .DESCRIPTION This will create a SQL Agent Job. It will use the configuration from the dbareports install and create the job on the the dbareports folder .PARAMETER JobName The name of the JOb .PARAMET...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Add-DbrServerToInventory.ps1
Add-DbrServerToInventory.ps1
Function Add-DbrServerToInventory { <# .SYNOPSIS Adds an instance or an array of instances to the dbareports database using the config file Blah de blah .DESCRIPTION This command will add a SQL Instance or an array of instances to the dbareports database using the config file generated at install or via the dbrc...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Update-DbrConnstring.ps1
Update-DbrConnstring.ps1
Function Update-DbrConnstring { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free sof...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/SharedFunctions.ps1
SharedFunctions.ps1
# These are shared, mostly internal functions. Function Update-dbareports { <# .SYNOPSIS Exported function. Updates dbareports. Deletes current copy and replaces it with freshest copy. .EXAMPLE Update-dbareports #> Invoke-Expression (Invoke-WebRequest -UseBasicParsing http://git.io/vn1hQ).Content }...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrDiskSpace.ps1
Get-DbrDiskSpace.ps1
Function Get-DiskSpace { <# .SYNOPSIS Displays Disk information for all local drives on a server .DESCRIPTION Returns a custom object with Server name, name of disk, label of disk, total size, free size and percent free. .PARAMETER ComputerName The SQL Server (or server in general) that you're connecting ...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrServerLoad.ps1
Get-DbrServerLoad.ps1
<#/* Adding a new server to the DBA Database Enter the corect values against the variables The errors will tell you what you have done wrong AUTHOR - ROb Sewell DATE - 04/05/2015 - Initial - 10/08/2015 - Added some failsafes !! - 18/08/2015 - Added non contactabel and inactive to the query -- 25/0920...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Get-DbrInfo.ps1
Get-DbrInfo.ps1
<# /* Various queries for getting information out of the DBA Database Connect to Server hosting DBA Database Use where IL.Inactive = 0 to only get active instances */ -- Generic infomration about Servers and locations and environments Select IL.ServerName, IL.InstanceName, IL.Environ...
PowerShellCorpus/Github/The-Amazing-SQL-Community-Collaborative_A-test-Repo/functions/Install-DbaReports.ps1
Install-DbaReports.ps1
Function Install-DbaReports { <# .SYNOPSIS Installs both the server and client components for dbareports. To install only the client component, use Install-DbaReportsClient. .DESCRIPTION Installs the following on the specified SQL server: Database with all required tables, stored procedures, extended prop...