Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Scripting Languages

26K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am trying to write a simple query to show me my "groups" of PC's I have in an Access database. I have a table called PC_EQUIP with 4 fields that I need: type, model, warranty and serial. This query works fine:

SELECT DISTINCT Type, Model, Warranty FROM PC_EQUIP

This shows me the information I mostly need since we order PC's in groups so the type, model and warranty date of each group will be the same and this query shows me the different groups that I want to see.

I really want to add two more pieces of information. Even though I am using DISTINCT, I would like to see one of the serial numbers for each DISTINCT group, dont care which. Obviously, if I add serial to the query above, I get a list of all records and the "DISTINCT" is useless. I would also like to add a COUNT to the query so it will show me how many rows are rolled up in that DISTINCT clause effectively showing me how many PC's I have on hand for that group,

The serial number part is optional but I cant seem to figure out how to make it return the count for each grouping.

Thanks
0
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Looking for a script that will go out and check if DNS is SET to DHCP. The script will run against all the computers in the network.  The output should only contain the name of Computers that are not using DHCP Option for DNS.

Thanks in advance
0
Looking for a script to generate a list of Computers and IP in the entire domain, preferably in a delimited format.
Thanks in advance.
0
Is there a script out there (.bat or .vbs ) that verify the Meltdn/Spectr  patches are successfully applied (including that registry key is added) & the health of Windows after patching?   I don't want Powershell script.
0
i tried to user the below command via batch script file

START \\%computer%\C$ /user:%username% %Password%

but every time it keep asking for the username and password.
is their any way that i can get it to open the C drive for any computer that i input in the batch file

note: i input in the batch file the username and password and PC name
so i use %username% and %password% and %computer% from my input when i run the batch file.

any advise?
0
Hi Guys

I have had this script that works fine to query AD for users that exist in AD and or Not and if they are enabled or Disabled.


#Create a txt file with the AD usernames inside a txt file c:\Temp\userstatus\ named Balh.txt
#TXT FILE WOULD INCLUDE SAMACCOUNTNAME FROM AD ENVIRONMENT FOR EXAMPLE
#Blah01
#Blah02
#Blah03

$user = get-content C:\Temp\Blah.txt
$user | foreach {
$Name = "$_"
 $Searcher = [ADSISearcher]"(sAMAccountName=$Name)"
 $Results = $Searcher.FindOne()
 If ($Results -eq $Null) {"$Name not in AD" >> C:\Temp\userstatusblah.txt}
 Else {
 $status = (get-aduser $Name).enabled
 if ($status -eq "True"){
 
 "$Name is Enabled" >> C:\Temp\Blahuserstatus.txt}
 else{
 "$Name is Disabled" >> C:\Temp\Blahuserstatus.txt}
 }}
#If you want to check only enabled accounts delete the "#" below
 #get-content C:\userstatus\userstatus.txt | select-string "is Enabled" >> C:\userstatus\userstatus_enabled.txt
#If you want to check only disabled accounts delete the "#" below
get-content C:\Temp\Blahuserstatus.txt | select-string "is Disabled" >> C:\Temp\Blah_users_disabled_in_AD.txt
#If you want to check only accounts not in AD delete the "#" below
get-content C:\Temp\userstatusBlah.txt | select-string "not in AD" >> C:\Temp\Blah_users_not_in_AD.txt


This script works fine
However I need now read in the email address from the txt and have some code to lookup SAMaccountName from email address read in  to then resolve the SAMaccountName , to then …
0
We have a Ms Sql script that groups transactions by dates, tools and how many techs used them.  When running the query, the result is as follows:
Date1      tools  ToolUse
---------- ------ -------
2017-01-03 Desk   2
2017-01-03 Hammer 3
2017-05-10 Hammer 1
2017-10-02 Desk   1
2017-10-02 Hammer 2

Open in new window


We are trying to extract from that result the the tools used the same days.

Based on the above the result we are looking for is:

Date     Tools      Date      Tools
-------- ---------- --------- ----------
1/3/2017 Desk (2)   10/2/2017 Desk (1)
1/3/2017 Hammer (3) 10/2/2017 Hammer (2)

Open in new window


Notice that the date 2017-05-10 is not present because only 1 tool was used that day.

We are looking into the "with" clause as to extract from the first result to get the second.

What would be the best way to go about this?
0
Hi,

Please view our script to display the Following:

2017-01-03, Hammer (3)
2017-01-03, Desk (2)
2017-05-10, Hammer (1)
2017-10-02, Desk (1)
2017-10-02, Hammer (2)

Open in new window


The script is not display what we need.  the script is:
SELECT Date1, tools, COUNT(*) AS "Same-Day-USe"
FROM TableName
GROUP BY tools,Date1
HAVING COUNT(*) > 1

Open in new window


