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
It 'Should have set the resource and all the parameters should match' { | |
# Get the Rule details | |
$virtualDiskNew = Get-iSCSIVirtualDisk -Path $VirtualDisk.Path | |
$VirtualDisk.Path | Should Be $virtualDiskNew.Path | |
$VirtualDisk.DiskType | Should Be $virtualDiskNew.DiskType | |
$VirtualDisk.Size | Should Be $virtualDiskNew.Size | |
$VirtualDisk.Description | Should Be $virtualDiskNew.Description | |
} |
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
# Clean up | |
Remove-iSCSIVirtualDisk ` | |
-Path $VirtualDisk.Path | |
Remove-Item ` | |
-Path $VirtualDisk.Path ` | |
-Force |
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
$ErrorParam = @{ | |
ErrorId = 'NICNotFound' | |
ErrorMessage = ($LocalizedData.NICNotFound -f $InterfaceAlias) | |
ErrorCategory = 'ObjectNotFound' | |
ErrorAction = 'Stop' | |
} | |
New-TerminatingError @ErrorParam | |
function New-TerminatingError | |
{ |
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
choco new devcon.portable |
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"?> | |
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | |
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | |
<metadata> | |
<id>devcon.portable</id> | |
<title>DevCon (Portable)</title> | |
<version>1.0</version> | |
<authors>Microsoft</authors> | |
<owners>Microsoft</owners> | |
<summary>Device Console (DevCon) Tool (Portable)</summary> |
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
#---------------------------------# | |
# environment configuration # | |
#---------------------------------# | |
os: WMF 5 | |
version: 10.0.10586.{build} | |
configuration: Release | |
platform: Any CPU |
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
Set-Location -Path .\devcon.portable\ | |
(Get-Content '.\devcon.portable.nuspec' -Raw).Replace("<version>1.0</version>", "<version>$($env:APPVEYOR_BUILD_VERSION)</version>") | Out-File '.\devcon.portable.nuspec' | |
cpack | |
Push-AppveyorArtifact ".\devcon.portable.$($ENV:APPVEYOR_BUILD_VERSION).nupkg" |
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
$Car = [Hashtable]::New() | |
$Car.Add('Make','Lamborghini') | |
$Car.Add('Model','Aventador') | |
$NewCar = $Car.Clone() | |
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
class Car:ICloneable { | |
[String] $Make | |
[String] $Model | |
} |
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
class Car:ICloneable { | |
[Object] Clone () { | |
$NewCar = [Car]::New() | |
foreach ($Property in ($this | Get-Member -MemberType Property)) | |
{ | |
$NewCar.$($Property.Name) = $this.$($Property.Name) | |
} # foreach | |
return $NewCar | |
} # Clone | |
[String] $Make |