Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Powershell / O365 experts, importing ad users into signatures!

$
0
0

Hi Spiceheads,

First time posting and a complete newbie so go easy on me. :) Attempting to get Powershell to create some O365 signatures and to pull the data from AD.

Structure of AD is as follows (running script locally on machine):

Domain\School\Users\Testing(OU) - 1 user placed into group to test.

Powershell
#import the active directory module which is needed for get-aduserimport-moduleactivedirectory#set folder location for files, the folder must already exist$save_location='C:\Users\administrator.SCHOOL\Downloads\O365\'#$users = get-aduser -Filter * -searchbase "OU=Testing,DC=BLANK,DC=BLANK,DC=BLANK,DC=BLANK,DC=BLANK" -Properties * -Credential school\administrator -Server domainnamehere$users=get-aduser-Filter*-searchbase"OU=Testing,DC=BLANK,DC=BLANK,DC=BLANK,DC=BLANK,DC=BLANK"-Properties*foreach($userin$users)...

Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>