Configuring and Operating a Hybrid Cloud with Microsoft Azure Stack — Question 26
You have an Azure Stack integrated system.
You establish a PowerShell session to a privileged endpoint, and you run several commands.
You need to ensure that logs of the session activity are exported to a file share.
Which cmdlet should you run?
Answer options
- A. Exit
- B. Clear-Host
- C. Out-Default
- D. Close-PrivilegedEndpoint
- E. Exit-PSSession
Correct answer: D
Explanation
The correct answer is D, Close-PrivilegedEndpoint, as it is used to properly close the session and can trigger the export of logs to a file share. The other options do not serve this purpose; for example, A (Exit) and E (Exit-PSSession) simply terminate the session without exporting logs, while B (Clear-Host) and C (Out-Default) do not address session logging at all.