Please advice
0
I need a simple one line powershell script to add to the below that will show me for each item the 'date modifided', 'date created', 'size' and 'author' attributes, can this be done in powershell, if so how would I finish the command off? the first part gets me just the folders which is what I am after:


Get-ChildItem \\server\share -Recurse | Where-Object{($_.psiscontainer)} |
1
Hello Folks,

I have found a way to rename PC from the PS console remotely,...

Rename-Computer -ComputerName 'oldname1' -NewName 'newname1' -DomainCredential "microsoft\admin" -force -restart

Open in new window


this works fine as one computer goes, however, I'd lke to create a script to handle a bulk of PCs

so far i got this

$oldnames = Get-Content "C:\scripts\oldname.txt"
$newnames = Get-Content "C:\scripts\newname.txt"

foreach ($oldname in $oldnames) {
    Rename-Computer -ComputerName $oldname -NewName $newname -Restart -DomainCredential "microsoft\admin"
}

Open in new window


Since the "foreach" will be focus on "$oldnames" how can I sync with  the "$newnames" variable ?  should I setup a loop for the amount of pcs being handle?

Any recommendations would be appreciated
0
Hire Technology Freelancers with Gigs
LVL 11
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

We have a Ms Sql table with 3 columns: DateTime, Tools and Technician,

We are trying to create script for where it present how each tools has been used simultaneously (same Date and time or close to it)

For example:

Tools that has been used in same date/time
Tools   DateTime          Technician
------- ----------------- ----------
Dryer   2017-1217 5:00pm  Joe
Dryer   2017-1217 5:00pm  Don
Dryer   2017-1217 5:00pm  Sandy
Hammer  2017-1218 6:00pm  Ray
Hammer  2017-1218 6:00pm  Steve
Spark   2017-1219 4:00pm  Joe
Spark   2017-1219 4:00pm  Ray

Open in new window

0
Hi Experts,

As per  my daily job run , Daily one folder (with some files)  will get create in a specified path. I have to copy this folder from one location to another using batch script.

So Copying should happen based on last modified date as previous day's folders will also present in the same path.

I have a script which moves all the folders from one location to another.

set source="x"
set destination="Z"
xcopy %x% %Z% /E /Y

Open in new window


I need to modify this script according to my requirement.

Any help regarding this would be highly appreciated.

Thanks in Advance/.
0
Hello,

i have created the below PS script which is meant to check if any new files have been placed within a folder and if so then it launches them and displays them on our various screens. the script loops every 20 seconds and if a file already exists with that name then it ignores the reset of the script and waits another 20 seconds.

my issues is that after 20 seconds the script will close the power point show already open and then it checks and sees its not there and re-launches it. i have not specified anywhere for the code to close the application so i am confused why this is happening. can someone show me where i am going wrong please?

 
$Path = "\\10.20.92.53\DeptDrives\DisplayContent"
$Extension = ".ppsx"
$ApplicationProcessName = "POWERPNT"
$ApplicationProcess = $null

