KEMBAR78
PowerShell Transcript - LED233SAL | PDF | System Software | Microsoft
0% found this document useful (0 votes)
46 views19 pages

PowerShell Transcript - LED233SAL

The document is a PowerShell transcript detailing the execution environment and functions related to command invocation. It includes information about the user's session, system configuration, and various PowerShell functions such as 'Invoke-Expression' and 'Invoke-Command'. The transcript also contains code snippets and parameters for these functions, indicating their usage and requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views19 pages

PowerShell Transcript - LED233SAL

The document is a PowerShell transcript detailing the execution environment and functions related to command invocation. It includes information about the user's session, system configuration, and various PowerShell functions such as 'Invoke-Expression' and 'Invoke-Command'. The transcript also contains code snippets and parameters for these functions, indicating their usage and requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 19

**********************

Début de la transcription Windows PowerShell


Heure de début : 20250528171216
Nom d'utilisateur : EDM\herizo.rajaoharinaiv
Utilisateur runAs : EDM\herizo.rajaoharinaiv
Nom de la configuration :
Ordinateur : LED233SALX (Microsoft Windows NT 10.0.22621.0)
Application hôte : C:\WINDOWS\System32\sdiagnhost.exe -Embedding
ID de processus : 24444
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation (Set-Location) : « Set-Location »
>> Liaison de paramètre (Set-Location) : nom = « Path » ; valeur = « C:\WINDOWS\
TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317 »
PS>
# Caller validation to ensure we are calling from and actual script, and not from a
malicious command line
function Test-Caller {
param(
[Parameter(Mandatory=$true)]
[System.Management.Automation.CallStackFrame[]]
$CallStack
)
$caller = $CallStack[1]
$location = $caller.Location
Write-Verbose -Message $('caller: ' + $location) -Verbose
if ($location -eq '<No file>') {
throw 'Invoke-Expression cannot be used in a script'
}
}

# Generated with
# $var = New-Object System.Management.Automation.CommandMetadata (Get-Command
Invoke-Expression)
# [System.Management.Automation.ProxyCommand]::Create($var) | Out-File .\Invoke-
Expression.ps1
function Invoke-Expression {
[CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkID=2097030')]
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)]
[string]
${Command})

begin
{
try {
Test-Caller -CallStack (Get-PSCallStack)
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
{
$PSBoundParameters['OutBuffer'] = 1
}
$wrappedCmd =
$ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Utility\Invoke-
Expression', [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters }

$steppablePipeline =
$scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
throw
}
}

process
{
try {
$steppablePipeline.Process($_)
} catch {
throw
}
}

end
{
try {
$steppablePipeline.End()
} catch {
throw
}
}
<#

.ForwardHelpTargetName Microsoft.PowerShell.Utility\Invoke-Expression
.ForwardHelpCategory Cmdlet

#>
}

