Skip to content

Instantly share code, notes, and snippets.

View megastary's full-sized avatar
🦀
Rusty.

Jakub Šindelář megastary

🦀
Rusty.
View GitHub Profile
# Test result with Pester
# Install with: Install-Module Pester -MinimumVersion 4.0.0 -Force -SkipPublisherCheck
# Import tested script
BeforeAll {
. $PSCommandPath.Replace('.Tests.ps1', '.ps1')
$File = "$([IO.Path]::GetTempPath())/$([Guid]::NewGuid())abacaba.txt"
New-Item -Path $File
}
# Test result with Pester
# Install with: Install-Module Pester -MinimumVersion 4.0.0 -Force -SkipPublisherCheck
# Import tested script
BeforeAll {
. $PSCommandPath.Replace('.Tests.ps1', '.ps1')
}
Describe 'flipfront' {
Context '([0, 1, 2, 3, 4], 2)' {
# Test result with Pester
# Install with: Install-Module Pester -MinimumVersion 4.0.0 -Force -SkipPublisherCheck
# Import tested script
BeforeAll {
. $PSCommandPath.Replace('.Tests.ps1', '.ps1')
}
Describe 'change' {
Context '0' {
# Test result with Pester
# Install with: Install-Module Pester -MinimumVersion 4.0.0 -Force -SkipPublisherCheck
# Import tested script
BeforeAll {
. $PSCommandPath.Replace('.Tests.ps1', '.ps1')
}
Describe 'nonogramrow' {
Context 'no parameters' {
@megastary
megastary / Move-Printer.ps1
Created September 24, 2020 11:08
PowerShell script, which creates new TCP/IP port, renames printer and moves printer to new port, utilizing Printing_Admin_Scripts included with every Windows OS. It is especially helpful for server still running Windows PowerShell 2.0, which lacks PrintManagement module.
<#PSScriptInfo
.VERSION 1.0
.GUID abed7be5-a430-48fb-b5fc-0f622f9e46b5
.AUTHOR Jakub Šindelář
.COMPANYNAME Houby Studio