Well I can't really read your code that much as it's not in English and unfortunately I only read/write English.

That aside, it looks like you have a variable assigned to something that is not shown here.

The SetDefaultPrinter is a Function which takes parameters to make it work.

Remember that PRINTER NAME and SHARE NAME can be different. The SetDefaultPrinter wants the PRINTER NAME, but if you created the printer with the AddPrinterConnection, you must include both the servername and the sharename.

SetDefaultPrinter('\\Server\sharename')

You can use a variable to prevent the return code from being seen on the console and you can output the error-code if wanted to verify

$RC=SetDefaultPrinter('\\Server\sharename')
'Setting Printer Default: ' + @SERROR ?