Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
engrit-epm
sccm-ts-scripts
Commits
a7411d18
Commit
a7411d18
authored
Apr 08, 2020
by
Saleh Raghib
Browse files
Updating scripts to accept dynamic file paths
parent
e41ca1c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
count-ad-objects.ps1
View file @
a7411d18
...
...
@@ -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
...
...
get-lens-info.ps1
View file @
a7411d18
...
...
@@ -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."
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment