
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2020 10:31 PM
When running an installer in the "Currently Logged On" run mode. The installer log reports the credential being used is "Service account - NT AUTHORITY\SYSTEM"
My installation package consists of one CMD action. For my command I am running a powershell script. Here is the command below:
The powershell script gets the contacts from the end users outlook and then exports them to a .csv located on the network. The .csv is created properly but no information is exported to it. Its blank. The command works fine from the command prompt when testing.
To me its seams like the installer is using the wrong credentials. Can anyone help?
My installation package consists of one CMD action. For my command I am running a powershell script. Here is the command below:
powershell.exe -executionpolicy bypass -file "\\SERVERNAME\packages\getContacts.ps1"
The powershell script gets the contacts from the end users outlook and then exports them to a .csv located on the network. The .csv is created properly but no information is exported to it. Its blank. The command works fine from the command prompt when testing.
To me its seams like the installer is using the wrong credentials. Can anyone help?
Labels:
- Labels:
-
General Discussion
8 REPLIES 8

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 02:24 AM
Ok so it's working on others. I do recall there is an issue if your deploying to yourself and the lansweeper server is on the same computer, if its on a server though, it shouldn't be different.


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 05:22 PM
CyberCitizen wrote:
I do recall there is an issue if your deploying to yourself and the lansweeper server is on the same computer
It must be the issue with deploying to yourself when the lansweeper server is on the same computer which explains my case exactly. Thanks for your time.
D

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 02:03 AM
I'm looking at the installer logs. When you click "Deployment" on the left there is a link to the "installer logs". Then beginning with the "Run Mode" column it say's "Currently Logged On Result: Deployment ended: The operation completed successfully. Stop(Success). Credential: (Service account - NT AUTHORITY\SYSTEM).
One thing I did not mention is that I'm testing this on myself. I am currently logged in and I'm running the deployment on myself. I get a good result when I run the deployment on a different computer with a different person logged in. Sorry I didn't mention that.
One thing I did not mention is that I'm testing this on myself. I am currently logged in and I'm running the deployment on myself. I get a good result when I run the deployment on a different computer with a different person logged in. Sorry I didn't mention that.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 01:47 AM
The script really isn't the main issue for me. I am more interested in the credentials the deployment is using. I have chosen to run the script as the logged in user but the log shows it uses a different set of credentials ie "Service account - NT AUTHORITY\SYSTEM"
Do you have any insight to the question about credentials. Thanks.
Do you have any insight to the question about credentials. Thanks.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 01:56 AM
Donovan wrote:
The script really isn't the main issue for me. I am more interested in the credentials the deployment is using. I have chosen to run the script as the logged in user but the log shows it uses a different set of credentials ie "Service account - NT AUTHORITY\SYSTEM"
Do you have any insight to the question about credentials. Thanks.
Where are you reading that log wise? The reason I ask is I run a few PowerShell scripts as the user and in my logs they show as logged on user and they run fine, as it needs to do a user task, looking at the deployment logs it shows as logged on user not SYSTEM.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2020 01:42 AM
I couldn't get the powershell to work.
At \\SERVERNAME\Apps$\Powershell Scripts\getContacts.ps1:3 char:23
+ $Outlook=NEW-OBJECT –comobject Outlook.Application
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The string is missing the terminator: ".
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
At \\SERVERNAME\Apps$\Powershell Scripts\getContacts.ps1:3 char:23
+ $Outlook=NEW-OBJECT –comobject Outlook.Application
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The string is missing the terminator: ".
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2020 12:52 AM
Can you post the script so it can be used for testing?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2020 05:12 PM
CyberCitizen wrote:
Can you post the script so it can be used for testing?
Sure but I would just like to point out that this issue with the credential is the same for anything I do from a CMD action.
$userContacts = "\\SERVERNAME\packages\" + $env:USERNAME + "_contacts.csv"
$userContacts
$Outlook=NEW-OBJECT –comobject Outlook.Application
$Contacts=$Outlook.session.GetDefaultFolder(10).items
$Contacts | Select-Object -Property FullName,MobileTelephoneNumber,Email1Address | Export-Csv -Path $userContacts -Force -NoTypeInformation
