UTC: 2018-07-27 04:35
russellds/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
| # Empty Array to hold disks in boot disk always first order. | |
| $disks = @() | |
| # Identify the boot partition | |
| $bootPartition = Get-WmiObject -Class Win32_DiskPartition | | |
| Where-Object {$_.BootPartition} | |
| # Identify the boot disk using the boot partition | |
| $bootDisk = Get-WmiObject -Class Win32_DiskDrive | | |
| Where-Object {$_.Index -eq $bootPartition.DiskIndex} | |
| #!/bin/bash | |
| echo 'InstanceId,KeyPair,PrivateIpAddress,PublicIpAddress,InstanceType,Tags,OwnerId' > $HOME/aws-instance-details.csv | |
| aws ec2 describe-instances --filters --query 'Reservations[].Instances[].[InstanceId,KeyName,PrivateIpAddress,PublicIpAddress,InstanceType,Tags[?Key==`Name`].Value[]]' --output text | | |
| sed 's/\t/,/g' >> $HOME/aws-instance-details.csv |
UTC: 2018-07-27 04:35
russellds/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
| function Rename-PictureToDateTaken { | |
| param( | |
| [string]$Path | |
| ) | |
| $assemblyLoaded = [appdomain]::currentdomain.getassemblies() | | |
| where { $_ -match 'System.Drawing' } | |
| if( -not $assemblyLoaded ) { |
| function ConvertFrom-Html { | |
| #.Synopsis | |
| # Convert a table from an HTML document to a PSObject | |
| #.Example | |
| # Get-ChildItem | Where { !$_.PSIsContainer } | ConvertTo-Html | ConvertFrom-Html -TypeName Deserialized.System.IO.FileInfo | |
| # Demonstrates round-triping files through HTML | |
| param( | |
| # The HTML content | |
| [Parameter(ValueFromPipeline=$true)] | |
| [string]$Html, |
| function Get-IISLogs { | |
| <# | |
| .SYNOPSIS | |
| Gets the IIS Logs for the number of hours specified and returns them as an array of PSObjects. | |
| .DESCRIPTION | |
| Gets the IIS Logs for the number of hours specified and returns them as an array of PSObjects. | |
| .PARAMETER Hours | |
| A description of the parameter. |