Schlagwort: Scripting

Problemstellung: Daten sollen mittels “Invoke-SqlCmd” aus einer SQL-Server Datenbanke geholt werden. Sofern das “SqlServer”-Modul für die Powershell installiert ist, kann das auf bequeme Weise mit dem Commandlet “Invoke-SqlCmd” erfolgen. Beispielsweise so: Wie aus dem Code-Block ersichtlich, werden die Ergebnisdaten in der Variable “$result” gespeichert. Wenn man sich die Variable nun ausgeben lässt, dann könnte man […]

Weiterlesen

Somtimes you have to check the network connection state of the devices you want to connect to. Here are two little functions that might do what you want. Check a particular host if it is reachable by ICMP: This function returns “false” if the host is unreachable. Now the function that loops through a list […]

Weiterlesen

Today I took some first steps to control my Shelly 2.5 device. Actually, it’s about developing a class library for the Shellys in C # for my little smart home broker. In order to understand how the device works, an efficient script language such as Powershell is a good choice. Here is a small script […]

Weiterlesen

“Format strings” are used in the measures and other objects so that a predefined representation can be enforced for certain values. Problem: By default, in many languages ​​the “thousands” digit is shown with a “” (space). If another thousands separator is to be used, this can be achieved as described below. So that Analysis Services […]

Weiterlesen