Function to start a process unelevated from an elevated command prompt
Utils\Start-ProcessUnelevated.ps1
Start-ProcessUnelevated [-FilePath] <String> [-ArgumentList] <String> [-WorkingDirectory <String>]
Function to start a process unelevated from an elevated command prompt. Use case for me is starting an unelevated to execute outlook com scripts against an unelevated outlook from an elevated powershell prompt.
#start powershell to run a function
'powershell.exe','-noexit -command Get-Process | select name,id -First 10'
Specifies the path and file name of the program to run. Enter the name of an executable file or of a document, such as a .txt or .doc file, that is associated with a program on the computer. This parameter is required.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies parameters or parameter values to use when this cmdlet starts the process. The argumentlist is to be provided as a string.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the location of the executable file or document that runs in the process. The default is the current folder.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
https://stackoverflow.com/questions/17765568/how-to-start-a-process-unelevated