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

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


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

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


Set-ExecutionPolicy weirdness

I have a short batch script I've written to set the Execution Policy to RemoteSigned then to launch my Powershell script.  cd \powershell "Set-ExecutionPolicy RemoteSigned"powershell...

View Article

how to have quotes in var

I have the following var and I need it to contain quotes$volhistC = "BA VOLH F=$voldevconfigL\volhist.bak" I need to have the quote printed to the var like F="path goes here\valhist.bak" How can I do...

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


Add a printer by using Windows PowerShell

A tip on how to add a printer by using Windows PowerShell on Windows 8Here's a tip from my colleague Ed Wilson (the Microsoft Scripting Guy) about how to add a printer by using Windows PowerShell on...

View Article

How to add credentials to the Windows Vault (PowerShell)

This PowerShell script shows how add credentials for specific users.Read More

View Article

Backup SQL Server Analysis Service database (PowerShell)

This PowerShell script will demo how to back up a SSAS database.Read More

View Article
Browsing all 8411 articles
Browse latest View live


Latest Images