get-adgroupmember -identity “orginalgroup” | Get-ADuser | Foreach-Object {Add-ADgroupmember -identity “destinationgroup” -Members $_}
Category: Powershell
Export Drivers from Windows with Powershell
i found a cool article about exporting driver with powershell: powershell-is-king-export-drivers-from-windows/
Commando:
Export-WindowsDriver -Destination “C:\Drivers\$((Get-WmiObject -Class win32_computersystem).Model)” -Online
Cool
Powershell Script to Install Requirements for Skype for Business Server 2015 on Server 2012 R2
I Created a powershell script to install Requirements for Skype for Business Server 2015 on Server 2012 R2
You can download the Script from Technet Script Libary
https://gallery.technet.microsoft.com/scriptcenter/Install-Requirements-for-aabf7358
Script Browser for Windows PowerShell ISE
Script Browser for Windows PowerShell ISE enables you to search for over 9000 script samples in the TechNet Script Center from within the scripting environment.
Creating a Home Drive with Windows PowerShell
With the following script I will do 3 things:
1. Set the user his home folder with drive letter
2. Create a folder on your home folders file share
3. Giving users full control on there folder.
The Script:
Get-ADUser -Filter * -SearchBase “OU=wardusers,DC=wardvissers,DC=local” | Foreach-Object {
$sam = $_.SamAccountName
$sid = $_.Sid
$HomeDrive=’J:’
$Domain=wardvissers.local’
$UserRoot=’\\wardvissers.local\dfs\home\’
$HomeDir=$UserRoot+$sam
# Assign the Drive letter and Home Drive for the user in Active Directory
SET-ADUSER $sam –HomeDrive $HomeDrive –HomeDirectory $HomeDir
# Create the folder on the root of the common Users Share
NEW-ITEM –path $HomeDir -type directory -force
$account=$Domain+’\’+$Accountname
# Set parameters for Access rule
$rights=[System.Security.AccessControl.FileSystemRights]::FullControl
$inheritance=[System.Security.AccessControl.InheritanceFlags]”ContainerInherit,ObjectInherit”
$propagation=[System.Security.AccessControl.PropagationFlags]::None
$allowdeny=[System.Security.AccessControl.AccessControlType]::Allow
$dirACE=New-Object System.Security.AccessControl.FileSystemAccessRule ($sid,$rights,$inheritance,$propagation,$allowdeny)
$dirACL=Get-Acl $HomeDir
$dirACL.AddAccessRule($dirACE)
Set-Acl -path $HomeDir -AclObject $dirACL
Write-Host $HomeDir access rights assigned
}
Microsoft Virtualization for VMware Professionals Jump Start
The “Microsoft Virtualization for VMware Professionals” Jump Start is specially tailored for VMware and Microsoft virtualization technology pros. This cutting-edge course features expert instruction and real-world demonstrations of Hyper-V, many components of the System Center Suite, including VMM 2012, and a myriad of VDI solutions. This course is designed for Data Center Managers, IT Professionals, IT Decision Makers, Network Administrators, Storage/Infrastructure Administrators & Architects. Expert IT infrastructure consultant, Corey Hynes, and Microsoft Technical Evangelist, Symon Perriman, leveraged an engaging "team teaching" approach which makes the class as entertaining as it is educational
Virtualization Jump Start (01): Virtualization Overview
Virtualization Jump Start (02): Differentiating Microsoft & VMware
Virtualization Jump Start (03a): Hyper-V Deployment Options & Architecture | Part 1
Virtualization Jump Start (03b): Hyper-V Deployment Options & Architecture | Part 2
Virtualization Jump Start (04): High-Availability & Clustering
Virtualization Jump Start (05): System Center Suite Overview with focus on DPM
Virtualization Jump Start (06): Automation with Opalis, Service Manager & PowerShell
Virtualization Jump Start (07): System Center Virtual Machine Manager 2012
Virtualization Jump Start (08): Private Cloud Solutions, Architecture & VMM Self-Service Portal 2.0
Virtualization Jump Start (09): Virtual Desktop Infrastructure (VDI) Architecture | Part 1
Virtualization Jump Start (10): Virtual Desktop Infrastructure (VDI) Architecture | Part 2
Virtualization Jump Start (11): v-Alliance Solution Overview
Virtualization Jump Start (12): Application Delivery for VDI
Download all the Video’s:
Video: WMV | WMV (ZIP) | PSP
Audio: WMA | MP3
Now only finding some spare time to watch’s these video’s
Gratis E-Book Mastering Powershell
Klik op de foto om Mastering Powershell als PDF te downloaden.
Klik HIER om het boek online te bekijken.
Powershell Start-Transscript
Start-Transcript is een handige tool.
Namelijk het logt namelijk alles wat je in typt in Powershell.
Dan kun je later filteren wat je bijvoorbeeld wilt gebruiken zonder kopiëren & plakken te gebruiken.
C:\PS>start-transcript
Dit start hij het transcript hij slaat het standaard op in de standaard locatie.
Ik gebruik vaak c:\PS>Start-Transcript -path d:\psexchtest.txt -noclobber
-Path zorgt er voor hij een tekst bestand aanmaakt op de schijf die ik gekozen heb met een naam die ik opgegeven heb.
-noclobber zorgt er voor dat het bestand niet overschreven wordt. Als hij ziet dat bestand bestaat dan krijg je een foutmelding.
Met stop-transcript wordt het bestand opgeslagen en wordt de transscript beëindigd.
Voorbeeldje: