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

Help with a script to query win32_service

Hi,I have the follwing script that has been created to help me identify the version of EMC Powerpath installed on my Windows servers.The script is working fine, but instead of ending having queried the...

View Article


Create SCCM 2007 Collections from CSV

Hi, I'm pretty new to powershell so any help would be appreciated!I've created the following script to create a large number of SCCM collection based on a CSV containing AD Sites.The script uses the...

View Article


Button to open website

I am really new at powershell, mostly having only used it on my exchange server.I need to remind my users of a survey they all need to do and decided on powershell.  I made a popup box with two...

View Article

PowerShell cmdlets in C# - usage of getDynamicParameters() - Looking for help

 Apologies for the lengthy read.  I look for some help and hence choosen to drop the code-snippet here.  Need this to help with my work at office.I wrote a cmdlet in C# to accept 2 parameters A and B ....

View Article

Adding Picture to Excel comment

Hi all, my troubles with excel continue sadly. Im trying to insert a picture into the background of an Excel comment. I can create a comment with text via:...

View Article


POWERSHELL NOT working, but the result is saying OK

Hi I have a problem, the problem is that I am running a PowerShell script:$server  =get-ADComputer-Filter'Name -like "serv*"' | select name$server  | ForEach-Object {...

View Article

Trying to list and output files in a folder. Why does this not work?

$Dir = Get-ChildItem C:\inetpub -recurse `$List = $Dir | where {$_.extension -eq ".rpt"} `$List | Format-Table FullName -hideTableHeaders | Out-File C:\inetpub\ReportsOnDriveC.txtHere's my error...

View Article

check for service installed & get status, output report, almost there I think?

Howdy,I have been trying to get a script working to check for a single service and I'm getting stuck.  I have the script below which does get all services and I'm not far off, but I'm not sure how to...

View Article


Generating a report from AD for all user objects with headers

Hello, new to the forum so please forgive me if i get something wrong on the formatting or something.I have a pretty simple request that i just simply can not remember how to complete.I have a domain...

View Article


Belly Up to the Title Bar

When you write a PowerShell script or function, sometimes it is helpful to provide feedback or status messages to the person running the script. Even if it is just for yourself, it is helpful to know...

View Article

Simple Hyper-V Virtual Machine Management Using PowerShell

PowerShell, of course, is integrated with just about every single piece of Microsoft technology these days. As the name applies, it's a 'powerful shell,' and through included or custom cmdlets can...

View Article

How can I determine the clicked cell in a WPF XAML grid ?

I'm presenting a set of records in a WPF xaml listview with datagridview cells: New-Window -Title 'Select Group' -WindowStartupLocation CenterScreen -Width 700 -Height 500 -DataContext...

View Article

Retrieve members from AD Container

Hello Everyone, I'm trying to get the names of computers that are members of a container... get-adobject -filter * -searchbase "CN=x,OU=x,OU=x,DC=x" -properties *|where-object {$_.member -like...

View Article


Output files

Hi there,I am using out-file for output, and output file contains very long rows.. so I did e.g.:>.\myscript.ps1 | out-file c:\temp\outfile.txt -width 4096 (it is working. )  I would like to use...

View Article

Test-Path Woes

I have not been keeping up on my training. I come back to powershell and find i am failing miserably. I understand the premise and logic of test path but i can get it to work only occasionally and dont...

View Article


Filtering users from AD

Hello all,I am trying to filter out users based on information from a CSV file put it is not working - the output is still sending all sAMAccountNames to a CSV.Add-PSSnapin...

View Article

PowerShell v1

I have several Windows servers that are 2003 R2 and 32 bit, some are 64 -bit.   They all have .net 3.5 install, but powershell v1.  I would like to find a way to upgrade to at least powershell v2, but...

View Article


SCCM and 32-bit remoting : cannot load the module ConfigurationManager

Trying to avoid to have to install an administrative client everywhere.The general idea is we want to pop up a selection grid to assign a client to a SCCM DeviceCollection.I want to build a ps1 script...

View Article

Powershell Cmdlet parameters -Tab expansion

 HI TeamAm developing Cmdlets using C#.  Like to clarify the following.1) When attempt to expand the command with tabs,  would the method getDynamicParameters()  be called for every parameter, to fetch...

View Article

Copy-toZip Woes

Im back again, I have been working with many variations of copy-to zip using  for-each($_. in $Variable) Copy-tozip...dir C:\Photos\*.JPG | Copy-ToZip -ZipFile C:\Photos2Looks to be the simplest method...

View Article
Browsing all 6937 articles
Browse latest View live