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

To check health of our customized Windows appliances after Meltdown patching,
I'll need a  bat/cmd/vb (don't want Powershell) script to :

1. to list the 1st 5 lines of output (which we'll run before patch/reboot & after to compare)
2. the patch date+time  &  compare with the last reboot date/time & the date a registry
     key is added : the sequence should be  add registry key 1st, apply patch & last reboot
     date/time last


1st 5 lines:
========
SERVICE_NAME: ACDaemon
DISPLAY_NAME: ArcSoft Connect Daemon
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE,PAUSABLE,IGNORES_SHUTDOWN)
. . . . .

SERVICE_NAME: AcPrfMgrSvc
DISPLAY_NAME: Ac Profile Manager Service
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
0
Receive 1:1 tech help
LVL 11
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

So not sure if it related to Patch Tuesday or not, but after I updated my computer Powershell ISE stop working.
I have search the internet for fixes and tried them.
  1. MalwareBytes for Poweliks and nothing came up
  2. Installed PS 5.1
  3. Checked and confirmed that KB3163245 is installed, but this was well before I started to have this issue. I did uninstall it, but still having the same issue.

Any Ideas
0
would there be an easy way to merge the output of get-adgroupmember with some of the attributes of get-aduser? I basically need to verify a number of group members but being able to write them out to a csv type report and also pull in a number of get-aduser attributes, e.g. enabled, accountexpirydate etc would really help with this exercise.

What I am suggesting is I want to specify get-adgroupmember group, and the output be written to CSV in a table format, which of course will show all group members, but then also include some attributes about the aduser, namely attributes: enabled, email address, accountexpirydate, lastlogintimestamp. By default get-adgroupmember only returns these attributes per group member which isn't quite enough:

  • distinguisedname
  • name
  • objectclass
  • objectGUID
  • SamAccountName
  • SID

Not sure if there's anyway to amend the output of cmdlet get-adgroupmember itself to show other user attributes to avoid having to merge the output of 2 commands. I suppose I could run 2 commands and join them into something like access, but an all in one way in PowerShell would be ideal to save time.
0
Hi All,

I wonder if anyone here can assist me in fixing the PowerShell script below:

#################################################################################################################################################################################
# Show the list of server in the specific OU that has problem with stopped service that is set to be running as Automatic when the CPU or the Memory load of the server is > 80% 
#################################################################################################################################################################################
#

$ResultFile = "C:\TEMP\TestResult.htm"
$StartOU = "OU=Production 1,OU=Computers,DC=MyDomain,DC=com"
$ServerList = @()
$ServerList = Get-ADComputer -Properties OperatingSystem, OperatingSystemVersion, lastLogonTimestamp, lastLogon -Filter {Enabled -eq $True} -SearchBase $StartOU |
				Where-Object {Test-Connection $_.Name -Count 1 -Quiet} | 
				Select-Object -Property Name

