-
Notifications
You must be signed in to change notification settings - Fork 6
/
PSRemoteOperations.psm1
30 lines (25 loc) · 1.08 KB
/
PSRemoteOperations.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
. $PSScriptRoot\functions\functions.ps1
. $PSScriptRoot\functions\private.ps1
. $PSScriptRoot\functions\New-PSRemoteOperationForm.ps1
. $PSScriptRoot\functions\Register-PSRemoteOperationWatcher.ps1
#add default properties for the custom result object
$update = @{
TypeName = "RemoteOpResult"
DefaultDisplayPropertySet = "Computername", "Date", "Scriptblock", "Filepath", "ArgumentList", "Completed", "Error"
Force = $True
}
Update-TypeData @update
$update.TypeName = "PSRemoteOpScriptBlock"
$Update.DefaultDisplayPropertySet = "Computername", "CreatedAt", "Scriptblock", "ArgumentList","Status","PSVersion"
$update.MemberName = "Age"
$update.MemberType = "ScriptProperty"
$update.Value = {(Get-Date) - $this.CreatedAt}
Update-Typedata @update
$update.TypeName = "PSRemoteOpFile"
$Update.DefaultDisplayPropertySet = "Computername", "CreatedAt", "FilePath", "ArgumentList", "Status","PSVersion"
$update.MemberName = "Age"
$update.MemberType = "ScriptProperty"
$update.Value = { (Get-Date) - $this.CreatedAt }
Update-TypeData @update
#add AutoCompleters
. $PSScriptRoot\autocompleters.ps1