You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Obtain data of Win32_Process class from a remote system and apply a filter on the output |`gwmi "Select ProcessId,Name,CommandLine From Win32_Process" -ComputerName dc01.corp.local \| ? Name -Like *PowerShell* \| select ProcessId,CommandLine`| Explicit credentials can be specified using the `-Username` and `-Password` parameters |
48
58
| View details about a certain service |`Get-WmiObject -Class Win32_Service -Filter "Name = 'WinRM'"`||
49
59
| Launch process using WMI |`Invoke-WmiMethod -Class Win32_Process -Name Create "cmd /c calc.exe"`| This can also be done on a remote system |
@@ -101,7 +111,6 @@ Use the TemplateCommand.cs file in the Commands folder to construct new cmdlets.
101
111
| Run with the -MyInteger parameter which changes the number of iterations from its default number of 5 iterations to whatever number is provided |`gtc -MyInteger 10`|
102
112
| Run with the -MyString parameter which changes the text that is printed from its default value of 'Hello World' to whatever string is provided |`gtc -MyString "Bye PowerShell"`|
103
113
| Combination of parameters |`gtc -MyInteger 10 -MyString "Bye PowerShell"`|
104
-
| Combination of parameters - Alternative |`gtc -MyInteger 10 -MyString "Bye PowerShell"`|
105
114
| Combination of parameters - Using fact that MyString is the only mandatory parameter for this command |`gtc -MyInteger 10 "Bye PowerShell"`|
106
115
| Command in combination with a couple of data manipulators in the pipe |`gtc "Bye PowerShell" -MyInteger 30 \| ? Attribute2 -Like Line1* \| select Attribute2 \| fl`|
107
116
@@ -122,24 +131,32 @@ Execute the following steps to implement your own cmdlet:
122
131
3. Make sure all results are stored in the `_results` variable.
123
132
8. Remove all of the template sample code and comments from the file to keep the source tidy.
| Invoke-Command | Using PSRemoting execute a command on a remote machine (which in that case will of course be logged) |
140
+
| Get-Service | Include option to also show service paths like in `sc qc`|
141
+
| * | Sysinternals utilities like `pipelist` and `sdelete`|
142
+
125
143
# Contributed NoPowerShell cmdlets
126
144
Authors of additional NoPowerShell cmdlets are added to the table below. Moreover, the table lists commands that are requested by the community to add. Together we can develop a powerful NoPowerShell toolkit!
0 commit comments