Questions tagged [powershell-cmdlet]

Quote from Microsoft site: "A cmdlet is a lightweight command that is used in the PowerShell environment. The PowerShell runtime invokes these cmdlets within the context of automation scripts that are provided at the command line. The PowerShell runtime also invokes them programmatically through PowerShell APIs"

Ref: Cmdlet Overview

882 questions
0
votes
2 answers

Filtering for strings in PowerShell

I would like to implement some custom cmdlets that filter some object by name, and I would like to use wild-card enabled search like for common cmdlets (Get-ChildItem and Get-Process). How can I implement this kind of search? Are there some examples…
fra
  • 3,488
  • 5
  • 38
  • 61
0
votes
3 answers

PowerShell in error using GetEventLog CmdLet

I am trying to run a PowerShell script and try to filter by the message. param($server, $message) Try { Invoke-Command -computername $server {Get-Eventlog -logname application -source "source" -message $message | Format-List} } Catch…
Maverick
  • 1,293
  • 1
  • 19
  • 39
-1
votes
0 answers

Command line closed instantly after typing "Flutter ___"

I face this problem after I reset my android studio. I re install the android studio and re install the flutter latest version 3.12.3 stable. I follow the steps mention by stack overflow users. I change the path of SDK to all the drive. I update my…
-1
votes
1 answer

Receive-SFTPFile : A parameter cannot be found that matches parameter name 'RemoteFile'

I am using Transferetto module to download SFTP files, it is able to connect to server and list the server files but throwing error while downloading with below error:- Receive-SFTPFile : A parameter cannot be found that matches parameter name…
John
  • 105
  • 9
-1
votes
1 answer

powershell ExecutionPolicy is not setting properly

I am running powershell from batch script. Here is sample code. powershell.exe Set-ExecutionPolicy Bypass -Force set logDir=C:\testfolder\ mkdir %logDir% powershell.exe C:\\test.ps1 >> "%logDir%test.log" Getting error:…
-1
votes
1 answer

How to pack PowerShell Binary Cmdlet to install from Azure DevOps Gallery

I have a PowerShell cmdlet written in C#. When I compile it, and pass it to Import-Module locally, it works fine. But, thus far, no combination of nuget pack has resulted in a package I can install from an Azure DevOps Artifact Gallery. I can pack…
Tom Padilla
  • 924
  • 10
  • 30
-1
votes
1 answer

Get process command

Would i be able to ask, How would I do a get-process to many machines however for a true or false response to come back for each machine that is running this specific process? however this one specific process only works or is activated when its…
-1
votes
2 answers

How to Office 365 Teams Get-Team and Get-Teamuser results export to CSV file

I wanna export to csv file like this format. Team name | User name | Role ================================ But, Get-Teamuser cmdlet result is Userid | User | Name | Role =============================== What should I do?
-1
votes
1 answer

how to run my application on windows container in azure?

i was just following this azure article to deploy my application using docker, The following example creates an App Service plan named myAppServicePlan in the Basic pricing tier (--sku B1) and in a Linux container (--is-linux). az appservice plan…
sravan ganji
  • 4,774
  • 3
  • 25
  • 37
-1
votes
1 answer

How to run an executable on a VM with PowerShell

I want to run an executable on a remote virtual machine. The executable is already on the remote virtual machine. The cmdlet I use is: $command = "c:\users\\desktop\Myexecutable.exe" Invoke-Command -ComputerName Machine98 -ScriptBlock…
Smurf
  • 7
  • 4
-1
votes
1 answer

C# PowerShell Cmdlet input prompt

Could anyone please provide a C# code sample showing how to prompt for user input in a custom PowerShell Cmdlet? I find plenty of articles on how to pass parameters to a Cmdlet, but little to none on how to prompt for user input during…
Bjørn H. Sandvik
  • 533
  • 4
  • 10
  • 22
-1
votes
1 answer

Implement Get-Help PSCmdlet

I am writing PowerShell Cmdlets using the PSCmdlet class in C#. [Cmdlet(VerbsCommon.Get, "Employee")] public class GetEmployee : PSCmdlet I want to provide more information in Remarks, Description, Synopsis section of Get-Help Get-Employee Anyone…
user3403260
  • 95
  • 1
  • 1
  • 7
-1
votes
1 answer

Difference between Power Shell cmdlets Copy-Item and Start-Bitstransfer

Could someone please explain what is the difference between Power Shell "Copy-Item" and "Start-Bitstransfer" cmdlets ? I'm going to use one of these cmdlets to copy a file from remote share to my local machine. I now that both of them can be run…
AnnaL
  • 111
  • 7
-1
votes
1 answer

What is a full-fledged PowerShell command?

If -let is a diminutive suffix and PowerShell commands are called command-lets, what is a full-fledged PowerShell command?
Henri Latreille
  • 263
  • 1
  • 11
-1
votes
2 answers

AppDomain.CurrentDomain.BaseDirectory changes to wrong directory

I have a created a dll with a Cmdlet command (see Get_DemoNames.cs). From this cmdlet I call a method UpdateXml(), so far everything is working. But UpdateXml() also creates files if they don't exist. When I call UpdateXml() in a class file like…
Sybren
  • 1,071
  • 3
  • 17
  • 51
1 2 3
58
59