Update Windows 7 Tile with Picture from Active Directory
Tag Archives: PowerShell
Move log files according to file name to separate folder
Here is the link for the script I am using for automatic moving log files to separate folder according to them name (Version 2.0).
According to file name…
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your logs and temporary file to use (change the brackets to relevant data, NO NEED BRACKETS!!!):
$path1 = “[Folder to look for logs]”
$csvfile1 = “[Temporary CSV file]”
I will be glade to get suggestions…
Thanks
Tal
Enable new user to access Lync
Here is the link for the script I am using to enable new user to access Lync (Version 1.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your domain and you lync server it runs from it (change the brackets to relevant data, NO NEED BRACKETS!!!):
$mailto = “[xxx@domain.com]”
$mailfrom = “Script@[domain].com”
$smtpsrv = “[SMTPServer]”
$RegPool = “[lyncpool.domin.com]”
$Notuser = “CN=Netbiosdomain$,CN=Users,DC=domain,DC=com”
$sipSuffix = “@[doamin.com]”
I will be glade to get suggestions…
Thanks
Tal
Get disk space report and send once a weekly to email
Here is the link for the script I am using for email notification regard disk space and daily report (Version 2.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your domain and you server list runs from it (change the brackets to relevant data, NO NEED BRACKETS!!!):
$serverlist = “[Server list to check]” #server.txt
$Reports = “[Location where to place report]”
$sender = “Scripts@[domain].com”
$SMTPServer = “[SMTPServer]”
$Recipient = “[xxx@domain.com]”
I will be glade to get suggestions…
Thanks
Tal
Create report regard IP existing in range
Here is the link for the script I am using to create report regard IP existing in range of class ‘C’ (Version 2.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your list and report file location (change the brackets to relevant data, NO NEED BRACKETS!!!):
$iplist1 = @(“192.168.0.”,”192.168.1.”)
$DestPath = “[location to place the report]”
I will be glade to get suggestions…
Thanks
Tal
Create server/PC/Laptops list from Active Directory
Here is the link for the script I am using to create server/PC/Laptops lists from Active Directory (Version 2.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your list files (change the brackets to relevant data, NO NEED BRACKETS!!!):
$LTfile = “[Laptops list]” #xxxxxxlt.txt laptops suffix is “-LT”
$Pcfile = “[Desktops list]” #xxxxxxpc.txt desktops suffix is “-PC”
$SRVfile = “[Servers list]” #xxxxxxsrv.txt
I will be glade to get suggestions…
Thanks
Tal
Zip event logs files and move to other location
Here is the link for the script I am using zip event logs files and move to other location (Version 1.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your needs and you servers to check (change the brackets to relevant data, NO NEED BRACKETS!!!):
$ComputerName = (“Server1″,”Server2″,”Server3″,”Server4”)
$Syslogs = “[File location to move to…]”
$Path2003 = “c$WINDOWSsystem32config”
$Path2008 = “c$WINDOWSSystem32WinevtLogs”
$sender = “Script@[domain].com”
$subject1 = “Archive Security Event Log”
$smtpsrv = “[SMTPSERVER]”
$Recepionist = “xxx@[domain].com”
$filter1 = “Archive*.evt”
$Source = “Archive-Security”
$Dest = “sec”
I will be glade to get suggestions…
Thanks
Tal
Create new account with shared account associate
Here is the link for the script I am using to create new account user and additional shared mailbox associate for the user (Version 2.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your domain and you server it runs from it (change the brackets to relevant data, NO NEED BRACKETS!!!):
$OOU = “[domain.com/Sales]”
$SOU = “[domain.com/Sites Recipients]”
$SSuffix = “@[domain.com]”
$MailFrom = “[test@domain.com]”
$OSuffix = “@[SharedDomain.com]”
$SMail = $SAlias+”@[domain.com]”
$GrouptoAdd = “[Group Name to Add permissions]”
$GrouptoAdd2 = “[2nd Group Name to Add permissions]”
$SmtpServer =”[SMTP server]”
I will be glade to get suggestions…
Thanks
Tal
Create second folder according personal folder
Here is the link for the script I am using to create additional personal folders (Version 2.0).
It is compare between two folders and create folders with same permissions as in the first.
I am running this script from scheduler every day to create second personal folders for new users created in my domain.
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your domain, your file location, your servers and emails for update when creation occur (change the brackets to relevant data, NO NEED BRACKETS!!!):
$tempfile1 = “D:TempUsersPST.txt”
$tempfile2 = “D:TempUsersDataNotInUsersPST.txt”
$tempfile3 = “D:TempUsersDataInUsersPST.txt”
$tempfile4 = “D:TempUsersData.txt”
$smtpServer = “[SMTPSERVER]”
$path1 = “[Second Location for personal Folder]”
$path4 = “[First Location of personal Folder]”
$Sender = “[Script@domain.com]”
$Receptions = “[1stContact@domain.com,2ndContact@domain.com]”
$Subject = “Second personal folder created for users”
I will be glade to get suggestions…
Thanks
Tal
Public Folders report
Here is the link for the script I am using for Public Folders report (Version 1.0).
The script is wrote in powershell.
It is can be run from command line like schedule task: “C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -command C:ScheduleTasksactive_directory_expiration.ps1”
Download the Script and rename the suffix from .txt to .ps1
On the first section you need to feel relevant data for your report store (change the brackets to relevant data, NO NEED BRACKETS!!!):
$ReportLoc = “[HTML location for this report]”
I will be glade to get suggestions…
Thanks
Tal