Register-WmiEvent -ComputerName vs Remote-PSSession via Invoke-Command
Hi PowerShell experts! I am currently creating a PowerShell eventing script that will be registering events on my local computer and monitoring win32_service and the __InstanceModificationEvent on...
View ArticleUsing PowerShell to check on SQL services
This is just a quick little post to give you another reason to learn PowerShell.Read More
View ArticleCreating Custom Objects in Windows PowerShell
How to create custom objects on demandRead More
View ArticleGet Certificate thumbprint using PowerShell
In order to get a list of certificates and their thumbprints, you can use the following PowerShell command:Read More
View ArticleConfigMgr 2012 R2: Playing around with Powershell for the 1st time…
Recently, Microsoft was very nice to provide a webpage with all available Powershell cmdlets for the System Center Suite. Fellow Dutchman and MVP James van den Berg made me aware (Thanks for that James...
View ArticleStoring PowerShell Credentials
Often I find myself needing to run an elevated cmdlet with a different account than what I’m logged in with. In the past, I would use the Get-Credential cmdlet at the start of my script. But that...
View ArticlePowershell.exe As Elevated?
I am running a command from the run line on the start menu, but when it runs the script, it says:Warning: To preform some operations you must run an elevated Windows PowerShell console. powershell.exe...
View ArticleUpdating a specific value of an array with multiple entries
Hi,I'm looking for a way to update an existing array.I have a PSCustomObject that I gather in an array$x= [PSCustomObject] @{ Source = "" Target ="" XD = "" ID = ""}$arrX += $x... Array looks...
View ArticleHow to test if the Theme folder exists in $web.Folders["_themes"].subfolders
Here's the question - How can I test for existance of the $web.Folders["_themes"].subfolders[$themeFolderName]) folder BEFORE I assign it to $folder variable?My code is below, and I want to list and...
View ArticleCreate Publishing Page using Custom PageLayout by PowerShell in SharePoint 2013
I was come up with an interesting requirement stating that, we need to create some huge numbers of pages based on a Custom PageLayout in our Site Collection. For that, I was planning to write a...
View ArticleHow to Add WebPart to the Publishing Page using PowerShell in SharePoint 2013
As part of the previous article, the next step would be adding a WebPart to the Page which we created. In the same manner, the script is going to be self-explanatory and straight forward. The...
View ArticleBe “SMART” with Windows Azure Pack and SMA
So, what exactly is SMA and why is it important in the world of PowerShell? Read More
View ArticleUpload display templates to all sites in your SharePoint Server 2013 farm...
In SharePoint Server 2013, display templates are used to control how content is displayed in the Content Search Web Part and the Search Result Web Part. You can read more about how display templates...
View ArticleSet the PowerShell Execution Policy to RemoteSigned
To allow local PowerShell scripts to be run, you must set the PowerShell Execution Policy from Restricted to RemoteSigned or Unrestricted.Read More
View ArticleExport-CSV file manipulation Adding header info and AD groupname to...
I'm new to scripting and need a little help.The script below (my first) is getting all members from a supplied AD Group, displaying the DisplayName and Name, sorting it by Name and Exporting it to a...
View ArticleUsing -FILTER option
I am trying to filter out A records in DNS using the following line but want to add a second value to the -FILTER section - Get-WmiObject -Class MicrosoftDNS_AType -NameSpace Root\MicrosoftDNS...
View ArticleNew object from existing object
Hi,I'm trying to create a new object from an existing but so far i can only create a pointer to an existing object.$a=New-Object'object[,]' 5,5$a[0,0] = 10$b=$a$b[0,0] = 9$a[0,0]$b[0,0]This is not...
View ArticleFinding site template names and ID’s in SharePoint using PowerShell
SharePoint 2010 includes the new Get-SPWebTemplate cmdlet for getting a list of site templates from the farm. You can use it by typing the following command (note that I am also sorting the table by...
View Articlerun two commands simultaneously
is there a way to run commands simultaneously (asynchronous)? For example:I want to run 'get-mailbox -resultsize unlimited' and 'get-contact -resultsize unlimited' at the same time, rather than waiting...
View ArticleOutput if folder compare are the same.
Nohandle - This is a script you posted a while back. How can I get the script to output if the folders are the same "The data in the folders are the same" and still show the output if they are...
View Article