Avatar of Pete
PeteFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

remote powershell session

I can run a remote PowerShell session by using:

Enter-PSSession 'computername'

then I can run PowerShell commands, but if i try and run a PowerShell script stored elsewhere, it fails with 'error creating pipeline'. how can I do this?

PS C:\WINDOWS\system32> Enter-PSSession F400

[F400]: PS C:\WINDOWS\system32> & "\\domain\Scripts\test.ps1"
An error occurred while creating the pipeline
.
Powershell

Avatar of undefined
Last Comment
Qlemo
Avatar of Qlemo
Qlemo
Flag of Germany image

What's in  the script you try to run?
Avatar of Pete
Pete
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

script contents:

MD C:\Test
Avatar of Qlemo
Qlemo
Flag of Germany image

The error message is probably misleading. I assume directly executing the MD works, and executing as a local script on F400 does too?
Avatar of Pete
Pete
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

yes it does. running single command works fine, just trying to run a ps1 file stored elsewhere.
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Powershell
Powershell

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.

27K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo