Dmitry Nefedov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
20 additions and
9 deletions
-
Sophia/PowerShell 5.1/Functions.ps1
-
Sophia/PowerShell 5.1/Manifest/Sophia.psd1
-
Sophia/PowerShell 5.1/Module/Sophia.psm1
-
Sophia/PowerShell 5.1/Sophia.ps1
|
|
@ -2,8 +2,8 @@ |
|
|
|
.SYNOPSIS |
|
|
|
The TAB completion for functions and their arguments |
|
|
|
|
|
|
|
Version: v5.11 |
|
|
|
Date: 12.07.2021 |
|
|
|
Version: v5.11.1 |
|
|
|
Date: 13.07.2021 |
|
|
|
|
|
|
|
Copyright (c) 2014–2021 farag |
|
|
|
Copyright (c) 2019–2021 farag & Inestic |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
@{ |
|
|
|
RootModule = '..\Module\Sophia.psm1' |
|
|
|
ModuleVersion = '5.11' |
|
|
|
ModuleVersion = '5.11.1' |
|
|
|
GUID = '109cc881-c42b-45af-a74a-550781989d6a' |
|
|
|
Author = 'Dmitry "farag" Nefedov' |
|
|
|
Copyright = '(c) 2014–2021 farag & Inestic. All rights reserved' |
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
.SYNOPSIS |
|
|
|
Sophia Script is a PowerShell module for Windows 10 fine-tuning and automating the routine tasks |
|
|
|
|
|
|
|
Version: v5.11 |
|
|
|
Date: 12.07.2021 |
|
|
|
Version: v5.11.1 |
|
|
|
Date: 13.07.2021 |
|
|
|
|
|
|
|
Copyright (c) 2014–2021 farag |
|
|
|
Copyright (c) 2019–2021 farag & Inestic |
|
|
@ -93,7 +93,7 @@ function Checkings |
|
|
|
# Check whether the logged-in user is an admin |
|
|
|
$CurrentUserName = (Get-Process -Id $PID -IncludeUserName).UserName | Split-Path -Leaf |
|
|
|
$CurrentSessionId = (Get-Process -Id $PID -IncludeUserName).SessionId |
|
|
|
$LoginUserName = (Get-Process -IncludeUserName -ErrorAction SilentlyContinue | Where-Object -FilterScript {($_.Name -eq "explorer") -and ($_.SessionId -eq $CurrentSessionId)}).UserName | Select-Object -Index 1 | Split-Path -Leaf |
|
|
|
$LoginUserName = (Get-Process -IncludeUserName -ErrorAction SilentlyContinue | Where-Object -FilterScript {($_.ProcessName -eq "explorer") -and ($_.SessionId -eq $CurrentSessionId)}).UserName | Select-Object -First 1 | Split-Path -Leaf |
|
|
|
|
|
|
|
switch ($CurrentUserName -ne $LoginUserName) |
|
|
|
{ |
|
|
@ -2888,10 +2888,10 @@ function WindowsColorMode |
|
|
|
The default app mode |
|
|
|
|
|
|
|
.PARAMETER Dark |
|
|
|
Set the default app mode dark |
|
|
|
Set the default app mode to dark |
|
|
|
|
|
|
|
.PARAMETER Light |
|
|
|
Set the default app mode light |
|
|
|
Set the default app mode to light |
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
AppMode -Dark |
|
|
|
|
|
@ -883,13 +883,24 @@ RestartDeviceAfterUpdate -Enable |
|
|
|
#endregion System |
|
|
|
|
|
|
|
#region WSL |
|
|
|
# Install the Windows Subsystem for Linux (WSL) ### |
|
|
|
# Install the Windows Subsystem for Linux (WSL) |
|
|
|
# Установить подсистему Windows для Linux (WSL) |
|
|
|
# WSL -Enable |
|
|
|
|
|
|
|
# Uninstall the Windows Subsystem for Linux (WSL) |
|
|
|
# Удалить подсистему Windows для Linux (WSL) |
|
|
|
# WSL -Disable |
|
|
|
|
|
|
|
<# |
|
|
|
Download and install the Linux kernel update package |
|
|
|
Set WSL 2 as the default version when installing a new Linux distribution |
|
|
|
Run the function only after WSL installed and PC restart |
|
|
|
|
|
|
|
Скачать и установить пакет обновления ядра Linux |
|
|
|
Установить WSL 2 как версию по умолчанию при установке нового дистрибутива Linux |
|
|
|
Выполните функцию только после установки WSL и перезагрузки ПК |
|
|
|
#> |
|
|
|
# EnableWSL2 |
|
|
|
#endregion WSL |
|
|
|
|
|
|
|
#region Start menu |
|
|
|