tis-powershell

7.2.7-22
PowerShell is an automation and configuration tool/framework. It includes a command-line shell, an associated scripting language and a framework for processing cmdlets
28721 downloads
Download
See build result See VirusTotal scan
tis-powershell icon
  • package : tis-powershell
  • name : PowerShell
  • version : 7.2.7-22
  • categories : System and network,Development
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
  • editor : Microsoft
  • licence : MIT
  • locale : all
  • target_os : windows
  • impacted_process : pwsh
  • architecture : x64
  • signature_date : 2023-05-16 14:00
  • size : 105.84 Mo
  • installed_size : 270.17 Mo
  • homepage : https://docs.microsoft.com/powershell/
package           : tis-powershell
version           : 7.2.7-22
architecture      : x64
section           : base
priority          : optional
name              : PowerShell
categories        : System and network,Development
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : PowerShell is an automation and configuration tool/framework. It includes a command-line shell, an associated scripting language and a framework for processing cmdlets
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.1
sources           : https://github.com/PowerShell/PowerShell/releases
installed_size    : 270172160
impacted_process  : pwsh
description_fr    : PowerShell est un outil/framework d'automatisation et de configuration. Il comprend un shell de ligne de commande, un langage de script associé et un framework pour le traitement des cmdlets
description_pl    : PowerShell to narzędzie/framework do automatyzacji i konfiguracji. Zawiera powłokę wiersza poleceń, powiązany język skryptowy i ramy do przetwarzania cmdletów
description_de    : PowerShell ist ein Automatisierungs- und Konfigurationstool/Framework. Es umfasst eine Befehlszeilen-Shell, eine zugehörige Skriptsprache und ein Framework für die Verarbeitung von Cmdlets
description_es    : PowerShell es una herramienta/marco de automatización y configuración. Incluye un shell de línea de comandos, un lenguaje de scripting asociado y un marco para procesar cmdlets
description_pt    : PowerShell é uma ferramenta/quadro de automação e configuração. Inclui uma shell de linha de comando, uma linguagem de scripting associada e uma estrutura para processar cmdlets
description_it    : PowerShell è uno strumento/framework di automazione e configurazione. Include una shell a riga di comando, un linguaggio di scripting associato e un framework per l'elaborazione di cmdlet
description_nl    : PowerShell is een tool/framework voor automatisering en configuratie. Het omvat een commandoregel, een bijbehorende scripttaal en een raamwerk voor het verwerken van cmdlets
description_ru    : PowerShell - это инструмент/фреймворк автоматизации и конфигурирования. Он включает в себя оболочку командной строки, соответствующий язык сценариев и структуру для обработки команд
audit_schedule    : 
editor            : Microsoft
keywords          : powershell,power,shell,core,powershell6,powershell7
licence           : MIT
homepage          : https://docs.microsoft.com/powershell/
package_uuid      : c60a946c-b24a-4469-b3da-34e2eccf9cb1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/PowerShell/PowerShell/tree/master/CHANGELOG
min_os_version    : 6.1
max_os_version    : 6.3
icon_sha256sum    : f6328cb3e50d5a2c14f663481de0ea43f9712014ccd430db91c6b4dee2fb07ba
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : BjESQv9zmmgrbYs6E+8FZavsTDFnEaNTA2RA2jbfAoX0Zb38IvWjVcf+fUFDt1klZS8jgnigrrcr6Ws70D3NUtzi6738FPx3YVZbAflQuGRKGg+u4zpodBObYazG4sGk8z4ZoqpFrjXB017v+v17EdFflie62bHDuWelnd8s0iqmWNK9LXWcF3/tdrfkQyLuDBlQYf5jTUiYhlaFKsW7Z6Eq1/7mL4Gg2hg+zhAKdx6ht0n4QgsQCUXAGfK0K2Pc4/vx9b5RESVyPDa4iQSHw5LU+pBVxtytHQo16c27aOwx5uqPpHdsdMC0MDi04/MUR51fwrAxlmXtOeRBskGE6g==
signature_date    : 2023-05-16T14:00:12.945364
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *

# Installation procedure: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-on-windows
# silent_args = 'ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=0 REGISTER_MANIFEST=0 ENABLE_PSREMOTING=0'


