Prevent a profile to be created when connecting with "Open Console" (PSRemoteing)

Topics: Feature Requests
Developer
Feb 19, 2016 at 11:25 AM
Edited Feb 19, 2016 at 11:28 AM
I suggest that we change the following rows in MainPage.xaml.cs
                    if ((bool)cb_ssl.IsChecked)
                        Explorer.StartInfo.Arguments = @"-NoExit -Command " + sCred + "Enter-PSSession '" + oAgent.TargetHostname + "' -Port " + tb_wsmanport.Text + " -UseSSL -Credential $creds";
                    else
                        Explorer.StartInfo.Arguments = @"-NoExit -Command " + sCred + "Enter-PSSession '" + oAgent.TargetHostname + "' -Port " + tb_wsmanport.Text + " -Credential $creds";
to
                   if ((bool)cb_ssl.IsChecked)
                        Explorer.StartInfo.Arguments = @"-NoExit -Command " + sCred + "Enter-PSSession '" + oAgent.TargetHostname + "' -Port " + tb_wsmanport.Text + " -UseSSL -Credential $creds -SessionOption (New-PSSessionOption -NoMachineProfile)";
                    else
                        Explorer.StartInfo.Arguments = @"-NoExit -Command " + sCred + "Enter-PSSession '" + oAgent.TargetHostname + "' -Port " + tb_wsmanport.Text + " -Credential $creds -SessionOption (New-PSSessionOption -NoMachineProfile)";
If adding the option "-SessionOption (New-PSSessionOption -NoMachineProfile)" to the Connection string it will prevent the Creation of a local profile of the Client Center User on the remote computer. (thus not leaving any unnessecary footprint on the machine).
Coordinator
Feb 23, 2016 at 9:44 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 23, 2016 at 9:46 AM
Marked as answer by rzander on 2/23/2016 at 2:46 AM