Skip to content

Instantly share code, notes, and snippets.

@JasonMorgan
JasonMorgan / TrustedHosts
Last active September 16, 2023 17:57
Setting and modifying Trusted Hosts with PowerShell
## Hey folks, this is just a quick walkthrough on modifying the trusted hosts property in WSMAN using Powershell
# By default PowerShell loads a PSDrive for the WinRM service
# We modify the trusted hosts property using the Set-Item cmdlet
Set-Item WSMan:\localhost\Client\TrustedHosts -value 192.168.1.13
#This sets the value to 192.168.1.13, it also overwrites any existing values
# If you want to set a subnet you can use the PowerShell wildcard character
Set-Item WSMan:\localhost\Client\TrustedHosts -value 192.168.1.*
@ian-noble
ian-noble / boxstarter-full-win10.ps1
Last active October 23, 2022 16:31
Boxstarter - Full - Windows 10
<#
.SYNOPSIS
BoxStarter script to configure Windows 10 development PC.
.DESCRIPTION
Install BoxStarter:
. { Invoke-WebRequest -useb http://boxstarter.org/bootstrapper.ps1 } | Invoke-Expression; get-boxstarter -Force
Run by calling the following from an **elevated** command-prompt.
Remove -DisableReboots parameter to allow the script to reboot as required.
@timothywarner
timothywarner / Get-AzServiceStatus.ps1
Created May 2, 2019 23:17
Get Azure global service status quickly and with no authentication needed.
# Thanks to Will Anderson for the inspiration (timw.info/rss)
Function Get-AzServiceStatus {
BEGIN {
Try {
Invoke-WebRequest -Uri 'https://azurecomcdn.azureedge.net/en-us/status/feed/' -OutFile "$env:TEMP\test.xml" -ErrorAction Stop