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 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. |
| 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 Rename-PictureToDateTaken { | |
| param( | |
| [string]$Path | |
| ) | |
| $assemblyLoaded = [appdomain]::currentdomain.getassemblies() | | |
| where { $_ -match 'System.Drawing' } | |
| if( -not $assemblyLoaded ) { |
UTC: 2018-07-27 04:35
russellds/chocolatey-packages
This file is automatically generated by the update_all.ps1 script using the AU module.
| #!/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 |
| # 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} | |
| function doStuff { | |
| param( | |
| [string] | |
| $Item | |
| ) | |
| $htDoStuff.($Item) = @{} | |
| } | |
| $stringFuncDoStuff = "${function:doStuff}" |
| function doStuff { | |
| param( | |
| [string] | |
| $Item, | |
| [string] | |
| $Value = 'default' | |
| ) | |
| $htDoStuff.($Item) = $Value |
| param( | |
| [string]$WorkspacePath | |
| ) | |
| $InformationPreference = 'Continue' | |
| Write-Information "Workspace Path: $( $WorkspacePath )" | |
| Set-Location -Path $WorkspacePath | |
| $telemetryStrings = @() |
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "label": "Remove Telemetry", | |
| "type": "shell", | |
| "command": "${workspaceFolder}/.vscode/scripts/RemoveTelemetry.ps1", | |
| "args": [ | |
| "-WorkspacePath", | |
| "${workspaceFolder}" |