full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/Github/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-27PartialView/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-27PartialView/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-25AnnotationAndCustomizingDisplay/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-07HtmlHelpers-ActionLink/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-07HtmlHelpers-ActionLink/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-13PreventingModelBind/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-13PreventingModelBind/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-31ImplementingSearchPagingSorting/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-31ImplementingSearchPagingSorting/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-11MappingParamAndUpdateModel/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-11MappingParamAndUpdateModel/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-14ModelBindingUsingInterface/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-14ModelBindingUsingInterface/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-18ViewEngines/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-18ViewEngines/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-22HtmlHelperCheckBoxList/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-22HtmlHelperCheckBoxList/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-16InsertUpdateDeleteUsingEF/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-16InsertUpdateDeleteUsingEF/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-15DeleteRecordsWithPostRequest/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-15DeleteRecordsWithPostRequest/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Asp.Net MVC/mvc-01Ornek/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/arslanaybars_CSharp-Workspace/Database/LINQ-EntityFramework/sqlwf-10EntityDataModel/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/arslanaybars_CSharp-Workspace/Database/LINQ-EntityFramework/sqlwf-10EntityDataModel/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/00tanker00_Powershell_Example/Get-VolumeRemain_multi.ps1 | Get-VolumeRemain_multi.ps1 | <#
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][string[]]$computername
)
Invoke-Command -ScriptBlock {Get-PSDrive -PSProvider FileSystem|sort Free} -ComputerName $computername | ft root,@{n= 'used(GB)' ; e={$_.used / 1GB}; align='right';formatstring='N2';width=10},@{n= 'free(GB)' ; e={$_.free / 1G... |
PowerShellCorpus/Github/00tanker00_Powershell_Example/Get-BJService.ps1 | Get-BJService.ps1 | <#
.SYNOPSIS
Retrieves core service information from one computer.
.DESCRIPTION
this script uses wmi to retrieve instances of win32_service class,
including keyinfomation, ofr a single state of services.
.PARAMETER - computername (is mandatory)
the name or ip of a single computer name
.PARAMETER - servicestate... |
PowerShellCorpus/Github/00tanker00_Powershell_Example/Get-VolumeRemain.ps1 | Get-VolumeRemain.ps1 | <#
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][string]$computername
)
Invoke-Command -ScriptBlock {Get-PSDrive -PSProvider FileSystem|sort Free} -ComputerName $computername | ft root,@{n= 'used(GB)' ; e={$_.used / 1GB}; align='right';formatstring='N2';width=10},@{n= 'free(GB)' ; e={$_.free / 1GB}... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/WindowsServerSpec_Example/parsing.ps1 | parsing.ps1 |
Function get-mostrecentfile {
Param(
[Parameter(Mandatory=$true)]$Pattarn,
[Parameter(Mandatory=$true)]$Server
)#end Param
Set-Location "$global:ResultsDir"
Return (Get-ChildItem | `
where Name -like "$Pattarn*" | `
Sort-Object -descending -property LastWrit... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/WindowsServerSpec_Example/ServerSpecScan.ps1 | ServerSpecScan.ps1 |
#Files and Directories Used
$currentScriptDirectory = Get-Location
$EventlgFunc = ".\Script_Modules\Eventlog_Functions.psm1"
$SrvrSpcFunc = ".\Script_Modules\ServerSpec_Functions.psm1"
$ENV:EventlgFunc = "$currentScriptDirectory\Script_Modules\Eventlog_Functions.psm1"
$ENV:SrvrSpcFunc = "$currentScriptDirector... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SvcAccountFixReport.ps1 | SvcAccountFixReport.ps1 | ##################################
## SvcAccountFixReport.ps1 ##
## Created: 7/11/2014 ##
## Created by: Louie Corbo ##
## ##
##################################
###########################################################################################################... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/PowerCLI vSphere report.ps1 | PowerCLI vSphere report.ps1 | #Add-PSSnapin VMware.VimAutomation.Core
$vSphere = "Domino.invest.com"
$User = "invest\vmadmin"
$Password = "I like virtual."
Connect-VIServer -Server $vSphere -User $User -Password $Password
Get-VM |
Select Name,
PowerState,
@{N="OS";E={$_.Guest.OSFullName}},
@{N="Datastore";E={[string]::Join(',',(Get-D... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/KMX_Services_Accounts_pwdLastSet_Report.ps1 | KMX_Services_Accounts_pwdLastSet_Report.ps1 | ##############################################
## KMX_Services_Accounts_pwdLastSet_Report ##
## 7/10/2014 ##
## By Louie Corbo ##
##############################################
##############################################################################################
#... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Connection_Test.ps1 | Connection_Test.ps1 |
Import-Module -force '.\Modules\WinSCPLibrary_Dav.psm1'
$HostName = '192.168.2.219'
$UserName = 'username'
$Password = 'password'
$SshHostKey = 'ssh-rsa 2048 78:25:df:0f:bd:6d:d1:d3:2d:46:26:92:20:1c:c8:ae'
$TEST = Set-SFTPSessionOption $HostName $UserName $Password $SshHostKey
#TEST.ListDirectory('/'... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Install_Splunk.ps1 | Install_Splunk.ps1 | # Install_Splunk_F.ps1
# Install's SPlunk Forwarder on server
# Requires output.conf and %HOSTNAME%_input.conf to be present in the same directory as the install script
# This will return the directory the script is located in.
function Get-ScriptDirectory
{
Split-Path $script:MyInvocation.MyCommand.Path
}... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SFTPDemo.ps1 | SFTPDemo.ps1 | #requires -version 2.0
<#------------------------------------------------------------------------
Script : SFTPTasks.ps1
Author : Bill.Grauer@Microsoft.com
Date : 12/27/12
Keywords : Secure FTP, SFTP, WinSCP
Comments : WinSCP Secure FTP example script using WinSCP Library module
For complete WinSC... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/EnableAccounts.ps1 | EnableAccounts.ps1 | ##################################
## EnableAccounts ##
## 6/17/2014 ##
## By Louie Corbo ##
##################################
###########################################################################################
## Script Function: Disables Accounts based on CSV F... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Update_Linux_userList.ps1 | Update_Linux_userList.ps1 | ##################################
## Update_Linux_userList ##
## 5/22/2014 ##
## By Louie Corbo ##
##################################
$IMPORTEDCSV = Import-Csv -path "L:\Log Parse\arcsight.csv"
$OUTPUTFILEPATH1 = "L:\Log Parse\arcsight-updated.csv"
$NewLine = "{0},{1},{2},... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/PasswordLastSetUpdate.ps1 | PasswordLastSetUpdate.ps1 | # Add the QUEST Active Roles AD Managements tools.
Add-PSSnapin Quest.ActiveRoles.ADManagement
Set-QADPSSnapinSettings -DefaultSizeLimit 0
# Variable for path, change to convenient location
# FORMER $exportPath = "C:\Windows\ADMT\_Option & Include Files\Users\PasswordLastSetUserstoChange.txt"
$exportPath = "C:\W... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Remove-Profile.ps1 | Remove-Profile.ps1 | function Remove-Profile {
<#
.SYNOPSIS
Deletes local User Profiles from a local or remote computer.
http://www.theinfraguy.com/2011/11/powershell-delprof-user-profile.html
.DESCRIPTION
Uses the Delete method of the Win32_UserProfile class.
.PARAMETER ComputerName
The name(s) of the computer to delete pro... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Last installed update.ps1 | Last installed update.ps1 | None |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Deployment.ps1 | Deployment.ps1 | <#-----------------------------------------------------------------------------------------------------------------
Script : Deployment.ps1
Author : Louie Corbo
Date : 01/04/15
Keywords : FileSync, ROBOCOPY, Drupal, Zip Archive
Comments : Copies files from Staging into production, and makes an archiv... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/zipupmultipledirectories.ps1 | zipupmultipledirectories.ps1 | $path = "F:\"
$list = Get-ChildItem $path
foreach($item in $list) {
$name = $item.Name
Set-Location "$path\$name"
7z a -tzip "$path\$name.zip" *
Set-Location $path
}
|
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Computer activity.ps1 | Computer activity.ps1 | import-module ActiveDirectory
$Servers = Get-ADComputer -filter * -SearchBase "ou=servers,dc=invest,dc=com" -properties IPv4Address | Select Name, IPv4Address
#-filter {Name -eq 'Heimdall'}
$Server_List = Foreach( $Server in $Servers)
{
$Output = $Server.Name
If (Test-Connection -comp $Output -count 2... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/test_ps.ps1 | test_ps.ps1 |
Get-ADComputer -Filter * -properties * | Select CN, IPv4Address, LastLogonDate | Export-Csv "C:\Users\lcorbo\Desktop\My Documents\Project\Inventory Script\Output CSVs\Computers_IP.csv" -notype
$Instance = "localhost\SQLEXPRESS"
$Test = invoke-sqlcmd -InputFile "C:\Users\lcorbo\Desktop\My Documents\Project\Inv... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/ADUser_Enable_Script_v1.ps1 | ADUser_Enable_Script_v1.ps1 | # This is a bulk AD User Enable script written by Rob Sanderson.
# C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
# Changing directory to where modules are stored.
cd .\Modules\SIDHistory\SIDHistory
# Importing modules
Import-module ActiveDirectory
Import-Module .\Modules\SIDHistory.psm1
# Sets th... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Update_Linux_Attributes_update.ps1 | Update_Linux_Attributes_update.ps1 | ##################################
## Update_Linux_Attributes ##
## 5/20/2014 ##
## By Louie Corbo ##
##################################
## Creates User attributes for Linux Users based on already existing attributes
## This section assumes the script is being run i... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/VPN_Token_Report.ps1 | VPN_Token_Report.ps1 | ##################################
## VPN_Token_Report.ps1 ##
## 8/20/2014 ##
## By Louie Corbo ##
##################################
####################
## Import Modules ##
####################
import-module ActiveDirectory
###############
## Set Paths ##
####... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SIDHistory_Test_Script_v1.ps1 | SIDHistory_Test_Script_v1.ps1 | # This is a bulk SID History removal script written by Rob Sanderson.
# C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
# Changing directory to where modules are stored.
cd C:\WindowsPowerShell\Modules\SIDHistory\SIDHistory
# Importing modules
Import-module ActiveDirectory
Import-Module .\SIDHistory... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/LASTLOGON.ps1 | LASTLOGON.ps1 | ##################################
## Update_Linux_userList ##
## 5/22/2014 ##
## By Louie Corbo ##
##################################
$IMPORTEDCSV = Import-Csv -path ".\lists\arcsight.csv"
$OUTPUTFILEPATH1 = ".\lists\arcsight-updated.csv"
$NewLine = "{0},{1},{2},{3},{4}" -... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Server deployments test.ps1 | Server deployments test.ps1 |
#Parameters
$Server = "LJC_Test"
$IP_Address = "x.x.x.x"
# VM Hardware Spec
$New_Drive_Size = 500 #This assumes a second hard drive will be attached
$Ram = 4096
$NUM_CPU = 1
$Selected_Network = "network"
# vShpere Information
$vSphere = "Dominio"
$Template_Name = "Template Location"
$Datastore = "D... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/X_Dev_PowerCLI.ps1 | X_Dev_PowerCLI.ps1 | <#
These Functions were all gained externally and no developed inhouse.
#>
Function Get-ViSession {
<#
.SYNOPSIS
Lists vCenter Sessions.
.DESCRIPTION
Lists all connected vCenter Sessions.
.EXAMPLE
PS C:\> Get-VISession
.EXAMPLE
PS C:\> Get-VISession | Where { $_.IdleMinutes -gt 5 }
.SOURC... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/certtest.ps1 | certtest.ps1 | #####################################################################
# New-SelfSignedCertificateEx.ps1
# Version 1.0
#
# Creates self-signed certificate. This tool is a base replacement
# for deprecated makecert.exe
#
# Vadims Podans (c) 2013
# http://en-us.sysadmins.lv/
######################################... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/DNS_Insert_script.ps1 | DNS_Insert_script.ps1 | # ADcomputer_Insert_script
# By Louie Corbo
# 12/5/2014
# This Script assumes "Import-Module sqlps –DisableNameChecking" has been run on the powershell instance.
# Currently uisng local Sql-express
$Instance = "localhost\SQLEXPRESS"
$DELETE_Query = "Delete from inventory.dbo.ADuser
GO"
invoke-sqlc... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/CheckAccounts.ps1 | CheckAccounts.ps1 | ##################################
## CheckAccounts ##
## 7/30/2014 ##
## By Louie Corbo ##
##################################
####################
## Import Modules ##
####################
import-module ActiveDirectory
###############
## Set Paths ##
##########... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SQL_connection.ps1 | SQL_connection.ps1 | <#------------------------------------------------------------------------
Script : SQL_connection.ps1
Author : Louie Corbo
Date : 02/19/16
Keywords : Environment checks.
Comments : Functions envolved in checking holiday's and other process
: impactful Dates
-------------------------------------... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Linux_user_refresh.ps1 | Linux_user_refresh.ps1 | ##################################
## Linux_user_refresh.ps1 ##
## 6/16/2014 ##
## By Louie Corbo ##
##################################
################################################################################################################################
## Scrip... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SignScript.ps1 | SignScript.ps1 | ## SignScript PS file
## This script signes a powershell script for use with remote execution.
## This script is reliant of the file MakeCert which can be obtained at:
## https://msdn.microsoft.com/en-us/library/windows/desktop/aa386968%28v=vs.85%29.aspx
## Louie Corbo
## 5/22/2015
$MAKECERTDIR = 'C:\Users\lcor... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Hotfix_report.ps1 | Hotfix_report.ps1 |
$Computername = "192.168.100.43"
$Last_Update = (`
Get-HotFix -ComputerName $Computername `
| Select InstalledOn `
| Sort-Object InstalledOn -Descending `
| Select InstalledOn -First 1 `
).installedOn
$Last_Update.ToString("MM-dd-yyyy") |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/ADcomputer_Insert_script.ps1 | ADcomputer_Insert_script.ps1 | # ADcomputer_Insert_script
# By Louie Corbo
# 12/5/2014
# This Script assumes "Import-Module sqlps –DisableNameChecking" has been run on the powershell instance.
# Currently uisng local Sql-express
$Instance = "servername\SQLEXPRESS"
$DELETE_Query = "Delete from inventory.dbo.ADcomputer
GO"
invoke-s... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/password_exporter_example.ps1 | password_exporter_example.ps1 | Import-module -force '.\Modules\Password_Management.psm1'
Export-Local_Password 'password' "/\Passwords\Passwords.txt" "password_export"
|
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Enabled_User_Validation_v1.ps1 | Enabled_User_Validation_v1.ps1 | # This is a bulk Enabled User Validation script written by Rob Sanderson.
# C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
# Changing directory to where modules are stored.
cd C:\WindowsPowerShell\Modules\SIDHistory\SIDHistory
# Importing modules
Import-module ActiveDirectory
Import-Module .\SIDHis... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Disabled_User_Enumeration_v1.ps1 | Disabled_User_Enumeration_v1.ps1 | # This is a bulk Disabled User Enumeration script written by Rob Sanderson.
# C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
# Changing directory to where modules are stored.
cd C:\WindowsPowerShell\Modules\SIDHistory\SIDHistory
# Importing modules
Import-module ActiveDirectory
Import-Module .\SIDH... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Disabled_FAKECORP_Report.ps1 | Disabled_FAKECORP_Report.ps1 | if (!(Test-Path FAKECORP:)){
New-PSDrive -Name FAKECORP -PSProvider ActiveDirectory -Server "ADSERVER.FAKECORP.adcmax.carmax.org" -Scope Global -root "//RootDSE/"
}
cd FAKECORP:
Get-ADUser -filter {Enabled -eq "False"} | Export-Csv C:\Users\9500026\Downloads\CSV\Disabled_FAKEUSERS.csv -notypeinformation
cd c... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SIDHistory_Removal_Script_v1.ps1 | SIDHistory_Removal_Script_v1.ps1 | # This is a bulk SID History removal script written by Rob Sanderson.
# C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe
# Changing directory to where modules are stored.
cd C:\WindowsPowerShell\Modules\SIDHistory\SIDHistory
# Importing modules
Import-module ActiveDirectory
Import-Module .\SIDHistory... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/unit_tests.ps1 | unit_tests.ps1 | <#-----------------------------------------------------------------------------------------------------------------
Script : unit_tests.ps1
Author : Louie Corbo
Date : 02/19/16
Keywords :
Comments :
---------------------------------------------------------------------------------------------------... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SFTP_connection.ps1 | SFTP_connection.ps1 | Function Open-SFTPSession {
# Load WinSCP .NET assembly
Add-Type -Path ".\DLL\WinSCPnet.dll"
# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
$sessionOptions.HostName = '192.168.209.219'
$sessionOptions.Us... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/FileSync.ps1 | FileSync.ps1 | <#-----------------------------------------------------------------------------------------------------------------
Script : FileSync.ps1
Author : Louie Corbo
Date : 12/30/15
Keywords : FileSync, ROBOCOPY, Drupal
Comments :
---------------------------------------------------------------------------... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/New_SelfSignedCertificateEX.ps1 | New_SelfSignedCertificateEX.ps1 | #####################################################################
# New-SelfSignedCertificateEx.ps1
# Version 1.0
#
# Creates self-signed certificate. This tool is a base replacement
# for deprecated makecert.exe
#
# Vadims Podans (c) 2013
# http://en-us.sysadmins.lv/
######################################... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/encrypt_test.ps1 | encrypt_test.ps1 |
Import-Module -force '.\Modules\Gnupg_Encryption.psm1'
# Event Type
$Event_Type = 'encrypttest'
# Files to Send
$toSend_Path = ".\"
$filetype = "*.txt"
$Files_Too_Encrypt = $toSend_Path + $filetype
$Recipient = 'email@email.com'
If (!([System.Diagnostics.EventLog]::SourceExists('encrypttest'))) {
New-... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Database_refresh.ps1 | Database_refresh.ps1 | # ADcomputer_Insert_script
# By Louie Corbo
# 12/9/2014
# Currently using local Sql-express
Import-Module sqlps –DisableNameChecking
$Instance = " localhost\SQLEXPRESS"
$Drop_DB_Query = "C:\Users\lcorbo\Desktop\My Documents\Project\Inventory Script\SQL Scripts\Drop_Inventory_Database.sql"
$Create_DB_Quer... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Update_Linux_Attributes.ps1 | Update_Linux_Attributes.ps1 | ##################################
## Update_Linux_Attributes ##
## 5/20/2014 ##
## By Louie Corbo ##
##################################
## Creates User attributes for Linux Users based on already existing attributes
$OUTPUTFILEPATH1 = "C:\AdminFiles\Scripts\AD Scripting\... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/winrm-config.ps1 | winrm-config.ps1 | winrm quickconfig -q
winrm quickconfig -transport:http
winrm set winrm/config @{MaxTimeoutms="1800000"}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="800"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
winrm set winrm/config/client/auth @{Basic... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Days passed from last Windows Update Backup.ps1 | Days passed from last Windows Update Backup.ps1 | function Get-DateDiff {
param (
[CmdletBinding()]
[parameter(Mandatory=$true)]
[datetime]$date1,
[parameter(Mandatory=$true)]
[datetime]$date2
)
if ($date2 -gt $date1){$diff = $date2 - $date1}
else {$diff = $date1 - $date2}
$diff
}
try {
$... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/SIDHistory-Welcome.ps1 | SIDHistory-Welcome.ps1 | <#-----------------------------------------------------------------------------
SID History PowerShell Module v1.5
Ashley McGlone, Microsoft Premier Field Engineer
http://aka.ms/SIDHistory
July, 2013
LEGAL DISCLAIMER
This Sample Code is provided for the purpose of illustration only and is not
intended to be us... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Powershell_Scripts/Server_Deployment_(Doop).ps1 | Server_Deployment_(Doop).ps1 | # Server Deployment Script
# Author: Louie Corbo Date: 06/03/2015
#Parameters
$global:Server = "Doop" # VM Server Name.
$global:IP_Address = "192.168.100.122" # VM Server IPv4 Address.
# VM Hardware Spec
$global:New_Drive_Size = 500 #This assumes a second h... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Modules/New-SelfSignedCertificateEx.ps1 | New-SelfSignedCertificateEx.ps1 | #####################################################################
# New-SelfSignedCertificateEx.ps1
# Version 1.0
#
# Creates self-signed certificate. This tool is a base replacement
# for deprecated makecert.exe
#
# Vadims Podans (c) 2013
# http://en-us.sysadmins.lv/
######################################... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Modules/Server_Administration_Task.ps1 | Server_Administration_Task.ps1 | # Administration task function for configuring Windows 2012 servers.
# Written by Louie Corbo
# Still being Tested, do not use in production.
# Date 5/11/2015
# Configures a Network Device to a static IPaddress.
# Tested successfully 5/20/2015
Function NET_INT_CONF() {
param(
[string]$IP_Address_LF,
[... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Server_Deployment_PowerCLI/PowerCLI Functions.ps1 | PowerCLI Functions.ps1 | # PowerCLI Frunctions for provisioning a template.
Function Confirm_Datastore_availability() {
param(
[string]$myTemplate,
[string]$myDatastoreCluster,
[INT]$MyNew_Drive_Size
)
$Size_needed = Get-HardDisk -Template $myVMName
$Size_available = Get-Datastore [math]::Round($info.Capacity - $info.P... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Server_Deployment_PowerCLI/Server deployments test.ps1 | Server deployments test.ps1 |
#Parameters
$Server = "Doop"
<#
$IP_Address = "x.x.x.x"
# VM Hardware Spec
$New_Drive_Size = 500 #This assumes a second hard drive will be attached
$Ram = 4096
$NUM_CPU = 1
$Selected_Network = "network"
# vShpere Information
$vSphere = "Dominio"
$Template_Name = "Template Location"
$Datastore = "Dat... |
PowerShellCorpus/Github/singlestone_Windows_Scripts_Examples/Server_Deployment_PowerCLI/Server Administration Task.ps1 | Server Administration Task.ps1 | # Administration task function for configuring Windows 2012 servers.
# Written by Louie Corbo
# Still being Tested, do not use in production.
# Date 5/11/2015
# Configures a Network Device to a static IPaddress.
Function NET_INT_CONF() {
param(
[string]$IP_Address_LF,
[string]$InterfaceAlias_LF,
[Int... |
PowerShellCorpus/Github/Bpedigo_powershell-scripts/run-module.ps1 | run-module.ps1 |
<#
.SYNOPSIS
simple scripte to show what modules are available for use.
Also, a short line to remind the user how to import the module.
.DESCRIPTION
.PARAMETER <Parameter-Name>
.EXAMPLE
run-module
.INPUTS
.OUTPUTS
.NOTES
Author: Brian Pedigo
Created: <date>
.... |
PowerShellCorpus/Github/Bpedigo_powershell-scripts/create-module.ps1 | create-module.ps1 | <#
.SYNOPSIS
Creates a new model. You can choose to create it for all users or just the
current user.
.DESCRIPTION
.PARAMETER -filename -all -edit
.EXAMPLE
create-module filename Luna -all -edit
.INPUTS
.OUTPUTS
.NOTES
Author: Brian Pedigo
Created: March 2015
.LI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.