https://pontuswendt.blog/
onsdag 26 augusti 2015
onsdag 29 april 2015
PowerShell App Deployment
If you ever had deployed application with SCCM, you´ve surely run into trouble, some guys on the forums have recomended this to me, and im pleased that I spend some time into this.
This is a tool for you to deploy applications/programs like you want to do, with some powershell in it, I can promise that you wont get disapointed.
Please read this, its a full guide how you deploy, work with it and so on.
http://psappdeploytoolkit.com/
I will show you a little guide how you working with it.
9. Its a simple .msi installation, with switch is "/qn"
10. Save the .ps1 file.
13. To start this program, you just put in
Deploy-Application.exe Install
And if you want to Uninstall.
This is a tool for you to deploy applications/programs like you want to do, with some powershell in it, I can promise that you wont get disapointed.
Please read this, its a full guide how you deploy, work with it and so on.
http://psappdeploytoolkit.com/
I will show you a little guide how you working with it.
1. First download the deployment toolkit here: https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases/download/3.6.2/PSAppDeployToolkit_v3.6.2.zip
2. Then I would recommend you to read this document, its a really good manual
3. Next up copy all the files in the Toolkit folder,

4. Then paste it in your local machine (you can put it in your Sourcefiles if you using sccm)
But I recommend to test it on one machine, just so you understand the logic.
5. Then the last part is to paste it, into the Files folder. Like this:

6. Now the funny part, Go into the Deploy-Application.ps1 and Edit.
Im using an half-dynamic script, you can find it here. Deploy-Application-halfdynamic.ps1
7. Take your time to look into the script, try to understand it. Read the .docx document its a very good manual(said that again, because it is.)
3. Next up copy all the files in the Toolkit folder,

4. Then paste it in your local machine (you can put it in your Sourcefiles if you using sccm)
But I recommend to test it on one machine, just so you understand the logic.
5. Then the last part is to paste it, into the Files folder. Like this:

6. Now the funny part, Go into the Deploy-Application.ps1 and Edit.
Im using an half-dynamic script, you can find it here. Deploy-Application-halfdynamic.ps1
7. Take your time to look into the script, try to understand it. Read the .docx document its a very good manual(said that again, because it is.)
8. In the script is isolated in some parts. you have
Pre-Installation
Installation
Post-installation
Pre-uninstallation
Uninstallation
Post-Uninstallation.
Pre-uninstallation
Uninstallation
Post-Uninstallation.
Its very simple, the script is goin in that order. Some pre-installs could be "remove older version of the program", Then Post-installation could be, add some registry things or reboot. Its up to you.
Same with uninstall, its easy to learn, fun to work with.
8. Ok, now go to row 150: edit you command line. so in this case:
9. Its a simple .msi installation, with switch is "/qn"
10. Save the .ps1 file.
11. Ok, now open a CMD with administration rights.
12. Go to the Folder:
13. To start this program, you just put in
Deploy-Application.exe Install
And if you want to Uninstall.
Deploy-Application.exe Uninstall
15. You can edit the Baloon-tip in the corner of course.And you can get it in english, just my test clients are on Swedish.
16. You can edit the logos and much more..

17. Then its finished.

18. Ok this was a little guide how you do, the simple way, Will post some tips of this program, later in my blog.
16. You can edit the logos and much more..

17. Then its finished.

18. Ok this was a little guide how you do, the simple way, Will post some tips of this program, later in my blog.
Thanks for reading.
/P
/P
tisdag 14 april 2015
Bulk computers from .csv to a Group
Could happen that a college need you to add a whole bunch of computer to a security group, and you have it in a .csv and want to add them. Can be easily done by a powershell script. Like this:
$sourced = Import-Csv "C:\temp\Bulk-computers.csv"
foreach ($s in $sourced)
{
Add-ADGroupMember -Identity GROUP1 -members $s.name
}
Very important that in the top of the .CSV file, you need a section with name, otherwise it wont work. Like this:

Good luck
/P
$sourced = Import-Csv "C:\temp\Bulk-computers.csv"
foreach ($s in $sourced)
{
Add-ADGroupMember -Identity GROUP1 -members $s.name
}
Very important that in the top of the .CSV file, you need a section with name, otherwise it wont work. Like this:

Good luck
/P
Copy Computers from group to other group
A small headache can ruin your day, you want to do a simple thing but cant do this in the standard Active Directory GUI
This is a small Powershell script that can help you on the way'
Run this command on the server that have the active directory cmdlet
$source = Get-ADGroupMember -Identity GROUP1
foreach ($S in $source)
{
Add-ADGroupMember -Identity GROUP2 -Members $s.SamAccountName
}
What the script does is Copy members in GROUP1 and import them in GROUP2
Remember that the two groups must be in the same domain.
Good luck
/P
This is a small Powershell script that can help you on the way'
Run this command on the server that have the active directory cmdlet
$source = Get-ADGroupMember -Identity GROUP1
foreach ($S in $source)
{
Add-ADGroupMember -Identity GROUP2 -Members $s.SamAccountName
}
What the script does is Copy members in GROUP1 and import them in GROUP2
Remember that the two groups must be in the same domain.
Good luck
/P
Join a Computer to Collection during OSD
Might happen in your daily work, you need a computer to join a collection in your OSD, And its easy done by this.
2. Place it in your Sourcefiles in a folder.
3. Then you do a package in sccm
7. Then go to your OSD,
9. Choose a name of the Command line.
10. Then your command line is;
wscript.exe AddMeToCollection.vbs SITE COLLID %_SMSTSClientIdentity%
11. Then use your package that you created earlier.
12. Wooala, Works.
/P
1. Ok first, you need this script.
2. Place it in your Sourcefiles in a folder.
3. Then you do a package in sccm
4. Then just Next,Next,Next as always.
5. Pin point your Source
6. Then Distribute your content, and the finnish the steps.
7. Then go to your OSD,
8. Then add 'Run Command line'
9. Choose a name of the Command line.
10. Then your command line is;
wscript.exe AddMeToCollection.vbs SITE COLLID %_SMSTSClientIdentity%
11. Then use your package that you created earlier.
12. Wooala, Works.
/P
Prenumerera på:
Kommentarer (Atom)






