Search this Blog

Showing posts with label Powershell. Show all posts
Showing posts with label Powershell. Show all posts

Tuesday, August 11, 2020

Setting HomeFolder for Bulk Users in Active Directory

Hi All, how to add home folders for multiple users in active directory? here is a solution, go through this article and this powershell script will help you to add home folder and map it to a fileshare, this would be very much useful for sys admins who wants to add/modify home folder for number of users with one go.

Below the link to the script and few screen shots of script output.

Link to Script:- AddHomeFolderBulkUsers

 

 

Bulk User Creation with PowerShell

Hi All, this time we are going to create bulk users with powershell, there might be a requirement for system admins where we need to create a bunch of users, creating one by one via GUI is a daunting task, this powershell script will create users in few minutes, create a .csv file with list of information about users, key in the same in script and execute, in few minutes you have users ready in active directory.

Links for the script:- https://github.com/snagaraj85/PowerShellBulkUserCreation

Below screenshot of csv file



Monday, June 03, 2019

Powershell Module to get local & remote system's disk space details

This handy PowerShell module helps us to get the disk space details of the local system as well the remote system. The script queries the WMI object and get the logical disks space details of each partitions. It lists the full details such as total volume size of the partition, drive letter, used space, free space as well the free space details in terms of percentage which will be very much useful. This wonderful module will assist to get the disk space details without logging to remote system.
And one more important thing is, if the computer parameter for remote system is not specified it defaults to the local system's disk details.
Usage: - Get-DiskSpace -Computer SERVER1
             Get-DiskSpace

Link to the script: Get-DiskSpace






 

Monday, April 09, 2018

Script to perform day to day Active Directory Tasks

Hi All, Below script can be used to perform day to day AD Tasks which are mentioned below in the image, also i shared the link for code...Feel free to use it & add your comments...:)


Link for the script:- AD-Management-Tasks




Tuesday, December 22, 2015

Exchange PowerShell Commands

Exchange Powershell command to get the details of a mailbox

[PS] C:\Users\sysadmin\Desktop>Get-Mailbox -Identity "Nagarajan S" | For
mat-List Name,Database,UseDatabaseQuotaDefaults,IssueWarningQuota,ProhibitSendRe
ceiveQuota,MaxSendSize,MaxReceiveSize,RecipientLimits,PrimarySmtpAddress,Organiz
ationalUnit,RecipientType,ServerName


Command to get Mail Forwarding Enabled Users

Get-Mailbox -Filter {ForwardingAddress -ne $null} | ft Name,ForwardingAddress,DeliverToMailboxAndForward -Autosize


Forefront Powershell command to get blocked email of a user

PS C:\Program Files (x86)\Microsoft Forefront Protection for Exchange Server>Get-FseQuarantine | Where-Object {$_.RecipientAddresses -eq "s.nagarajan@testdomain.com"} | Select-object -property "SenderName","SenderAddress","Subject","DetectionTime","IncidentCategory","IncidentName","RecipientNames" 


To get the mailbox size of the users in an OU

get-mailbox -OrganizationalUnit "ou=IT,ou=Users,dc=testdomain,dc=net" -resultsize unlimited | get-mailboxstatistics | ft DisplayName,TotalItemSize,Itemcount


Setting mail enabled security group to restrict mail delivery to DL

Set-DistributionGroup Test-ChennaiDL -AcceptMessagesOnlyFromDLMembers "ALL_MAIL SENDERS"