Category Archives: Powershell

Windows 10: Powershell Script to protect your privacy

Hi,

this Powershell script is a try to protect your privacy in Windows 10.
Update 17.08.2016: Lot of adjustment to Windows 10 1607. Added more documentation
Continue reading Windows 10: Powershell Script to protect your privacy

Advertisment to support michlstechblog.info

VMware: Set DNS Server of all ESXi Host conntected to vCenter

Hi,

this is a script to set the DNS Servers for all ESXi Hosts connected to vCenter.

Usage is very simple. Open a PowerCli Command shell. The script accept 2 parameters. “vc” = the vCenter and “s” is the a comma separarted list of DNS Servers.

PS D:\temp> .\SetHostDNS.ps1 -vc yourVCenterServer.yourdomain -s 8.8.4.4,8.8.8.8
Set DNS Server at host1.yourdomain ... ok
Set DNS Server at host2.yourdomain ... ok

Thats all 🙂

Michael

Windows: Script to uninstall all Hotfixes and Updates

Hi,

here is a “oneliner” to uninstall all Windows Update at once. They were deinstalled in order from the highest to the lowest KB Number which increases speed of the remove process(Latest fix first).
Continue reading Windows: Script to uninstall all Hotfixes and Updates

Powershell: Some examples to use a MySQL Database

Hi,

sometimes it makes sence to write Data in a “real” Databasesystem instead of writing to a text- or xml file.

MySQL offers an native Windows .NET Connector to its Database. You can get it here.

Continue reading Powershell: Some examples to use a MySQL Database

Powershell: Export a Excel Worksheet as csv file

Hi,

with a few lines Powershell code it is possible to export a Excel Workbook as a csv file.
Define your excel list

$sExcelFile="D:\temp\ExcelFile.xlsx"
$sCSVFile="D:\temp\list.csv"

Open Excel using DCOM
Continue reading Powershell: Export a Excel Worksheet as csv file