Questions tagged [powershell-remoting]

The ability to create a remote connection, in an other way than using WMI, is the most important difference between PowerShell v 1.0 and 2.0.

Host applications can use a PowerShell object to run commands that use WS-Management-based Windows PowerShell remoting to create a temporary or persistent connection to the remote computer. This includes establishing an interactive session with a single remote computer.

1238 questions
-1
votes
1 answer

Connect to Azure VM from local

i'm absolutely beginner in power-shell scripting and windows automation.so any help would be appreciated. i have access to a Azure-VM in my local pc at office. There are some tasks that i need to do daily on my local and VM machine. i am trying to…
Usman
  • 11
  • 1
  • 2
-1
votes
1 answer

Invoke-Command limit?

I try to run a command on about 42 servers, and the script got stuck and failed. When I try to run Invoke-Command on the one of the failed servers, I got: Connecting to remote server $$$$ failed with the following error message : The WSMan service…
Itzik
  • 107
  • 1
  • 3
  • 11
-1
votes
1 answer

Constrained endpoint on specific user

I'm trying to create a PowerShell endpoint constraint that restricts an user to only execute the functions in a custom module I made. The first thing I did is import-module mymodule.psm1 which allows me to run my modules fine withing my host…
Katz
  • 826
  • 3
  • 19
  • 40
-1
votes
1 answer

Trigger an email alert in PowerShell when ExpiryInDays data returned by PSCustomObject is less than or equal to 30

I have a script here that will return the information I need from the certificates binded in IIS from different web servers. $Date = Get-Date $servers = Get-Content C:\servers.txt $cert = Foreach ($server in $servers) { Invoke-Command…
Didge
  • 13
  • 5
-1
votes
1 answer

Try to remotely kill a process using PowerShell

I have followed the advice here and here to write a PowerShell script that remotely kills a process: Get-WmiObject Win32_Process -Filter "Name='myapp.exe'" -ComputerName remotecomputername | Invoke-WmiMethod -Name Terminate The above works when I…
majjam
  • 1,286
  • 2
  • 15
  • 32
-1
votes
1 answer

Powershell Tcp-IP, how to, Connect / SendData / ReadResult / Disconnect

I need to query printer over JetDirect protocol (Tcp-IP Port 9100) I already write the code to connect and disconnect, but for put and read data i have some problem :( 'printer.local:9100' | Connect-TcpHost | Disconnect-TcpHost result TcpDestNodes …
Alban
  • 3,105
  • 5
  • 31
  • 46
-1
votes
1 answer

Remote Commands fail after adding machines to TrustedHosts

I added both local and remote machine to TrustedHosts: winrm set winrm/config/client '@{TrustedHosts="WIN-XXXXX,Windows7-1"}' After doing that remote commands now fail Invoke-Command -ComputerName "Windows7-1" -Credential $cred -ScriptBlock…
-1
votes
1 answer

Certification Test Tool 1.2 for Azure Certified "Access is Denied"

My Azure marketplace VM image was removed suddenly by Microsoft due to WannaCry vulnerability. I'm trying to run Certification Test Tool 1.2 for Azure Certified on a new VM created from the new patched image. I am logged in as a local administrator…
SalamiArmy
  • 413
  • 1
  • 5
  • 14
-1
votes
1 answer

PowerShell Workflow - InlineScript Remoting

How can you use PowerShell workflows to interact with Exchange Online via remote PowerShell and take advantage of the workflow features such as parallel foreach, retries, etc.? # I could never find specific examples of this and finally got it…
Douglas Plumley
  • 565
  • 5
  • 21
-1
votes
1 answer

New-ADUser Access denied error with Powershell script

When I run .ps1 I have written to create AD accounts and Mailboxes based on arguments passed to it from a WinForm I am consistently getting the error: New-ADUser : Access is denied The script is run when someone clicks a button in a winform and…
Jake
  • 1
  • 1
  • 4
-1
votes
1 answer

Remote Schedule Windows Update and Shutdown with Powershell

I am currently trying to create an automation script with powershell. The script I'm using is Force Install Updates on Remote Computer The script allows a remote computer to creates a scheduled task to perform a windows update on a host…
a walter
  • 59
  • 8
-1
votes
1 answer

Remote Powershell code blocks execute in parallel

Could somebody help with understanding multithreading in remote powershell? I am trying to copy a file to remote computer using only WinRM. Here is the algorithm: Divide local file to byte[] chunks. Every chunk is base64 encoded. base64 string sent…
Azat Khadiev
  • 387
  • 4
  • 14
-1
votes
1 answer

How can I use the -PipelineVariable parameter with a cmdlet that processes its input in parallel?

I am querying Active Directory for a list of computers and using Invoke-Command to retrieve data from each one. Because I am calling Invoke-Command twice for each computer - once with the -FilePath parameter and once with the -ScriptBlock parameter…
Lance U. Matthews
  • 15,725
  • 6
  • 48
  • 68
-1
votes
1 answer

How to bulk update IIS configuration without consuming all available memory?

Each call to set-webconfigurationproperty will leak a decent amount of memory and will eventually make the current process to hit the MaxMemoryPerShellMb limit of winrs. An example of calling set-webconfigurationproperty + checking the current…
-1
votes
1 answer

Does powershell remoting support version of the powershell to be used on remote target?

Can I supply a version of powershell to be used on the target machine while ps remoting. May be my question is not proper or not possible to answer but if any body having idea please help me. I am trying to do a remoting using powershell on a…
1 2 3
82
83