Tag: PowerShell
-
Quickly install the SQL powershell toolls on your local machine
I wanted to quickly install the 2012 powershell tools on to my machine. I could’t find a simple summary, so here goes: Visit this site: http://www.microsoft.com/en-us/download/details.aspx?id=29065 Download the following: Microsoft® Windows PowerShell Extensions for Microsoft® SQL Server® 2012 Microsoft® SQL Server® 2012 Shared Management Objects Microsoft® System CLR Types for Microsoft® SQL Server® 2012 Wherever…
-
Quick PowerShell script to check DNS settings on all servers
I wanted to decommission some old Domain Controllers. I needed to make sure that other servers weren’t pointing to theses old DCs for DNS. I wrote this quick PowerShell script to loop through all servers and get their DNS search order. Hope that helps some one, or me when we moce to the next version…
-
Quick PowerShell script to “tail -f” dhcp logs
When I am working in Linux, I like to leave a log open with “tail -f”, so I can see the results of some test I am performing. The other day I wanted to see when a new machine joined the network, so I could give it a static DHCP lease. Usually I connect to…
-
Useful PowerShell Get-HotFix commands
I can never remember these, and now that I have posted them, I don’t have to! I will add more as I need them:
-
Import Picture into AD with PowerShell
I know this is everywhere, so this is more a note for myself. How to upload pictures to AD via PowerShell:
-
PowerShell 3: Using Invoke-RestMethod to refresh a new oAuth 2 token
I wanted to translate this code into powershell. Below is the Powershell code to request a refresh token from Google using oAtuh 2. Hope that helps someone.
-
My upgrade of SharePoint 2007 to 2010 “script”
One of my most recent projects was the migration of our intranet from SharePoint 2007 to 2010. Since we were going to change the name of the site, I was able to run through this “script” several times as practice to make sure I had everything correct. I decided to do a detach and attach…
-
PowerShell command to allow inline PDF viewing in SharePoint 2010
My users like to view PDFs in their browser on our SharePoint site. I needed to allow this in 2010: Here is the powershell to allow inline PDF viewing in SharePoint 2010
-
PowerShell 3 – Invoke-WebRequest and Invoke-RestMethod, unable to set the Accept header?
With both of these commands, when I try to add an Accept header (I want to receive my CRM 2011 data in JSON format, so I need Accept=application/json) I receive the error: “This header must be modified using the appropriate property or method.” I think this is a bug. This link shows the bug, and…
-
PowerShell 3: Invoke-WebRequest vs Invoke-RestMethod and a SharePoint 2010 list with more than 1000 entries
When using Invoke-RestMethod with a SharePoint 2010 list and ListData.svc, it returns an “System.Xml.XmlElement#http://www.w3.org/2005/Atom#entry” object. Not sure why, but the end result is that you can’t get access to the “rel=next” url, or am I doing something wrong? I had to use Invoke-WebRequest and then take the Content and put it in an XML variable,…
