is there a way to see powershell commands live ?

Hi,

while I am working on Windows GUI, is there a way to see what PowerShell commands been executed for my GUI activities ?

for example, if I format a disk through GUI, I want to see what PowerShell commands related to this task, like if I have done it through PowerShell.

thanks,