script-example.com

       

the quick introduction to common scripting languages, as well as sample scripts.

Diese Seite gibt es auch in Deutsch

📁 Topics

PowerShell

PowerShell

In the modern world, everyone strives for automation. Automating everyday tasks increases efficiency and can avoid errors caused by repetitive monotonous work. PowerShell can be used to automate such mundane tasks.


Windows Batch

Windows Batch

Batch files can be used to automate simple processes in Microsoft Windows. Batch files use the commands of the command prompt, in the simplest case these cmd commands can be entered in a simple text file line by line, it is then executed one command after the other. Windows batch originate from the MS-DOS era. At that time batch files had the file extension .bat. Since Windows 2000 the extension .cmd is used. Additionally there is the possibility to use jump labels or variables, up to more compl...


📰 New Posts

Preview PowerShell Version: get-host
PowerShell /

PowerShell version 7.2.4 released

changed: 20.05.2022 from Bernhard (Initial Release: 02.05.2022)

The PowerShell version can be displayed with the get-host command. ... continue reading

PowerShell Log-Files: Logging into a textfile - write to file
PowerShell /

PowerShell Log-Files: Logging into a textfile - write to file

created: 05.05.2022 from Bernhard

Log files in PowerShell can be created via the Out-File command, via a custom function, or via PowerShell's built-in Transcript. ... continue reading

PowerShell: File attributes: Change date - without any tools.
PowerShell /

PowerShell: File attributes: Change date - without any tools.

created: 03.05.2022 from Bernhard

As an alternative to special programs, the date of a file or folder can also be changed with PowerShell.  ... continue reading

Preview PowerShell editors in comparison: ISE, Visual Studio Code
PowerShell /

PowerShell editors in comparison: ISE, Visual Studio Code

created: 02.05.2022 from Bernhard

Choosing the right editor can significantly simplify development, even though PowerShell scripts can theoretically be created in any text editor. The advantages of a PowerShell-optimized editor include syntax highlighting, auto-completion, code snippets, and a debugging mode that can step through the script line-by-line and analyze specific areas. For a long time, the standard PowerShell editor was the Windows-integrated PowerShell ISE, which does a good job especially for debugging ,but the IS... ... continue reading

PowerShell if else and switch
PowerShell /

PowerShell if else and switch

created: 02.05.2022 from Bernhard

Test conditions with the commands if, elseif, else and switch and execute a command if they apply: if, else, ... then ... continue reading

Preview PowerShell Help | Get-Help
PowerShell /

PowerShell Help | Get-Help

created: 02.05.2022 from Bernhard

Probably the most important PowerShell command is Get-Help. With Get-Help the integrated PowerShell help can be called, it gives an overview of the function of the individual commands and their application, up to concrete examples. ... continue reading

Preview PowerShell: Cmdlet (enhanced Function)
PowerShell /

PowerShell: Cmdlet (enhanced Function)

created: 02.05.2022 from Bernhard

In PowerShell ISE a template for a PowerShell cmdlet can be inserted with Ctrl+J. The template extends the script with elements for documentation and thus gives the integrated PowerShell help all necessary information for the cmdlet: "get-help". ... continue reading

Preview PowerShell - Handling passwords.
PowerShell /

PowerShell - Handling passwords.

created: 02.05.2022 from Bernhard

Of course, passwords should never be stored in plain text in a script file. PowerShell offers possibilities for a secure handling of passwords. As an example, a password for a specific user can be stored encrypted as a text file. Only the respective user can decrypt the file, for other users the file is worthless. ... continue reading

Preview PowerShell variables, data types and objects
PowerShell /

PowerShell variables, data types and objects

created: 02.05.2022 from Bernhard

Basics of PowerShell variables and their data types. ... continue reading

PowerShell Syntax: compare and nest
PowerShell /

PowerShell Syntax: compare and nest

created: 02.05.2022 from Bernhard

PowerShell uses so-called comparison operators for comparing values. Pipes can be used to pass different PowerShell commands to other commands. ... continue reading

Windows PowerShell Commands:Overview
PowerShell /

Windows PowerShell Commands:Overview

created: 02.05.2022 from Bernhard

the available PowerShell commands can be started with the command: ... continue reading

Preview Powershell console commands
PowerShell /

Powershell console commands

created: 02.05.2022 from Bernhard

To begin with, it is not always necessary to write a script for PowerShell. Especially for administrators the PowerShell console offers a possibility to execute certain tasks via commands. ... continue reading