full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/Github/ianpottinger_PowerShell/Load-NuGet.ps1
Load-NuGet.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { Set-PSRepository -Name PSGallery -InstallationPolicy Trusted } Start-Service WinRM $OnlineN...
PowerShellCorpus/Github/ianpottinger_PowerShell/Parse-NetStat.ps1
Parse-NetStat.ps1
$ObjectNetStat = (NetStat)[4..$NetStat.count] | ConvertFrom-String | Select-Object P2,P3,P4,P5 $ObjectNetStat | Group-Object P5 Remove-Item -Path Variable:\PSNetStat $ObjectNetStat | ForEach-Object ` { $Status = $_ $Entry = New-Object PSCustomObject -Property ` @{ Protocol = $Status....
PowerShellCorpus/Github/ianpottinger_PowerShell/Get-dotNETversions.ps1
Get-dotNETversions.ps1
Get-Host $PSVersionTable Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse ` | Get-ItemProperty -name Version,Release -EA 0 ` | Where { $_.PSChildName -match '^(?!S)\p{L}'} ` | Select PSChildName, Version, Release function Get-Framework-Versions() { $installedFrameworks = @...
PowerShellCorpus/Github/ianpottinger_PowerShell/Recover-NullifiedFiles.ps1
Recover-NullifiedFiles.ps1
# # When run from the location containing the corrupt destination data, pulls the files from the recovered source location $Output = "SubFolderName" $OutputPath = "X:" $RecoveredSource = "\\ServerHostName\ShareName$\Restored\Area\RootFolder\$Output" $NullDestination = "\\ServerHostName\ShareName$\RootFolder\$Output...
PowerShellCorpus/Github/ianpottinger_PowerShell/Profile.ps1
Profile.ps1
#$WEBcredentials = Get-Credential -Message "Enter login details for internet access via web proxy" #[System.Net.WebRequest]::DefaultWebProxy.Credentials = $WEBcredentials #[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials Import-Module -Name PSReadline Set-PSR...
PowerShellCorpus/Github/ianpottinger_PowerShell/Set-ClientTimeZone.ps1
Set-ClientTimeZone.ps1
tzutil /l | Select-String "Standard Time" | Out-File -FilePath TimeZones.list [string[]]$TimeZones = Get-Content .\TimeZones.list $TimeZones $TimeZones.Count function Set-TimeZone { [CmdletBinding(SupportsShouldProcess = $True)] param( [Parameter(ValueFromPipeline = $False, ValueFromPipelineByProperty...
PowerShellCorpus/Github/ianpottinger_PowerShell/Test-PortRange.ps1
Test-PortRange.ps1
function Test-Port { [CmdletBinding()] Param ( $HostName, $TcpPort, [int]$MsTimeOut = 10, [switch]$progress ) if ( !( Test-Connection -ComputerName $Hostname -Count 1 -Quiet ) ) { Write-Verbose "$Hostname is not pingable or host does not exist. Unable ...
PowerShellCorpus/Github/ianpottinger_PowerShell/Search-ForwardedEvents.ps1
Search-ForwardedEvents.ps1
<# .Synopsis Searches events forwarded and archived by Windows Event Collector .DESCRIPTION TL;DR .EXAMPLE Search-ForwardedEvents -InputLogs "L:\WinEvt\Logs" -OutputResults "\\ServerName\L$\WinEvt" ` -IncludeFilter "Capture","Everyone","Wanted","Everything" ` -ExcludeFilter "Ignore","Myself","D...
PowerShellCorpus/Github/ianpottinger_PowerShell/Trace-Network.ps1
Trace-Network.ps1
Get-NetEventSession Remove-NetEventSession $Trace = NetEventSession -Name 'Trace' Add-NetEventProvider -Name 'Microsoft-Windows-TCPIP' -SessionName 'Trace' Start-NewEventSession -Name 'Trace' Stop-NetEventSession -Name 'Trace' $Capture = Get-WinEvent -Path $Trace.LocalFilePath -Oldest New-TimeSpan -End...
PowerShellCorpus/Github/ianpottinger_PowerShell/Return-MissingFolder.ps1
Return-MissingFolder.ps1
[string]$PreviousLocation = "D:\Parent\" [string]$MissingFolder = "Child" [array]$LocationsFound = Get-ChildItem -Path $PreviousLocation -Directory -Recurse -Depth 2 ` | Where-Object Name -EQ $MissingFolder If ( $LocationsFound -ne $null ) { If ( $LocationsFound.Count -gt 1 ) { $Recent...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Find-LostADaccounts.ps1
Find-LostADaccounts.ps1
[string]$WhoIsThis = "ianpottinger" [array]$NameParts = $WhoIsThis.Split(" ") [int]$NamePartCount = $NameParts.Count [string]$FirstPart = $NameParts[0] [string]$LastParts = $NameParts[1..$NameParts.Count] [string]$FullName = $NameParts Write-Host -ForegroundColor Black -BackgroundColor White "Collecting Activ...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Get-ADUsersCreatedSince.ps1
Get-ADUsersCreatedSince.ps1
Import-Module ActiveDirectory $Since = 183 Get-ADUser -Filter * -Properties created,givenname,surname ` | Where-Object -Property created -GT ((Get-Date).AddDays(-$Since)) ` | Select-Object created, name, givenname, surname ` | Sort-Object created | Export-Csv CreatedThisYear.csv -NoTypeInformation
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Promote-ADDScontroller.ps1
Promote-ADDScontroller.ps1
# # Windows PowerShell script for AD DS Deployment # Import-Module ServerManager -Verbose Add-WindowsFeature Telnet-Client Windows-Server-Backup DNS AD-Domain-Services GPMC -IncludeAllSubFeatures -IncludeManagementTools -Verbose # servermanagercmd -install Telnet-Client Backup-Features DNS AD-Domain-Services G...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Get-ServerLoginSessions.ps1
Get-ServerLoginSessions.ps1
# Import the Active Directory module for the Get-ADComputer CmdLet Import-Module ActiveDirectory # Get today's date for the report $today = Get-Date # Setup email parameters $subject = "ACTIVE SERVER SESSIONS REPORT - " + $today $priority = "Normal" $smtpServer = "mail.workplace.gov.uk" $emailFrom = "admin@...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Profile.ps1
Profile.ps1
#$WEBcredentials = Get-Credential -Message "Enter login details for internet access via web proxy" #[System.Net.WebRequest]::DefaultWebProxy.Credentials = $WEBcredentials #[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials $ADdomain = Get-ChildItem Env:\USERDOMA...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Disable-ADInactiveUsers.ps1
Disable-ADInactiveUsers.ps1
#From a list of usernames in a text file, disable the accounts that have failed to login in the within the grace number of days function Disable-InactiveUsers { [CmdletBinding()] param ( [string]$Request = "REF88888888", [string]$InputList = "Users2Disable.txt", [string]$OutputCSV = "Use...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Get-ADLastUserLogins.ps1
Get-ADLastUserLogins.ps1
#From a list of usernames in a text file, find the latest date the account was logged in function Get-LastUserLogins { [CmdletBinding()] param ( [string]$InputList = "CheckUserLogins.txt", [string]$OutputCSV = "UserLoginResult.csv", [int]$InactiveDays = 60 ) $Today = Get-Date...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/ADDS checks.ps1
ADDS checks.ps1
#DCDiag (part of WS03 SP1 Support tools) displays all information about Domain Controller information. dcdiag.exe /V /C /D /E /s:#DomainControllerName# > c:\dcdiag.log #NetDiag provides information about specific network configuration for the local machine. netdiag.exe /v > c:\netdiag.log #RepAdmin helps diagni...
PowerShellCorpus/Github/ianpottinger_PowerShell/ADDS/Copy-ADUserGroups.ps1
Copy-ADUserGroups.ps1
$SourceUser = "PowerfulUser" $TargetUser = "RestrictedUser" If ( Get-Module -Name ActiveDirectory ) { Write-Host -ForegroundColor Green -BackgroundColor Black "The Active Directory module is presently loaded" } else { Try { Write-Host -Foregrou...
PowerShellCorpus/Github/ianpottinger_PowerShell/GCP/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/MSOL/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/MSOL/Renew-ADFScertificate.ps1
Renew-ADFScertificate.ps1
# https://docs.microsoft.com/en-gb/azure/active-directory/connect/active-directory-aadconnect-o365-certs # https://technet.microsoft.com/library/jj151815.aspx #Server 2012 R2 requires KB2955164 # http://support.microsoft.com/kb/2955164 #Server 2008 R2/2012 requires requires KB3094446 # http://support.microso...
PowerShellCorpus/Github/ianpottinger_PowerShell/AWS/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/DHCP/Query-DHCP.ps1
Query-DHCP.ps1
function Query-DHCP { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [string]$DHCPserver = "DHCPserver", [string]$HostName, #= "EndPoint", [string]$IPaddress, #= "192.168.144.120", [string]$MACaddress, #= "00-00-00-00-00-00", [switch]$Refresh = $false ) ...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Get-TenantVMsOS.ps1
Get-TenantVMsOS.ps1
function Get-AzureTenantVMs { [CmdletBinding()] param ( # "Drive:\folder\AzureVMs.csv" or "\\hostname\share\folder\AzureVMs.csv" [string]$CSVfile = ( (Get-Location).Path + "\AzureVMs.csv"), # $AzureSubscriptions = "Live,Non-Live;Microsoft Azure Enterprise" [string[]]$AzureSubscri...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Add-NetworkInterfaces.ps1
Add-NetworkInterfaces.ps1
[string]$AzureSubscription = "Non-Live" [string]$ResourceGroupName = "ORG-RG-SPFS-001" [string[]]$TargetVMnames = "ORG-SH-SPFS-001", "ORG-SH-SPFS-002", "ORG-SH-SPFS-003" [int]$InterfacesToAdd = 2 [int]$InterfaceOffset = 0 [switch]$Progress = $True #Login-AzureRmAccount Select-AzureRmSubscription -Subscript...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Add-DataDisks.ps1
Add-DataDisks.ps1
# Backing up virtual machines with more than 16 data disks is not supported. #https://docs.microsoft.com/en-us/azure/backup/backup-azure-vms-prepare function Add-DataDisks { [CmdletBinding()] param ( [string]$AzureSubscription = "Non-Live", [string]$ResourceGroupName = "ORG-RG-SPFS-001"...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Get-TenantVMs.ps1
Get-TenantVMs.ps1
function Get-AzureTenantVMs { [CmdletBinding()] param ( # "Drive:\folder\AzureVMs.csv" or "\\hostname\share\folder\AzureVMs.csv" [string]$CSVfile = ( (Get-Location).Path + "\AzureVMs.csv"), # $AzureSubscriptions = "Live,Non-Live;Microsoft Azure Enterprise" [string[]]$AzureSubscri...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Create-TrafficManagerProfile.ps1
Create-TrafficManagerProfile.ps1
#Get-AzureRmTrafficManagerEndpoint -Name org-ep-staffdev-001 -Type AzureEndpoints -ProfileName org-tmp-staffdev -ResourceGroupName org-rg-dev-001 $DevEnv = "training" $DevEnvLower = $DevEnv.ToLower() $DevEnvUpper = $DevEnv.ToUpper() $TrafficManagerProfile = New-AzureRmTrafficManagerProfile -Name ("ORG-TMP-STA...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Extend-DataDisk.ps1
Extend-DataDisk.ps1
function Extend-DataDisks { [CmdletBinding()] param ( [string]$AzureSubscription = "Non-Live", [string]$ResourceGroupName = "ORG-RG-SPFS-001", [string]$TargetVMname = "ORG-SH-CFSW-001", [string]$DataDiskName = "lbe-sh-cfsw-001-data-disk1", [int]$NewDataDiskSize = 1023, [s...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Extend-SystemDisk.ps1
Extend-SystemDisk.ps1
function Extend-SystemDisk { [CmdletBinding()] param ( [string]$AzureSubscription = "Non-Live", [string]$ResourceGroupName = "ORG-RG-SPFS-001", [string[]]$TargetVMnames = "ORG-SH-CFSW-001, ORG-SH-CFSW-002; ORG-SH-SOFS-001, ORG-SH-SOFS-002, ORG-SH-SOFS-003; ORG-SH-SPFS-001, ORG-SH-SPFS-0...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Migrate-AzureRMresource.ps1
Migrate-AzureRMresource.ps1
$SourceResourceName = 'org-asb-we-prodsup-001-04' $TargetSubscriptionName = 'Microsoft Azure Enterprise' $TargetResourceGroup = 'ORG-RG-PRODSUP-001' $SourceResourceID = Find-AzureRmResource -ResourceNameContains $SourceResourceName | Select-Object -ExpandProperty ResourceId $TargetSubscriptionID = Get-AzureRmS...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Build-VM.ps1
Build-VM.ps1
# Add an Azure account Add-AzureRmAccount # List all avaliable Azure subscriptions Get-AzureRmSubscription # Select a subscription to use Select-AzureRmSubscription -SubscriptionName 'Microsoft Azure Internal Consumption' # Create a new resource group $rg="RGPowerShell" $location="North Europe" New-Azure...
PowerShellCorpus/Github/ianpottinger_PowerShell/ARM/Get-InternetFacingVMs.ps1
Get-InternetFacingVMs.ps1
$AzurePublicAddresses = Get-AzureRmPublicIpAddress $AzurePublicAddresses ` | Select-Object Name, ResourceGroupName, IpAddress, Location, PublicIpAllocationMethod ` | Format-Table $AzureLoadBalancers = Get-AzureRmLoadBalancer $InternetFacingBalancers = $AzureLoadBalancers ` | Where-Object Name -Match IFLB...
PowerShellCorpus/Github/ianpottinger_PowerShell/SPO/Profile.ps1
Profile.ps1
<# Check if existing credentials are present and use them or capture login details #> If ( $SPOcredentials ) # Test-Path variable:global:Credentials { Write-Host -ForegroundColor Black -BackgroundColor White 'Using existing $SPOcredentials' } ElseIf ( $MSOLcredentials ) { Write-Host -ForegroundColor ...
PowerShellCorpus/Github/ianpottinger_PowerShell/SPO/Previous versions.ps1
Previous versions.ps1
Add-PSSnapin Microsoft.sharepoint.powershell $url = "http://contoso.com" $site = New-Object Microsoft.SharePoint.SPSite($url) $web = $site.OpenWeb() function GetCheckedOutFiles($web) { Write-Host "Processing Web: $($web.Url)..." foreach ($list in ($web.Lists | ? {$_ -is [Microsoft.SharePoint.SPDocume...
PowerShellCorpus/Github/ianpottinger_PowerShell/2016/Cluster2016Configuration.ps1
Cluster2016Configuration.ps1
Import-Module ServerManager Import-Module Deduplication, SmbShare -Verbose Import-Module FailoverClusters -Verbose #Update-Help -UICulture en-GB -Verbose #$Credentials = Get-Credential -Message "Enter credentials for cluster administrator" -UserName "Administrator" -Verbose $ClusterName = "ORG-SC-SOFS-001" ...
PowerShellCorpus/Github/ianpottinger_PowerShell/2016/Migrate Data Volume.ps1
Migrate Data Volume.ps1
# Migrating an archived NTFS volume from one server to the empty NTFS volume of another server # Increase the size of the cache used for file sharing FSUTIL behavior set memoryusage 2 # Enable tracking on local open file handles using OPENFILES /Local, same as using SysInternals 'handles' OPENFILES /Local ON ...
PowerShellCorpus/Github/ianpottinger_PowerShell/2016/Test-WMI.ps1
Test-WMI.ps1
$CheckState = Get-Content D:\islive.txt If ( (Test-Path Variable:StatusResults) -eq $true ) { Remove-Item Variable:StatusResults } $CheckState | ForEach-Object ` { $HostState = Test-NetConnection -ComputerName $_ $HostResult = $HostState | Select-Object ComputerName, RemoteAddress, PingSucceeded...
PowerShellCorpus/Github/ianpottinger_PowerShell/2016/Infrastructure2016.ps1
Infrastructure2016.ps1
ADCS: Standalone root with new 4096 bit SHA256 private key Install Active Directory Certificate Services role Install Certifcate Authority role Validality: 10 year validality Database: E:\ADCS\ Database logs: E:\ADCS\ CertUtil -Backup E:\Backups\Date CertUtil -BackupDB E:\Backups\Date CertUtil -BackupKey E:...
PowerShellCorpus/Github/ianpottinger_PowerShell/2016/Server2016Configuration.ps1
Server2016Configuration.ps1
# Configuring network details using PowerShell or the commented Networking Shell commands # Attempt to resolve the intended server hostname to avoid conflicts from a correctly functioning machine using DNS NSlookup # Request the network details for the new server, providing the hostname. $Hostname = "MemberServ...
PowerShellCorpus/Github/ianpottinger_PowerShell/SFBO/Fix-LyncWhiteScreen.ps1
Fix-LyncWhiteScreen.ps1
Get-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{00000000-0000-0000-0000-000000000000}” -Name “Compatibility Flags” Get-ItemProperty -Path “HKLM:\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{00000000-0000-0000-0000-000000000000}” -Name “Compatibility ...
PowerShellCorpus/Github/ianpottinger_PowerShell/SFBO/Profile.ps1
Profile.ps1
<# Check if existing credentials are present and use them or capture login details #> If ( $SFBOcredentials ) # Test-Path variable:global:Credentials { Write-Host -ForegroundColor Black -BackgroundColor White 'Using existing $SFBOcredentials' } ElseIf ( $MSOLcredentials ) { Write-Host -ForegroundCo...
PowerShellCorpus/Github/ianpottinger_PowerShell/CRMDO/Add-CRMlicense.ps1
Add-CRMlicense.ps1
$Users = Get-Content -LiteralPath "Z:\licensethis3.txt" $Users | ForEach-Object { $user = $_ If ($msoluser = Get-MsolUser -UserPrincipalName $user) { Write-Host "User - $user, Applying license.... `n" -ForegroundColor White $AccountSkuId = "Tenant365:CRMPLAN2" #$AccountSkuI...
PowerShellCorpus/Github/ianpottinger_PowerShell/CRMDO/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/Docker/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/DNS/Create-DNSentries.ps1
Create-DNSentries.ps1
dnscmd ORG-SP-DNS-003 /RecordAdd dev.organisation.net staffdev.dev.organisation.net. /CreatePTR A 127.0.0.1 dnscmd ORG-SV-DNS-006 /RecordAdd dev.organisation.net staffdevapi.dev.organisation.net. /CreatePTR A 127.0.0.1 dnscmd ORG-SH-DNS-009 /RecordAdd dev.organisation.net staffdevapi.dev.organisation.net. /CreatePTR ...
PowerShellCorpus/Github/ianpottinger_PowerShell/DNS/Get-ADDNSusage.ps1
Get-ADDNSusage.ps1
Import-Module ActiveDirectory Import-Module DnsServer Clear Cls [array]$ADDClist = Get-ADGroupMember "Domain Controllers" | Select-Object -ExpandProperty name $ADDClist $DomainControllers = Get-ADGroupMember "Domain Controllers" | Select-Object -ExpandProperty name $DomainControllerIPs = $DomainControlle...
PowerShellCorpus/Github/ianpottinger_PowerShell/GPO/WMI-filters.ps1
WMI-filters.ps1
<# WMI Filters https://msdn.microsoft.com/en-us/library/aa394102%28VS.85%29.aspx Non laptops SELECT * FROM Win32_Battery WHERE (BatteryStatus = 0) SELECT * FROM Win32_PhysicalMemory WHERE (FormFactor != 12) For laptops SELECT * FROM Win32_Battery WHERE (BatteryStatus <> 0) SELECT * FROM Win32_PhysicalMem...
PowerShellCorpus/Github/ianpottinger_PowerShell/ASM/Profile.ps1
Profile.ps1
#[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials #C:\Windows\system32\WindowsPowerShell\v1.0\modules #C:\Windows\syswow64\WindowsPowerShell\v1.0\modules if ( Get-PSRepository -Name PSGallery | Where-Object -Property InstallationPolicy -eq "Untrusted" ) { ...
PowerShellCorpus/Github/ianpottinger_PowerShell/ASM/CleanAzureModules.ps1
CleanAzureModules.ps1
$AzureModules = ( Get-Module -ListAvailable AzureRM.* ) $AzureModules = $AzureModules + ( Get-Module -ListAvailable AzureRM ) $AzureModules = $AzureModules + ( Get-Module -ListAvailable Azure.* ) $AzureModules = $AzureModules + ( Get-Module -ListAvailable Azure ) $AzureModules #$AzureModules | ForEach-Object { R...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/_profile.ps1
_profile.ps1
$env:PSModulePath = $env:PSModulePath + ";c:\Tools\Bin\MAX\PowerShell\modules" Import-Module MAXEX -verbose Set-Location C:\Tools\Bin
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/New-Migration.ps1
New-Migration.ps1
Function New-Migration { [cmdletbinding()] Param( [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$pbi, [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$database ...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Start-BuildMAX.ps1
Start-BuildMAX.ps1
Function Start-BuildMAX { Process { Show-InfoMessage "Starting MAX Build" $command = "cmd /c c:\tools\bin\MAX\buildmax.cmd" Invoke-Expression -Command:$command } } #export-modulemember -function Start-BuildMAX
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Invoke-CDE.ps1
Invoke-CDE.ps1
Function Invoke-CDE { [cmdletbinding()] Param( [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [int]$loanId, [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$option ) ...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Initialize-Database.ps1
Initialize-Database.ps1
Function Initialize-Database { [cmdletbinding()] Param( [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$database ) Begin { <# Helper function to show usage of cmdlet. #> ...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Invoke-DBBackup.ps1
Invoke-DBBackup.ps1
Function Invoke-DBBackup { [cmdletbinding()] Param( [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$database ) Begin { <# Helper function to show usage of cmdlet. #> Function Show-Usage { Show-I...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Invoke-LoanStatus.ps1
Invoke-LoanStatus.ps1
Function Invoke-LoanStatus { Begin { <# Helper function to launch the Loan Status Service Executable. #> Function Launch-Loan-Status-Service($loanStatusServiceDirName, $loanStatusServiceExeName) { Show-InfoMessage "Launching Loan Status ...
PowerShellCorpus/Github/swhittier_MAX/Local/PowerShell/modules/MAXEX/Show-InfoMessage.ps1
Show-InfoMessage.ps1
<# Helper function to show information message. #> Function Show-InfoMessage { [cmdletbinding()] Param( [parameter(Mandatory=$true, ValueFromPipeline)] [ValidateNotNullOrEmpty()] #No value [string]$msg ) #Write-Host $msg -ForegroundColor Whi...
PowerShellCorpus/Github/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/packages/EnterpriseLibrary.Common.6.0.1304.0/Update-EntlibConfiguration.ps1
Update-EntlibConfiguration.ps1
# ============================================================================== # Microsoft patterns & practices Enterprise Library # ============================================================================== # Copyright © Microsoft Corporation. All rights reserved. # THIS CODE AND INFORMATION IS PROVIDED "AS...
PowerShellCorpus/Github/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/packages/EnterpriseLibrary.Common.6.0.1304.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath Utils.psm1) $relativeInstallPath = Get-RelativePath ([System.Io.Path]::GetDirectoryName($dte.Solution.FullName)) $installPath $folder = (Join-Path (Join-Path $relativeInstallPath "lib") "NET45") Add-ToolFolder $folder ...
PowerShellCorpus/Github/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/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/gustavoferrazfontes_SampleBoundedContextUsingMessaging/SampleIntegratingByMessaging/packages/EnterpriseLibrary.Data.6.0.1304.0/tools/install.ps1
install.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath Utils.psm1) $relativeInstallPath = Get-RelativePath ([System.Io.Path]::GetDirectoryName($dte.Solution.FullName)) $installPath $folder = (Join-Path (Join-Path $relativeInstallPath "lib") "NET45") Add-ToolFolder $folder ...
PowerShellCorpus/Github/vagnard_Semester2Lab2/PapersDB/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/vagnard_Semester2Lab2/PapersDB/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/OPSTest_E2E_NewRepo_1489723535873/.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/JohnnyBurst_UninstallProgram/Uninstall.ps1
Uninstall.ps1
get-wmiobject -Class win32_product -Computername InsertComputerName -Filter "Name like '%software%'" | ForEach-Object { $_.Uninstall()} #Alter InsertComputerName to the name(s) of your domain joined machines. #Edit '%software%' to be the name of the software you would like uninstalled
PowerShellCorpus/Github/fenxu_fenxu_20160725_docs_empty_docset/.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 ur...
PowerShellCorpus/Github/pdl5p_dnc2a/Properties/PublishProfiles/dnc2 - Web Deploy-publish.ps1
dnc2 - Web Deploy-publish.ps1
[cmdletbinding(SupportsShouldProcess=$true)] param($publishProperties=@{}, $packOutput, $pubProfilePath) # to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327 try{ if ($publishProperties['ProjectGuid'] -eq $null){ $publishProperties['ProjectGuid'] = '91349c5d-365b-4de...
PowerShellCorpus/Github/OPSTest_E2E_Provision_1488783941650/.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/jing-tw_storage-performance/Basic-Operation/powcli/create-vm-general-purpose-profile-sequential.ps1
create-vm-general-purpose-profile-sequential.ps1
# Usage # . ./create-vm-general-purpose-profile-sequential.ps1 -num 10 # # remove vm # . ./remove-vm.ps1 $esxi_host_ip '192.168.1.101' -vm_prefix_name '20150427v' -num 10 param ( [int]$num=1, [string] $esxi_host_ip='192.168.1.101', [string] $vm_prefix_name='vm_prefix_name' ) $vCPU=2 $vRAM=4096 ...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/start-vm-general-purpose-profile-sequential.ps1
start-vm-general-purpose-profile-sequential.ps1
# Usage # . ./create-vm-general-purpose-profile-sequential.ps1 -num 10 # # remove vm # . ./remove-vm.ps1 -num 10 param ( [int]$num=1 ) $esxi_host_ip='192.168.1.101' $vm_name='v' $global:creation_start_time = Get-Date 1..$num | foreach { $date=Get-Date start-vm -vm $vm_name$_ $print_...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/start-vm-general-purpose-profile-async.ps1
start-vm-general-purpose-profile-async.ps1
# Usage # . ./start-vm-general-purpose-profile-async.ps1 -vm_prefix_name '20150427v' -num 10 # # report # .\Use-Culture.ps1 en-US {get-task} | export-csv test.csv # # remove vm # . ./remove-vm.ps1 -num 10 param ( [int]$num=1, [string] $vm_prefix_name='vm_prefix_name' ) 1..$num | foreach { start-...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/clone-vm-async.ps1
clone-vm-async.ps1
# Usage # async # .\clone-vm.ps1 -esxi_host_ip $esxi_host_ip -tempalte_img="win7-test-01" # # Batch # (a) clone 30 vm # (async) .\clone-vm.ps1 -esxi_host_ip $esxi_host_ip -clone_source_vm 'clone-source2' -vm_datastore 'datastore-103' -vm_prefix_name '20150427v' -num $count # # remove vm # . ./rem...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/create-vm-general-purpose-profile-async_study.ps1
create-vm-general-purpose-profile-async_study.ps1
# Usage # . ./create-vm-general-purpose-profile-async.ps1 -vm_prefix_name '20150427v' -num 10 # # report # .\Use-Culture.ps1 en-US {get-task} | export-csv test.csv # # remove vm # . ./remove-vm.ps1 $esxi_host_ip '192.168.1.101' -vm_prefix_name '20150427v' -num 10 param ( [int]$num=1, [string] $esxi_host...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/net-report.ps1
net-report.ps1
$esxtopInterval = 3 $first = $true $report = @() for($i = 0; $i -lt 100;$i++){ $stats = Get-EsxTop -CounterName NetPort | where{$_.ClientName -eq 'vmnic0'} if(!$first){ # create a data row $row = "" | Select ClientName, NumOfSendPackets, NumOfSendBytes, NumOfRecvPackets, NumOfRecvBytes $row.ClientName...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/move-vm-general-purpose-profile-sequential.ps1
move-vm-general-purpose-profile-sequential.ps1
# Usage # . ./move-vm-general-purpose-profile-sequential.ps1 -num 10 # # remove vm # . ./remove-vm.ps1 -num 10 param ( [int]$num=1 ) $esxi_host_ip='192.168.1.101' $vm_name='v' $esxi_host_ip_destination='192.168.1.102' $global:creation_start_time = Get-Date 1..$num | foreach { $date=Get-Date ...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/create-vm-general-purpose-profile-async.ps1
create-vm-general-purpose-profile-async.ps1
# Usage # . ./create-vm-general-purpose-profile-async.ps1 -esxi_host_ip '192.168.1.101' -vm_prefix_name '20150427v' -num 10 # # report # .\Use-Culture.ps1 en-US {get-task} | export-csv test.csv # # remove vm # . ./remove-vm.ps1 $esxi_host_ip '192.168.1.101' -vm_prefix_name '20150427v' -num 10 param ( [int...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/boot-storm-only-boot.ps1
boot-storm-only-boot.ps1
# usage: # ./testcase-09-async.ps1 #connect-viserver -server 192.168.1.200 -user root -password 1111111 # ============= Run 1 ============= <# Host 3 VirtualStor 12 * 32GB Win7 VM Boot VM "Evaluate boot storm case 1. time for this job 2. host CPU usage and cvm CPU usage - host 1 - host 2" #> $vm_pattern=...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/move-vm-general-purpose-profile-async.ps1
move-vm-general-purpose-profile-async.ps1
# Usage # . ./move-vm-general-purpose-profile-async.ps1 -esxi_host_ip_destination $esxi_host_ip_destination -vm_prefix_name '20150427v' -num 10 # # report # .\Use-Culture.ps1 en-US {get-task} | export-csv test.csv # # remove vm # . ./remove-vm.ps1 -num 10 param ( [int]$num=1, [string] $vm_prefix_name='v...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/snapshot-vm.ps1
snapshot-vm.ps1
# Usage # .\snapshot-vm.ps1 -vm_prefix_name $vm_prefix_name -num $count # param ( [int]$num=1, [string] $vm_prefix_name='vm_prefix_name' ) 1..$num | foreach { new-snapshot -vm $vm_prefix_name$_ -name "$($vm_prefix_name)-$($date)" -memory:$true -RunAsync } # wait for all VMs to finish the task. ...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/snapshot-vm-backup.ps1
snapshot-vm-backup.ps1
# Usage # step 1: # .\create-vm-general-purpose-profile-sequential.ps1 -num 1 # # step 2: # async # .\snapshot-vm.ps1 -num 1 -async:$true # sync # .\snapshot-vm.ps1 -num 1 # # Batch # (a) snapshot target vm in 30 times # (async) .\snapshot-vm.ps1 -num 30 -target_vm v1 -async:$true # ...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/remove-vm.ps1
remove-vm.ps1
# Usage # . ./remove-vm.ps1 -num 10 -vm_prefix_name '20150427v' param ( [int]$num=1, [string] $vm_name='vm_prefix_name' ) 1..$num | foreach { stop-vm -vm $vm_name$_ -confirm:$false remove-vm -vm $vm_name$_ -DeletePermanently -confirm:$false }
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/testcase-08-async-org-only-host3.ps1
testcase-08-async-org-only-host3.ps1
# usage: # ./testcase-08-async.ps1 #connect-viserver -server 192.168.1.200 -user root -password 1111111 # host 3 run 1 $count=4 $esxi_host_ip='192.168.1.103' $run_index=1 $vm_prefix_name="$($esxi_host_ip)-run-$($run_index)-20150501v" $vm_datastore='datastore-103' .\clone-vm-async.ps1 -esxi_host_ip $esxi_...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/Use-Culture.ps1
Use-Culture.ps1
############################################################################# ## ## Use-Culture ## ## From Windows PowerShell Cookbook (O'Reilly) ## by Lee Holmes (http://www.leeholmes.com/guide) ## ############################################################################# <# .SYNOPSIS Invoke a scrip...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/testcase-08-async-org.ps1
testcase-08-async-org.ps1
# usage: # ./testcase-08-async.ps1 #connect-viserver -server 192.168.1.200 -user root -password 1111111 # host 1 run 1 $count=4 $esxi_host_ip='192.168.1.101' $run_index=1 $vm_prefix_name="$($esxi_host_ip)-run-$($run_index)-20150428v" .\clone-vm-async.ps1 -esxi_host_ip $esxi_host_ip -clone_source_vm 'clone-sou...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/testcase-08-async.ps1
testcase-08-async.ps1
# usage: # ./testcase-08-async.ps1 #connect-viserver -server 192.168.1.200 -user root -password 1111111 # host 1 run 1 $count=4 $esxi_host_ip='192.168.1.101' $run_index=1 $vm_prefix_name="$($esxi_host_ip)-run-$($run_index)-20150427v" .\clone-vm-async.ps1 -esxi_host_ip $esxi_host_ip -tempalte_img "win7-test-01...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/template-vm-async.ps1
template-vm-async.ps1
# Usage # async # .\clone-vm.ps1 -esxi_host_ip $esxi_host_ip -tempalte_img="win7-test-01" # # Batch # (a) clone 30 vm # (async) .\clone-vm.ps1 -esxi_host_ip $esxi_host_ip -tempalte_img "win7-test-01" -vm_prefix_name '20150427v' -num $count # # remove vm # . ./remove-vm.ps1 -num 10 param ( [i...
PowerShellCorpus/Github/jing-tw_storage-performance/Basic-Operation/powcli/testcase-09-async-only-run3.ps1
testcase-09-async-only-run3.ps1
# usage: # ./testcase-09-async.ps1 #connect-viserver -server 192.168.1.200 -user root -password 1111111 # ============= Run 3 ============= # Host 2 -> 3 VirtualStor 4 * 30GB Win7 VM Migration VM $count=4 $esxi_host_ip='192.168.1.101' $esxi_host_ip_destination='192.168.1.103' $run_index=3 $vm_prefix_name="...