This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Draws graph in the Powershell console | |
.DESCRIPTION | |
Consumes datapoints and draws colored coded fully customizable graph in the Powershell console. | |
.PARAMETER Datapoints | |
Array of data points which is to be plotted on the graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-PipeInFunction | |
{ | |
[CmdletBinding()] | |
[Alias()] | |
[OutputType([String])] | |
Param | |
( | |
[Parameter(Mandatory=$true, | |
ValueFromPipeline=$true, | |
ValueFromPipelineByPropertyName=$true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Telegram = { | |
token: null, | |
to: null, | |
message: null, | |
proxy: null, | |
parse_mode: null, | |
escapeMarkup: function (str, mode) { | |
switch (mode) { | |
case 'markdown': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Хотим чтобы консолько балакала по аглицки | |
[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
### Парсим | |
$DataOutput = (((quser) -replace '^>', '') -replace '\s{2,}', ',').Trim() | ForEach-Object { | |
if ($_.Split(',').Count -eq 5) { | |
Write-Output ($_ -replace '(^[^,]+)', '$1,') | |
} else { | |
Write-Output $_ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
### Host Console Settings | |
$ColorsTrue = @{ForegroundColor = "Black"; BackgroundColor = "Green"} | |
$ColorsFalse = @{ForegroundColor = "White"; BackgroundColor = "DarkRed"} | |
$ColorsError = @{ForegroundColor = "White"; BackgroundColor = "Red"} | |
$ColorsInfo = @{ForegroundColor = "DarkGray"} | |
$ColorsVerbose = @{ForegroundColor = "DarkYellow"} | |
### Paths to CMDLets | |
. C:\Powershell\Functions\Test-TCPing.ps1 | |
. C:\Powershell\Functions\ConvertTo-Encoding.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Data Source | |
$items = 1..85 | |
# Loop | |
$items | ForEach-Object ` | |
-Begin { | |
# Initialize Tracking | |
$total = $items.Count | |
$start = Get-Date | |
$i = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Telegram = { | |
token: null, | |
to: null, | |
message: null, | |
proxy: null, | |
parse_mode: null, | |
escapeMarkup: function (str, mode) { | |
switch (mode) { | |
case 'markdown': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# | |
# Скрипт для архивации журнала регистрации 1С Предприятия 8.3 - https://gitlab.pravo.tech/p.lvov/compress-1coldjournals | |
# | |
### | |
$isDebug = $false | |
$ScriptVersion = [version]1.3 | |
$StartScriptDate = Get-Date | |
$LogFileName = (Join-Path $PSScriptRoot ("\logs\" + (Get-Date).ToString("yyyy-MM-dd_HH-mm-ss") + '_1C_Journal_Compress.log')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear-Host | |
$LogFileName = (Join-Path $PSScriptRoot ("\logs\" + (Get-Date).ToString("yyyy-MM-dd_HH-mm-ss") + '_LogOff.log')) | |
function Log | |
{ | |
[CmdletBinding()] | |
[Alias()] | |
#[OutputType([String])] | |
Param |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 7 | |
#Requires -Modules SqlServer | |
#Install-Module SqlServer -Force | |
Clear-Host | |
Import-Module SqlServer | |
### Статус Debug | |
$IsDebug = $false |
OlderNewer