Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sccm-ts-scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
engrit-epm
sccm-ts-scripts
Commits
a7411d18
Commit
a7411d18
authored
5 years ago
by
Saleh Raghib
Browse files
Options
Downloads
Patches
Plain Diff
Updating scripts to accept dynamic file paths
parent
e41ca1c8
No related branches found
No related tags found
1 merge request
!3
Made drive letters a param
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
count-ad-objects.ps1
+4
-3
4 additions, 3 deletions
count-ad-objects.ps1
get-lens-info.ps1
+3
-2
3 additions, 2 deletions
get-lens-info.ps1
with
7 additions
and
5 deletions
count-ad-objects.ps1
+
4
−
3
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
...
...
This diff is collapsed.
Click to expand it.
get-lens-info.ps1
+
3
−
2
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."
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment