full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/diablomnky_scripts/Powershell/EnableAnonymousRelay-Exchange.ps1 | EnableAnonymousRelay-Exchange.ps1 | Add-PSSnapin Microsoft.Exchange.Management.*
Get-ReceiveConnector "" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient" |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/NewGlobalAddressList.ps1 | NewGlobalAddressList.ps1 | $tenant = <companyName>
$GAL = <companyCode>
echo "Creating new GAL $GAL"
New-GlobalAddressList -Name $GAL -RecipientFilter {(CustomAttribute3 -eq $tenant)}
echo "Done Creating new GAL $GAL"
|
PowerShellCorpus/Github/diablomnky_scripts/Powershell/MassDisablePCs.ps1 | MassDisablePCs.ps1 | Write-Host "Importing AD Module..."
Import-Module activedirectory
Write-Host "Importing list of computers"
$date = Read-Host "Enter today's date in YYYYMMDD format: "
$list = Import-CSV %USERPROFILE%\disablePCs-$date.csv
$Destination = <Disabled Computers OU>
forEach ($item in $list)
{
Set-ADComputer -Identity... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/EnableLitigationHold.ps1 | EnableLitigationHold.ps1 | #Pulls list of all User Mailboxes in organization and enables Litigation Hold indefinitely
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Set-Mailbox -LitigationHoldEnabled $true |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/CreateSecurePasswordFile.ps1 | CreateSecurePasswordFile.ps1 | #Prompts user for full file path of password file to be created
$location = Read-Host "Enter full path to save secure password file in: "
#Creates Credentials prompt for user to enter in credentials and exports the password as a secure string
(Get-Credential).Password | ConvertFrom-SecureString | Out-File $location |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/InstallNetFx3.ps1 | InstallNetFx3.ps1 | $currentLocation = Split-Path -Parent $MyInvocation.MyCommand.Path;
dism.exe /online /enable-feature /featurename:NetFX3 /source:$currentLocation /LimitAccess |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/CustomerAudit.ps1 | CustomerAudit.ps1 | $orgUnit = Read-Host 'Enter top level OU: '
$Mailbox = @()
$Stats = @()
$customer =""
foreach ($user in Get-Mailbox -OrganizationalUnit $orgUnit)
{
$MailboxForUser = Get-Mailbox -identity $user | fl
$Mailbox += $MailboxForUser
$StatsForUser = Get-MailboxStatistics -identity $user | fl
$Stats += $StatsForUs... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/ConnectToOffice365.ps1 | ConnectToOffice365.ps1 | # Office 365 username
$User = <O365_adminAccount>
# Prompts user for password and stores is as a secure string
$SecureString = Read-Host -AsSecureString 'Enter your password ' | ConvertFrom-SecureString | ConvertTo-SecureString
# Creates object to store the username and password securely
$MySecureCreds = New-Objec... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/ListProfilesByIP.ps1 | ListProfilesByIP.ps1 | # Run script with domain admin powershell session
# Allow script to run, if blocked as admin
#Set-ExecutionPolicy Unrestricted
# Loads all modules
Get-Module -ListAvailable | Import-Module
# Initialize variables and a dictionary. Use $i and $j for /24 or smaller subnet, and $i,$j,$k,$l for /16 - /23 subnet
$netAd... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/PingHosts.ps1 | PingHosts.ps1 | Write-Host "Importing list of computers"
$list = Import-CSV %USERPROFILE%\hostnames.csv
forEach($item in $list)
{
ping -n 1 $item.hostname >> %USERPROFILE%\host-ips.csv
} |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/DisableClutterFolder-Automated.ps1 | DisableClutterFolder-Automated.ps1 | # Office 365 username
$User = <O365_adminAccount>
# Location of file with O365 password
$File = "\\path\to\file"
# Creates object to store the username and password securely
$Credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, (Get-Content $File | ConvertTo-SecureStrin... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/ExchangeCalendarPermissions.ps1 | ExchangeCalendarPermissions.ps1 | $mbx = Get-Mailbox -Resultsize Unlimited | Select Alias,PrimarySmtpAddress
foreach ($i in $mbx)
{
$j = $i.Alias
$email = $i.PrimarySmtpAddress.Local+"@"+$i.PrimarySmtpAddress.Domain
$CalPerms = Get-MailboxFolderPermission -Identity "${j}:\calendar"
for ($k=0; $k -lt $CalPerms.length; $k++)
{
$calendar = ... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/E164-OfficeNumbers.ps1 | E164-OfficeNumbers.ps1 | $enabledUsers = Get-AdUser -Filter * -SearchBase <topLevel OU> -Properties * | Select SamAccountName,telephoneNumber
foreach ($user in $enabledUsers)
{
if ($user.telephoneNumber.Length -eq 0)
{
$user.SamAccountName+" has no Office number. No changes will be made" | Out-File -FilePath %USERPROFILE%\E16... |
PowerShellCorpus/Github/diablomnky_scripts/Powershell/Distromaker.ps1 | Distromaker.ps1 | $data = import-csv $args[0]
foreach ($item in $data){
New-DistributionGroup -Name $item.distro -Alias $item.distro -DisplayName $item.Distro -OrganizationalUnit <destinationOU> -SamAccountName $item.Alias -PrimarySMTPAddress $item.alias -Type distribution
} |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_4_10_0_25/.openpublishing.build.ps1 | .openpublishing.build.ps1 | param(
[string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1",
[string]$parameters
)
# Main
$errorActionPreference = 'Stop'
# Step-1: Download buildcore script to local
echo "download build core script to local with source url: ... |
PowerShellCorpus/Github/Tangerineglobal_OAuthWCF/OAuthWCF/packages/Newtonsoft.Json.8.0.3/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/Tangerineglobal_OAuthWCF/OAuthWCF/packages/Newtonsoft.Json.9.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/Tangerineglobal_OAuthWCF/OAuthWCF/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/Tangerineglobal_OAuthWCF/OAuthWCF/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/Tangerineglobal_OAuthWCF/OAuthWCF/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/Tangerineglobal_OAuthWCF/OAuthWCF/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/Tangerineglobal_OAuthWCF/OAuthWCF/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/OPS-E2E-Prod_E2E_P_D_NewRepo_2017_5_25_29_40_41/.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/E2ETestPPE_E2E_Micft_Transfer_Dynamic/.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/nguerrera_repros/SatelliteAssemblyHostIssue/installcli.ps1 | installcli.ps1 | $RepoRoot = "$PSScriptRoot"
$DotnetCLIVersion = "1.0.0-rc3-004512"
# Use a repo-local install directory (but not the bin directory because that gets cleaned a lot)
if (!$env:DOTNET_INSTALL_DIR)
{
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_cli\"
}
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
{
mkdir $env... |
PowerShellCorpus/Github/Henryzhaoheran_azStorScripts/listAllVHDs.ps1 | listAllVHDs.ps1 |
# For ASM
Add-AzureAccount
Select-AzureSubscription -SubscriptionId ''
$disks = Get-AzureDisk
$disks | Where-Object {$_.AttachedTo -eq $null} | ft DiskName,IOType,Location,DiskSizeInGB,OS -AutoSize
# For ARM
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionId ""
$accountlist = ... |
PowerShellCorpus/Github/Henryzhaoheran_azStorScripts/listp30vhd.ps1 | listp30vhd.ps1 | # List all P30 Disks in one subscription.
# All SSDs whose size is greater than 512GB is count as P30 disk.
# For ASM
Add-AzureAccount
Select-AzureSubscription -SubscriptionId ''
$disks = Get-AzureDisk
$disks | Where-Object {($_.IOType -eq 'Provisioned') -and ($_.DiskSizeInGB -gt '512')} | ft DiskSizeInG... |
PowerShellCorpus/Github/mbednarczyk_win8store/MeteoICM/AppPackages/MeteoICM_1.1.0.0_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/mbednarczyk_win8store/MeteoICM/AppPackages/MeteoICM_1.1.0.1_AnyCPU_Test/Add-AppDevPackage.ps1 | Add-AppDevPackage.ps1 | #
# Add-AppxDevPackage.ps1 is a PowerShell script designed to install app
# packages created by Visual Studio for developers. To run this script from
# Explorer, right-click on its icon and choose "Run with PowerShell".
#
# Visual Studio supplies this script in the folder generated with its
# "Prepare Package" c... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/chocoCommand.ps1 | chocoCommand.ps1 |
# Exact search for GoogleChrome
choco search GoogleChrome -e
# Internalize packages
choco download GoogleChrome --recompile --resource-location=C:\tools --download-location=C:\tools
|
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/tests/test.ps1 | test.ps1 | ipmo C:\Users\lukem\Documents\GitHub\AutoDownloader -force
$VerbosePreference = "continue"
Invoke-AutoDownload -disableExport |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/tests/DownloadTest.ps1 | DownloadTest.ps1 |
Import-Module ..\AutoDownloader.psd1
$PackageName = "GoogleChrome"
$CurrentVersion = [Version]("10.0.0")
Read-NuGetPackageVersion -PackageID $PackageName |
Where-Object {$_} |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/tests/download_test.ps1 | download_test.ps1 | using module ..\Packages.psm1
using module ..\..\AutoDownloader
$config = Get-Content $PSScriptRoot\..\PackagesConfig.json | ConvertFrom-Json
$config.NugetPackages | ForEach-Object {
[NuGetPackage]$Package = $_
$Package.UpdateRecentVersion()
if ([version]$Package.RecentVersion -gt [versio... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/tests/Packages.tests.ps1 | Packages.tests.ps1 | using Namespace System.IO
using Module ..\Packages.psm1
Import-Module ..\AutoDownloader.psm1
Describe "Testing PackagesList class" {
$mockedFileInfo = [FileInfo]::new("/Mocked.json")
Mock Get-Content {
return @"
{
"NugetPackage": [
{
"Name" : "GoogleChrome",
... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/tests/package_feed_test.ps1 | package_feed_test.ps1 | using module ..\Packages.psm1
using module ..\..\AutoDownloader
$doc = Get-Item $PSScriptRoot\..\PackagesConfig.json
$PackageList = [PackagesList]::new($doc)
$PackageList.Packages | ForEach-Object {
[NuGetPackage]$Package = $_
$Package.UpdateRecentVersion()
if ($Package.IsOutdated()) {
... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Invoke-PackageDownload.ps1 | Invoke-PackageDownload.ps1 | using module ..\Packages.psm1
<#
.Description
Invokes a package download of the defined packages in the json config.
.Example
Invoke-PackageDownload
#>
function Update-RecentVersion {
param(
[Parameter(ValueFromPipeline=$true)]
[Package]$Package
)
Proc... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Get-PackageList.ps1 | Get-PackageList.ps1 | using module ..\Packages.psm1
<#
.Description
Returns instance of Packages list.
.Example
PS> Get-PackagesList
#>
function Get-PackageList {
$pkgs = [PackagesList]::GetInstance().Packages
if (-not $pkgs) {
Throw "No packages defined in config file."
}
retu... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Read-FromNugetEndpoint.ps1 | Read-FromNugetEndpoint.ps1 |
<#
.Description
Reads nuget package data to a specific filter.
.Example
Read-NuGetPackageData -PackageID "GoogleChrome" -PackageVersion "55.0.2883.87"
#>
function Read-NuGetPackageData {
param(
$Provider = "chocolatey.org",
[Parameter(Mandatory=$true)]
$Packag... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Import-PackagesList.ps1 | Import-PackagesList.ps1 | using module ..\Packages.psm1
using module ..\Metadata.psm1
function Import-PackageList {
[PackagesList]::SetInstance(
(Get-Item -Path ($PSScriptRoot+"\..\" + [ModuleMetadata]::PackageConfig))
)
} |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Write-PackageList.ps1 | Write-PackageList.ps1 | using module ..\Packages.psm1
function Write-PackageList {
try {
[PackagesList]::GetInstance().Save()
}
catch {
Throw "Unable to save list."
}
} |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Merge-Object.ps1 | Merge-Object.ps1 | using module ..\Packages.psm1
# This is not working on PowerShell Core. On Full PS 5.1 it works.
function Merge-Object {
param(
# Custom object to translate to type.
# Type needs to have a constructor with no parameters.
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Invoke-BinaryDownload.ps1 | Invoke-BinaryDownload.ps1 | using namespace System.IO
using module ..\Packages.psm1
<#
.Description
Downloads piped URL to a download location.
Obtains file name from URL.
#>
function Invoke-BinaryDownload {
param(
[Parameter(ValueFromPipeline=$true)]
[PSCustomObject]$Url,
[string]$Download... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Find-BinaryUrlFromNupkg.ps1 | Find-BinaryUrlFromNupkg.ps1 | using module ..\Metadata.psm1
<#
.synopsis
Find-BinaryURLFromNupkg obtains the download URL provided in the package.
.description
Ties together a number of cmdlets that extract a local nupkg, and attmepts to locate the definition of the url / url64bit paramter provided
to the Install-Cho... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Invoke-WebCall.ps1 | Invoke-WebCall.ps1 |
<#
.Description
Used to abstract out Invoke-RestMethod, this is due to proxy requierments.
Allows for a central place to configure switches, and pass through arguments.
#>
function Invoke-WebCall {
param(
[string]$uri,
[string]$OutFile
)
Write-Verbose "Call... |
PowerShellCorpus/Github/lukemgriffith_PackageSleuth/functions/Invoke-AutoDownload.ps1 | Invoke-AutoDownload.ps1 | <#
.Description
Initiates the AutoDownload process, performing the workflow on all configured packages in the json configuration file.
#>
function Invoke-AutoDownload {
param(
[switch]$disableExport
)
Write-Verbose "Initiating package autodownload."
Write-Verbose "Impo... |
PowerShellCorpus/Github/backwardsDave1_PoorMansUnitTestingFramework/Example.ps1 | Example.ps1 | <#
.SYNOPSIS
This script contains tests for the functions in GetDhcpScopeOptionValue.ps1
.DESCRIPTION
This script contains tests for the functions in GetDhcpScopeOptionValue.ps1
.INPUTS
.OUTPUTS
.EXAMPLE
.NOTES
Author: dklempfner@gmail.com
Date: 23/01/2017
#>
Import-Module ... |
PowerShellCorpus/Github/curiousmindz_Scripts/VMInfo.ps1 | VMInfo.ps1 | #Created log file
$erroraction = $ErrorActionPreference
$ErrorActionPreference = "silentlyContinue"
New-Item -Path c:\ -ItemType File -Name GetSystemInfoLog.txt >> $null
$LOG = "c:\GetSystemInfoLog.txt"
write-output "############################# START #####################################" >> $LOG
Fu... |
PowerShellCorpus/Github/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/Ajax/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/LabJS/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/Projetos/BundleMinification/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/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/alexandretarifa_workshop-aspnet-treinando/Treinando/packages/EntityFramework.6.1.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/alexandretarifa_workshop-aspnet-treinando/Treinando/packages/EntityFramework.6.1.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/OPSTest_E2E_Provision_1489730735506/.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/boboky_ansible-oms/roles/windows-oms-agent-management/files/installomsagent.ps1 | installomsagent.ps1 | <#
Author: Daniel Örneling
Date: 28/12/2016
Script: InstallOMSAgent.ps1
Version: 1.0
Twitter: @DanielOrneling
#>
# Set the Workspace ID and Primary Key for the Log Analytics workspace.
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="The ID of the Log An... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/windows-oms-config/files/enableRules_tcp.ps1 | enableRules_tcp.ps1 |
[CmdletBinding()]
Param(
[Parameter(Mandatory=$False)]
[string]$portNumber="8084",
[switch]$DisableRule #by default it is false
)
$firewallRuleName="NPMDFirewallRule"
$firewallRuleDescription = "NPMD Firewall port exception"
$processName = "NPMDAgent.exe"
$protocolName = "tcp"
$direction = "in"
$IC... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/windows-oms-config/files/enableRules_icmp.ps1 | enableRules_icmp.ps1 | netsh advfirewall firewall add rule name="NPMDICMPV4Echo" protocol="icmpv4:8,any" dir=in action=allow
netsh advfirewall firewall add rule name="NPMDICMPV6Echo" protocol="icmpv6:128,any" dir=in action=allow
netsh advfirewall firewall add rule name="NPMDICMPV4DestinationUnreachable" protocol="icmpv4:3,any" dir=in actio... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/deploy-oms/scripts/AzureSAIngestionParent-MS-Mgmt-SA.ps1 | AzureSAIngestionParent-MS-Mgmt-SA.ps1 | #region Variables definition
# Variables definition
# Common variables accross solution
$StartTime = [dateTime]::Now
$Timestampfield = "Timestamp"
#will use exact time for all inventory
$timestamp=$StartTime.ToUniversalTime().ToString("yyyy-MM-ddTHH:45:00.000Z")
#Update customer Id to your Operationa... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/deploy-oms/scripts/AzureSAIngestionChild-MS-Mgmt-SA.ps1 | AzureSAIngestionChild-MS-Mgmt-SA.ps1 | param (
[Parameter(Mandatory=$true)][array]$Salist,
[Parameter(Mandatory=$false)][boolean] $EnableExtraMetrics = $false
)
#$ErrorActionPreference = "SilentlyContinue"
#region Variables definition
# Variables definition
# Common variables accross solution
$StartTime = [dateTime]::Now
$Timestampfield = ... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/deploy-oms/scripts/CreateSchedules-MS-Mgmt-SA.ps1 | CreateSchedules-MS-Mgmt-SA.ps1 | $ErrorActionPreference = "SilentlyContinue"
#region Login to Azure account and select the subscription.
#Authenticate to Azure with SPN section
Write-Verbose "Logging in to Azure..."
$Conn = Get-AutomationConnection -Name AzureRunAsConnection
# retry
$retry = 6
$syncOk = $false
do
{
try
{
Add-Az... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/deploy-oms/scripts/AzureStorageMetricsEnabler-MS-Mgmt-SA.ps1 | AzureStorageMetricsEnabler-MS-Mgmt-SA.ps1 |
$ErrorActionPreference = "SilentlyContinue"
#region Variables definition
# Variables definition
#Replace the below string with a metric value name such as 'TimeStamp' to update TimeGenerated to be that metric named instead of ingestion time
$Timestampfield = "Timestamp"
#Update customer Id to your Operati... |
PowerShellCorpus/Github/boboky_ansible-oms/roles/deploy-oms/scripts/CleanSolution-MS-Mgmt-SA.ps1 | CleanSolution-MS-Mgmt-SA.ps1 |
param (
[Parameter (Mandatory= $false)]
[string] $resourcegroup,
[Parameter (Mandatory= $false)]
[string] $targetSubscriptionId,
[Parameter (Mandatory= $false)]
[string] $automationaccount,
[Parameter (Mandatory= $false)]
[string] $deleteList
)
$ErrorActionPreference... |
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_4_11_30_5_18/.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/OPS-E2E-PPE_E2E_D_NewRepo_2017_5_15_26_59_6/.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/zabelsa01_scripts/powershell/Retina/Retina/ICVAStatusAllIP.ps1 | ICVAStatusAllIP.ps1 | $homedir = "E:\Retina Metrics"
cd $homedir
#Import Retina CSV
. "$Scripts\lib\ImportCSV.ps1"
$Import = $Data | where-object {$_.IAV -ne "N/A"} | where-object {$_.IAV -notlike "*-T-*"} | where-object {$_.IAV -notlike "*-B-*"}
#Total IPs Scanned
$TotalIP = (import-csv "$csv" | select IP -unique | measure-obje... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.