Commit a7411d18 authored by Saleh Raghib's avatar Saleh Raghib
Browse files

Updating scripts to accept dynamic file paths

parent e41ca1c8
......@@ -2,7 +2,8 @@
param(
[Parameter(Mandatory=$true)][string]$ComputerName,
[switch]$DebugOutput,
[string]$ADModuleSource
[string]$ADModuleSource,
[string]$RootDriveLetter
)
function debug($msg) {
......@@ -40,8 +41,8 @@ $secpass = ConvertTo-SecureString $pass -AsPlainText -Force
debug "Creating PSCredential object..."
$psCreds = New-Object -typename System.Management.Automation.PSCredential -argumentlist $user, $secpass
# Copy AD module files from wintools to correct locations on X:
$dest = "x:\windows"
# Copy AD module files from wintools to correct locations
$dest = "$RootDriveLetter:\windows"
robocopy /s /r:3 /w:5 $ADModuleSource $dest *.* 2>&1
# Import PowerShell AD module
......
......@@ -7,10 +7,11 @@ param(
# "IP" is safer because it's less likely to return multiple conflicting results
[string]$BasedOn="IP",
[string]$givenMAC=$false,
[string]$givenIP=$false
[string]$givenIP=$false,
[string]$LogDir
)
$log = "x:\engrit\logs\get-lens-info-script.log"
$log = "$LogDir\get-lens-info-script.log"
if($CalledFromTS) {
new-item -path $log -itemtype "file" -value "Start of log."
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment