Skip to content

Instantly share code, notes, and snippets.

View Stephanevg's full-sized avatar
:shipit:
I like computers

Stéphane Stephanevg

:shipit:
I like computers
View GitHub Profile
#Test-PortConnectivity -Source '127.0.0.1' -RemoteDestination 'dc1' -Port 57766
#Test-PortConnectivity '127.0.0.1' 'dc1' 57766 -Protocol UDP -Iterate
#Test-PortConnectivity 'localhost' 'dc2' 51753 -Protocol UDP
#Test-PortConnectivity -Source $EUCAS -RemoteDestination $EUMBX -Port 135 -Iterate
#Test-PortConnectivity -Source 'localhost' -RemoteDestination '127.0.0.1' -Port 135 -Iterate -protocol TCP
Function Test-PortConnectivity()
{
#source -> https://geekeefy.wordpress.com/2016/01/07/powershell-telnet-tcpudp-ports-on-multiple-machines/
Param
@Stephanevg
Stephanevg / Get-ClassConstructors.ps1
Last active October 3, 2017 11:27
Finds the list of constructors from a given class
Function Get-ClassConstructor {
Param(
[Parameter(Mandatory=$true)]$ClassName
)
$return = [$ClassName].GetConstructors() | % {$_.GetParameters() | Select Member -Unique }
return $return
}
@Stephanevg
Stephanevg / Get-ClusterDataStore.ps1
Last active August 4, 2017 13:53
Returns the Storage Pods that are attached to a specefic cluster
Function Get-ClusterDataStore {
<#
.SYNOPSIS
Retrieves the datastores that are attached to a cluster
.DESCRIPTION
Returns
.EXAMPLE
@Stephanevg
Stephanevg / FunctionNotClosing.ps1
Last active July 27, 2017 09:50
VSCODE BUG: Code blocks do not close correctly.
function Write-ChangeLog {
[Cmdletbinding()]
param (
[Parameter(Mandatory=$true)][String]$Message
)
$ChangeLogWriter = "C:\Admin\Tools\ChangeLogWriter\ChangeLogWriter.exe"
if (Test-Path $ChangeLogWriter) {
Write-Log -Message "Write to the ChangeLogWriter" -Status INFO
@Stephanevg
Stephanevg / readme.md
Created July 25, 2017 12:27
Bug VS code Readme.md display breaks after adding to staging area

Documentation for SDB-OPR-GenerateTaskScheduleCSVInputFile.ps1

Email LastModifiedDate Author CreationDate
  |  25.07.2017      |  Stephane van Gulick |  25.07.2017 

Script History

date Comment Name
@Stephanevg
Stephanevg / settings.json
Last active July 17, 2017 12:44
vscode user settings
{
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
"workbench.colorTheme": "PowerShell ISE",
"workbench.iconTheme": "vscode-great-icons",
"editor.fontSize": 16,
"files.defaultLanguage": "powershell",
"editor.autoClosingBrackets": true,
"editor.autoIndent": true,
"powershell.codeFormatting.preset" : "OTBS"
}
@Stephanevg
Stephanevg / Profile.ps1
Created June 30, 2017 07:41
windows powershell profile
function prompt
{
# The at sign creates an array in case only one history item exists.
$history = @(get-history)
if($history.Count -gt 0)
{
$lastItem = $history[$history.Count - 1]
$lastId = $lastItem.Id
}
@Stephanevg
Stephanevg / Packer error log Halting machine gracefully.log
Last active June 27, 2017 07:52
Packer error log Halting machine gracefully
2017/06/27 08:14:32 [INFO] Packer version: 1.0.2
2017/06/27 08:14:32 Packer Target OS/Arch: windows amd64
2017/06/27 08:14:32 Built with Go Version: go1.8.3
2017/06/27 08:14:32 Using internal plugin for parallels-pvm
2017/06/27 08:14:32 Using internal plugin for digitalocean
2017/06/27 08:14:32 Using internal plugin for oneandone
2017/06/27 08:14:32 Using internal plugin for cloudstack
2017/06/27 08:14:32 Using internal plugin for googlecompute
2017/06/27 08:14:32 Using internal plugin for null
2017/06/27 08:14:32 Using internal plugin for triton
@Stephanevg
Stephanevg / packer hyperv
Last active June 27, 2017 06:58
Packer hyperv
{
"variables": {
"PACKER_LOG": "1",
"PACKER_LOG_PATH": "packerlog.txt"
},
"Builders": [{
"type": "hyperv-iso",
"iso_url": "C:\\Users\\taavast3\\Downloads\\en_windows_server_2012_r2_with_update_x64_dvd_6052708 (1).iso",
"iso_checksum": "8E98E65389E8353186356C96B3A26DD1",
"iso_checksum_type": "md5",
@Stephanevg
Stephanevg / Error log packer hyperv & winrm communicator
Last active June 21, 2017 22:03
Error log packer hyperv & winrm communicator
PS C:\Users\taavast3\OneDrive\Scripting\Packer> .\packer.exe build .\hyperv.json
2017/06/21 23:32:11 Using internal plugin for amazon-ebssurrogate
2017/06/21 23:32:11 Using internal plugin for amazon-instance
2017/06/21 23:32:11 Using internal plugin for hyperv-iso
2017/06/21 23:32:11 Using internal plugin for oneandone
2017/06/21 23:32:11 Using internal plugin for parallels-pvm
2017/06/21 23:32:11 Using internal plugin for qemu
2017/06/21 23:32:11 Using internal plugin for virtualbox-iso
2017/06/21 23:32:11 Using internal plugin for alicloud-ecs
2017/06/21 23:32:11 Using internal plugin for amazon-chroot