Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – Enable WinRM

Posted on September 5, 2017September 5, 2017 By David Kittell

Not recommended for production computers but this will get the WinRM working on a development computer.

Enable-PSRemoting -Force

Set-WSManQuickConfig -SkipNetworkProfileCheck

winrm set winrm/config/client/auth '@{Basic="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'

Set-Item wsman:\localhost\client\trustedhosts *

Winrm enumerate winrm/config/listener

Restart-Service WinRM

New-NetFirewallRule -DisplayName "Windows Remote Management (HTTPS-In)" -Name "Windows Remote Management (HTTPS-In)" -Profile Any -LocalPort 5986 -Protocol TCP
New-NetFirewallRule -DisplayName "RemotePowerShell" -Direction Inbound –LocalPort 5985-5986 -Protocol TCP -Action Allow

Test-WSMan 10.40.20.174

Invoke-Command -ComputerName 10.40.20.174 -ScriptBlock { Get-ChildItem C:\ } -credential dkittell

If you can’t connect due to access denied try this

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Mac OS X – Get Network Information

Posted on February 27, 2017May 2, 2017

Every once in a while you need to get some basic network information from your Mac or a Mac you are supporting, this script below will help get you some helpful information. #!/bin/sh clear sExternalMACALService="http://dns.kittell.net/macaltext.php?address=" # List all Network ports NetworkPorts=$(ifconfig -uv | grep ‘^[a-z0-9]’ | awk -F : ‘{print…

Read More

Ektron Find Replace In UrlAliasManual

Posted on October 23, 2013October 26, 2015

This script will rename manual aliases set xact_abort on declare @currval nvarchar(500) declare @newval nvarchar(500) declare @search nvarchar(500) declare @replace varchar(500) set @search = ‘/Index’ –string to find set @replace = ‘/Default’ –replacement string declare @pos int declare @id bigint begin tran declare curs cursor local fast_forward for select AliasId,AliasName…

Read More

Delete Duplicate Rows

Posted on April 29, 2013October 26, 2015

CREATE TABLE DuplicateRcordTable (Col1 INT, Col2 INT) INSERT INTO DuplicateRcordTable SELECT 1, 1 UNION ALL SELECT 1, 1 –duplicate UNION ALL SELECT 1, 1 –duplicate UNION ALL SELECT 1, 2 UNION ALL SELECT 1, 2 –duplicate UNION ALL SELECT 1, 3 UNION ALL SELECT 1, 4 GO SELECT * FROM…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes