Storing 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 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 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 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 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 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 ArticleIncluding Task result in the output
Normal 0 false false false EN-IE X-NONE X-NONEHi All, I am running this script on a daily basis and getting the correct output. Is there any way of getting the below script to include the task...
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 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 ArticleRemoving Windows Optional Feature In Win8
Hi All,I have a Windows 8 (not 8.1) laptop with an SSD that's constantly almost out of space. Disk cleanup goes some way, but I dug around and discovered the removing Windows Optional Features....
View Articleplay sound on a remote computer with powershell
hey there! i have a hostmonitor server and another monitor station. i neet to play an alarm sound on the station whenever there is some error.is it posibol to do it?how can i connect from the server...
View ArticlePowershell: Binary Modules vs Script Modules
Hi Experts,I'm writing a Build Process (wrapping msbuild in my module) for 350+ projects (VS 2010). This module now includes lots of Functions. Although, it is working efficently, but , I've started...
View ArticleCan not remote to myself
Probably obvious once I see what is wrong but for now I'm baffled.I'm running Powershell 3.0 and want to solve this before I upgrade to 4.I stripped all the overhead I couldfirewall disabledno...
View Article