full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Verify-5-8.ps1
Verify-5-8.ps1
#region Description <# ######################################################################## Scenario: a user notices that storage performance is slow. After investigating the problem, the user determines that the affected datastore has only one path. Notes: Code comments have been deliberately omitted. ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-7.ps1
Break-5-7.ps1
#region Description <# ######################################################################## Scenario: a user notices that storage performance is slow. After investigating the problem, the user determines that the affected datastore has only one path. Notes: Code comments have been deliberately omitted. ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-10.ps1
Break-5-10.ps1
#region Description <# ######################################################################## Scenario: a user cannot access virtual machines that are located on iSCSI datastores. Notes: Code comments have been deliberately omitted. ######################################################################## ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Verify-5-7.ps1
Verify-5-7.ps1
#region Description <# ######################################################################## Scenario: a user notices that storage performance is slow. After investigating the problem, the user determines that the affected datastore has only one path. Notes: Code comments have been deliberately omitted. ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-2.ps1
Break-5-2.ps1
#region Description <# ######################################################################## Scenario: cannot access virtual machines that are located on iSCSI datastores Notes: Code comments have been deliberately omitted. ######################################################################## #> #endre...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Verify-5-9.ps1
Verify-5-9.ps1
#region Description <# ######################################################################## Scenario: a user cannot access virtual machines that are located on iSCSI datastores. Notes: Code comments have been deliberately omitted. ######################################################################## ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-3.ps1
Break-5-3.ps1
#region Description <# ######################################################################## Scenario: cannot access virtual machines that are located on iSCSI datastores Notes: Code comments have been deliberately omitted. ######################################################################## #> #endre...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Verify-5-10.ps1
Verify-5-10.ps1
#region Description <# ######################################################################## Scenario: a user cannot access virtual machines that are located on iSCSI datastores. Notes: Code comments have been deliberately omitted. ######################################################################## ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-6.ps1
Break-5-6.ps1
#region Description <# ######################################################################## Scenario: Complaints of terrible performance from VMs located on iSCSI storage Notes: Code comments have been deliberately omitted. ######################################################################## #> #endr...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Break-5-5.ps1
Break-5-5.ps1
#region Description <# ######################################################################## Scenario: Cannot access virtual machines that are located on iSCSI datastores Notes: Code comments have been deliberately omitted. ######################################################################## #> #endre...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod5/Verify-5-1.ps1
Verify-5-1.ps1
#region Description <# ######################################################################## Scenario: Cannot create on, or move a virtual machine to the NFS datastore Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregio...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-1.ps1
Verify-6-1.ps1
#region Description <# ######################################################################## Scenario: An administrator reports that a newly provisioned ESXi host fails to configure its HA agent when added to the cluster Notes: Code comments have been deliberately omitted. #################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-3.ps1
Verify-6-3.ps1
#region Description <# ######################################################################## Scenario: a user cannot migrate a powered-on virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-8.ps1
Break-6-8.ps1
#region Description <# ######################################################################## Scenario: You receive complaints about the performance of some virtual machines that reside in a vSphere cluster. Notes: Code comments have been deliberately omitted. ###############################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-7.ps1
Break-6-7.ps1
#region Description <# ######################################################################## Break-7-6 Scenario: A user cannot migrate a powered-on virtual machine. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregio...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-4.ps1
Verify-6-4.ps1
#region Description <# ######################################################################## Scenario: You will respond to VMware vSphere® High Availability issues that are reported by the system. Notes: Code comments have been deliberately omitted. #########################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-6.ps1
Break-6-6.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine will not start in either the Test or Production resource pools. Notes: Code comments have been deliberately omitted. ################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-10.ps1
Break-6-10.ps1
#region Description <# ######################################################################## Scenario: you receive complaints about some virtual machines performance that reside in a VMware vSphereÛ cluster Notes: Code comments have been deliberately omitted. ##############################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-5.ps1
Break-6-5.ps1
#region Description <# ######################################################################## Scenario: You receive complaints about the performance of some virtual machines that reside in a VMware vSphereÛ cluster Notes: Code comments have been deliberately omitted. ########################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-9.ps1
Break-6-9.ps1
#region Description <# ######################################################################## Scenario: A user cannot migrate a powered-on virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-9.ps1
Verify-6-9.ps1
#region Description <# ######################################################################## Scenario: A user cannot migrate a powered-on virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-7.ps1
Verify-6-7.ps1
#region Description <# ######################################################################## Scenario: A user cannot migrate a powered-on virtual machine. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region ...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-6.ps1
Verify-6-6.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine will not start in either the Test or Production resource pools. Notes: Code comments have been deliberately omitted. ################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-8.ps1
Verify-6-8.ps1
#region Description <# ######################################################################## Scenario: You receive complaints about the performance of some virtual machines that reside in a vSphere cluster. Notes: Code comments have been deliberately omitted. ###############################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-4.ps1
Break-6-4.ps1
#region Description <# ######################################################################## Scenario: You will respond to VMware vSphere® High Availability issues that are reported by the system. Notes: Code comments have been deliberately omitted. #########################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-2.ps1
Verify-6-2.ps1
#region Description <# ######################################################################## Scenario: a user cannot power on a virtual machine in either the Test or Production resource pools. Notes: Code comments have been deliberately omitted. #############################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-10.ps1
Verify-6-10.ps1
#region Description <# ######################################################################## Scenario: you receive complaints about some virtual machines performance that reside in a VMware vSphere® cluster Notes: Code comments have been deliberately omitted. ###########################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-3.ps1
Break-6-3.ps1
#region Description <# ######################################################################## Scenario: a user cannot migrate a powered-on virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Verify-6-5.ps1
Verify-6-5.ps1
#region Description <# ######################################################################## Scenario: You receive complaints about the performance of some virtual machines that reside in a VMware vSphereÛ cluster Notes: Code comments have been deliberately omitted. ########################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-2.ps1
Break-6-2.ps1
#region Description <# ######################################################################## Scenario: a user cannot power on a virtual machine in either the Test or Production resource pools. Notes: Code comments have been deliberately omitted. #############################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod6/Break-6-1.ps1
Break-6-1.ps1
#region Description <# ######################################################################## Scenario: An administrator reports that a newly provisioned ESXi host fails to configure its HA agent when added to the cluster Notes: Code comments have been deliberately omitted. #################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Reset/reset.ps1
reset.ps1
#region Description <# ######################################################################## RESET TOOL ######################################################################## #> #endregion #region requires #requires -Version 4.0 #requires -Modules mod_requirements, mod_common, Posh-SSH, @{ModuleName="VM...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-7.ps1
Break-8-7.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine does not power on. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #re...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-7.ps1
Verify-8-7.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine does not power on. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #re...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-9.ps1
Verify-8-9.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine does not power on Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-4.ps1
Break-8-4.ps1
#region Description <# ######################################################################## Scenario: The Related Objects pane of a VM shows a phantom network. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-3.ps1
Break-8-3.ps1
#region Description <# ######################################################################## Scenario: The user is unable to power on any virtual machines. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-4.ps1
Verify-8-4.ps1
#region Description <# ######################################################################## Scenario: The Related Objects pane of a VM shows a phantom network. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #r...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-3.ps1
Verify-8-3.ps1
#region Description <# ######################################################################## Scenario: The user is unable to power on any virtual machines. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-2.ps1
Break-8-2.ps1
#region Description <# ######################################################################## Scenario: A user is reporting that a virtual machine in the vCenter Server inventory is missing Notes: Code comments have been deliberately omitted. ################################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-5.ps1
Verify-8-5.ps1
#region Description <# ######################################################################## Scenario: Permissions misconfiguration issues Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region requires #requi...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-5.ps1
Break-8-5.ps1
#region Description <# ######################################################################## Scenario: Permissions misconfiguration issues Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #region requires #requi...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-1.ps1
Verify-8-1.ps1
#region Description <# ######################################################################## Scenario: A user cannot consolidate a virtual machine’s snapshots Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-2.ps1
Verify-8-2.ps1
#region Description <# ######################################################################## Scenario: A user is reporting that a virtual machine in the vCenter Server inventory is missing Notes: Code comments have been deliberately omitted. ################################################################...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-6.ps1
Verify-8-6.ps1
#region Description <# ######################################################################## Scenario: A user cannot install VMware Tools in a virtual machine. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #re...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-1.ps1
Break-8-1.ps1
#region Description <# ######################################################################## Scenario: A user cannot consolidate a virtual machineĺs snapshots Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Verify-8-8.ps1
Verify-8-8.ps1
#region Description <# ######################################################################## Scenario: A user cannot install VMware Tools in a virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-6.ps1
Break-8-6.ps1
#region Description <# ######################################################################## Scenario: A user cannot install VMware Tools in a virtual machine. Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #re...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-8.ps1
Break-8-8.ps1
#region Description <# ######################################################################## Scenario: A user cannot install VMware Tools in a virtual machine Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/VSTS/Mod8/Break-8-9.ps1
Break-8-9.ps1
#region Description <# ######################################################################## Scenario: A user reports that a virtual machine does not power on Notes: Code comments have been deliberately omitted. ######################################################################## #> #endregion #reg...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Auto_LabHome/vsphere-6.5-vghetto-standard-lab-deployment.ps1
vsphere-6.5-vghetto-standard-lab-deployment.ps1
# Author: William Lam # Website: www.virtuallyghetto.com # Description: PowerCLI script to deploy a fully functional vSphere 6.5 lab consisting of 3 # Nested ESXi hosts enable w/vSAN + VCSA 6.5. Expects a single physical ESXi host # as the endpoint and all four VMs will be deployed to ph...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Auto_LabHome/Showdown-HomeLab.ps1
Showdown-HomeLab.ps1
Connect-VIServer MyVIServer # Set the amount of time to wait before assuming the remaining powered on guests are stuck $waittime = 60 #Seconds # Get All the ESX Hosts $ESXSRV = Get-VMHost # For each of the powered on VMs with running VM Tools Foreach ($VM in ($ESXSRV | Get-VM | Where {$_.PowerState -eq "pow...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Auto_LabHome/auto_setup_lab_new.ps1
auto_setup_lab_new.ps1
########################################################### # # # VMware Virtual SAN -- Making Storage Great Again # # # # # # The Al...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Auto_LabHome/CreateVMlog.ps1
CreateVMlog.ps1
Get-VIEvent -maxsamples 10000 |where {$_.Gettype().Name-eq "VmCreatedEvent" -or $_.Gettype().Name-eq "VmBeingClonedEvent" -or $_.Gettype().Name-eq "VmBeingDeployedEvent"} |Sort CreatedTime -Descending |Select CreatedTime, UserName,FullformattedMessage -First 10
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Vmware_Official/Stop-VMHostSsh.ps1
Stop-VMHostSsh.ps1
<# .NOTES =========================================================================== Script name: Stop-VMHostSsh.ps1 Created on: 2016-07-01 Author: Peter D. Jorgensen (@pjorg, pjorg.com) Dependencies: None known ===Tested Against Environment==== vSphere Version: 5.5, 6.0 PowerCLI Version: Pow...
PowerShellCorpus/Github/fjiannan_PowerCli_Scripts/scripts/Vmware_Official/Start-VMHostSsh.ps1
Start-VMHostSsh.ps1
<# .NOTES =========================================================================== Script name: Start-VMHostSsh.ps1 Created on: 2016-07-01 Author: Peter D. Jorgensen (@pjorg, pjorg.com) Dependencies: None known ===Tested Against Environment==== vSphere Version: 5.5, 6.0 PowerCLI Version: Po...
PowerShellCorpus/Github/vaclavmech_CalendarRights/foo.ps1
foo.ps1
# Václav Měch # Tieto # Disclaimer: I created this script from my own will and in my free time and I don't feel obligated to fix / maintain it. # However, I will most likely fix any reported bugs, or implement functions that might improve it. I just don't feel like I have to. # Any b...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1490033133987/.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/jessevl_RSM-STAR-Demo/src/RawResponseLocation/Properties/PublishProfiles/StarDemo4-SouthEastAsia-publish.ps1
StarDemo4-SouthEastAsia-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/jessevl_RSM-STAR-Demo/src/RawResponseLocation/Properties/PublishProfiles/StarDemo2-WestEurope-publish.ps1
StarDemo2-WestEurope-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/jessevl_RSM-STAR-Demo/src/RawResponseLocation/Properties/PublishProfiles/StarDemo1-WestUS (2)-publish.ps1
StarDemo1-WestUS (2)-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/jessevl_RSM-STAR-Demo/src/RawResponseLocation/Properties/PublishProfiles/StarDemo1-WestUS-publish.ps1
StarDemo1-WestUS-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties, $packOutput, $nugetUrl) # to learn more about this file visit http://go.microsoft.com/fwlink/?LinkId=524327 $publishModuleVersion = '1.0.1' function Get-VisualStudio2015InstallPath{ [cmdletbinding()] param() process{ $k...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_Provision_2017_4_21_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/jamesbannan_azure-automation-resource-security/functions/Get-AzureRegion.ps1
Get-AzureRegion.ps1
<# .SYNOPSIS Returns the geo-political region of an Azure datacenter. .DESCRIPTION The Get-AzureRegion cmdlet returns the geo-political region of an Azure datacenter. .EXAMPLE C:\PS> Get-AzureRegion -location 'australiasoutheast' .EXAMPLE C:\PS> Get-AzureRegion -displayName 'Australia So...
PowerShellCorpus/Github/jamesbannan_azure-automation-resource-security/functions/Assert-SecureResourceGroupPolicyLocation.ps1
Assert-SecureResourceGroupPolicyLocation.ps1
<# .SYNOPSIS Applies an ARM policy on a Resource Group to prevent deployment of resources in other geo-political regions. .DESCRIPTION The Assert-SecureResourceGroupPolicyLocation cmdlet checks for the existence of an ARM policy which prevents deployment of resources outside the geopolitical region in w...
PowerShellCorpus/Github/jamesbannan_azure-automation-resource-security/functions/Assert-SecureResourceGroupRbac.ps1
Assert-SecureResourceGroupRbac.ps1
<# .SYNOPSIS Creates security groups in Azure Active Directory for selected Resource Groups and assigns Azure RBAC roles. .DESCRIPTION The Assert-SecureResourceGroupRbac cmdlet checks for the existence of a Security Group in Azure Active Directory for each RBAC role. For example, a Resource Group...
PowerShellCorpus/Github/jamesbannan_azure-automation-resource-security/functions/Assert-SecureSubscriptionPolicyLocation.ps1
Assert-SecureSubscriptionPolicyLocation.ps1
<# .SYNOPSIS Applies an ARM policy on a Resource Group to prevent deployment of resources in other geo-political regions. .DESCRIPTION The Assert-SecureResourceGroupPolicyLocation cmdlet checks for the existence of an ARM policy which prevents deployment of resources outside the geopolitical region in w...
PowerShellCorpus/Github/beforeyousreejesh_CreateNugetPackageOnBuild/NugetPackage/tools/init.ps1
init.ps1
param($installPath, $toolsPath, $package, $project) $projectPath=$project.Properties.Item("FullPath").Value Import-Module (Join-Path $toolsPath UploadNugetPackage.psm1) -ArgumentList $projectPath
PowerShellCorpus/Github/beforeyousreejesh_CreateNugetPackageOnBuild/NugetPackage/tools/uninstall.ps1
uninstall.ps1
param($installPath, $toolsPath, $package, $project) Set-StrictMode -Off $BuildName="CreateNuget" function CheckoutProjFileIfUnderSourceControl(){ $sourceControl = Get-Interface $project.DTE.SourceControl ([EnvDTE80.SourceControl2]) if($sourceControl.IsItemUnderSCC($project.FullName) -and $sourceCon...
PowerShellCorpus/Github/beforeyousreejesh_CreateNugetPackageOnBuild/NugetPackage/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) #uncomment this line to test in local #Add-Type -AssemblyName "Microsoft.Build" Set-StrictMode -Off $BuildName="CreateNuget" function CheckoutProjFileIfUnderSourceControl(){ $sourceControl = Get-Interface $project.DTE.SourceControl ([EnvDTE80.Sour...
PowerShellCorpus/Github/beforeyousreejesh_CreateNugetPackageOnBuild/NugetPackage/Content/NugetPackage/Scripts/UploadNugetPackage.ps1
UploadNugetPackage.ps1
[CmdletBinding()] Param ( [string]$source, [string]$apiKey ) Set-StrictMode -Off Write-Output "Publishing nuget package" $Files_Dir=Get-ChildItem (Split-Path -Path $PSScriptRoot -Parent) $NuPkg_File=$Files_Dir | where {$_.extension -eq ".nupkg"} if(!$NuPkg_File) { throw("Could not find ...
PowerShellCorpus/Github/beforeyousreejesh_CreateNugetPackageOnBuild/NugetPackage/Content/NugetPackage/Scripts/CreateNugetPackage.ps1
CreateNugetPackage.ps1
[CmdletBinding()] Param ( [Parameter(Mandatory=$True)] [ValidateScript({Test-Path $_})] [string]$ProjectFilePath, [Parameter(Mandatory=$True)] [ValidateScript({Test-Path $_})] [string]$OutputDirectory, [Parameter(Mandatory=$True)] [ValidateSet('CreateNuget','CreateAndPublishNuget'...
PowerShellCorpus/Github/OPS-E2E-PPE_E2E_NewRepo_2017_3_28_10_5_36/.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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/EliPedro_ProjectDDD/ProjetoModeloTDD/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/lexaat22_PartyInvites/PartyInvites/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/lexaat22_PartyInvites/PartyInvites/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/odelljl_asf_1/HelloWorldApplication/Scripts/Deploy-FabricApplication.ps1
Deploy-FabricApplication.ps1
<# .SYNOPSIS Deploys a Service Fabric application type to a cluster. .DESCRIPTION This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. .NOTES WARNING: This script file is invoked by Visual Studio. Its paramet...
PowerShellCorpus/Github/tienbui123_School/SchoolWebSerVice/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/tienbui123_School/SchoolWebSerVice/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/tienbui123_School/SchoolWebSerVice/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/tienbui123_School/SchoolWebSerVice/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/tienbui123_School/SchoolWebSerVice/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/tienbui123_School/SchoolWebSerVice/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/GeeLaw_1drv-layout/Publish-OneDriveFolderLayout.ps1
Publish-OneDriveFolderLayout.ps1
Function Publish-OneDriveFolderLayout { Param ( [Parameter(Mandatory = $true)] [string]$AccessToken ) $local:ErrorActionPreference = 'Stop'; $local:idPrefix = (Get-Item '.').Name; $local:idPrefix = $local:idPrefix.Substring(0, $local:idPrefix.IndexOf('!') + 1).ToLowerInv...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Get-OneDriveChildren.ps1
Get-OneDriveChildren.ps1
Function Get-OneDriveChildren { [CmdletBinding(DefaultParameterSetName = 'ByPath')] Param ( [Parameter(Mandatory = $true)] [string]$AccessToken, [Parameter(Mandatory = $false, ParameterSetName = 'ByPath')] [string]$Path = '/', [Parameter(Mandatory = $true, Pa...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Download-OneDriveLayout.ps1
Download-OneDriveLayout.ps1
Function Download-OneDriveLayout { Param ( [Parameter(Mandatory = $true)] [string]$AccessToken, [Parameter(Mandatory = $true)] [string]$RootId, [Parameter(Mandatory = $false)] [ValidateRange(10, 55)] [int]$MaxJobCount = 55 ) $local:Erro...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Complete-MovingOnOneDrive.ps1
Complete-MovingOnOneDrive.ps1
Function Complete-MovingOnOneDrive { Param ( [Parameter(Mandatory = $true)] [string]$AccessToken, [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string[]]$Files ) $local:ErrorActionPreference = 'Stop'; $local:validParents = [System.Colle...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Request-OneDriveToken.ps1
Request-OneDriveToken.ps1
Function Request-OneDriveToken { Param ( [Parameter(Mandatory = $true)] [string]$AppId ) Start-Process ('https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=' + $AppId + '&scope=files.readwrite&response_type=token&redirect_uri=https://login.live.com/oauth20_de...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Reset-OneDriveMess.ps1
Reset-OneDriveMess.ps1
Function Reset-OneDriveMess { 0..99 | ForEach-Object { Pop-Location; }; $local:replacer = [System.Text.RegularExpressions.Regex]::new('=@(.*?),\d+'); Get-ChildItem desktop.ini -Force -File -Recurse | ForEach-Object { $local:content = Get-Content -Path $_.FullName -Raw; $local:content =...
PowerShellCorpus/Github/GeeLaw_1drv-layout/Get-OneDriveItem.ps1
Get-OneDriveItem.ps1
Function Get-OneDriveItem { [CmdletBinding(DefaultParameterSetName = 'ByPath')] Param ( [Parameter(Mandatory = $true)] [string]$AccessToken, [Parameter(Mandatory = $false, ParameterSetName = 'ByPath')] [string]$Path = '/', [Parameter(Mandatory = $true, Parame...