File tree Expand file tree Collapse file tree 6 files changed +72
-0
lines changed Expand file tree Collapse file tree 6 files changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System . Management . Automation ;
2
+ using UiPath . PowerShell . Models ;
3
+ using UiPath . PowerShell . Util ;
4
+ using UiPath . Web . Client ;
5
+
6
+ namespace UiPath . PowerShell . Cmdlets
7
+ {
8
+ /// <summary>
9
+ /// <para type="synopsis">Shows the valid time zone names recognized by the Orchestrator.</para>
10
+ /// </summary>
11
+ [ Cmdlet ( VerbsCommon . Get , Nouns . TimeZones ) ]
12
+ public class GetTimeZones : AuthenticatedCmdlet
13
+ {
14
+ protected override void ProcessRecord ( )
15
+ {
16
+ var timeZones = HandleHttpOperationException ( ( ) => Api . Settings . GetTimezones ( ) ) ;
17
+ foreach ( var tz in timeZones . Items )
18
+ {
19
+ WriteObject ( Timezone . FromDto ( tz ) ) ;
20
+ }
21
+ }
22
+ }
23
+ }
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ internal static class Nouns
22
22
internal const string QueueDefinition = UiPath + "QueueDefinition" ;
23
23
internal const string QueueItem = UiPath + "QueuItem" ;
24
24
internal const string Tenant = UiPath + "Tenant" ;
25
+ internal const string TimeZones = UiPath + "TimeZones" ;
25
26
internal const string User = UiPath + "User" ;
26
27
}
27
28
}
Original file line number Diff line number Diff line change
1
+ using UiPath . Web . Client . Models ;
2
+
3
+ namespace UiPath . PowerShell . Models
4
+ {
5
+ public class Timezone
6
+ {
7
+ public string Name { get ; internal set ; }
8
+ public string Value { get ; internal set ; }
9
+
10
+ internal static Timezone FromDto ( NameValueDto dto )
11
+ {
12
+ return new Timezone
13
+ {
14
+ Name = dto . Name ,
15
+ Value = dto . Value
16
+ } ;
17
+ }
18
+ }
19
+ }
Original file line number Diff line number Diff line change 80
80
<Compile Include =" Cmdlets\GetPermission.cs" />
81
81
<Compile Include =" Cmdlets\GetRole.cs" />
82
82
<Compile Include =" Cmdlets\GetProcessSchedule.cs" />
83
+ <Compile Include =" Cmdlets\GetTimeZones.cs" />
83
84
<Compile Include =" Cmdlets\GrantRolePermission.cs" />
84
85
<Compile Include =" Cmdlets\RemoveAsset.cs" />
85
86
<Compile Include =" Cmdlets\GetAsset.cs" />
114
115
<Compile Include =" Models\Role.cs" />
115
116
<Compile Include =" Cmdlets\RevokeRolePermission.cs" />
116
117
<Compile Include =" Models\ProcessSchedule.cs" />
118
+ <Compile Include =" Models\Timezone.cs" />
117
119
<Compile Include =" Util\AuthenticatedCmdlet.cs" />
118
120
<Compile Include =" Util\FilterAttribute.cs" />
119
121
<Compile Include =" Util\FilteredBaseCmdlet.cs" />
Original file line number Diff line number Diff line change
1
+ ``` PowerShell
2
+
3
+ NAME
4
+ Get-UiPathTimeZones
5
+
6
+ SYNOPSIS
7
+ Shows the valid time zone names recognized by the Orchestrator.
8
+
9
+
10
+ SYNTAX
11
+ Get-UiPathTimeZones [-AuthToken <AuthToken>] [<CommonParameters>]
12
+
13
+
14
+ DESCRIPTION
15
+
16
+
17
+ RELATED LINKS
18
+
19
+ REMARKS
20
+ To see the examples, type: "get-help Get-UiPathTimeZones -examples".
21
+ For more information, type: "get-help Get-UiPathTimeZones -detailed".
22
+ For technical information, type: "get-help Get-UiPathTimeZones -full".
23
+
24
+
25
+
26
+ ```
Original file line number Diff line number Diff line change 26
26
- [ Get-UiPathRobot] ( Get-UiPathRobot.md )
27
27
- [ Get-UiPathRole] ( Get-UiPathRole.md )
28
28
- [ Get-UiPathTenant] ( Get-UiPathTenant.md )
29
+ - [ Get-UiPathTimeZones] ( Get-UiPathTimeZones.md )
29
30
- [ Get-UiPathUser] ( Get-UiPathUser.md )
30
31
- [ Grant-UiPathRolePermission] ( Grant-UiPathRolePermission.md )
31
32
- [ Register-UiPathLicense] ( Register-UiPathLicense.md )
You can’t perform that action at this time.
0 commit comments