Skip to content

Instantly share code, notes, and snippets.

View equelin's full-sized avatar

Erwan Quélin equelin

View GitHub Profile
@equelin
equelin / Set-VDSInfrastructureTrafficResourceConfig
Last active July 9, 2017 21:10
Configure shares parameters for system traffic with distributed switchs and Network I/O control
<#
.SYNOPSIS
Configure shares parameters for system traffic with distributed switchs and Network I/O control.
.DESCRIPTION
You can use Network I/O Control on a distributed switch to configure bandwidth allocation for the traffic that is related to the main system features in vSphere:
- Management
- Fault Tolerance
- iSCSI
- NFS
- Virtual SAN
# We cloned our project to C:\sc\PSStackExchange
$Path = 'C:\sc\PSStackExchange'
$ModuleName = 'PSStackExchange'
$Author = 'RamblingCookieMonster'
$Description = 'PowerShell module to query the StackExchange API'
# Create the module and private function directories
mkdir $Path\$ModuleName
mkdir $Path\$ModuleName\Private
mkdir $Path\$ModuleName\Public
@equelin
equelin / gist:84fc7f37339ef15208ae
Created July 28, 2015 14:06
prep_centos_rhel_7.X_part2
# Désactivation log
systemctl stop rsyslog.service
/sbin/service auditd stop
# Suppression anciens kernels
/bin/package-cleanup --oldkernels --count=1 -y
#Suppression traces YUM
/usr/bin/yum clean all
@equelin
equelin / gist:a2096af3dda8dfefa1d8
Created July 28, 2015 14:05
prep_centos_rhel_7.X_part1
# Désactivation logs le temps de la préparation du template
systemctl stop rsyslog.service
/sbin/service auditd stop
# Désactivation SELINUX
setenforce 0
sed -i -e 's!^SELINUX=.*!SELINUX=disabled!' /etc/selinux/config
# Désactivation FIREWALLD
systemctl stop firewalld
@equelin
equelin / gist:5cedbdc3a98c97558319
Last active August 29, 2015 14:25
prep_centos_rhel_6.X_part2
# Désactivation logs le temps de la préparation du template
/sbin/service rsyslog stop
/sbin/service auditd stop
# Suppression anciens kernels
/usr/bin/package-cleanup --oldkernels --count=1 -y
#Suppression traces YUM
/usr/bin/yum clean all
@equelin
equelin / gist:4dcda9f85f3c7e2ccb93
Last active August 29, 2015 14:25
prep_centos_rhel_6.X_part1
# Désactivation logs le temps de la préparation du template
/sbin/service rsyslog stop
/sbin/service auditd stop
# Désactivation SELINUX (optionnel)
/usr/sbin/setenforce 0
sed -i -e 's!^SELINUX=.*!SELINUX=disabled!' /etc/selinux/config
# Désactivation IPTABLES (optionnel)
/sbin/service iptables stop
Param (
[Parameter(Mandatory=$true)]
[string]$VMHost,
[string]$Datastore="*",
[int]$asyncUnmapFilePourcentage=50
)
# Récupere les informations sur le ou les datastore(s)
$Datastores = Get-Datastore -Name $Datastore
<#
.SYNOPSIS
Reclame l'espace libre sur les datastores en thin provisionning.
.DESCRIPTION
Reclame l'espace libre sur les datastores en thin provisionning.
.PARAMETER Datastore
Nom d'un datastore sur lequel sera reclame l'espace libre. le datastore peut etre passé en argument.