Monthly Archives: December 2019

VScode improvement

VScode is the recommended editor for PowerShell Core as its multi-platform. Personally, I’ve preferred the Windows PowerShell ISE as its more closely aligned with the code I create and the work I do. The latest VScode improvement means I’m beginning … Continue reading

Posted in Powershell | 1 Comment

Clear the trusted host list

The final option in administering the trusted host list is to clear the entire list. The following function will clear the trusted host list function clear-trustedhost { [CmdletBinding()] param (  [string]$computername = $env:COMPUTERNAME ) if (Test-Connection -ComputerName $computername -Quiet -Count … Continue reading

Posted in Powershell | Leave a comment

Remove a trusted host

Continuing our collection of routines to manage the trusted hosts this time we’ll look at how to remove a trusted host function remove-trustedhost { [CmdletBinding()] param (  [string]$trustedhost,  [string]$computername = $env:COMPUTERNAME ) if (Test-Connection -ComputerName $computername -Quiet -Count 1) {   … Continue reading

Posted in Powershell | Leave a comment

Add a trusted host

Last time I showed how to read the trusted host list  – this is how you add a trusted host function add-trustedhost { [CmdletBinding()] param (  [string]$trustedhost,  [string]$computername = $env:COMPUTERNAME ) if (Test-Connection -ComputerName $computername -Quiet -Count 1) {   $th … Continue reading

Posted in Powershell | Leave a comment

Trusted hosts

You can use trusted hosts in WSMAN based PowerShell remoting to authenticate computers where Kerberos isn’t available. The WSMAN configuration is available through the WSMAN PowerShell drive or you can use the WSMANInstance cmdlets – available in Windows PowerShell v5.1, … Continue reading

Posted in Powershell | Leave a comment

Keep it Simple

One of the principles I’ve always tried to stick with when writing code – in PowerShell or any other language – is Keep it Simple. Keeping code simple makes it easier to understand, easier to debug and easier to maintain. … Continue reading

Posted in Powershell | 1 Comment

What do you use PowerShell for?

What do you use PowerShell for? Personally, I’ve always used it as a tool to automate the administration of Windows systems. I’ve created and managed systems. Managed the OS and file system. Administered Exchange, Active Directory and SQL Server amongst … Continue reading

Posted in Powershell | 1 Comment