Kill TCP connection with Powershell

Sometimes you have an application that keeps connections open while they should be closed. Because Windows does not seem to have the capability to kill an connection without killing the whole process we’ll to use a 3rd party tool called cports.exe. Download here: https://www.nirsoft.net/utils/cports-x64.zip   $ProcessName= "BackgroundTransferHost" $State = "CloseWait " while ($true) { sleep -Seconds […]

Read More

Windows Server 2016 Update settings

In Windows Server 2016 there are no GUI options available to change the update behavior. In this blog I was outline the different ways to change the Windows Server 2016 Update settings. Windows Server 2016 Update settings Windows always looks at registry keys located in the following hive: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU Typically there is a key named […]

Read More

No disks with supported bus types found to be used for S2D

I had some HP DL380’s to test Storage Spaces Direct (S2D) and walked into the following error: Enable-ClusterStorageSpacesDirect : No disks with supported bus types found to be used for S2D At line:1 char:1 + Enable-ClusterStorageSpacesDirect + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (MSCluster_StorageSpacesDirect:root/MSCLUSTER/…ageSpacesDirec    t) [Enable-ClusterStorageSpacesDirect], CimException     […]

Read More

Provisioning VM Networks

This script/Powershell functions can be used for (automatic) provisioning VM networks based on VLANs on existing Logical Network and switches in Virtual Machine Manager. Create VM Network Function: 1. Check if VLAN already exist 2. Create Network site in logical network and add VLAN 3. Enable VLAN on Uplink Port Profile 4. Create VM Network […]

Read More

Sample-SQL-Actions – SQL through SMA

Sample-SQL-Actions demonstrates how to create a SQL database connection and use this connection to execute commands on the database through SMA in Windows Azure Pack. Before running this workflow, you must create a Management Service (Windows Azure Pack) variable named ‘SQL_Connectionstring’ with the connectionstring to the SQL server. Example: “Server=SQL1;Database=TestDB;User ID=SQLuser;Password=Passw0rd;” http://gallery.technet.microsoft.com/scriptcenter/SMA-Sample-SQL-Actions-9cdfefa4 <#    Sample-SQL-Actions […]

Read More

Distribute Datasources

Ever came in the situation of a fast growing environment and your backup disks are getting fuller and fuller, till the point you need to move datasources to a new added disk? Well, I got sick and tired of moving datasources manually using MigrateDatasourceDataFromDPM.ps1, so I wrote a powershell script. You only need to edit […]

Read More