Create a Windows batch script. The batch script will contain the following:
@echo off
set /p bd=Enter the Boot drive letter of the computer.
echo %bd%
set /p cn=Enter the computer name.
echo %cn%
set /p mdl=Enter the model.
echo %mdl%
IF EXIST "%bd%\newfolder" (cd %bd%\newfolder)
ELSE (mkdir %bd%\newfolder)
IF EXIST "%bd%\newfolder\casefile.txt" GoTo DONE
echo !bt! > "%bd%\newfolder\casefile.txt"
echo $Env:"%bd%\newfolder\casefile.txt"
systeminfo
for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^| findstr /i
"Physical Host"') do (
echo %%i >>
\\server1\folder1\folder2\macadd%random%.txt
)
nslookup localhost 2>nul | find "Address:"
xcopy "c:\system.evtx" "%bd%\newfolder\casefile.txt"
for /f %%a in ('hostname') do (
md %%a
echo !a! > "%bd%\newfolder\casefile\host.txt"
)
IF EXIST "C:\windows\system32\winevt\Logs\sys.evtx" echo sys.evtx
successfully created
:DONE
echo data already exists in the newfolder
pause
Create a Windows batch script. The batch script will contain the following: Ask the user interactively:...
Create a Windows batch script that: Execute the correct commands redirecting output to command-name.txt in BootDrive\newfolder2 in order to get the output below: Environment variable System information Mac address (You cannot use the ipconfig command) DNS table Export the system.evtx file to BootDrive\newfolder2\sys.evtx Use a FOR loop to: Execute hostname and send the output to a variable host Output the variable host to BootDrive\newfolder2\casefile\host.txt Use an if statement to determine if sys.evtx exists (from #4) If sys.evtx exists echo sys.evtx...
Question: Hands-On Project 3-3 Use a Batch File A file with a bat file extension is called a batch file. Yo... Use a Batch File A file with a .bat file extension is called a batch file. You can use a batch file to execute a group of commands, sometimes called a script, from a command prompt. Do the following to learn to use a batch file: 1. Using a command prompt window, copy the files in your Documents folder...
Problem 1 Write a BASH script to create a user account from the Linux system on which your script is run. The script should process two positional parameters. First positional parameter is supposed to be a string with a user name (e.g., user_name) Second positional parameter is supposed to be a string with a user password (e.g., user_password) In your script: Check if two positional parameters were passed to your script when it was invoked If NOT, print an appropriate...
Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a. Write the following as script6.sh and change its permissions to count for num in d do if num eq 100 then count (count+1) done echo The number 10 was found $count times What is the output? Run the script as ./script6.sh 10 20 30 10 40 20 50 10 60 <enter Summarize what the script does r using the read command. The following script...
Please write a BASH Script in LINUX that... 1. is actually executable 2. has a comment to tell us what you did, why and how. 3. allows a user to enter their name and a number between 1 than 100 (this must be prompted so the user knows what to do) 4. creates a random number between 1 and 100 for you to guess. The command to create a random number is shown below. (if you find a better one...use...
Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....
Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...