Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MS OneDrive, an online service for file storage and syncing across devices, is used by many to backup and store files. For enterprise backup and

MS OneDrive, an online service for file storage and syncing across devices, is used by many to backup and store files. For enterprise backup and syncing, organizations rely on local or remotely managed systems to secure their intellectual property. However, for simple backup of data, PowerShell Automation can be used to trigger file transfers periodically. This assignment will exercise the use of PowerShell, designing a script that will copy files from one server to another, and setting it to run on a defined schedule.

PowerShell Setup

  1. Check version of PowerShell using Get-Host or $PSVersionTable (should display 4.0).
  2. Check the ability to run scripts using Get-ExecutionPolicy (should be RemoteSigned). If not correct run command: Set-ExecutionPolicy - ExecutionPolicy RemoteSigned

Use the "ITT-430 Benchmark Security Automation with PowerShell" file and conduct online research to create a script to transfer files from one member server to another following these settings:

  1. Member Server (source): create the folder C:\ITT430-Files
  2. Transfer Server (destination): create the folder C:\ITT430-Storage share this folder in your domain
  3. Schedule the task to run every hour

Another benefit of PowerShell comes in the automation of various security-related tasks.

Some organizations will spend thousands of dollars on software that PowerShell can do for free. For example, provisioning users (a compliance requirement and regulatory requirement for many organizations) is essential in sustaining the security and least privilege access to systems. With some PowerShell familiarity in-hand, research and use skills obtained to create a script that will provision inactive users.

Create an automated script that disables Active Directory users that have not logged on in 45 days.

Paste both working, full scripts into a single MS Word document and submit as directed.

ITT-430 Benchmark - Security Automation with PowerShell

Creating a PowerShell Script

In this exercise, you will create script by declaring parameters (like declaring variables in programming) and using the Copy-Item cmdlet.

  • For param use: review https://technet.microsoft.com/en-us/library/jj554301.aspx
  • For Copy-Item use: review https://technet.microsoft.com/en-us/library/ee156818.aspx

In your Windows Server, place the following contents into a text file (or use MS PowerShell IDE) to create and save the script as ITT430Copy.ps1 file. Save it and note the location.

param(

[string]$computerName,

[string]$filePath

)

Copy-Item -Path $computerName -Destination $filePath -Recurse

Creating a Scheduled Task to Automate the Script

In Windows Server, open MS PowerShell IDE

Perform the following commands:

Define the Scheduled Task

$Action = New-ScheduledTaskAction -Execute "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Argument -NonInteractive -NoLogo -NoProfile -File C:\ ITT430Copy.ps1 -SourcePath C:\ITT430-Files* -DestinationPath \\ITT430-SV1\ITT430-Storage"

Set Schedule Trigger (time to execute)

$Trigger = New-ScheduledTaskTrigger -Once -At '12AM' -RepetitionInterval (New-TimeSpan -minutes 15) -RepetitionDuration (New-Timespan -hour 1000)

Place Scheduled Task and Trigger into memory

$Task = New-ScheduledTask -Action $Action -Trigger $Trigger -Settings (New-ScheduledTaskSettingsSet)

Register the Scheduled Task into System Scheduler

$Task | Register-ScheduledTask -TaskName 'File Transfer AutoSync' -User 'DomainAdmin' -Password 'password'

$Task

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions