Blog J.Schweiss

Infosammlung zu .NET- und anderen Programmier-Themen


clock Oktober 6, 2015 05:25 by author Administrator



LimitLess LED

clock Oktober 6, 2015 05:07 by author Administrator



clock Oktober 3, 2015 21:01 by author Administrator


Writing JavaScript code on Windows with jsc.exe

clock Oktober 3, 2015 06:57 by author Administrator


using the compiler. jsc is located at C:\Windows\Microsoft.NET\Framework\v2.0.50727


JavaScript Best Practices

from Commandline


cscript //E:jscript hello.js
@if (@CodeSection == @Batch) @then
  @cscript //Nologo //E:jscript "%~f0" "test arg" %* & pause & goto :eof
WScript.Echo("hello world");
for (var i = 0, n = WScript.Arguments.Length, args = []; i < n; ++i)
WScript.Echo("arguments: " + args.join(","));


// replace.js: globally replace one string with another.
// See directions for syntax.

function directions() {
  WScript.Echo("cscript //Nologo test_cscript_javascript_engine targetstring \
replstring < infile.txt > outfile.txt");
   WScript.Echo("\nEnclose strings that have spaces in quotation marks.");
function processTextStream() {
    target = WScript.Arguments.Item(0);
    newString = WScript.Arguments.Item(1);
    while (!WScript.StdIn.AtEndOfStream) {
        line = WScript.StdIn.ReadAll();
        // If I wasn't passing a variable as the first argument
        // of line.replace, I could use normal regex syntax like
        // line.replace(/Robert/g,"Bob")
        line = line.replace(RegExp(target,"g"),newString)

// --------------------------------------------------

if (WScript.Arguments.length < 2) {
else {

Bootstrap & Less in VisualStudio

clock September 28, 2015 04:51 by author Administrator


ASP.NET & SignalR

clock September 27, 2015 06:15 by author Administrator

ist cool!


clock September 25, 2015 05:54 by author Administrator


jQuery Grid

clock September 25, 2015 05:40 by author Administrator



clock September 25, 2015 05:33 by author Administrator

here and Article

Sharepoint 2010

clock September 25, 2015 05:01 by author Administrator

setup VM


Clean Desktop Service

clock September 25, 2015 04:55 by author Administrator


Clean VS Workspaces

clock September 25, 2015 04:35 by author Administrator



clock September 21, 2015 04:42 by author Administrator

Wireless Sensor 433MHz

clock September 21, 2015 03:27 by author Administrator


with RF4432S and RF5151 module.

Preprogrammed STM8L151 microcontroller on board.

LINQ to Objects

clock September 21, 2015 03:02 by author Administrator

Public Class Form1
    Private Sub Button1_Click(ByVal sender _
          As System.Object, _
          ByVal e As System.EventArgs) _
          Handles Button1.Click
        ' variabili per composizione
        ' del messaggio finale:
        Dim messaggio As String = ""
        Dim NL As String = Environment.NewLine
        ' dichiarazione array:
        Dim frutti() As String = _
           {"mela", "pera", "banana", "mandarino"}
        ' dichiarazione della variabile che conterrà
        ' l'insieme delle stringhe
restituite dalla
        ' query. La query è dichiarata nella stessa
        ' istruzione:
        Dim fruttiPreferiti = _
           From f In frutti _
           Where f.StartsWith("m") _
           Select f
        ' scorrimento dell'insieme delle stringhe
        ' per la composizione del messaggio:
        For Each frutto In fruttiPreferiti
            messaggio &= "Frutto: " & frutto & Environment.NewLine 
    End Sub
End Class

WMIC Formats

clock September 20, 2015 22:35 by author Administrator

Output Formats


Some usefull commands when using WMIC:

  • wmic process [pid] delete
    The rough equivalent (for you UNIX/Linux minded folks) of "kill -9 [pid]"
  • wmic process where name='cmd.exe' delete
    It functions something like "killall -9 cmd.exe" would on a Linux box, where killall lets you kill processes by name.
  • wmic process list brief /every:1
    Sort of like (but not exactly) the Linux/UNIX top command.
  • wmic useraccount
    This one gives a lot more detail than the old "net user" command. With "wmic useraccount" you get user
    names, SIDs, and various security settings.
  • wmic qfe
    This one shows all hotfixes and service packs. QFE stands for Quick Fix Engineering.
  • wmic startup list full
    This shows a whole bunch of stuff useful in malware analysis, including all files loaded at Startup and the
    reg keys associated with autostart.
  • wmic process list brief | find "cmd.exe"
    That works a little like a Linux "ps -aux | grep cmd.exe".
  • wmic /record:test.xml process list brief
    You can use the /record option in WMIC to record the WMIC commands you typed, their output, and a timestamp.
    After the command runs, your results are stored in xml format. That's the only format supported, but this
    is a handy record of what you typed, when you typed it, and the results you got. The only down side, though,
    is that it will overwrite a previous test.xml, rather than append to it. Still, not bad, as long as you make
    sure to use different names for your record files.

Network interface configuration options offered by WMIC:

  • wmic nicconfig where IPEnabled='true'
    That'll give you a list of IP interfaces.
  • wmic nicconfig where Index=1 call EnableStatic (""), ("")
    To change the IP address at the command line
  • wmic nicconfig where Index=1 call EnableDHCP
    Do this for DHCP, where the index is the number of the interface you get from that first nicconfig
    command I put in this update.


Having Problems using wmic with /format:csv with "invalid xsl"?

You are using a not en-EN regional setting on WIN2Kxx-Server? -> workaround copy "c:\system32\wbem\en-EN" to "\de-DE" for example.

Or specify xsl: wmic /output: test.csv process /format: %WINDIR%\System32\wbem\en-EN\csv 


Example usage for xcacls.vbs


Other examples and help information can be found on the Microsoft support site on: here

Xcacls.vbs can be downloaded from: here


clock September 20, 2015 21:14 by author Administrator

Befehlszeilenprogramm zur Windows-Remoteverwaltung

Die Windows-Remoteverwaltung (WinRM) ist die Microsoft-Implementierung
des WS-Verwaltungsprotokolls, das eine sichere Kommunikation
mit lokalen und Remotecomputern über Webdienste ermöglicht. 


Wenn Sie Hilfe zu einem bestimmten Vorgang benötigen:

  winrm g[et] -?          Abrufen von Verwaltungsinformationen.
  winrm s[et] -?          Ändern von Verwaltungsinformationen.
  winrm c[reate] -?     Erstellen neuer Instanzen von Verwaltungsressourcen.
  winrm d[elete] -?      Entfernen einer Instanz aus einer Verwaltungsressource.
  winrm e[numerate] -?  Auflisten aller Instanzen einer Verwaltungsressource.
  winrm i[nvoke] -?     Führt eine Methode für eine Verwaltungsressource aus.
  winrm id[entify] -?    Stellt fest, ob eine WS-Verwaltungsimplementierung
                                 auf diesem Remotecomputer ausgef?hrt wird.
  winrm quickconfig -?  Konfiguriert diesen Computer so, dass "WS-Management"-
                                  Anforderungen von anderen Computern akzeptiert werden.
  winrm configSDDL -?  Ändert vorhandene Sicherheitsbeschreibung f?r URI.
  winrm helpmsg -?      Zeigt die Fehlermeldung für den Fehlercode an.

Wenn Sie Hilfe zu verwandten Themen anzeigen möchten:

  winrm help uris          Zeigt Infos zum Erstellen von Ressourcen-URIs an.
  winrm help aliases      Abkürzungen für URIs
  winrm help config       Konfigurieren von WinRM-Client- und Diensteinstellungen
  winrm help certmapping Konfiguriert den Clientzertifikatzugriff.
  winrm help remoting   Zeigt Informationen zum Zugriff auf Remotecomputer an
  winrm help auth          Bereitstellen v. Anmeldeinformationen für Remotezugriff
  winrm help input         Bereitst. v. Eingaben z. Erstellen, Festlegen, Aufrufen
  winrm help switches    Andere Schalter wie z. B. Formatierung, Optionen, usw.
  winrm help proxy       Stellt Proxyinformationen bereit.

Powershell: enter-pssession

clock September 20, 2015 20:26 by author Administrator

Managing Remote Servers with PowerShell



start how-to

powershell for WIN10 IoT  (Raspberry Pi 2)

set-item wsman:\localhost\client\trustedhosts *

restart-service winrm

Enter-PSSession -ConnectionURI

Enter-PSSession -ConnectionUri -Credential user

You can skip the http:// stuff if you're using the default WinRM configuration and instead of:

Enter-PSSession -ConnectionURI

And you need to explicitly tell enter-pssession which user account on the remote machine will be used:

$Cred = Get-Credential "remotecomputername\username"

Enter-PSSession XXX.XX.XX.XX -Credential $Cred

Trust more remote machines:

winrm set winrm/config/client '@{TrustedHosts="machineA,machineB"}'

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "machineA,machineB"

How can I get list about TrustedHosts (WSMan:\LocalHost\Client ) in local computer ?

Get-Item WSMan:\localhost\Client\TrustedHosts

How can I know if WinRM service is enabled in a computer ?

Get-Service -ComputerName server01 -Name winrm | Select Status

How can I know if WinRM is set up to receive request in a computer ?
One way to find is to see if the client ports are listed or not.

Get-ChildItem WSMan:\localhost\Client\DefaultPorts

How can I know if WinRM is set up for remote management on this machine?.
You should be able to list the listeners.

Get-ChildItem WSMan:\localhost\Listener

Get WinRM-Configuration

WinRM get winrm/config/client


Client NetworkDelayms = 5000 URLPrefix = wsman AllowUnencrypted = false Auth Basic = true Digest = true Kerberos = true Negotiate = true Certificate = true CredSSP = false DefaultPorts HTTP = 5985 HTTPS = 5986 TrustedHosts =


clock September 20, 2015 08:10 by author Administrator




clock September 20, 2015 01:50 by author Administrator

Dark Theme

Admin Theme



Bootply – Bootstrap Playground

Bootstrap with Angular

Flot graphs tutorial

Cross Domain Ajax