full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/mhsohail_CustomDomain/CustomDomain/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/OPSTest_E2E_NewRepo_2017_3_23_9_33_16/.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/erhur777_Vio-Master/util/openstack-cli-windows/openstack-cli-env.ps1
openstack-cli-env.ps1
$env:OS_AUTH_URL="https://your-server.domain.com:5000/v2.0" $env:OS_TENANT_NAME="your-project" $env:OS_USERNAME="your-user" #CACERT is optional, and only use it if you don't have a CA-signed certificate for your cloud #$env:OS_CACERT="C:\your\path\vio.pem" $Password = Read-Host -Prompt "OpenStack User Password?" -...
PowerShellCorpus/Github/Wizcorp_setit/windows.ps1
windows.ps1
write-host "Set up chocolatey" get-packageprovider -name chocolatey -force -forcebootstrap write-host "Set up nuget" get-packageprovider -name nuget -force -forcebootstrap write-host "Installing packages" install-package GoogleChrome -force -forcebootstrap install-package nodejs -force -forcebootstrap instal...
PowerShellCorpus/Github/tsugliani_NSX-Scripts/nsx-resolve-issues.ps1
nsx-resolve-issues.ps1
# # NSX-Resolve-Issues # Description: FIX NSX Cluster Status seen as unresolved. # Author: Timo sugliani <tsugliani@vmware.com> # Version: 1.1 # Date: 09/10/2014 # # Global environment variables $vcenter_hostname = "vc-cap-a.corp.local" $vcenter_port = 443 $vcenter_username = "corp\administrator" $vcen...
PowerShellCorpus/Github/tsugliani_NSX-Scripts/nsx-playground.ps1
nsx-playground.ps1
# Global environment variables $nsxHost = "10.152.129.58:13433" $nsxUser = "admin" $nsxPass = "password1!" # Create authentication header with base64 encoding $EncodedAuthorization = [System.Text.Encoding]::UTF8.GetBytes($nsxUser + ':' + $nsxPass) $EncodedPassword = [System.Convert]::ToBase64String($EncodedAuth...
PowerShellCorpus/Github/tsugliani_NSX-Scripts/nsx-deploy-services.ps1
nsx-deploy-services.ps1
# # NSX-Deploy-Services # Description: Deploy Guest Introspection & Data Security # Author: Timo sugliani <tsugliani@vmware.com> # Version: 1.0 # Date: 09/04/2014 # # Global environment variables $vcenter_hostname = "vc-cap-a.corp.local" $vcenter_port = 443 $vcenter_username = "corp\administrator" $v...
PowerShellCorpus/Github/RuelleJoelle_PowerShell-O365-Scripts/2 Get Skype & Exchange License.ps1
2 Get Skype & Exchange License.ps1
#Create authentification object for the user $credential = Get-Credential -UserName 'your login' -Message "Enter SPO credentials" #Import Lync module Import-Module LyncOnlineConnector #Log in to Office 365 and register using the information provided to previously. $session = New-CsOnlineSession -Credential $cr...
PowerShellCorpus/Github/RuelleJoelle_PowerShell-O365-Scripts/1 Create Signature.ps1
1 Create Signature.ps1
#Create authentification object for the user $credential = Get-Credential -UserName 'your login' -Message "Enter SPO credentials" #Initializing a persistent connection to Exchange $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credent...
PowerShellCorpus/Github/Fr3db3rt_Project-One/read-file-with-get-content.ps1
read-file-with-get-content.ps1
# read-file-with-get-content Get-Content C:\Scripts\DisableOracleProcessing.txt $a = Get-Content C:\Scripts\DisableOracleProcessing.txt Write-Host $a $a.GetType() # read entire file, then display line 0 to 2 (Get-Content C:\Scripts\DisableOracleProcessing.txt)[0 .. 2] # better: only read and display the ...
PowerShellCorpus/Github/Fr3db3rt_Project-One/example-1.ps1
example-1.ps1
Get-Content "C:\Scripts\DisableOracleProcessing.txt" -Encoding Byte -ReadCount 16 | ForEach-Object { $output = "" foreach ( $byte in $_ ) { #CALLOUT A $output += "{0:X2} " -f $byte #END CALLOUT A } $output }
PowerShellCorpus/Github/ryukotsei_Monos.MongoDB.Setup/test.ps1
test.ps1
# create mongo DB instances # methods: https://docs.mongodb.com/manual/reference/method/ Function Write-Log { # output to logFile param($message) $logDate = Get-Date -UFormat "%m/%d/%Y %H:%M:%S%p" "$logDate $message" | Out-File $logFile -Append If ($verboseOutput -eq $true) { Wri...
PowerShellCorpus/Github/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/packages/Microsoft.ApplicationInsights.WindowsServer.2.1.0/Tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) if ([System.IO.File]::Exists($project.FullName)) { function MarkItemASCopyToOutput($item) { Try { #mark it to copy if newer $item.Properties.Item("CopyToOutputDirectory").Value = 2 } Catch { write-host $_.Exception.ToString() }...
PowerShellCorpus/Github/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/TingKong_week7_day4_tiy/StudentApp/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/packages/EntityFramework.6.0.0/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) if (Get-Module | ?{ $_.Name -eq 'EntityFramework' }) { Remove-Module EntityFramework } Import-Module (Join-Path $toolsPath EntityFramework.psd1) # SIG # Begin signature block # MIIarwYJKoZIhvcNAQcCoIIaoDCCGpwCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQ...
PowerShellCorpus/Github/AlbinaV_Lab10/Lab10/Content/WebApplication1/packages/EntityFramework.6.0.0/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/Lab10/Content/WebApplication1/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/AlbinaV_Lab10/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/AlbinaV_Lab10/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/AlbinaV_Lab10/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/simonqqsmith_Scripts/SQL_Server/run_sql.ps1
run_sql.ps1
<# .DESCRIPTION Snippet to connect to a SQL Server instance and run some SQL .AUTHOR Simon Smith #> ## Connect to db and execute query $SQLServer = "MySQLServer" #use Server\Instance for named SQL instances! $SQLDBName = "MyDBName" $SqlQuery = "select * from auth...
PowerShellCorpus/Github/simonqqsmith_Scripts/SQL_Server/Get-SQLInstance.ps1
Get-SQLInstance.ps1
Function Get-SQLInstance {   <# .SYNOPSIS Retrieves SQL server information from a local or remote servers. .DESCRIPTION Retrieves SQL server information from a local or remote servers. Pulls all instances from a SQL server and detects if in a cluster or n...
PowerShellCorpus/Github/simonqqsmith_Scripts/SQL_Server/SQL_Inventory.ps1
SQL_Inventory.ps1
<# .DESCRIPTION Retrieves SQL server information using SCOM class .AUTHOR Simon Smith #> BEGIN{ $SQLInstance = get-scomclass -Displayname 'SQL DB Engine' | get-scomclassinstance; $FTConf = @{Expression={$_.Computer};Label="Server Name"},@{Expression={$_.Instanc...
PowerShellCorpus/Github/simonqqsmith_Scripts/Windows/AWS_S3_List_Buckets.ps1
AWS_S3_List_Buckets.ps1
<# .DESCRIPTION Lists AWS Buckets .AUTHOR Simon Smith #> $AWSDOTNETSDKPath = "C:\Program Files (x86)\AWS SDK for .NET\bin\Net45\AWSSDK.dll" [Reflection.Assembly]::LoadFile($AWSDOTNETSDKPath) | Out-Null # Create a client AmazonS3Client client = new AmazonS3Cli...
PowerShellCorpus/Github/simonqqsmith_Scripts/SSIS/SSIS_Deploy/ProjDeploy/SSIS_Deployment_Script_MyProj_TEST.ps1
SSIS_Deployment_Script_MyProj_TEST.ps1
..\common\SSISDeploymentScript.ps1 -ConfigurationsPath "..\common\Common.dtproj.user" -SolutionPath "..\..\\MyProj\MyProj\MyProj\" -ParametersXml "..\MyProj\Parameters-MyProj.xml" -Environment "Test" -PathOnServer "/SSISDB/MyProj/MyProj"
PowerShellCorpus/Github/simonqqsmith_Scripts/SSIS/SSIS_Deploy/ProjDeploy/SSIS_Deployment_Script_MyProj_DEV.ps1
SSIS_Deployment_Script_MyProj_DEV.ps1
..\common\SSISDeploymentScript.ps1 -ConfigurationsPath "..\common\Common.dtproj.user" -SolutionPath "..\..\\MyProj\MyProj\MyProj\" -ParametersXml "..\MyProj\Parameters-MyProj.xml" -Environment "Development" -PathOnServer "/SSISDB/MyProj/MyProj"
PowerShellCorpus/Github/simonqqsmith_Scripts/SSIS/SSIS_Deploy/ProjDeploy/SSIS_Deployment_Script_MyProj._PROD.ps1
SSIS_Deployment_Script_MyProj._PROD.ps1
..\common\SSISDeploymentScript.ps1 -ConfigurationsPath "..\common\Common.dtproj.user" -SolutionPath "..\..\\MyProj\MyProj\MyProj\" -ParametersXml "..\MyProj\Parameters-MyProj.xml" -Environment "Production" -PathOnServer "/SSISDB/MyProj/MyProj"
PowerShellCorpus/Github/simonqqsmith_Scripts/SSIS/SSIS_Deploy/Common/SSISDeploymentScript.ps1
SSISDeploymentScript.ps1
param ([string]$ConfigurationsPath, [string]$SolutionPath, [string]$ParametersXml, [string]$Environment, [string]$pathOnServer) # Import sqlps module Import-Module Sqlps -DisableNameChecking; # Set the devenv location $devenv = "C:/Program Files (x86)/Microsoft Visual Studio...
PowerShellCorpus/Github/n8felton_PowershellScripts/PaperCut/Expand-PaperCutJCE.ps1
Expand-PaperCutJCE.ps1
Param ( # Path to JCE zip [Parameter(Mandatory=$true, Position=0)] [string] $JCEZipFile ) $PaperCutPath = "C:\Program Files\PaperCut MF" $RuntimeLibSecurity = "$PaperCutPath\runtime\jre\lib\security", "$PaperCutPath\runtime\win64\jre\lib\security" $PolicyFiles ...
PowerShellCorpus/Github/wcmcool_Citrix_ApplicationUsage/Citrix_ApplicationUsage/GetCitrixApplicationInfo.ps1
GetCitrixApplicationInfo.ps1
# Usage: 搜集应用使用情况,每天新建一个以当天日期为名的目录,并将当前小时的应用使用信息导出到相应文件 # 定义工作目录变量 填写绝对路径 $WorkDir = "E:\Scripts\Ps\Citrix_ApplicationUsage" # 定义导出目录名变量 $DirExport $DirExport = [string](Get-Date -UFormat %Y%m%d) # 定义导出文件名变量 $FileExport $FileExport = [string](Get-Date -DisplayHint Time).Hour # 创建当天导出文件目录 if ( !(Test-Pat...
PowerShellCorpus/Github/wcmcool_Citrix_ApplicationUsage/Citrix_ApplicationUsage/ExportCitrixApplicationInfo.ps1
ExportCitrixApplicationInfo.ps1
# Usage: 读取CSV文件,处理、筛选数据并输出到Excel文档 # 定义工作目录变量 填写绝对路径 $WorkDir = "E:\Scripts\Ps\Citrix_ApplicationUsage" # 查找.log文件,获取log文件名 $LogFiles = Get-ChildItem "$WorkDir\AppDataInfo\*.log" # 循环每个log文件 foreach ( $LogFile in $LogFiles ) { # 获取日期目录名 $DirExport = ($LogFile.Name).Split(".")[0] ...
PowerShellCorpus/Github/rajadain_ps-log-collector/log-collector.ps1
log-collector.ps1
param( [string]$source = "C:\inetpub\logs\LogFiles", [string]$target = "." ) Import-Module WebAdministration # All the IIS control goodness foreach ($site in Get-Website) { # Every site configured in IIS $ID = $site.ID # Assemble log file path $LogFilePath = $source + "\W3SVC" + $I...
PowerShellCorpus/Github/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/zilongzhao_azurepx/InnocentPeople/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/gidifede_mainRepo/foldername/AzureAutomationTutorialScript.ps1
AzureAutomationTutorialScript.ps1
<# .DESCRIPTION An example runbook which gets all the ARM resources using the Run As Account (Service Principal) .NOTES AUTHOR: Azure Automation Team LASTEDIT: Mar 14, 2016 #> $connectionName = "AzureRunAsConnection" try { # Get the connection "AzureRunAsConnection " ...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolateyauto3/__NAME__/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#Install-VirtualPackage '__NAME__.portable' '__NAME__.install'
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolateyauto3/__NAME__.install/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one #Items that could be replaced based on what you call chocopkgup.exe with #{{PackageName}} - Package Name (should be same as nuspec file and folder) |/p #{{PackageVersion}} - The updated version | /v #{{DownloadU...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolateyauto3/__NAME__.portable/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one #Items that could be replaced based on what you call chocopkgup.exe with #{{PackageName}} - Package Name (should be same as nuspec file and folder) |/p #{{PackageVersion}} - The updated version | /v #{{DownloadU...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolateyauto/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one #Items that could be replaced based on what you call chocopkgup.exe with #{{PackageName}} - Package Name (should be same as nuspec file and folder) |/p #{{PackageVersion}} - The updated version | /v #{{DownloadU...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolatey/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one $packageName = '__NAME__' # arbitrary name for the package, used in messages $installerType = 'EXE_MSI_OR_MSU' #only one of these: exe, msi, msu $url = 'URL_HERE' # download url $url64 = 'URL_x64_HERE' # 64bit U...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolatey3/__NAME__/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#Install-VirtualPackage '__NAME__.portable' '__NAME__.install'
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolatey3/__NAME__.install/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one $packageName = '__NAME__.install' # arbitrary name for the package, used in messages $installerType = 'EXE_MSI_OR_MSU' #only one of these: exe, msi, msu $url = 'URL_HERE' # download url $url64 = 'URL_x64_HERE' #...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/chocolateytemplates/_templates/chocolatey3/__NAME__.portable/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one $packageName = '__NAME__.portable' # arbitrary name for the package, used in messages $url = 'URL_HERE/.zip/.7z' # download url $url64 = 'URL_x64_HERE' # 64bit URL here or remove - if installer decides, then use ...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/ps-fileassociation/chocolatey/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'ps-fileassociation' $revision = '4167a7fab0f27011e746f078ed148d27c0e2d59d' $urlBase = "https://raw.github.com/austinwagner/chocolatey-packages/$revision/$packageName/scripts" $scripts = @( @('Register-FileAssociation.ps1', '4381346F2AA7ADBC51F6D8D58356C8AE029C411D'), @('Unregister-FileAssoc...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/ps-fileassociation/scripts/Unregister-FileAssociation.ps1
Unregister-FileAssociation.ps1
# The MIT License (MIT) # # Copyright (c) 2014 Austin Wagner # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, ...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/ps-fileassociation/scripts/Register-FileAssociation.ps1
Register-FileAssociation.ps1
# The MIT License (MIT) # # Copyright (c) 2014 Austin Wagner # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, ...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/VS2013.VSCommands/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'VS2013.VSCommands' $url = 'http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece/file/106247/16/SquaredInfinity.VSCommands.VS12.vsix' function Invoke-BatchFile($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') ...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/VS2013.VSCommands/tools/chocolateyUninstall.ps1
chocolateyUninstall.ps1
$vsixId = "a99761e2-42ea-40bd-992f-4b84ccaeaf05" function Invoke-BatchFile ($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function Invoke-VsVars32() { $batchFile = Join-Path $env:VS120COMNTOOLS "vs...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/_templates/vsix2013/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = '__NAME__' $url = '__REPLACE__' function Invoke-BatchFile($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function Invoke-VsVars32() { $batchFile = Join-Path $env:VS120COMNTOOLS 'vsva...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/_templates/vsix2013/tools/chocolateyUninstall.ps1
chocolateyUninstall.ps1
$vsixId = '__REPLACE__' function Invoke-BatchFile ($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function Invoke-VsVars32() { $batchFile = Join-Path $env:VS120COMNTOOLS 'vsvars32.bat' Invoke-B...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/icaros/beta/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'icaros' $version = '3.0.1_b3' $installerType = 'EXE' $sha1 = '55EA70574C9578022C171E7FF822456C1904F065' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $downloadUrl = Invoke-WebRequest -Uri "http://www.videohelp.com/download/Icaros_v$version.exe" -UseBasicParsing | select...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/icaros/beta/tools/chocolateyUninstall.ps1
chocolateyUninstall.ps1
$packageName = 'icaros' $installerType = 'EXE' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART' $exe = Join-Path "$env:ProgramFiles" 'Icaros\unins000.exe' Uninstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$exe"
PowerShellCorpus/Github/austinwagner_chocolatey-packages/icaros/stable/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'icaros' $version = '3.0.0' $installerType = 'EXE' $sha1 = '77994F4F026DB74E2116657E27B60CB9374B7C49' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' $downloadUrl = Invoke-WebRequest -Uri "http://www.videohelp.com/download/Icaros_v$version.exe" -UseBasicParsing | select -E...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/icaros/stable/tools/chocolateyUninstall.ps1
chocolateyUninstall.ps1
$packageName = 'icaros' $installerType = 'EXE' $silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART' $exe = Join-Path "$env:ProgramFiles" 'Icaros\unins000.exe' Uninstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$exe"
PowerShellCorpus/Github/austinwagner_chocolatey-packages/VS2013.PowerTools/tools/chocolateyInstall.ps1
chocolateyInstall.ps1
$packageName = 'VS2013.PowerTools' $url = 'http://visualstudiogallery.msdn.microsoft.com/dbcb8670-889e-4a54-a226-a48a15e4cace/file/117115/3/ProPowerTools.vsix' function Invoke-BatchFile($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path...
PowerShellCorpus/Github/austinwagner_chocolatey-packages/VS2013.PowerTools/tools/chocolateyUninstall.ps1
chocolateyUninstall.ps1
$vsixId = 'VSProPack.Microsoft.D67305A0-1A33-49E1-913B-8A8BC420750C' function Invoke-BatchFile ($file) { $cmd = "`"$file`" & set" cmd /c $cmd | Foreach-Object { $p, $v = $_.split('=') Set-Item -path env:$p -value $v } } function Invoke-VsVars32() { $batchFile = Join-Path $en...
PowerShellCorpus/Github/Robonora_weatherstation/backend/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/Robonora_weatherstation/backend/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/Robonora_weatherstation/backend/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/Robonora_weatherstation/backend/packages/jQuery.1.7.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/Robonora_weatherstation/backend/packages/jQuery.1.7.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 $supportsJsIntelliSenseFile = [System.Version]::Parse($dte.Version).Major -ge 11 if (-not $supportsJsIntelliSenseFile) { Write-Host "IntelliSense JS files are n...
PowerShellCorpus/Github/Robonora_weatherstation/backend/packages/jQuery.1.7.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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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/oriel7_PracticalAssessment/TangentSolutions/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...