-
-
Notifications
You must be signed in to change notification settings - Fork 7
New Command
Apostolis Bekiaris edited this page Apr 22, 2020
·
9 revisions
Uses an external processs to execute a command and captures the output.
New-Command [[-commandTitle] <Object>] [[-commandPath] <Object>] [[-commandArguments] <Object>]
[[-workingDir] <Object>] [<CommonParameters>]
This Cmdlet can be used to execute Windows powershell CmdLets from PowerShell Core.
PS C:\> (New-Command "Gac Assemblies" -commandPath "c:\windows\syswow64\WindowsPowerShell\v1.0\powershell.exe" -commandArguments "-command `"& {&'Get-GacAssembly' }`"").stdout
19.2.0.0 DevExpress.XtraVerticalGrid.v19.2.resources
19.2.6.0 DevExpress.XtraWizard.v19.2
19.2.6.0 DevExpress.XtraWizard.v19.2.Design
19.2.0.0 DevExpress.XtraWizard.v19.2.resources
19.2.0.0 DevExpress.XtraWizard.v19.2.resources
19.2.0.0 DevExpress.XtraWizard.v19.2.resources
19.2.0.0 DevExpress.XtraWizard.v19.2.resources
4.0.0.0 dfsvc
10.0.0.0 EventViewer
10.0.0.0 EventViewer.Resources
3.5.1.0 Google.Protobuf
10.0.0.0 InspectVhdDialog
10.0.0.0 InspectVhdDialog.Resources
10.0.0.0 InspectVhdDialog6.2
10.0.0.0 InspectVhdDialog6.2.Resources
10.0.0.0 InspectVhdDialog6.3
10.0.0.0 InspectVhdDialog6.3.Resources
4.0.0.0 Microsoft.Activities.Build
{{ Fill commandArguments Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill commandPath Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill commandTitle Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill workingDir Description }}
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.