Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 8583 articles
Browse latest View live

PowerShell 3.0 in a month of lunches

In 2011 there was an offer for an Training Kit for PowerShell in a month of lunches.  I am planning on offering a supplement to a server course and would like to use this text.  Is there a update for a...

View Article


I think I'm getting Custom objects wrong

Hi, I think I'm getting the PSObject concept wrong.I've got the below for each loop. $mbInitialSize just returns a Mailbox Name, and the total size of their PST's found on their computer which is held...

View Article


Need Help with Combo Box Display of Selected Value

I am looking for a way to display a selected value (i.e., "Peter") in a combo box upon form load with PowerShell. When the form loads, the combo box is blank. Also, I don't think my code is very...

View Article

Trying to understand output

If I run the following command it displays my output in 2 columns like this: collection name          collection IDcollection name          collection ID Get-WmiObject -ComputerName sfrvmsccmcn1...

View Article

Lines of code running before others are finished?

Yesterday was my first attempt at running my entire Windows 7 PC build Powershell script that I've been working on and I had several problems with some lines of code not actually running and sometimes...

View Article


PowerShell tip: Determining the DNS suffix search list

A tip on how to use Windows PowerShell 3.0 on Windows 8 (or on Windows Server 2012) to determine the DNS suffix search list.Read More

View Article

Using a PowerShell Script to automate SQL Server database restore

Recently we moved our remote ConfigMgr 2012 database to our site server. The plan was to leave the existing remote server in place to support the “ad hoc” users.Now, how to refresh that database on a...

View Article

What does $_. Mean in PowerShell?

Contrary to common belief, PowerShell doesn’t just make up variables whenever it feels like it. Just a few years ago, I would have swore it did though. Take this script as example:Read More

View Article


More Powerful SharePoint PowerShell Commands - Part 3

In the last article of this series, I alluded that more could be done in SharePoint on Web Applications with the aid of PowerShell. Most developers and admins of SharePoint 2013 are familiar with the...

View Article


Export Search Results with PowerShell

A while back, I wrote an introduction to how you could play with our C# SDK from PowerShell. And just the other day, Adrian wrote a post talking about how you could export really large result sets to...

View Article

Help for Variable prase

Hi All,Please can anyone help me in parseexact of variable. Requirement is to extract single value rather whole string.Let me tell the exact requirement, i have a form with textbox which will take a...

View Article

xaml Extract parent window properties.

I am running a script calling an xaml file and need to know how to extract the size of the parent (Windows) form from the script in order to position this at the top right of the desktop. I have set...

View Article

Get-WmiObject Win32_Computersystem | Format-List Name, manufacturer, model,...

Need to extract info using wmi for all laptops on domain.$strFilter = "computer"   $objDomain = New-Object System.DirectoryServices.DirectoryEntry $objSearcher = New-Object...

View Article


Need help with table (hashtable?) formatting

I've write a simple script to  get remote counters reagarding to disk performance:$counter_read_latency="\PhysicalDisk(*)\Avg. Disk sec/Read"$counter_write_latency="\PhysicalDisk(*)\Avg. Disk...

View Article

Used Disk Space

Hi Masters, I would like to get "remotely" more servers Disk infos as: Diskname,WholeDiskSize,FreeSpace,UsedDiskSpace.What I have done until now:function Get-FreeSpace {gwmi win32_volume -Filter...

View Article


Running job on remote computer as scheduled job

There seems to be times and reasons why running a powershell command or script on a remote computer as a scheduled job is a neccesity. I have been trying to come up with a way to do this on all my...

View Article

How to create the proper loop

I have this code which now works. $Results = Foreach ($Server in (get-content "C:\Temp\servers.txt"))     {Get-Service "Credential Manager" -ComputerName $Server | Select...

View Article


Share Permissions

(Please visit the site to view this media)HiI've read a post on your site regarding this topic but I don't believe a solution was ever reached. Is there a way to get 2 specific shares and their...

View Article

Use Windows Command Line Tools and PowerShell Cmdlets to Manage Security in...

In this article we'll take a look at how to configure and manage the Windows Firewall with Advanced Security via Netsh and Powershell cmdlets.Read More

View Article

Step-By-Step: Manage Windows Azure using PowerShell

Over the last few weeks I’ve been writing about Windows Azure IaaS.Read More

View Article
Browsing all 8583 articles
Browse latest View live