Quantcast
Channel: Windows PowerShell Forum
Browsing all 2562 articles
Browse latest View live

Script help - should be simple - check file size remote machine

Hi there,  I need some help with the following task: check filesize**, last access date of a single file that exists in c:\ for a list of remote machinesreport output: remotemachinename - filesize -...

View Article


$input and input parameters

I have created a function that accepts parameters as input and also there is a $input automatic variable, which is a collection, for that function. so the structure of my function is like function...

View Article


How can I make a powershell script wait until 00 seconds?

Hello, I don't know a lot about powershell, but have managed to put together a simple script that basically does what I need, which is to make a beep sound every 10 minutes at 09, 19, 29, 39, 49 and 59...

View Article

How to change headers in Export-CSV file?

I have one question about the original post here: http://social.technet.microsoft.com/Forums/da-DK/winserverpowershell/thread/e8498dd3-5744-4d90-bd87-72ad7259c3dd I am trying to read the headers from a...

View Article

Measure-Command { Sleep -MilliSeconds 1 }

Hello there PowerShell forums. Is Measure-Command or Sleep supposed to be this inaccurate? PS C:\> measure-command { sleep -milliseconds 1 } Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds :...

View Article


Is there... script to shutdown VM in Hyper V cluster?

Please help....  I am looking for a PowerShell script to shutdown the virtual machine for one node in the Hyper V cluster before shutting down that node.  The virtual machine will not be migrated to...

View Article

Randomly can't run commands in PowerShell

I'm trying to run SSH from PowerShell and it says that ssh isn't recognized as a cmdlet, function, script file etc. I knwo for a fact that the path to ssh.exe is in my path as I can is it from a normal...

View Article

Script to capture sAMAccount name based on email address

Hi everyone, Can anyone help me putting together a script to capture sAMAccount (in this from DOMAIN\user) from email address? This script would query the AD to find the login names – most likely there...

View Article


Removing Leading Zeros from IP Address in XML file w/ PowerShell

Hello all, I am attempting to use PowerShell to get content from several XML files and remove any leading zeros that may exist in an IP address within the XML file.  For example an IP address may...

View Article


Variable Question

Hello All! I am new to the forums, and a Powershell newb, so pardon my ignorance in advance :) One of the variables I've set in one of my scripts doesn't seem to work, and I'm unsure why(considering...

View Article

Looping through a list of computers using Get-WmiObject

I have the attached script to go through many servers in the network and get their share information. Some computers in our network have different names in dns, ex I will query a computername called...

View Article

Set-Acl works or not...need expert help

My code works on my Windows 2008R2 domain (test). But same code on Windows 2003 domain (customer production) acts strange. Here is my code.   # Set ACL $FullPermissionsGroup = "DL_AdminGroup" $Rights =...

View Article

WMI Class for HP OpenView Agent

Hello,   I need to WMI Class to query the Version of OMW Agent installed on all the servers , We are using HP Openview manager 8.16 and need to query the agent version. I tried to find out the WMI...

View Article


Using LanManServer with Powershell

Hi, I have the following code on a vbscript that creates shares on a filer: strMyDate = (RIGHT("0" &Day(Date),2) & "." & RIGHT("0" &Month(Date),2) & "." & Year(Date)) Set...

View Article

I want Create an OLE Automation Server In C# VS2010

Hi Every One ,    Iam Completely new to OLE , I want Create an OLE Automation Server app in C# VS2010.it should expose one function. Kindly tell me how i can start ,    Any small Sample would be great...

View Article


Listing all the patches/updates installed in Windows machine

Hi All I want a script to list all the patches/updates installed in my PC. I tried the below script but it does not give me complete list of patches [SQL, Visual Studio, some Office patches are not...

View Article

Executing SharePoint / PowerShell commands from C# code using Visual Studio

Hello everyone, I'm having some troubles with embedding PowerShell script into C# code using Visual Studio. PowerShell library has been added to the solution, and all works fine when I call (from C#...

View Article


Using Powershell to compare two files - one is very large

Hi Generally, if I have two CSV files and I want to compare the membership, I use this command below: diff -ReferenceObject (import-csv c:\docs\ListA.csv) -DifferenceObject (Import-csv...

View Article

Where-Object's InputObject parameter, is there an example of using it?

Can anyone provide an example of using Where-Object's -InputObject parameter? Especially confusing to me is how to use Where-Object's -InputObject and the -FilterScript parameter together.

View Article

PowerShell Script Required for Export Total Users with Description, Username,...

Hi All, In My root Domain [ 2008 R2] have one "Universal Security" Group created only in rot domain  which is having members of both root & child domains. My client want to generate reports on...

View Article
Browsing all 2562 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>