User Rights Assignment: Log on as a batch job

Scheduling tasks on windows you need at least “Log on as a batch job” rigths. Here you find the default settings:


How to Write on the same line with Write-Output

Powershell cmdlet Write-Output on some case is preferable instead of Write-Host; I need to use Start-Transcript and (probably a bug) Write-Host do not make any entry on transcript file.

But Write-Output is missing some nice features like -nonewline.. I need to append a string on the same line of previous output:

try {
    start-transcript -path C:\transcript.txt -Append
    # My Job
    Write-Output "1 - Job one"
    [console]::setcursorposition($([console]::Cursorleft + 25),$([console]::CursorTop - 1))
    Move-Item C:\Test.txt C:\TestDone.txt -force -ea Stop
    Write-Output "    [OK]"
catch [Exception] {
    Write-Output "    [FAIL]"
    $ScriptError = $_.Exception.Message
    Write-Warning $ScriptError
finally {

The trick was done by:


[console]::Cursorleft is your current column
[console]::CursorTop is you current line

Probably with the same trick you can overwrite the previews output…

Problem: Can’t print anymore on Fedora 26

Some days ago my Fedora 26 workstation stop printing on a HP 1505n connected via network. This is what i found on eventlog:

[  234.320486] pdftopdf[2220]: segfault at 10 ip 00007f34fd4ea19f sp 00007ffee7b72d80 error 6 in[7f34fd461000+1c7000]

pdftopdf is crashing… and here the bug:

Update to qpdf-libs-6.0.0-8.fc26 for solve the problem.

How to Disable SMB1

WannaCry and Co. suggest that it’s time to remove some old protocol, and SMB1 it’s one of that.

Here you find a script that is usefull for that; run it as admin rights:


This batch call a powershell script (check that all the scripts is stored on the same folder and that the execution path is where you store the scripts)

I used a batch to bypass the powershell signature and make easier for helpdesk to runas as admin.

For disable it with GPO, check this:

PROBLEM: Outlook Indexing is not reliable

If you recently start to have problem with Outlook search after June patches rollout, this is a know issue:

Based on your OS there is a fix release (check the link above) or, if you prefer a workaround; a reg key to add.


Some other links regarding indexing problem: