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.

1050 questions
-1
votes
1 answer

Powershell to fetch the Component Governance result from azure devops build pipeline

We have a requirement to fail the azure devops Build pipeline if you get a Component goverance alert om missing license information on that particular build. Is there any powersehll command topull the component goveranace build result from pipeline…
-1
votes
1 answer

Enabled PS Remoting in local machine

I am trying to enable PS-Remoting on my local machine using following command Enable-PSRemoting but it gives error as follows as per above error I need to change the network connection type to either Domain or Private. To check network connection…
Harish Shisode
  • 549
  • 3
  • 14
-1
votes
1 answer

How to connect to remote server using powershell from local . Enter-PSSession not working

I am trying to connect to remote computer using local powershell session. for that I am trying to use local powershell Enter-PSSession or New-PSSession comandlets as : $session = New-PSSession -ConnectionUri…
Usman
  • 2,426
  • 4
  • 36
  • 68
-1
votes
1 answer

How to format the Out-GridView display using calculated property?

The Powershell script below works great to show the Azure User properties, except the license column which needs to be formatted to remove the company domain name. This is the script. #Import Module If (!(Get-Module "*MSOnline*")) {Import-Module…
-1
votes
1 answer

How do I restart a windows service on an Azure VM remotely from my office desktop using powershell?

I have a few Windows Server 2019 Core VMs in Azure all running the same windows service. I would like to run a powershell script from my computer that loops through all the VMs and restarts the service on each. I have a PS script on each VM which…
-1
votes
0 answers

New-ADUser cannot validate argument on parameter 'name'

I need to add new users into my AD from a remote computer. WMI is activated - so no problem with that. The argument -Name is not validated but the variable is set. The PowerShell command works on my domain controller, but not remote. I have tried to…
nicolas
  • 61
  • 1
  • 9
-1
votes
1 answer

Powershell remoting Windows -> Linux : submit a parametrized script

I guess I have it 90% correct, but a small part seems to be missing... I have no problem opening a remote session from Windows -> Linux (host) No problem passing a command either. This works fine: $Session = New-PSSession -SSHTransport -HostName…
Philippe
  • 57
  • 1
  • 7
-1
votes
1 answer

Remote Powershell run interactive batch file

This is probably a question with a binary answer. I have a series of batch files on a server. They all require user input in some way, either via CHOICE or SET. I would like to run these remotely from my desktop, using powershell. Is this possible?…
-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
  • 87
  • 1
  • 3
  • 10
-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
  • 776
  • 3
  • 14
  • 37
-1
votes
1 answer

In PowerShell, which authentication scheme should I use?

When using PowerShell remoting (Using the Invoke-Command cmdlet for example), an authentication scheme is required. The options are Kerberos, CredSSP, NTLM and Negotiate. What is the difference between them? What should I use?
iTayb
  • 10,984
  • 21
  • 71
  • 128
-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,171
  • 2
  • 13
  • 27
-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
  • 2,816
  • 5
  • 23
  • 43
1 2 3
69
70