Giter Club home page Giter Club logo

deploy-laps's Introduction

Deploy-LAPS

Powershell v4+ License: GPL v3 contributions welcome

This script and accompanying files will allow system administrators to automatically deploy Microsoft Local Administrator Password Solution (LAPS). Please visit https://technet.microsoft.com/en-us/mt227395.aspx for more information about LAPS.

Parameters

-ComputerOU
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
This is the OU that LAPS will assign permissions to update it's own AD object to write the password when changed. If this is not set it will pull the default computer OU from AD.

-OrgUnitRead
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Sets the OU that has read access to the passwords stored in the computer AD object.
If this is not set only domain/enterprise admins will have access.

-OrgUnitReset
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Sets the OU that has reset access to the passwords.
If this is not set only domain/enterprise admins will have access.

-SecGroupRead
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Sets the Security Group that has read access to the passwords stored in the computer AD object.
If this is not set only domain/enterprise admins will have access.

-SecGroupReset
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Sets the Security Group that has reset access to the passwords.
If this is not set only domain/enterprise admins will have access.

-GPOName
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Sets the GPO name when importing/creating the GPO.
If this is not set the GPO name will be Deploy-LAPS.

-DownloadURL
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Allows you to download LAPS from another source. This may be useful if a newer version comes out you can modify the script rather
than rely on me to update it.

-DistributiveFileName
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Allows you to change the name of the executable that is downloaded. This could be useful where there is a SRP rule allowing a certain filename in a certain directory.

-InstallLogFileName
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Allows you to change the name of the installation log file name. This does not allow changing of the directory.

-TranscriptFileName
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Allows you to change the name of the transcript. This does not allow changing of the directory.

-SMBShareName
Not Required.
Pipeline not accepted.
Named Position.
No Wildcards.
Allows you to change the name of the SMB share created on the computer you run the script on to share out the executable for the client computers to access.


Exmaple usage

Requires admin shell.

.\Deploy-LAPS.ps1 This will run the script with all the defaults and prompting for required information as you go.

.\Deploy-LAPS.ps1 -GPOName "My Awesome LAPS GPO" This will run the script with defaults but set the GPOname to "My Awesome LAPS GPO"

deploy-laps's People

Contributors

exchange12rocks avatar sup3rlativ3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zbalkan

deploy-laps's Issues

Copy-Item fails to copy required folder and instead copies home directory

When trying to copy the working folder it instead copies the users home directory.

Copy-Item : The process cannot access the file 'C:\Users\Administrator\NTUSER.DAT' because it is being used by another 
process.
At E:\Deploy-LAPS\Deploy-LAPS.ps1:37 char:2
+     Copy-Item -Path .\ -Destination $WorkFolderPath -Recurse
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (NTUSER.DAT:FileInfo) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Copy-Item : The process cannot access the file 'C:\Users\Administrator\NTUSER.DAT' because it is being used by another
process.
At E:\Deploy-LAPS\Deploy-LAPS.ps1:37 char:2
+     Copy-Item -Path .\ -Destination $WorkFolderPath -Recurse
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (NTUSER.DAT:FileInfo) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

Copy-Item : The process cannot access the file 'C:\Users\Administrator\ntuser.dat.LOG1' because it is being used by 
another process.
At E:\Deploy-LAPS\Deploy-LAPS.ps1:37 char:2
+     Copy-Item -Path .\ -Destination $WorkFolderPath -Recurse
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (ntuser.dat.LOG1:FileInfo) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Copy-Item : The process cannot access the file 'C:\Users\Administrator\ntuser.dat.LOG1' because it is being used by
another process.
At E:\Deploy-LAPS\Deploy-LAPS.ps1:37 char:2
+     Copy-Item -Path .\ -Destination $WorkFolderPath -Recurse
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (ntuser.dat.LOG1:FileInfo) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand

Copy-Item : The process cannot access the file 'C:\Users\Administrator\ntuser.dat.LOG2' because it is being used by 
another process.
At E:\Deploy-LAPS\Deploy-LAPS.ps1:37 char:2
+     Copy-Item -Path .\ -Destination $WorkFolderPath -Recurse
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (ntuser.dat.LOG2:FileInfo) [Copy-Item], IOException
    + FullyQualifiedErrorId : CopyDirectoryInfoItemIOError,Microsoft.PowerShell.Commands.CopyItemCommand
Copy-Item : The process cannot access the file 'C:\Users\Administrator\ntuser.dat.LOG2' because it is being used by
another process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.