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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netstandard2.0</TargetFramework> | |
</PropertyGroup> | |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | |
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | |
<OutputPath>..\..\..\FredsIronScripter2018\bin</OutputPath> | |
<DocumentationFile>..\..\..\FredsIronScripter2018\bin\FredsIronScripter2018.xml</DocumentationFile> |
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
using System; | |
namespace Fred.IronScripter2018 | |
{ | |
/// <summary> | |
/// Class containing information on a disk | |
/// </summary> | |
[Serializable] | |
public class DiskInfo | |
{ |
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-FISSystemInformation | |
{ | |
<# | |
.SYNOPSIS | |
Gathers information on the target's system. | |
.DESCRIPTION | |
This function uses CIM to gather information about the target computer(s)'s system. | |
.PARAMETER ComputerName |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Types> | |
<!-- Fred.IronScripter2018.DiskInfo --> | |
<Type> | |
<Name>Deserialized.Fred.IronScripter2018.DiskInfo</Name> | |
<Members> | |
<MemberSet> | |
<Name>PSStandardMembers</Name> | |
<Members> | |
<NoteProperty> |
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
Write-Host "Didn't really expect me to do a thing, did you?" | |
# Dummy script file for a tutorial |
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
#----------------------------------------------------------------------------# | |
# Parameters # | |
#----------------------------------------------------------------------------# | |
# Path to a file with server names | |
$servers = 'DC', 'AdminHost' | |
# Whether errors should be ignored | |
$ignoreErrors = $true |
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
$scriptBlock = { | |
Connect-Lab | |
$id = "<id>" | |
$labname = "wsFund$($id)" | |
$domainName = "lab$($id).contoso.com" | |
$labSources = 'C:\LabSources' | |
$image = 'Windows Server 2016 Datacenter Evaluation (Desktop Experience)' | |
New-LabDefinition -Name $labname -DefaultVirtualizationEngine HyperV | |
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-ShellBuffer | |
{ | |
[CmdletBinding()] | |
param () | |
try | |
{ | |
# Define limits | |
$rec = New-Object System.Management.Automation.Host.Rectangle | |
$rec.Left = 0 |
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
New-Module -Name Test -ScriptBlock { | |
function Get-Test1 | |
{ | |
[CmdletBinding()] | |
param () | |
$var = 24 | |
$depth = 0 | |
try | |
{ |
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 Out-Default | |
{ | |
<# | |
.SYNOPSIS | |
A wrapper for Out-Default, adding automatic caching to all output sent to screen. | |
.DESCRIPTION | |
A wrapper for Out-Default, adding automatic caching to all output sent to screen. | |
Maximum capacity can be configured by setting $global:OutputCacheSize |
OlderNewer