Windows PowerShell 5.0 contains a large number of new features and new features that enhance the overall user experience. While some of these features can only be used by hard core PowerShell developers, other new features and features are widely applicable.
For example, one of the new features is remote file editing. The administrator can temporarily establish a remote session with another Windows server through PowerShell. The new remote file editing feature builds on this basis, allowing you to establish a remote session and then edit the file on the remote computer.
The method for establishing a remote session is usually the same. You can use the enter-pssession command to attach the –computername parameter and the name of the target system. Next, enter the Psedit command that contains the remote system path and file name.
For example, if you want to edit a file named C:\Files\File.txt on the Server1, the corresponding command is as follows:
Enter-pssession–computername Server1
Psedit C:\Files\File.txt
PowerShell 5.0 Another improved feature is the desired state configuration. For users unfamiliar with the expected state configuration, the improved functionality allows administrators to compare the expected state of the Windows Server, and if the server has problems and deviates from the ideal configuration, the administrator can take corrective action in a timely manner.
The expected state configuration feature has been around for some time, but Microsoft has added a new parameter. The new parameter allows throttling valve restrictions to be set on the desired state configuration feature. The idea is that the expected state configuration feature typically runs concurrently with a large number of servers. Doing so consumes a lot of system resources. Throttle limits allow administrators to limit the concurrent number of expected state configurations, thereby limiting system resource consumption.
Set Throttle valve Limit
The expected state Configuration feature in the new version has the same syntax as previous versions, but there is a difference. Microsoft has introduced a command-line switch called –throttlelimit. The maximum number of desired status configuration actions followed by the command-line switch.
Understand subtle changes
Perhaps PowerShell 5.0 one of the most popular changes is its interface-not the command set. Critics argue that Windows PowerShell's copy-and-paste functionality can produce unpredictable results. Microsoft has completely modified the way copying and pasting works.
The new feature appears in the Windows 10 preview version. You will find a new tab named Experimental from the Windows PowerShell property sheet.
A big problem with copying and pasting in Windows PowerShell is that if you select multiple lines of code replication, PowerShell replicates each row individually without duplicating the entire block of code. For example, if you copy a four-line command and then paste it into the PowerShell interface, PowerShell inserts a line break between each line, which results in an error message. The check box shown in Figure 1 allows you to copy multirow together to avoid this problem.
Another annoying problem with older versions of the PowerShell interface is that if you zoom the window, some of the commands are sometimes hidden outside the bounds of the window. In PowerShell 5.0, when you shrink a window, the text is not hidden and adapts to the size of the new window.