PoshCode Archive  Artifact [d0345f98d2]

Artifact d0345f98d29493813423422161abe244812a026a5166299a351a7d232ec45abb:

  • File Trims-text-and-signs-it.ps1 — part of check-in [58c88c2677] at 2018-06-10 13:50:39 on branch trunk — Trims text and signs it (user: unknown size: 583)

# encoding: ascii
# api: powershell
# title: 
# description: Trims text and signs it
# version: 0.1
# license: CC0
# x-poshcode-id: 5135
# x-archived: 2014-05-05T02:10:44
#
#
(Get-Content c:\loltweaks.export.ps1) | ` Where-Object { $_ -match '\S' } | ` Out-File c:\loltweaks.ps1
$filename = "c:\loltweaks.ps1"
$lines = (Get-Content $filename);
$lines | ForEach-Object { $_.Trim(); } | Out-File C:\LoLtweaks.ps1
Set-AuthenticodeSignature C:\LoLtweaks.ps1 @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0] -TimestampServer http://timestamp.comodoca.com/authenticode