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

Password Reminder

Hello, i am trying to get this Password Reminder script to work but i cant figure out how to get it to calculate remaining days until the password expiry´s here is the script i am using. #...

View Article


MY Boss was asked to get these reports ASAP, Please help me

1.       A list of all GPOs that run a script, what the scripts name is, and what it’s function is, if you can figure it out.  If the script is mapping drives, printers, or pulling files from a...

View Article


Input window in power shell is not appearing when script run without opending...

I am asking path from user and getting powershell INPUT window is  prompt when script is open in shell editorbut when I save this script as *.ps1 and right click->run with power shell then it is not...

View Article

Behaviour interactive shell Function

Hello,When I run following code from the shell, it indeed gives me a .csv with all files bigger than 1MB in c:\testGet-ChildItem -Path c:\test -Recurse |    Where-Object -FilterScript {$_.Length -ge...

View Article

Unable to move files

Hello There,I've created a script powershell to move XML files from one server to another.The script do :Foreach XML containing on a specified folder - Create a subfolder based on the lastwritetime(it...

View Article


n00b needs assistance iterating list of computers to show group membership

I'm a complete n00b, but I catch on pretty fast. However, I seeem to be running into a problem I could use some assistance with. I currently use the following Powershell command to list the group...

View Article

Training - Looking for the best CBT/CD Don Jones Powershell Training

I've seen several of Don's presentations and I've been impressed with his ability to make Powershell understandable. Now I'm looking for some training for some of my coworkers (about 10 to start). I...

View Article

Loading and using .NETAssembiles and Classes

I want to start using the new compression features in the .NET 4.5 class 'System.IO.Compression.FileSystem'As I want to zip/unzip files etc and do not want to use any third party modules or libraries...

View Article


Output Dilemma - CVS vs Excel

I have a script that I can run against the internal servers to produce an Excel file listing groups/members of the Local Admin group by columns for Server, Sponsor, Group, Members.  The script does...

View Article


Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005...

Hi Richard,I am a newbie to Powershell.  I have been reading and testing code while learning.  Right now, I am stuck on something I am sure is silly.My code:#$strUser = Read-Host "Enter user...

View Article

Powershell script to test RDP is available

I am looking to write a script to test a server to see if the RDP port is available. Is there a way to do so?

View Article

Bulk Set NTFS permissions on folders

I work for a company that supports IT in schools.  We have developed a standard  AD, groups, folders and permissions structure, each school have their own domain but the structure remains identical -...

View Article

Sort a dynamic Range in Excel with Powershell

So, i've done a lot of searching and i've come up empty... I use a lot of excel within powershell, but i've never done dynamic sorting.Here's the snippet from the macro."    Rows("1:582").Select...

View Article


Name change to lowercase - VMware

Ok i have written some scripts before but am not exactly sure how to do this.Our whiny team of server ops who doesn't have the same process now wants all the names of the guests in Vsphere to all be...

View Article

PS V3 command failing (Get-EventSubscriber -Force).count

The above was working fine in V2 but fails in V3, ie no count property! How can I fix this please? I assumed that V3 was supposed to be backwards compatible with V2, but obviously not.

View Article


Odd behaviour with Select-Object

Hello,picking up from one of the excellent tips posted out from this site (invaluable) I cannot see at the moment why, my normal select-object does not work. I am using PowerShell v2 as belowName...

View Article

Location based printing script

Normal 0 false false false false EN-US X-NONE X-NONE Im a new VMware View Admin and Im having an issue with location based printing. It is not consistently working and instead of spinning my wheels on...

View Article


PowerShell V3 StrictMode question

This may be related to my previous post regarding Set-StrictMode. I have a module that works fine in V2, ie Import-Module Get-StrictMode, etc, but in V3 it just returns 'StrictMode: Off', whatever the...

View Article

Powershell script to move files in folders and subfolders from one Network...

I am trying to use to below Powershell script:get-childitem -Path \\servername\location |    where-object {$_.LastWriteTime -lt (get-date).AddDays(-31)} |     move-item -destination "C:\Dumps"The...

View Article

Finding Windows server's hard disk space and availabe disk space

Hello,Looking for Power-shell script using version 2 or 3 that will compile a text file and retrieve the Windows server's (2003, 2008) hard disk and available disk space for 1000 servers.This can be...

View Article
Browsing all 8583 articles
Browse latest View live


Latest Images