This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Uptime { | |
[CmdletBinding()] | |
param ( | |
[Parameter(ValueFromPipeline = $true, | |
ValueFromPipelineByPropertyName = $true)] | |
[string[]]$ComputerName = $env:COMPUTERNAME | |
) | |
BEGIN { | |
# Define $Results array to append each computer into; get the current date once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-PowerCSV { | |
[CmdletBinding()] | |
param ( | |
# Position 1 is implied here, and doesn't need to be specified | |
[Parameter(Mandatory = $true)] | |
[string[]]$ComputerName, | |
[Parameter(Mandatory = $true, | |
ValueFromPipeline = $true)] | |
$InputFile, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$List = @' | |
1 Partridge in a pear tree | |
2 Turtle Doves | |
3 French Hens | |
4 Calling Birds | |
5 Golden Rings | |
6 Geese a laying | |
7 Swans a swimming | |
8 Maids a milking | |
9 Ladies dancing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ideally this is [string[]] | |
param([string]$VMNameStr) | |
# Copying from old: Split up names by commas, trim the ends, output to screen | |
$VMNameStr -split "," | %{$_.trim()} |
NewerOlder