Skip to content

Commit a7ed609

Browse files
v2.1.0
1 parent 907dee8 commit a7ed609

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

ISERemoteTab.psd1

24 Bytes
Binary file not shown.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ $ISERemoteProfile = "C:\Scripts\RemoteProfile.ps1"
5959
$psise.CurrentPowerShellTab.AddOnsMenu.Submenus.Add($Display,$Action,$shortcut) | Out-Null
6060
```
6161

62+
The console function, `New-ISERemoteTab` will also use the value of `$ISERemoteProfile` as its default value.
63+
6264
A sample profile script, [SampleRemoteProfile.ps1](SampleRemoteProfile.ps1), is included with this module.
6365

6466
## Deprecation Notice
6567

6668
This module should be considered in maintenance-mode. The PowerShell ISE should be considered deprecated. I will try to address bug fixes, but do not expect any other changes or enhancements to this module. If you like the concept of separate remoting sessions, you can achieve similar results with [Windows Terminal](https://docs.microsoft.com/en-us/windows/terminal/get-started).
67-

changelog.md

548 Bytes

Changelog for ISERemoteTab

v2.1.0

  • Help updates.
  • Modified -ProfileScript parameter in New-ISERemoteTab to use $ISEREmoteProfile as the default. This is a continuation of Issue #10.
  • Updated README.md.

v2.0.0

  • Updated License.
  • Modified New-ISERemoteTab to better support profiles so that prompt functions can be defined. Issue #10.
  • Changed the -Profile parameter in New-ISERemoteTab to -ProfileScript to avoid potential conflicts with the automatic $Profile variable. This also required an update to New-ISERemoteTabForm.
  • Updated commands to support PowerShell Direct and connecting to a Hyper-V virtual machine. Issue #9.
  • Added the nrtf alias for New-ISERemoteTabForm.
  • Removed the cred and c aliases for the Credential parameter in New-ISERemoteTab.
  • Removed code in New-ISERemoteTab to run Test-WSMan.
  • Added better error handling in New-ISERemoteTab.
  • Removed user name in New-ISERemoteTab when prompting for credential.
  • Reorganized module layout.
  • Updated SampleRemoteProfile.ps1 with a demo prompt function.
  • Increased the required Windows PowerShell version to 5.1.
  • Help updates.
  • Updated README.md.

docs/New-ISERemoteTab.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Create remote tabs in the PowerShell ISE.
1515
### ComputerCredential (Default)
1616

1717
```yaml
18-
New-ISERemoteTab -Computername <String[]> [-Credential <PSCredential>] [-Authentication <String>] [-CertificateThumbprint <String>] [-ConfigurationName <String>] [-Port <Int32>] [-SessionOption <PSSessionOption>] [-UseSSL] [-ProfileScript <String>] [<CommonParameters>]
18+
New-ISERemoteTab -Computername <String[]> [-Credential <PSCredential>] [-Authentication <String>] [-CertificateThumbprint <String>] [-ConfigurationName <String>] [-Port <Int32>] [-SessionOption <PSSessionOption>] [-UseSSL] [-ProfileScript <String>] [<CommonParameters>]
1919
```
2020

2121
### ComputerPrompt
@@ -231,9 +231,9 @@ Accept wildcard characters: False
231231
232232
Specify the path to a profile script file.
233233
234-
hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.
234+
hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.
235235
236-
You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.
236+
You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.
237237
238238
Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.
239239
@@ -244,7 +244,7 @@ Aliases:
244244

245245
Required: False
246246
Position: Named
247-
Default value: None
247+
Default value: $ISERemoteProfile
248248
Accept pipeline input: False
249249
Accept wildcard characters: False
250250
```

