Skip to content

Instantly share code, notes, and snippets.

View PrzemyslawKlys's full-sized avatar
🍉
Dreaming about great things! A bit bored...

Przemysław Kłys PrzemyslawKlys

🍉
Dreaming about great things! A bit bored...
View GitHub Profile
@PrzemyslawKlys
PrzemyslawKlys / gist:46bbb9e1acb24fe09b530d071f92cbe6
Last active November 5, 2018 08:24
Merge-Array - Adding field
$Array1 = @()
$Element1 = [PSCustomObject] @{ Name = 'Company1'; Count = 259 }
$Element2 = [PSCustomObject] @{ Name = 'Company2'; Count = 300 }
$Array2 = @()
$Element3 = [PSCustomObject] @{ Name = 'Company1'; Count = 25 }
$Element4 = [PSCustomObject] @{ Name = 'Company2'; Count = 100 }
<#
.SYNOPSIS
Create a new desktop wallpaper from various sources and optionally overlay some text.
.DESCRIPTION
The script can be run manually, at logon or even as a scheduled task to update the wallpaper regularly
Wallpaper sources include:
- A solid colour
function Test-Array {
param (
[string[]] $other = @(),
[bool[]] $thisValue = @(),
[bool[]] $Bold = @(),
[bool[]] $Italic = @()
)
$thisValue.GetType()
$bold.GetType()
foreach ($value in $thisValue) {
#Install-Module ImportExcel
Import-Module ImportExcel
$file = Import-Excel -Path "Book1.xlsx"
$test = @()
foreach ($l in $file) {
$test += "$($l.Name) $($l.Surname)"
}
$test | Export-Excel -Path "Book-Exported.xlsx"