Skip to content

Instantly share code, notes, and snippets.

View stephaneerard's full-sized avatar

Stéphane Erard stephaneerard

  • Pragmatism & Enthusiasm
  • Nice, France
View GitHub Profile
vagrant@infra:~$ sudo ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:50:a7:ad:75 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
using namespace System.Text.RegularExpressions
function Get-Config {
[CmdletBinding()]
param(
[string] $Path,
[string[]] $Env
)
# env vars to interpolate in imports (i.e. "%env%.json")
using namespace System.Text.RegularExpressions
[CmdletBinding]
function Get-Config {
param(
[string] $Path,
[string[]] $Env
)
# env vars to interpolate in imports (i.e. "%env%.json")
using namespace System.Text.RegularExpressions
[CmdletBinding]
function Get-Config {
param(
[string] $Path,
[string[]] $Env
)
# env vars to interpolate in imports (i.e. "%env%.json")
[cmdletbinding]
function Get-Project {
param(
[string] $Name
)
$projects = frenchex-config get "projects" | convertfrom-json
if(![string]::IsNullOrEmpty($Name)){
$bits = $projects.psobject.properties | Foreach-Object {
Import-Module Pester
Describe "New-SoftwareProject" {
import-module -Name $PSScriptRoot\..\New-SoftwareProject -Force
BeforeEach {
Push-Location 'TestDrive:\'
$testDir = (Get-Item 'TestDrive:\').FullName
}
param(
[switch] $Force
)
function Iterate {
param(
$OverModules,
[string] $CurrentPath
)
// test file .ps1 which can be executed and debugged using vscode in my case
param(
)
Describe "New-SoftwareProject" {
BeforeAll {
$beforeDir = Get-Location
Import-Module -Name "$PSScriptRoot/../.infra/Utils"
INFO interface: detail: Add-WindowsCapability -Online -Name Rsat.RemoteAccess.Management.Tools
INFO interface: detail: win-srv: Add-WindowsCapability -Online -Name Rsat.RemoteAccess.Management.Tools
win-srv: Add-WindowsCapability -Online -Name Rsat.RemoteAccess.Management.Tools
INFO interface: detail: Path :
INFO interface: detail: win-srv: Path :
win-srv: Path :
INFO interface: detail: Online : True
INFO interface: detail: win-srv: Online : True
win-srv: Online : True
INFO interface: detail: Add-WindowsCapability -Online -Name Rsat.RemoteDesktop.Services.Tools
# create local admin
$Username = 'localadmin'
$Password = 'l0ng-p4ssw0rd'
$SecuredPassword = (ConvertTo-SecureString -AsPlainText -Force $Password)
$group = "Administrators"
$newLocalUserParams = @{
AccountNeverExpires = $true
Password = $SecuredPassword