by skufel | Mar 14, 2016 | Network, Scripting, Windows
When you need to use your computer as wireless hotspot, you can easily enable that functionality with PowerShell: Windows PowerShell Copyright (C) 2013 Microsoft Corporation. All rights reserved. PS C:\windows\system32> netsh wlan set hostednetwork...
by skufel | Sep 11, 2015 | Infrastructure, Scripting, SysAdmin, Windows
To remove Event Log Source use this: Remove-EventLog -Source "Desktop Window Manager" Replace Desktop Window Manager with Event Log Source you want to...
by skufel | Sep 11, 2015 | Automation, Infrastructure, Scripting, SysAdmin, Windows
To list all Event Logs and sources associated with them use: Get-EventLog -LogName * |ForEach-Object {$LogName = $_.Log;Get-EventLog -LogName $LogName -ErrorAction SilentlyContinue |Select-Object @{Name= "Log Name";Expression = {$LogName}}, Source...
by skufel | Aug 4, 2015 | Automation, Infrastructure, Network, Scripting, SysAdmin, Web Servers
If you need to watch IIS application pool and start it once goes down and want to use PowerShell for that here is simple script for that. Script includes also logging all restarts in log file which is created in same folder as script. # AppPool to monitor $AppPoolName...
by skufel | Jul 22, 2015 | Automation, Databases, Scripting, Windows
Recently I went through requirement of running SQL scripts on multiple databases on different servers. As the list of databases was different from script to script I decided to create universal solution, which will allow to easily prepare for deployment and can be...