Christian Persson

This user hasn't shared any profile information

Posts by Christian Persson

How to check if your antivirus setup is working

When I install or upgrade an antivirus solution I always make sure that it works by creating a dummy file that reports as a virus but its not, that way I can see that the AV client reports the virus, that the management server gets a notice of virus and that the email notification to the support team is working as intended.

This is nothing new but I will share is no the less as I myself need to have the dummy file saved somewhere.

Save the following text in a file on the client and name it to (EICAR is the creator of this test file)

Now your AV should report the file as a virus and notify the management server and depending on your configuration you should receive an email

Exchange: Email error 451 4.4.0 DNS query failed

After an upgrade of DC to 2012R2 and removing the old 2003 DC I found that Exchange had problems sending mail to a small amount of different domains. When I looked in the message queue I found that all these domains had the same error: 451 4.4.0 DNS Query Failed

Since I just had installed two new DC 2012R2 that now acted as the only DNS servers in the domain and that I recently read about extension mechanisms for DNS (EDNS) I figured this must be the issue. When EDNS is activated the DNS package can exceed 512 bytes and some firewalls don’t like this hence the DNS query failed problem.

But there is a quick fix for this and that is to just disable the EDNS on the DC:

  • At a command prompt, type the following command, and then press Enter:

    Note Type a 0 (zero) and not the letter “O” after “enableednsprobes” in this command.

    The following information appears:



Manage test and production groups in WSUS from powershell with PoshWSUS

I have always found the WSUS interface lacking in functionality for handling multiple server groups with test and production environments and here comes PoshWSUS in real handy.

I will show you basics on how to manage test and production groups and verify patch assignment.

You can find the PoshWSUS module here

Loading the module and connecting to your WSUS server

Select the group for your test environment that already got the latest patches assigned and deployed where patch functionality is verified

Get all the patches from your test environment and assign them to your production group

When the script is done running you will have an output list on all the assigned patches to the production group.

Lets verify that the production environment has the same patches applied as the test environment and list missing patches if found

If no patches are returned then your test environment now match your production environment of assigned patches



Check system up-time


Microsoft instructions to check system up-time:

Go to “Start” -> “Run“.

2.  Write “CMD” and press on “Enter” key.

3.  Write the command “net statistics server” and press on “Enter” key.

4.  The line that start with “Statistics since …” provides the time that the server was up from.

  •   The command “net stats srv” can be use instead.

Import specific GPO through powershell from the Backup all script


This script is based on the backup all gpo script done here

The script will loop through all the GPO and you will be presented with a pop-up asking if you wish to import the specific GPO.

Backup all GPO in domain through Powershell


Add multiple Windows patches to WIM using DISM and Powershell


Install and uninstall Java through Powershell – SCCM


I needed to deploy Java in one of our enterprise environments with a lot of old Java still laying around, I needed to upgrade all to the new version and remove all old versions as they are a security threat. Java don’t have the option to remove all previous installations, I guess its because its a shitty software, but what do I know.

Here is my solution to remove all previous Java installations and install the new Java

SCCM and Adobe Reader XI with Powershell


How to distribute Adobe Reader XI in System Center

1. Download the .msi package from adobe  here

2. Download the Adobe Customization Wizard XI here

3. Do you customization to fit your IT needs in Customization Wizard and generate a .mst file

4. Create a powershell file with the following code

Uninstall a program from powershell


If you need to uninstall a program from a prowershell script this will do the trick:

If you get the return value of 1603 your not running your script as admin

Page 1 of 3123
Christian Persson's RSS Feed
Go to Top