Chirag Nagrekar has Published 465 Articles

How to test remote computer connectivity using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Jul-2020 09:23:26

2K+ Views

To test the remote connectivity using PowerShell Test-Connection command is used. PowerShell also supports the Ping command and both the commands are almost produce the same output but Test- Connection cmdlet supports advanced parameters. See how both commands output look.Ping Command −PS C:\Temp> ping Test1-Win2k16 Pinging Test1-Win2k16 [192.168.0.108] with 32 bytes ... Read More

How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 28-Jul-2020 09:19:57

760 Views

Internet Explorer (IE) supports the enhanced protection mode for more security of the browser and the same can be enabled/disabled using PowerShell. Let see when we can find this setting in IE.Internet Explorer → Internet Options → Advanced → Enable Enhanced Protection ModeWe can modify this setting using PowerShell and ... Read More

How to test WinRM connectivity using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 25-Jul-2020 11:26:53

13K+ Views

In system admin role or as a PowerShell engineer you need to connect to many computers remotely. So as the first step, we need to test the remote connectivity by applying ping command or Test-Connection but many organizations have a stringent policy, and some of the servers ICMP packets are ... Read More

How does PowerShell Remoting work?

Chirag Nagrekar

Chirag Nagrekar

Updated on 25-Jul-2020 11:23:32

283 Views

There are several ways to connect to remote computer cmdlets. These computers can be in the same domain, different domains, or for the workgroups using PowerShell. Here, we will mainly focus on the inbuilt parameter, Invoke-Command, and to execute PSSession command remotely.Inbuilt -ComputerName parameter.Many cmdlets in PowerShell supports the -ComputerName parameter, ... Read More

How to use –Timeout parameter in Restart-Computer cmdlet in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 24-Jul-2020 10:36:28

1K+ Views

As the name describes, with –Timeout parameter, you can restrict time for validations (PowerShell, WinRM, and WMI connectivity check after reboot) for –Wait and –For parameters and if the checks don’t complete during that time then it returns an error. This timeout value is in seconds. You can specify this ... Read More

How to use -For parameter in Restart-Computer cmdlet in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 24-Jul-2020 10:35:30

240 Views

In the –Wait parameter 3 main checks are validated − PowerShell, WMI, and WINRM connectivity. So whenever you specify the –Wait parameter, you have to wait until all three checks pass, however, if any of the checks fail then script freezes and can not further execute. If you know which ... Read More

How to use –Wait parameter in Restart-Computer cmdlet in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 24-Jul-2020 10:33:36

2K+ Views

When we use Restart-Computer command with the remote computer names, PowerShell restarts the mentioned remote computers without any checks or validations if the server has come up or not. This requirement is fulfilled with the - Wait parameter. Whenever the - Wait parameter specified, PowerShell performs the below 3 checks ... Read More

How to restart a remote system using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 24-Jul-2020 10:30:17

2K+ Views

To restart the remote computer, you need to use the Restart-Computer command provided by the computer name. For example, Restart-Computer -ComputerName Test1-Win2k12The above command will restart computer Test1-Win2k12 automatically and if you have multiple remote computers to restart then you can provide multiple computers separated with comma (, ).For example, ... Read More

How to change the background color of the font in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 14-Jul-2020 13:16:43

3K+ Views

To change the background color of the font, you can use the GUI and command line both.With GUI − Colors → Screen Background.CLI −$host.UI.RawUI.BackgroundColor = "DarkBlue"You will notice that the background color of the text has been changed to DarkBlue.

How to generate a strong password using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 13-Jul-2020 05:39:25

461 Views

To generate a strong password with the PowerShell, we can use 8 or more characters password. In the below example, we are going to use the 8 character password, you can change the number of characters as per your convenience.This script you can bind into windows forms and provide it ... Read More

Advertisements