ForEach($Computer in $ServerList) {
    $hostdns = [System.Net.DNS]::GetHostEntry($Computer) 
    $OS = Get-WmiObject Win32_OperatingSystem -ComputerName $Computer -ErrorAction Stop
    $LastBoot = [System.Management.ManagementDateTimeconverter]::ToDateTime("$((Get-WmiObject Win32_OperatingSystem -ComputerName $Computer).LastBootUpTime)")
    $Uptime = (Get-Date) - $LastBoot
	
    $propHash = [ordered]@{ 
        ComputerName = $Computer 
        BootTime     = $BootTime 
        

Open in new window

0
I used the following code to login into a webpage.

$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate("https://sfe-uat.epway.com")
while($ie.Busy -or $ie.ReadyState -ne 4) {start-sleep -m 500}
$ie.Document.IHTMLDocument3_getElementById("ctl00_username").value = "abcdef"
$ie.Document.IHTMLDocument3_getElementById("ctl00_password").value = "123456"
$ie.Document.IHTMLDocument3_getElementById("ctl00_login").click()
start-sleep 2
$ie.Document.body | Out-File -FilePath C:\Users\averm\Documents\adi\test\web123.txt

But I need some more help with this code. I'm logging into the page but i need to download a statement. The attached images shows you what to download.

Step1: In home page under "Reports" i need to select "Aging"
Step2: In "Aging" page i need to go to "Aging Group" and select "Direct Energy Aging" and select "Export". so that it will download my statement.

The following 4 images may help you to get some information. Please help me to find the solution.
1.png
2.png
3.png
4.png
0
I need powershell script to extract last login user on all vm on a vcenter.
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
Hi, my organization has contacts globally, I only need contacts for America region usually I use get-contact or get-contact - identity for all contacts or specific contact is there any script for a specific region? thanks
0
I need to automate unzipping multiple .zip files to different folders using 7 zip.  For example, I have 4 .zip files in one folder and need to unzip them into their own folders, not in to one.  Ideally, I would like to put the command or script into an SSIS package.
Thank you.
0
Hi,

I want to add page loading spinner in my Angular 2 application.. I have some side bar subscriptions which added in main component and calling the side bar subscriptions  like print, when it takes tile to print or search i want to show the loading spinner,,

Thanks!
0
Free Tool: Path Explorer
LVL 11
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hi ,
This script basically replaces the databse schema based on which env this script is run .
example reaplaces 'RA_311'  with 'RA_350' in 350 env ,  AD1 with AD5  in 350 env   for all databases llisted. Attched is the script.  also I need logging of each step

thanks
expx.sh
0
Hi there!

I've been trying to figure out how to copy all the tags from my instances to the attached volumes in a region.
I found two Lambda scripts which say they do that, but I can't figure out how to make use of them (I'm not a Lambda whiz)

#1
https://gist.github.com/mlapida/931c03cce1e9e43f147b

#2
https://gist.github.com/deepthawtz/8726d3d0efe4fb48d01180074fa818f9

When I create a function, each of those throws errors and never works. Can someone explain to me ELI5 how to make a function that will copy my instances tags to my volumes, ideally I'd run this scripts when I need it.

My instances are in us-west-2c
0
Good Morning,

I am new to scripting and never done it in the past and now have a test environment to play with it and once successful deploy this for about 100 computers running mix of windows 7 64 bit OS and windows 10 64 bit OS.

What I need to accomplish:  Uninstall Bluebeam 2016 and 2015 versions from about 100 computers and install the new BB 2017 on these domained machines. I need to get it done efficiently and to be able to show message to users that currently this upgrade is performed and once it finished display its now completed and thank you for your patience.  

Test Environment:

Got BB 2016 installed on Windows 10 x64 domained machine.
Built a test GPO and have this test computer in there.
Two scripts are in the startup sectiion:  1. UninstallPreviousversions.bat 2 BB2017silentinstall.bat They are setup in order.

As I am testing by rebooting this machine, looks like the script works after the login :

It uninstalls the older version 2016
and installs 2017 version silently

This takes about 15 minutes which is expected but the echo messages are not showing up for user to know that this process is going on.

Can someone help me to make my scripts better so that when the users log in to their windows 10 or windows 7 computers, its little graphical and the prompt "stays there" until the uninstall and new install is completed and if it fails for some reason, it gives a message that the changes were unable to be done.

Attached are my …
0
Is there any research has been done or based on personal experience, which mobile development tool/ platform should be used in term of time needed to develop a brand new "simple" app from scratch?

Open for suggestions, thank you.
0
Hello to all VB Guru's

I'm trying to make a vb script (.vbs) subroutine that will:

Continually check if a process (.exe) is running
Once it's done running (finished), then launch another program (.exe).
 
Everything I've tried to far, doesn't work.

Really appreacate all your assistance!

-Mac
0
I have Comodo for virus protection now, so I want to uninstall AVG Business.  Comodo has a script that uninstalls AVG and installs Comodo, but Comodo is already installed on the machines, so I am looking to just uninstall AVG.  Can someone please look at this script and let me know what can be changed.  I thought that I had changed it, but every time it ran there were errors, so this is the original script:
import socket
import _winreg
import os
import shutil
import time
import ssl
import time
import ctypes
import urllib2
import getpass
def Avgpres():
    ret=os.popen("wmic product get name").read()
    if 'AVG' in ret:
        AVGUninstall()
    else :
        print "AVG Uninstallation compelted"

def Download2(Download_URL,Download_Path):
    
    fileName = Download_URL.split('/')[-1]
    DownTo = os.path.join(Download_Path, fileName)
    context = ssl._create_unverified_context()
    f=urllib2.urlopen(Download_URL,context=context)
    data=f.read()
    print f.getcode()
    with open(DownTo, "wb") as code:
        code.write(data)
    return DownTo
  

def AVGUninstall():
    Download_Path=os.environ['PROGRAMDATA']
    os.chdir(Download_Path)
    Download_URL ="http://files-download.avg.com/util/tools/AVG_Remover.exe"
    path=Download2(Download_URL,Download_Path)
    out=os.popen(path+' -silent -norestart').read()
    time.sleep(90)
    os.remove(path)
print  "Computer Name: " +socket.gethostname()
print "IP-Address :"
print  

Open in new window

0
Hello,

I have an Excel file with some Powershell scripts that are automatically filed from other cells.
What I need is to create a button that will copy /past each command individually in one Powershell session.
The scrips are located on the cells (W3,X3,Y3,Z3, AA3 and AB3)

I will like firs to open powershell running a ps1 file and the on that session to copy paste the scrips located in the cells a following:

- W3
- wait time 10 seconds
- X3
- Y3
-Z3
-AA3
-AB3


Thank you and I appreciate the help.
0
Hi Expert.

I am trying to run this github  cloudFormation template but I am getting the following error

https://gist.github.com/ashvinishinde-tudip/79a445af4a1ca2adbb5241f5df7cce44

error

Template validation error: Invalid template property or properties [1, 2, 3, DoNotify, 4, PassPercent, 5, 6]


is there anyone can help me how to resolve this issue. I have looked at the above script it is missing "Resources":  & "Properties":
0
Hi.... I need help on loading fixed length (NACHA format) file to DB2 table.  DO not need to process (i mean parsing or transformation) the file, but need to load it.

here is the file structure

5euqy euq 6767 CCD wqyeu
2 4545  435435 tert5656565
3 434 343 erer eerer 4545 e
4 fffds 5656 787 433 78888
6 wetwyty ghghuyuy wyeuy
7 6556 878 989 990
8 ywieyuwqyu
5euqy euq 6767 PPD wqyeu
2 4545  435435 tert5656565
3 434 343 erer eerer 4545 e
4 fffds 5656 787 433 78888
6 wetwyty ghghuyuy wyeuy
7 6556 878 989 990
8 ywieyuwqyu

file has 8 type of records, each record type has different lay out. Block 5...8 is repeating in the file.  class code (PPD, CCD) mentioned in record type 5. based on that value layout of record type 6 changes.

I need to load this file to db2 table. Please suggest how this can be done.
0
Free Tool: IP Lookup
LVL 11
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I am looking for a script (PowerShell or JS) that will create multiple Calendar overlays for a SharePoint online Calendar. I found some for SharePoint 2013, but it does not work for SharePoint online. When creating a SharePoint site template, Calendar Overlays are stripped. Unless anyone can think of another way of automatically creating them, Scripting seems the way to go.

Any help will be great. Thank you.
0
Hi,
So I have the below login script set for all users to map a network drive located on another network which the office has a VPN tunnel to:

@echo off

echo Please type your network user name

set /p username=


echo Please type your network password

set /p password=

Net use Z: \\Share\Shared$ /user:DOMAIN\%username% %password% /persistent:YES

The script works fine when run manually, but I just cant seem to see why it doesn't run on logon. When I pull gpresult it states it has applied successfully.

Thanks
Craig
0
any one work on Sadad Payment Method Alinma Bank?
0
I'm looking for a simple web code (some simple script) which does not play well with Ghostery

Basically I'm looking for something to add to my website which will make a viewer of my website, who is using Ghostery, to not be able to fully use or see our page when Ghostery breaks our page.  The hope is to get them to disable Ghostery when viewing our website.
0
tut: https://www.coretechnologies.com/products/AlwaysUp/AutoIt/

Tool usage:

This is my error message , so how to run this?
ClickButton "Idle timer expired" "OK"
0
I open my PC then i connect to RDP (i have no Administrator rights,i can't install softs or modify registry,policies etc),the session goes IDLE if i don't have activity for 12 minutes and then after 5 min logs off my session.  and my soft stops to run.I heard that it works with ''MOVE MOUSE'' and it really works if i connect to rdp from my pc , but..... I don't like that because we still have to shut down the computer, right?so i thought to open another rdp where i have administrator rights and i am logging in to the other RDP (this is the problem idle rdp),the problem is that after 12 minutes i receive the message:
Your Remote Desktop session ended becouse the remote computer didn't receive any input form you.

Open in new window

,i tried to run MOVE MOOUSE on both but dones't work, any idea?
thanx!
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.