Skip to content

Instantly share code, notes, and snippets.

#requires -version 3.0
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]
$Path
)
function Sort-NodeArray {
param (
Configuration AspNet45WebServer {
WindowsFeature WebAspNet45 {
Name = 'Web-Asp-Net45'
Ensure = 'Present'
}
WindowsFeature WebWindowsAuth {
Name = 'Web-Windows-Auth'
Ensure = 'Present'
winrm.cmd g winrm/config/service/auth -r:$env:computername -a:kerberos
winrm.cmd s winrm/config/service/auth -r:$env:computername -a:kerberos @{CredSSP="true"}
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$ComputerName,
[int]
$Port = 443
)
#requires -version 3
[CmdletBinding()]
param ()
$DatabasePath = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'DatabasePath is not null' -Property DatabasePath |
Select-Object -ExpandProperty DatabasePath -First 1
$DatabasePath = [Environment]::ExpandEnvironmentVariables($DatabasePath)
$HostsFilePath = Join-Path -Path $DatabasePath -ChildPath HOSTS
function ConvertFrom-IISW3CLog {
[CmdletBinding()]
param (
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
[Alias('PSPath')]
[string[]]
$Path
)
process {
function Add-LazyProperty {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[PSObject]
$InputObject,
[Parameter(Mandatory=$true, Position=1)]
[string]
$Name,
(gwmi win32_product -filter 'Name="name of application in Add/Remove Programs"').Uninstall()
([adsi]'WinNT://domain/username,user').ChangePassword('oldpassword','newpassword')

monitoring: what I want

I've recently shifted from a straight engineering job to a job with a "dev/ops" title. What I have discovered in operations land depresses me. The shoemaker's children are going unshod. Operations software is terrible.

What's driving me craziest right now is my monitoring system.

what I have right now

What I have right now is Nagios.