# Generated with
# $var = New-Object System.Management.Automation.CommandMetadata (Get-Command
Invoke-Command)
# [System.Management.Automation.ProxyCommand]::Create($var) | Out-File .\Invoke-
Command.ps1
function Invoke-Command {
[CmdletBinding(DefaultParameterSetName='InProcess',
HelpUri='https://go.microsoft.com/fwlink/?LinkID=2096789',
RemotingCapability='OwnedByCommand')]
param(
[Parameter(ParameterSetName='Session', Position=0)]
[Parameter(ParameterSetName='FilePathRunspace', Position=0)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Runspaces.PSSession[]]
${Session},

[Parameter(ParameterSetName='ComputerName', Position=0)]
[Parameter(ParameterSetName='FilePathComputerName', Position=0)]
[Alias('Cn')]
[ValidateNotNullOrEmpty()]
[string[]]
${ComputerName},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='Uri', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathUri',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[pscredential]
[System.Management.Automation.CredentialAttribute()]
${Credential},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='SSHHost')]
[ValidateRange(1, 65535)]
[int]
${Port},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[switch]
${UseSSL},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='Uri', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathUri',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='ContainerId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMId', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathContainerId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName',
ValueFromPipelineByPropertyName=$true)]
[string]
${ConfigurationName},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[string]
${ApplicationName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[int]
${ThrottleLimit},

[Parameter(ParameterSetName='Uri', Position=0)]
[Parameter(ParameterSetName='FilePathUri', Position=0)]
[Alias('URI','CU')]
[ValidateNotNullOrEmpty()]
[uri[]]
${ConnectionUri},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[switch]
${AsJob},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[Alias('Disconnected')]
[switch]
${InDisconnectedSession},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[ValidateNotNullOrEmpty()]
[string[]]
${SessionName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[Alias('HCN')]
[switch]
${HideComputerName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='SSHHost')]
[string]
${JobName},

[Parameter(ParameterSetName='ComputerName', Mandatory=$true, Position=1)]


[Parameter(ParameterSetName='Session', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='Uri', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='InProcess', Mandatory=$true, Position=0)]
[Parameter(ParameterSetName='VMId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='VMName', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='ContainerId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='SSHHost', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='SSHHostHashParam', Mandatory=$true,
Position=1)]
[Alias('Command')]
[ValidateNotNull()]
[scriptblock]
${ScriptBlock},

[Parameter(ParameterSetName='InProcess')]
[switch]
${NoNewScope},

[Parameter(ParameterSetName='FilePathComputerName', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathRunspace', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathUri', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathContainerId', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathSSHHost', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHostHash', Mandatory=$true)]
[Alias('PSPath')]
[ValidateNotNull()]
[string]
${FilePath},

[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[switch]
${AllowRedirection},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathUri')]
[System.Management.Automation.Remoting.PSSessionOption]
${SessionOption},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[System.Management.Automation.Runspaces.AuthenticationMechanism]
${Authentication},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[switch]
${EnableNetworkAccess},

[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathContainerId')]
[switch]
${RunAsAdministrator},

[Parameter(ParameterSetName='SSHHost', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHost', Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${HostName},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[ValidateNotNullOrEmpty()]
[string]
${UserName},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Alias('IdentityFilePath')]
[ValidateNotNullOrEmpty()]
[string]
${KeyFilePath},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[string]
${Subsystem},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[int]
${ConnectingTimeout},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[ValidateSet('true')]
[switch]
${SSHTransport},

[Parameter(ParameterSetName='SSHHostHashParam', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHostHash', Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[hashtable[]]
${SSHConnection},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[switch]
${RemoteDebug},

[Parameter(ValueFromPipeline=$true)]
[psobject]
${InputObject},

[Alias('Args')]
[System.Object[]]
${ArgumentList},

[Parameter(ParameterSetName='VMId', Mandatory=$true, Position=0,


ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true, Position=0,
ValueFromPipelineByPropertyName=$true)]
[Alias('VMGuid')]
[ValidateNotNullOrEmpty()]
[guid[]]
${VMId},

[Parameter(ParameterSetName='VMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${VMName},

[Parameter(ParameterSetName='ContainerId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathContainerId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${ContainerId},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Uri')]
[string]
${CertificateThumbprint})

begin
{
try {
Test-Caller -CallStack (Get-PSCallStack)
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
{
$PSBoundParameters['OutBuffer'] = 1
}

$wrappedCmd =
$ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Core\Invoke-
Command', [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters }

$steppablePipeline =
$scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
throw
}
}

process
{
try {
$steppablePipeline.Process($_)
} catch {
throw
}
}

end
{
try {
$steppablePipeline.End()
} catch {
throw
}
}
<#

.ForwardHelpTargetName Microsoft.PowerShell.Core\Invoke-Command
.ForwardHelpCategory Cmdlet

#>

# Exporting function overrides


Export-ModuleMember -Function @(
'Invoke-Expression'
'Invoke-Command'
)
>> Erreur de terminaison (Export-ModuleMember) : « L'applet de commande Export-
ModuleMember ne peut être appelée qu'à l'intérieur d'un module. »
**********************
Début de la transcription Windows PowerShell
Heure de début : 20250528171216
Nom d'utilisateur : EDM\herizo.rajaoharinaiv
Utilisateur runAs : EDM\herizo.rajaoharinaiv
Nom de la configuration :
Ordinateur : LED233SALX (Microsoft Windows NT 10.0.22621.0)
Application hôte : C:\WINDOWS\System32\sdiagnhost.exe -Embedding
ID de processus : 24444
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation (Out-String) : « Out-String »
>> Liaison de paramètre (Out-String) : nom = « InputObject » ; valeur = « L'applet
de commande Export-ModuleMember ne peut être appelée qu'à l'intérieur d'un
module. »
Export-ModuleMember : L'applet de commande Export-ModuleMember ne peut être appelée
qu'à l'intérieur d'un module.
Au caractère Ligne:422 : 1
+ Export-ModuleMember -Function @(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Export-ModuleMember],
InvalidOperationException
+ FullyQualifiedErrorId :
Modules_CanOnlyExecuteExportModuleMemberInsideAModule,Microsoft.PowerShell.Commands
.ExportModuleMemberCommand
Export-ModuleMember : L'applet de commande Export-ModuleMember ne peut être appelée
qu'à l'intérieur d'un module.
Au caractère Ligne:422 : 1
+ Export-ModuleMember -Function @(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Export-ModuleMember],
InvalidOperationException
+ FullyQualifiedErrorId :
Modules_CanOnlyExecuteExportModuleMemberInsideAModule,Microsoft.PowerShell.Commands
.ExportModuleMemberCommand
PS>& 'C:\WINDOWS\TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317\TS_WERQueue.ps1'
**********************
Début de la transcription Windows PowerShell
Heure de début : 20250528171217
Nom d'utilisateur : EDM\herizo.rajaoharinaiv
Utilisateur runAs : EDM\herizo.rajaoharinaiv
Nom de la configuration :
Ordinateur : LED233SALX (Microsoft Windows NT 10.0.22621.0)
Application hôte : C:\WINDOWS\System32\sdiagnhost.exe -Embedding
ID de processus : 24444
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation (Out-String) : « Out-String »
>> Liaison de paramètre (Out-String) : nom = « InputObject » ; valeur = « La
propriété MaxQueueSizePercentage n'existe pas dans le chemin d'accès
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting. »
Get-ItemProperty : La propriété MaxQueueSizePercentage n'existe pas dans le chemin
d'accès
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting.
Au caractère C:\WINDOWS\TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317\
CL_Utility.ps1:87 : 22
+ ... stryEntry = Get-ItemProperty -Path $registryEntryPath -Name $registry ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (MaxQueueSizePercentage:String)
[Get-ItemProperty], PSArgumentException
+ FullyQualifiedErrorId :
System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.GetI
temPropertyCommand
Get-ItemProperty : La propriété MaxQueueSizePercentage n'existe pas dans le chemin
d'accès
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting.
Au caractère C:\WINDOWS\TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317\
CL_Utility.ps1:87 : 22
+ ... stryEntry = Get-ItemProperty -Path $registryEntryPath -Name $registry ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (MaxQueueSizePercentage:String)
[Get-ItemProperty], PSArgumentException
+ FullyQualifiedErrorId :
System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.GetI
temPropertyCommand
PS>CommandInvocation (Set-Location) : « Set-Location »
>> Liaison de paramètre (Set-Location) : nom = « Path » ; valeur = « \ »
PS>CommandInvocation (Set-Location) : « Set-Location »
>> Liaison de paramètre (Set-Location) : nom = « Path » ; valeur = « C:\WINDOWS\
TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317 »
PS>
# Caller validation to ensure we are calling from and actual script, and not from a
malicious command line
function Test-Caller {
param(
[Parameter(Mandatory=$true)]
[System.Management.Automation.CallStackFrame[]]
$CallStack
)
$caller = $CallStack[1]
$location = $caller.Location
Write-Verbose -Message $('caller: ' + $location) -Verbose
if ($location -eq '<No file>') {
throw 'Invoke-Expression cannot be used in a script'
}
}

# Generated with
# $var = New-Object System.Management.Automation.CommandMetadata (Get-Command
Invoke-Expression)
# [System.Management.Automation.ProxyCommand]::Create($var) | Out-File .\Invoke-
Expression.ps1
function Invoke-Expression {
[CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkID=2097030')]
param(
[Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)]
[string]
${Command})

begin
{
try {
Test-Caller -CallStack (Get-PSCallStack)
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
{
$PSBoundParameters['OutBuffer'] = 1
}

$wrappedCmd =
$ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Utility\Invoke-
Expression', [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters }

$steppablePipeline =
$scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
throw
}
}

process
{
try {
$steppablePipeline.Process($_)
} catch {
throw
}
}

end
{
try {
$steppablePipeline.End()
} catch {
throw
}
}
<#

.ForwardHelpTargetName Microsoft.PowerShell.Utility\Invoke-Expression
.ForwardHelpCategory Cmdlet

#>
}

# Generated with
# $var = New-Object System.Management.Automation.CommandMetadata (Get-Command
Invoke-Command)
# [System.Management.Automation.ProxyCommand]::Create($var) | Out-File .\Invoke-
Command.ps1
function Invoke-Command {
[CmdletBinding(DefaultParameterSetName='InProcess',
HelpUri='https://go.microsoft.com/fwlink/?LinkID=2096789',
RemotingCapability='OwnedByCommand')]
param(
[Parameter(ParameterSetName='Session', Position=0)]
[Parameter(ParameterSetName='FilePathRunspace', Position=0)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.Runspaces.PSSession[]]
${Session},

[Parameter(ParameterSetName='ComputerName', Position=0)]
[Parameter(ParameterSetName='FilePathComputerName', Position=0)]
[Alias('Cn')]
[ValidateNotNullOrEmpty()]
[string[]]
${ComputerName},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='Uri', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathUri',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[pscredential]
[System.Management.Automation.CredentialAttribute()]
${Credential},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='SSHHost')]
[ValidateRange(1, 65535)]
[int]
${Port},
[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[switch]
${UseSSL},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='Uri', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathUri',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='ContainerId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMId', ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='VMName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathContainerId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName',
ValueFromPipelineByPropertyName=$true)]
[string]
${ConfigurationName},

[Parameter(ParameterSetName='ComputerName',
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathComputerName',
ValueFromPipelineByPropertyName=$true)]
[string]
${ApplicationName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[int]
${ThrottleLimit},

[Parameter(ParameterSetName='Uri', Position=0)]
[Parameter(ParameterSetName='FilePathUri', Position=0)]
[Alias('URI','CU')]
[ValidateNotNullOrEmpty()]
[uri[]]
${ConnectionUri},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[switch]
${AsJob},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[Alias('Disconnected')]
[switch]
${InDisconnectedSession},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[ValidateNotNullOrEmpty()]
[string[]]
${SessionName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[Alias('HCN')]
[switch]
${HideComputerName},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='SSHHost')]
[string]
${JobName},

[Parameter(ParameterSetName='ComputerName', Mandatory=$true, Position=1)]


[Parameter(ParameterSetName='Session', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='Uri', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='InProcess', Mandatory=$true, Position=0)]
[Parameter(ParameterSetName='VMId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='VMName', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='ContainerId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='SSHHost', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='SSHHostHashParam', Mandatory=$true,
Position=1)]
[Alias('Command')]
[ValidateNotNull()]
[scriptblock]
${ScriptBlock},

[Parameter(ParameterSetName='InProcess')]
[switch]
${NoNewScope},

[Parameter(ParameterSetName='FilePathComputerName', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathRunspace', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathUri', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true, Position=1)]
[Parameter(ParameterSetName='FilePathContainerId', Mandatory=$true,
Position=1)]
[Parameter(ParameterSetName='FilePathSSHHost', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHostHash', Mandatory=$true)]
[Alias('PSPath')]
[ValidateNotNull()]
[string]
${FilePath},

[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[switch]
${AllowRedirection},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathUri')]
[System.Management.Automation.Remoting.PSSessionOption]
${SessionOption},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[System.Management.Automation.Runspaces.AuthenticationMechanism]
${Authentication},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathUri')]
[switch]
${EnableNetworkAccess},

[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathContainerId')]
[switch]
${RunAsAdministrator},

[Parameter(ParameterSetName='SSHHost', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHost', Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${HostName},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[ValidateNotNullOrEmpty()]
[string]
${UserName},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Alias('IdentityFilePath')]
[ValidateNotNullOrEmpty()]
[string]
${KeyFilePath},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[string]
${Subsystem},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[int]
${ConnectingTimeout},

[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[ValidateSet('true')]
[switch]
${SSHTransport},

[Parameter(ParameterSetName='SSHHostHashParam', Mandatory=$true)]
[Parameter(ParameterSetName='FilePathSSHHostHash', Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[hashtable[]]
${SSHConnection},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Session')]
[Parameter(ParameterSetName='Uri')]
[Parameter(ParameterSetName='FilePathComputerName')]
[Parameter(ParameterSetName='FilePathRunspace')]
[Parameter(ParameterSetName='FilePathUri')]
[Parameter(ParameterSetName='VMId')]
[Parameter(ParameterSetName='VMName')]
[Parameter(ParameterSetName='ContainerId')]
[Parameter(ParameterSetName='FilePathVMId')]
[Parameter(ParameterSetName='FilePathVMName')]
[Parameter(ParameterSetName='FilePathContainerId')]
[Parameter(ParameterSetName='SSHHost')]
[Parameter(ParameterSetName='SSHHostHashParam')]
[Parameter(ParameterSetName='FilePathSSHHost')]
[Parameter(ParameterSetName='FilePathSSHHostHash')]
[switch]
${RemoteDebug},

[Parameter(ValueFromPipeline=$true)]
[psobject]
${InputObject},

[Alias('Args')]
[System.Object[]]
${ArgumentList},

[Parameter(ParameterSetName='VMId', Mandatory=$true, Position=0,


ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMId', Mandatory=$true, Position=0,
ValueFromPipelineByPropertyName=$true)]
[Alias('VMGuid')]
[ValidateNotNullOrEmpty()]
[guid[]]
${VMId},

[Parameter(ParameterSetName='VMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathVMName', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${VMName},

[Parameter(ParameterSetName='ContainerId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[Parameter(ParameterSetName='FilePathContainerId', Mandatory=$true,
ValueFromPipelineByPropertyName=$true)]
[ValidateNotNullOrEmpty()]
[string[]]
${ContainerId},

[Parameter(ParameterSetName='ComputerName')]
[Parameter(ParameterSetName='Uri')]
[string]
${CertificateThumbprint})

begin
{
try {
Test-Caller -CallStack (Get-PSCallStack)
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer))
{
$PSBoundParameters['OutBuffer'] = 1
}
$wrappedCmd =
$ExecutionContext.InvokeCommand.GetCommand('Microsoft.PowerShell.Core\Invoke-
Command', [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters }

$steppablePipeline =
$scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
throw
}
}

process
{
try {
$steppablePipeline.Process($_)
} catch {
throw
}
}

end
{
try {
$steppablePipeline.End()
} catch {
throw
}
}
<#

.ForwardHelpTargetName Microsoft.PowerShell.Core\Invoke-Command
.ForwardHelpCategory Cmdlet

#>

# Exporting function overrides


Export-ModuleMember -Function @(
'Invoke-Expression'
'Invoke-Command'
)
>> Erreur de terminaison (Export-ModuleMember) : « L'applet de commande Export-
ModuleMember ne peut être appelée qu'à l'intérieur d'un module. »
**********************
Début de la transcription Windows PowerShell
Heure de début : 20250528171217
Nom d'utilisateur : EDM\herizo.rajaoharinaiv
Utilisateur runAs : EDM\herizo.rajaoharinaiv
Nom de la configuration :
Ordinateur : LED233SALX (Microsoft Windows NT 10.0.22621.0)
Application hôte : C:\WINDOWS\System32\sdiagnhost.exe -Embedding
ID de processus : 24444
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation (Out-String) : « Out-String »
>> Liaison de paramètre (Out-String) : nom = « InputObject » ; valeur = « L'applet
de commande Export-ModuleMember ne peut être appelée qu'à l'intérieur d'un
module. »
Export-ModuleMember : L'applet de commande Export-ModuleMember ne peut être appelée
qu'à l'intérieur d'un module.
Au caractère Ligne:422 : 1
+ Export-ModuleMember -Function @(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Export-ModuleMember],
InvalidOperationException
+ FullyQualifiedErrorId :
Modules_CanOnlyExecuteExportModuleMemberInsideAModule,Microsoft.PowerShell.Commands
.ExportModuleMemberCommand
Export-ModuleMember : L'applet de commande Export-ModuleMember ne peut être appelée
qu'à l'intérieur d'un module.
Au caractère Ligne:422 : 1
+ Export-ModuleMember -Function @(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Export-ModuleMember],
InvalidOperationException
+ FullyQualifiedErrorId :
Modules_CanOnlyExecuteExportModuleMemberInsideAModule,Microsoft.PowerShell.Commands
.ExportModuleMemberCommand
PS>& 'C:\WINDOWS\TEMP\SDIAG_30790e07-dbbb-4f5c-bb7c-453cb875a317\
TS_DiagnosticHistory.ps1'
PS>CommandInvocation (Set-Location) : « Set-Location »
>> Liaison de paramètre (Set-Location) : nom = « Path » ; valeur = « \ »

You might also like