Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

Getting default account information

Hi,I have been searching the web for a solution to get the email address of the default email account in outlook. I want to have a scipt that i can run on the client...(Pop3 and Exchange)I have not yet...

View Article


Image may be NSFW.
Clik here to view.

Including 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 Article


Redirect StdOutput failure 2>&1

I know I saw a video once on this but I don't remember what the trick is when using PowerShell.  PS T:\> Get-Service -Name UPS 2>&1 C:\scripts\outputx.txtGet-Service : A positional parameter...

View Article

Searching for files less than 1 day old

Hi all,I am trying to get all files from a folder that are 24 hours old or less.Its currently pulling all files in the folder, from months ago, but i only need files from the previous 24 hours onlyCan...

View Article

PowerShell Newbie and Remoting Issues

I have read chapter 13 of the :Month of Lunches" book, and I have a pretty good understanding of the "Remoting Concepts" however I would like a bit of clarification from an expert. I have a "HomeGroup"...

View Article


Setting Web Site RequestFiltering/RequestLimits/MaximumAllowedContentLength

I am trying to set the Maximum Allowed Content Length for a web site under IIS 7.5 using Powershell 2 or 3.  The only examples I have seen use appcmd ...  This is easy to do with the IIS Manager UI by...

View Article

Catching particular WMI exception

Hello AllCan someone please help me with the following question.I am trying to be more specifc when catching exceptions if I do the followingGet-WmiObject -ComputerName Server1 -Class Win32_PowerPlan...

View Article

Add Host in NLB Cluster from Remote Server (Access is denied. (Exception from...

I am running command from Remote Server invoke-command -computername server1 -filepath c:\host.ps1Inside host.ps1----------------------------------------import-module...

View Article


Passing CIMInstance as arguments to methods using 'Invoke-CimMethod'

I want to invoke CIM class method and pass CIM instance as argument to the method. The below scripts executes properly but the argument is not reaching the provider. I have put the traces in provider...

View Article


Calling of the Powershell functions

Hi,While I am calling the function:function get-localadmin {  param ($strcomputer)    $admins = Gwmi win32_groupuser –computer $strcomputer   $admins = $admins |? {$_.groupcomponent –like...

View Article

Unexpected Results using WMI to query Offline Files

I'm try to list offline files on a remote computer running Windows 7 x64.If I execute the following command locally, I get expected results -- namely, a list of all the items in the local files...

View Article

gwmi win32_product error ONLY in win xp

Hi  All,I am creating a script to collect some system information for multiple servers. As a part of it, I am collecting softwares installed in group of machines. I am taking the list of softwares...

View Article

test server connection before executing commands

Hi All,I have  a script which would collect some windows hardware information. I have list of servers in $filelist. and so,  I have used foreach ($computer in $filelist) {write-host `nwrite-host...

View Article


Remote PowerShell - Validating new 2008 Cluster

 Hi,If it a possible, I need an advice, about remote installation MS Cluster 2008 with PowerShell. I run following script by PowerShell remote to remote machine (Windows 2008 R2), this script only...

View Article

Problems with creating a Windows Server 2008 R2 Failover Cluster Remotely...

Hi guys,I am trying to remotely setup a cluster (Windows Server 2008 R2 Failover clustering) from a single central server. So in my scenario, I have 3 servers. My central script server and my 2 cluster...

View Article


how to customize daylight saving starting and ending dates by powershell

how to customize daylight saving starting and ending dates by powershell?I tried this , but did not work? $x=Get-WmiObject win32_timezone | select * $x.StandardMonth=9 $x.put_no errors results, but...

View Article

Map network drive with prompt

Hi I am wondering how can I get a PS script to run and prompt users to enter :Drive letterUNC pathSo it will effectively replace whats in explorer.

View Article


How to Get adapter name of the virtual Machine ???

Hello ,How to Get adapter name of the virtual Machine ???using Hyper-v windows server 2012 with powershell. Thanks Alok Kumar Sharma    

View Article

How to change the name of single specific switch inside Virtual Machine ???

Hello ,I have two Nic in a Virtual Machine as Nic1,Nic2 and both Nic are connected with different type of switch example (Private and Internal) Switches.I want to change Switch according to given Mac...

View Article

Trying to find default printer from list of remote computer

I am trying to write (or use someone elses) script that will search a text file of computerson the local lan and return which printer is set as the default printer for that computer/user.ThanksHere is...

View Article
Browsing all 10624 articles
Browse latest View live