$repeat = $true
do
{
    $ApplicationProcess = $null




 
    # specify the folder that the PPS files are stored
    set-location $Path
 
    # Get a list of files in the folder
    $Files = Get-ChildItem | ? {$_.name -like "*$Extension"}
 
    # Check if the folder contains any files
    

    if ($Files)
    {

        #Delete Existing temp Files within IE Folder cache
        get-childitem -path C:\Users\DisplayBoardDS\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\ -Include * -recurse | foreach { $_.Delete()}

        # Get the most recent file
        $LatestFile = ($files | select | Sort-Object -Property lastwritetime -Descending)[0]
    

        $importLogFile = 

Open in new window

0
When I write a program in Perl 6, is it visible to the user, like JavaScript? Or is it compiled into an interim format that is not accessible to the user?

I am considering using Perl for a public facing web page but also for downloadable tool they would run locally.

I hear there is a bin folder, but what exactly goes into this? Is it the .pl file?

Thanks
1
I have version 5 currently...

My-MBP-2:~ newbieweb$ perl -v

This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

Copyright 1987-2013, Larry Wall

and I run El Capitan

I need to instal Perl 6 but be sure in no way that it impacts the current installation of Perl 5, which is used by my system.

Thanks.
0
I am new to the Perl syntax but have used OOP from Pascal, to C++ to C#.

Can you give me an example of the syntax for using OOP in Perl?

Thanks.
0
I understand Perl is part of my Mac OS, but I hear I would be best served to ensure any programming (learning) in Perl should be isolated so as not to upset the functioning of my El Capitan system.

What kind of installation shall I make to ensure the Perl I access from Mac Terminal does not touch any system files?

Thanks.
0
Years ago, I learned Sed and Awk to complete a project in telecom. Today, I do not recall any aspect of those languages. But am about to learn Perl and have been told that Perl is based on Sed and Awk.

Is that true?

And how are they similar?

Once I start hearing these details, I suspect I will recall a few things about how and why I used Sed and Awk.

Thanks.
0
Hello Folks,

I'm trying to get all users from an active directory GroupMember, I have the following script

get-adgroupmember "TEX_Users" -recursive | % {
    get-aduser $_ -Properties Employeeid | select Name | Out-File -FilePath C:\Window.000\users.txt
}

Open in new window


When deploying script within the PS console i get the users from that group, although for some with a long name i get something like
john doe smit ...

when I try to export it to a file or CSV, it only shows me one user ...

can anybody suggest me what the error might be or if they have a better script that would also work out...

thanks for looking
0
[Webinar On Demand] Database Backup and Recovery
LVL 11
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

I have a little script to check the version of SEP on some systems. It works,outputs the name and the version. The problem is it puts the "headers" on each server.
$servers = gc servers.txt
foreach ($server in $servers)
{Invoke-Command -ComputerName $server -Command {Get-ItemProperty -Path "HKLM:SOFTWARE\\Symantec\
\Symantec Endpoint Protection\currentversion"}|ft pscomputername, productversion}

Open in new window



The output looks like this:
PSComputerName PRODUCTVERSION
-------------- --------------
server1        14.0.3752.1000



PSComputerName PRODUCTVERSION
-------------- --------------
server2        14.0.3752.1000

Open in new window

Can I easily get it to look like this:
PSComputerName PRODUCTVERSION
-------------- --------------
server1        14.0.3752.1000
server2        14.0.3752.1000

Open in new window


Thx!
0
We have over 20 subnets . Each Subnet will have a different DNS Config.
All servers have a Static IP/DNS.  
I have a script below to set the DNS on the servers but Want to enhance it so it will be a single script and based on first 3 Octets of the "Ethernet" adapter, It will assign the specific DNS.  

Sample Subnets >DNS
172.120.8.x =DNS "172.120.8.150" "172.120.9.150"
172.120.9.x =DNS "172.120.9.150" "172.120.8.150"
172.120.16.x =DNS "172.120.16.150" "172.120.17.150"
172.120.17.x =DNS "172.120.17.150" "172.120.16.150"

~~Current Script~~~
#Variables
$DNS1 = "172.120.16.150"
$DNS2 = "172.120.17.150"
$Adapter1 = Get-NetAdapter "Eth*" | select -expand name

#Assigning primary and secondary DNS servers
netsh interface ipv4 set dnsservers name=$Adapter1 static $DNS1 primary
netsh interface ipv4 add dnsservers name=$Adapter1 $DNS2 index=2
Write-Host "The Primary DNS is:" $DNS1
Write-Host "The Secondary DNS is:" $DNS2
exit
0
I need my website to extract the data from a PDF and generate a CSV file. And I hope to do this on the front end, inside the client browser. But, if required, I could to this extraction on the back-end.

The PDF would be a month merchant credit card statement. The data I would extract to a CSV would be the numerous transactions.

What web technology can do this? And without human intervention.

Thanks.
0
I have no experience with Perl and suspect it may be the best choice of technology for a financial analysis and reporting website I am making. I expect to allow users to upload PDF's or CSV files to my website, which my site will then parse, summarize and generate new reports.

There will be times when my logic needs to access published national standards tables for a specific record with names like:

CPS Retail 2 Max (Developing Markets only)
CPS Retail Key Entered

from a list of thousands of items

So, this is the reason I suspect Perl is a good choice.

Can someone please confirm that and show me why Perl is so good for pattern matching?

Is it a front end or a back end technology? What other technologies often work well with Perl? It is compiled? Or is it a script?



Thanks.
0
I need to allow users to upload their financial reports (PDF or CSV) to my site, but enable them to obscure private data (Business Name, Merchant Account Numbers, etc.) before any data gets stored to the disk.

I need to use Angular to create a list of user data fields extracted from the PDF and display them for approval, perhaps with a checkbox next to each field. Fields which contain that merchants proprietary data need to be then be checked off by the user so those fields would be populated with XXXXX's.

I do not want to store that PDF onto my server. Instead, I want the user to select the fields needing to be hidden. Or even ignore them altogether. I just do not want that PDF on my server.

So, the question is...

Can Angular extract the contents of a PDF that has been uploaded? And a PDF that does not exist on disk?

I could save the extracted data onto my server in some other fashion, not yet decided.

I prefer Angular 4, and hope this functionality exists in Angular 4.

It's an interesting challenge. I see Angular as a great platform for nested logic and as a place to store objects and lists of objects. And to do the first part of processing this data on the client is what intrigues me.

Thanks.
0
Hi Experts,

Is there a script or a process where an .ini file from a folder under C:\ in copied into the user's C:\Users\<user>\Appdata\SAP\Roaming folder?

This needs to be done for Win 7 and Win 10 machines, so anytime a new user logs onto the machine and his/her profile is created this file gets copied over to the above mentioned folder path

Thanks
0

Scripting Languages

26K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.