en-US/ISERemoteTab-help.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,16 @@
177177
<maml:name>ProfileScript</maml:name>
178178
<maml:description>
179179
<maml:para>Specify the path to a profile script file.</maml:para>
180-
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
181-
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.</maml:para>
180+
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
181+
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.</maml:para>
182182
<maml:para>Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.</maml:para>
183183
</maml:description>
184184
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
185185
<dev:type>
186186
<maml:name>String</maml:name>
187187
<maml:uri />
188188
</dev:type>
189-
<dev:defaultValue>None</dev:defaultValue>
189+
<dev:defaultValue>$ISERemoteProfile</dev:defaultValue>
190190
</command:parameter>
191191
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
192192
<maml:name>SessionOption</maml:name>
@@ -288,16 +288,16 @@
288288
<maml:name>ProfileScript</maml:name>
289289
<maml:description>
290290
<maml:para>Specify the path to a profile script file.</maml:para>
291-
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
292-
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.</maml:para>
291+
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
292+
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.</maml:para>
293293
<maml:para>Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.</maml:para>
294294
</maml:description>
295295
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
296296
<dev:type>
297297
<maml:name>String</maml:name>
298298
<maml:uri />
299299
</dev:type>
300-
<dev:defaultValue>None</dev:defaultValue>
300+
<dev:defaultValue>$ISERemoteProfile</dev:defaultValue>
301301
</command:parameter>
302302
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
303303
<maml:name>PromptForCredential</maml:name>
@@ -364,16 +364,16 @@
364364
<maml:name>ProfileScript</maml:name>
365365
<maml:description>
366366
<maml:para>Specify the path to a profile script file.</maml:para>
367-
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
368-
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.</maml:para>
367+
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
368+
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.</maml:para>
369369
<maml:para>Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.</maml:para>
370370
</maml:description>
371371
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
372372
<dev:type>
373373
<maml:name>String</maml:name>
374374
<maml:uri />
375375
</dev:type>
376-
<dev:defaultValue>None</dev:defaultValue>
376+
<dev:defaultValue>$ISERemoteProfile</dev:defaultValue>
377377
</command:parameter>
378378
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
379379
<maml:name>VMName</maml:name>
@@ -406,16 +406,16 @@
406406
<maml:name>ProfileScript</maml:name>
407407
<maml:description>
408408
<maml:para>Specify the path to a profile script file.</maml:para>
409-
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
410-
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.</maml:para>
409+
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
410+
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.</maml:para>
411411
<maml:para>Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.</maml:para>
412412
</maml:description>
413413
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
414414
<dev:type>
415415
<maml:name>String</maml:name>
416416
<maml:uri />
417417
</dev:type>
418-
<dev:defaultValue>None</dev:defaultValue>
418+
<dev:defaultValue>$ISERemoteProfile</dev:defaultValue>
419419
</command:parameter>
420420
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
421421
<maml:name>PromptForCredential</maml:name>
@@ -519,16 +519,16 @@
519519
<maml:name>ProfileScript</maml:name>
520520
<maml:description>
521521
<maml:para>Specify the path to a profile script file.</maml:para>
522-
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The form will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
523-
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox to store the current file in the variable.</maml:para>
522+
<maml:para>hNormally, you do not have a traditional PowerShell profile script when you enter a remote PSSession. But you have the option to specify a profile script that will be executed in the remote session in place of a regular profile script. The command will look in your current session for a variable called ISERemoteProfile which is the path to a ps1 file with your remote profile script.</maml:para>
523+
<maml:para>You can set this in your PowerShell ISE Profile script or you can use the Save script setting checkbox when running New-ISERemotTabForm to store the current file in the variable.</maml:para>
524524
<maml:para>Note that this variable is only for the length of your PowerShell session and does NOT update your ISE profile.</maml:para>
525525
</maml:description>
526526
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
527527
<dev:type>
528528
<maml:name>String</maml:name>
529529
<maml:uri />
530530
</dev:type>
531-
<dev:defaultValue>None</dev:defaultValue>
531+
<dev:defaultValue>$ISERemoteProfile</dev:defaultValue>
532532
</command:parameter>
533533
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
534534
<maml:name>PromptForCredential</maml:name>

functions/New-ISERemoteTab.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Function New-ISERemoteTab {
7373
Throw "Cannot validate path $_"
7474
}
7575
})]
76-
[string]$ProfileScript
76+
[string]$ProfileScript = $ISERemoteProfile
7777
)
7878

7979
Begin {
@@ -223,7 +223,7 @@ Function New-ISERemoteTab {
223223
}
224224
} #Try
225225
Catch {
226-
Write-Warning "Can't create remote tab to $computer. $($_.exception.Message)."
226+
Write-Warning "Can't create remote tab to $computer. $($_.exception.Message)"
227227
}
228228
}) #foreach computer
229229

0 commit comments

Comments
 (0)