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

Merge branch 'drive-letter-fix' into 'master'

Made drive letters a param

See merge request !3
parents e41ca1c8 44741e4d
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
param( param(
[Parameter(Mandatory=$true)][string]$ComputerName, [Parameter(Mandatory=$true)][string]$ComputerName,
[switch]$DebugOutput, [switch]$DebugOutput,
[string]$ADModuleSource [string]$ADModuleSource,
[string]$RootDriveLetter
) )
function debug($msg) { function debug($msg) {
...@@ -40,8 +41,8 @@ $secpass = ConvertTo-SecureString $pass -AsPlainText -Force ...@@ -40,8 +41,8 @@ $secpass = ConvertTo-SecureString $pass -AsPlainText -Force
debug "Creating PSCredential object..." debug "Creating PSCredential object..."
$psCreds = New-Object -typename System.Management.Automation.PSCredential -argumentlist $user, $secpass $psCreds = New-Object -typename System.Management.Automation.PSCredential -argumentlist $user, $secpass
# Copy AD module files from wintools to correct locations on X: # Copy AD module files from wintools to correct locations
$dest = "x:\windows" $dest = "${RootDriveLetter}:\windows"
robocopy /s /r:3 /w:5 $ADModuleSource $dest *.* 2>&1 robocopy /s /r:3 /w:5 $ADModuleSource $dest *.* 2>&1
# Import PowerShell AD module # Import PowerShell AD module
......
...@@ -7,10 +7,11 @@ param( ...@@ -7,10 +7,11 @@ param(
# "IP" is safer because it's less likely to return multiple conflicting results # "IP" is safer because it's less likely to return multiple conflicting results
[string]$BasedOn="IP", [string]$BasedOn="IP",
[string]$givenMAC=$false, [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) { if($CalledFromTS) {
new-item -path $log -itemtype "file" -value "Start of log." 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