→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dnvn
Engaged Sweeper II
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:

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?
8 REPLIES 8
CyberCitizen
Honored Sweeper
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.

dnvn
Engaged Sweeper II
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
dnvn
Engaged Sweeper II
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.
dnvn
Engaged Sweeper II
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.
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.
CyberCitizen
Honored Sweeper
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
CyberCitizen
Honored Sweeper
Can you post the script so it can be used for testing?
dnvn
Engaged Sweeper II
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