def install():
    package_prefix = control.package.split("-", 1)[0]
    pkg_pwsh5 = package_prefix + "-" + "powershell5"
    pkg_pwsh_core = package_prefix + "-" + "powershell-core"

    # Older Windows versions depends on PowerShell 5
    if windows_version() < WindowsVersions.Windows10:
        if not WAPT.is_installed(pkg_pwsh5):
            if WAPT.is_available(pkg_pwsh5):
                print("Installing: %s" % pkg_pwsh5)
                WAPT.install(pkg_pwsh5)
                WAPT.audit(pkg_pwsh5)
            else:
                error("ERROR: %s package not found on the repo, please import it" % pkg_pwsh5)
    else:
        # W10+ part
        if WAPT.is_installed(pkg_pwsh5):
            print("Forgetting: %s" % pkg_pwsh5)
            WAPT.forget_packages(pkg_pwsh5)

    # Forget Powershell Core
    if WAPT.is_installed(pkg_pwsh_core):
        print("Forgetting: %s" % pkg_pwsh_core)
        WAPT.forget_packages(pkg_pwsh_core)

    # Installing package
    bin_name = glob.glob("PowerShell-*.msi")[0]
    install_msi_if_needed(
        bin_name,
        min_version=control.get_software_version(),
    )

    # Disabling update check and telemetry
    set_environ_variable("POWERSHELL_CLI_TELEMETRY_OPTOUT", "1")
    set_environ_variable("POWERSHELL_TELEMETRY_OPTOUT", "1")
    set_environ_variable("POWERSHELL_UPDATECHECK", "Off")
    set_environ_variable("POWERSHELL_UPDATECHECK_OPTOUT", "1")
    set_environ_variable("DOTNET_CLI_TELEMETRY_OPTOUT", "1")
    set_environ_variable("DOTNET_TELEMETRY_OPTOUT", "1")
# -*- coding: utf-8 -*-
from setuphelpers import *
import json


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    api_url = "https://api.github.com/repos/PowerShell/PowerShell/releases"
    arch_dict = {"x64": "-win-x64.msi", "x86": "-win-x86.msi"}

    # Getting latest version information from official sources
    print("API used is: %s" % api_url)
    dict_result = json.loads(wgets(api_url, proxies=proxies))
    for tag in dict_result:
        if tag["tag_name"] == "v7.2.7":
            print("Tag URL used is: %s" % tag["html_url"])
            version = tag["tag_name"].split("-")[-1].replace("v", "")
            for download in tag["assets"]:
                if arch_dict[control.architecture] in download["name"]:
                    download_url = download["browser_download_url"]
                    latest_bin = download["name"]
                    break
            break

    # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Checking version from file
    version_from_file = get_version_from_binary(latest_bin)
    if Version(version_from_file, 4) != Version(version, 4) and version_from_file != "":
        print("Changing version to the version number of the binary")
        # os.rename(latest_bin, latest_bin.replace(version, version_from_file))
        version = version_from_file
    else:
        print("Binary file version corresponds to online version")

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Deleting outdated binaries
    remove_outdated_binaries(version)

    # Validating update-package-sources
    return package_updated
86d1fcb67f224cefb504e9701baecc1e727a2a00bafe04f8c351890e911b4ec7 : setup.py
7445f2f711759fe7167fae2329911f9800d087265d1ba720a8801ff775ac1b31 : PowerShell-7.2.7-win-x64.msi
16a6549d059b7cfac8673c5a62687acc3d8871dd789717d6a5a3e454ccebae73 : update_package.py
f6328cb3e50d5a2c14f663481de0ea43f9712014ccd430db91c6b4dee2fb07ba : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
c1ad5ade9a79635d3f28cc671f73aab29b6f17775ba1beb5dbbc372800a43f12 : WAPT/changelog.txt
29fd93a980d15438c8e3d201e0579f6f7d445fa28d4b0c9207687849328b982f : luti.json
55151c3f85ffae5059a8ea084bd0846f8e184367e9ab5bc6c6caf2411d00822a : WAPT/control
7.3.4-22
===
Disabling update check and telemetry

7.2.7-21
===
Last release supporting Windows 7/8.0

7.3.1-20
===
Cleanup old packages

7.2.6-15
===
Migrate package name from tis-powershell-core to tis-powershell, the code have been adapted for it on Windows