Skip to content
Browse files

Changed encoding to ASCII

  • Loading branch information...
1 parent c380156 commit 8ad9ec0376a35458ce707cadf03df702dfaef90a @dfinke committed Jul 15, 2012
View
6 chapter11/NewObjectHashTable.ps1
@@ -1,4 +1,4 @@
-New-Object PSObject -Property @{
- FirstName = "Donald"
- LastName = "Knuth"
+New-Object PSObject -Property @{
+ FirstName = "Donald"
+ LastName = "Knuth"
}
View
10 chapter11/PSCustomObject.ps1
@@ -1,6 +1,6 @@
-[PSCustomObject] @{
- FirstName = "Donald"
- LastName = "Knuth"
- Date = Get-Date
-} | Add-Member -PassThru -MemberType ScriptProperty `
+[PSCustomObject] @{
+ FirstName = "Donald"
+ LastName = "Knuth"
+ Date = Get-Date
+} | Add-Member -PassThru -MemberType ScriptProperty `
FullName {"{0}, {1}" -f $this.LastName, $this.FirstName} | ft -a
View
24 chapter11/PSCustomObjectAndMore.ps1
@@ -1,13 +1,13 @@
-Add-Type -TypeDefinition @"
-namespace Example {
- public class Test {
- public string FirstName {get; set;}
- public string LastName {get; set;}
- }
-}
-"@
-
-[Example.Test] @{
- FirstName = "Donald"
- LastName = "Knuth"
+Add-Type -TypeDefinition @"
+namespace Example {
+ public class Test {
+ public string FirstName {get; set;}
+ public string LastName {get; set;}
+ }
+}
+"@
+
+[Example.Test] @{
+ FirstName = "Donald"
+ LastName = "Knuth"
}
View
38 chapter11/StartScheduledJobIn.ps1
@@ -1,20 +1,20 @@
-function Start-ScheduledJobIn {
- param (
- [string]$Name,
- [int]$SecondsFromNow,
- [ScriptBlock]$ScriptBlock
- )
-
- $trigger = New-JobTrigger `
- -Once `
- -At (Get-Date).AddSeconds($SecondsFromNow)
-
- Register-ScheduledJob `
- -Name $Name `
- -ScriptBlock $ScriptBlock `
- -Trigger $trigger
-}
-
-cls
-
+function Start-ScheduledJobIn {
+ param (
+ [string]$Name,
+ [int]$SecondsFromNow,
+ [ScriptBlock]$ScriptBlock
+ )
+
+ $trigger = New-JobTrigger `
+ -Once `
+ -At (Get-Date).AddSeconds($SecondsFromNow)
+
+ Register-ScheduledJob `
+ -Name $Name `
+ -ScriptBlock $ScriptBlock `
+ -Trigger $trigger
+}
+
+cls
+ipmo PSScheduledJob -Force
Start-ScheduledJobIn TestGetService 5 {Get-Service}

0 comments on commit 8ad9ec0

Please sign in to comment.
Something went wrong with that request. Please try again.