Skip to content

Rob Looman Blog

Work related blogs

Recent Posts

  • Security
  • SCCM 2012 R2 PowerShell module Import\Export Collections
  • Manage Windows Azure with Mac OS/X
  • SCCM 2012 PowerShell: Create a Global Condition Rule
  • TechDays 2013 day 0: Defending your Microsoft Infrastructure from cyber threats

Recent Comments

  • Blanik on Create RegistrySetting object with PowerShell
  • aaj on Create RegistrySetting object with PowerShell
  • Rob Looman on Create RegistrySetting object with PowerShell
  • aaj on Create RegistrySetting object with PowerShell
  • Artem on SCCM 2012 PowerShell: Create a Global Condition Rule

Archives

  • August 2016
  • December 2013
  • November 2013
  • May 2013
  • March 2013
  • January 2013
  • October 2012
  • September 2012
  • June 2012
  • April 2012
  • March 2012
  • February 2012

Categories

  • Azure
  • Network
  • PowerShell
  • Remote
  • SCCM 2012
  • Uncategorized
  • WMI

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Tag: Remote

Control a computer via Powershell

Just a simple script to control a machine via powershell.

#Set computername to control
$pc = "[Computername]"
#Trust the host because we are not in the same domain
set-item wsman:\localhost\Client\TrustedHosts -value $pc -force
#Enter the session
Enter-PSSession $pc -Credential $pc\Administrator
Posted on June 13, 2012August 11, 2016Categories PowerShell, RemoteTags Remote
Proudly powered by WordPress