Search found 24 matches

by jason@sbtc.com.tw
Sat Sep 29, 2018 12:34 am
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

jvierra wrote:
Thu Sep 27, 2018 9:29 pm
That is not a service script. It is missing all required elements.

You need to use the "New Project/Service Project" template to create a service. A service script looks like this in part:
......
.....
Thank you for your help, i will rewrite my script.
by jason@sbtc.com.tw
Thu Sep 27, 2018 8:48 pm
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

Jason. You are not trapping errors. Can you please post the complete service script. Complete script # Services lab cls $logFile = "c:\log\srvlab1.txt" $sourcefolder = "C:\TripodTechLab\temp\lab\" $FilesArray = Get-ChildItem $sourcefolder $Status = $true $aa = 0 $aa >> $logfile foreach ($t0 in $Fil...
by jason@sbtc.com.tw
Thu Sep 27, 2018 8:42 pm
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

jvierra wrote:
Fri Sep 21, 2018 3:22 am
Jason. You are not trapping errors.

Can you please post the complete service script.
has update in the before, you can't see?
by jason@sbtc.com.tw
Fri Sep 21, 2018 1:56 am
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

service-lab1.ps1 sourcefilder content 6X@CSKA[)JY5SJQ2(08-30-14-44-41).jpg and other files I used try and catch, the service still stopped working. if get error. This is not a permission issue. The working directory in the c:\ drive. i know is 6X@CSKA[)JY5SJQ2(08-30-14-44-41).jpg file name to leade...
by jason@sbtc.com.tw
Wed Sep 19, 2018 4:30 am
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

However, if it works as a script, the script will not stop.
by jason@sbtc.com.tw
Wed Sep 19, 2018 3:13 am
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Re: Service will be sluggish when scrpit encounters error

with what options? For what platform? Script Engines: Target : Microsoft Windows 64 bit. SAPIEN Powershel V3 Host(windows Service) "Some error": What exactly does that mean? some file the name content @, example: 6X@CSKA[)JY5SJQ2(08-30-14-44-41).jpg Example Code: $Filesarray = Get-ChildItem -path "$...
by jason@sbtc.com.tw
Tue Sep 18, 2018 12:33 am
Forum: Windows PowerShell
Topic: Service will be sluggish when scrpit encounters error
Replies: 12
Views: 2232

Service will be sluggish when scrpit encounters error

To help you better we need some information from you. *** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. *** Product, version and build: PowerShell Studio ...
by jason@sbtc.com.tw
Fri Nov 10, 2017 12:25 am
Forum: Windows PowerShell
Topic: Install fail
Replies: 3
Views: 927

Re: Install fail

jvierra wrote:
Thu Nov 09, 2017 9:28 pm
Upgrade 2012 to V5 or later or downgrade the exe to V3.
i has try upgrade to V5, but also is fail.
Interesting in other 2012 server will not fail even is v4 or v5

OK i will try downgrade the exe to v3.
by jason@sbtc.com.tw
Thu Nov 09, 2017 9:22 pm
Forum: Windows PowerShell
Topic: Install fail
Replies: 3
Views: 927

Install fail

I compiled my script, and in some machine installation was successful.
But in a windows server 2012R2 installation failed.
The powershell Version is 4.0
by jason@sbtc.com.tw
Fri Oct 20, 2017 8:42 pm
Forum: Windows PowerShell
Topic: cab get variable name?
Replies: 1
Views: 984

cab get variable name?

i hope can get variable name, but no idea, script like below.

$123 = "test 123"
$456 = "test 456"
$789 = "test 789"
$a = "$123", "$456", "$789"
foreach ($t0 in $a)
{
# want to get variable name, not value
}