-
-
Notifications
You must be signed in to change notification settings - Fork 7
New Command
apobekiaris edited this page Sep 4, 2020
·
9 revisions
Uses an external process 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
Executes the Get-GacAssembly .NET Framework command from a powershell core prompt.
{{ 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.