Today I am getting the opportunity to attend the Techstravaganza 2012 event http://www.techstravaganza.com at Microsoft’s office in NYC. I hope to pick up a lot of good information on PowerShell and SharePoint.
Archive for the ‘System Admin’ Category
Techstravaganza 2012
Posted in PowerShell, SharePoint, Windows Server, tagged Microsoft, Powershell, training on March 30, 2012 | Leave a Comment »
List Sever Reboot Times
Posted in PowerShell, System Admin, tagged CSV, Powershell, Reboot on February 28, 2012 | 2 Comments »
I was recently working on a Windows Server in my office when I noticed it had not been rebooted in a while. That got me to thinking, how many other servers in my environment had gotten in under the radar and were in need of a reboot. So, I decided to try my hand at [...]
Using sFTP in SQL Server SSIS
Posted in SQL Server, tagged sFTP, SQL Server, SSIS on February 23, 2012 | Leave a Comment »
On several occasions I have had to use SSIS to export data from a SQL database, and then transfer that data to a third party via sFTP. SQL Server SSIS has an FTP task built in but it does not natively support sFTP. There are several commercial products (Eldos Software, /n Software, CozyRoc) out on the market [...]
Now for a little VB Script
Posted in VB Script, Windows Server, tagged scripting, VB Script on February 16, 2012 | Leave a Comment »
I was going through some old files and thought I would post this one as a good example of using VBScript. I had a request to automate the upload of a file to an FTP site. This example dates back to 2006 so I know there are better ways to do this now, but it is a good example [...]
Setting Up PowerShell 2010
Posted in SharePoint, Windows Server, tagged Common Install Issues, SharePoint2010 on February 10, 2012 | Leave a Comment »
Today I was setting up PowerShell 2010 for testing on a VM and I ran into an issue during the install that is apparently quite common. I had successfully installed the prerequisites and was attempting to install the actual product when I got the following error. Setup is unable to proceed due to the following [...]
Using PowerShell to map a network drive
Posted in PowerShell, System Admin, Windows Server, tagged Login Script, Powershell, VPN on February 3, 2012 | Leave a Comment »
Recently my CFO purchased a new computer for his home office. He wanted to be able to VPN into the office and have access to all of his network shares and applications. After installing all his applications I was trying to decide on how to go about mapping his network drives after he logged onto [...]
Using PowerShell to copy files and send via email
Posted in PowerShell, System Admin, Windows Server, tagged email, FileCopy, Powershell on January 24, 2012 | 4 Comments »
I was reading Joe Keohan’s Blog about copying files via PowerShell and that got me to thinking about a process I already had. Each night we copy files from a shared folder and post them to our intranet site for internal use. We currently are using a batch file to handle this but I thought [...]
Updated PowerShell script to loop through files for printing.
Posted in PowerShell, Windows Server, tagged acrobat, Powershell, printing on January 23, 2012 | 2 Comments »
After finishing my script from the previous post I thought there has to be a better way to write this and reduce the lines of code. Not that 5 separate lines is a lot. But, if the list of items to print grew larger say to 15 documents, and was in different subdirectories then it [...]
Using PowerShell to print pdf files automatically
Posted in PowerShell, Windows Server, tagged automation, Powershell, printing on January 18, 2012 | Leave a Comment »
My office has a series of nightly reports from SQL Server that export as Adobe documents. The users want them printed and waiting for them each morning on a specific printer. We had a little utility that could do this (and more) but the problem with it was that the computer running the utility had [...]
Get Quarter begin and end dates
Posted in SQL Server, tagged sql, SQL Server on January 15, 2012 | Leave a Comment »
This is a script I wrote to use when I need to get the quarter begin and end dates for SQL. declare @date datetime declare @begdate datetime declare @enddate datetime set @date = getdate() --get first day of CURRENT qtr set @begdate = dateadd(q, datediff(q, 0, @date), 0) --get last day of CURRENT qtr set @enddate = dateadd(q, datediff(q, 0, dateadd(q, 1, @date)), -1) select @date as today, @begdate as QtrBegin, @enddate as QtrEnd