myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Script Question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> Windows PowerShell >> Script Question Page: [1]
Login
Message << Older Topic   Newer Topic >>
Script Question - 8/14/2008 1:01:38 PM   
netwerkassist

 

Posts: 1
Score: 0
Joined: 8/14/2008
Status: offline
I'm new to Powershell and had a need to run a disk checking script that did not use psexec.  I found one here:
http://www.myitforum.com/articles/40/view.asp?id=9651

I created a server txt file and also save the file as test.ps1.  I opened powershell changed the directory to the script folder and entered test.ps1.  No file was created.  Was there a syntax I'm missing or>?

appreciate insight

P.S. I'm also trying to see if I can change the output to say htlm.
Post #: 1
RE: Script Question - 8/14/2008 9:49:24 PM   
martylist

 

Posts: 41
Score: 0
Joined: 6/10/2005
From: Colorado, USA
Status: offline
It's hard to say what's wrong, you need to provide more details, like the script you are using if you made any changes, exact file paths, and exact error messages. Unless you changed the path, the script you linked to requires the input server list to be in this file path:C:\Myworkplace\Clientlist.txt The script will not create a file, it will open Excel and populate the cells in a worksheet. When you ran the script, what was output to the screen? 

(in reply to netwerkassist)
Post #: 2
RE: Script Question - 8/27/2008 9:46:35 AM   
SAPIENScripter

 

Posts: 100
Score: 0
Joined: 5/15/2007
From: SAPIEN Technologies
Status: offline
There are many places this could fail and you definitely need to provide some more information.  But we can take a step back.  First can you run this in Powershell on your computer;

get-wmiobject Win32_LogicalDisk -computername $env:computername -Filter "DriveType = 3"

You should get a listing of all your fixed drives.  If so try again and change $env:computername to the name of a remote computer.  What happens? There are ways to get the output to HTML but let's see if this is working first.


_____________________________

Jeffery Hicks
Microsoft MVP - Windows PowerShell
http://blog.SAPIEN.com
coming soon: Managing Active Directory with Windows PowerShell: TFM
followme: http://www.twitter.com/jeffHicks

(in reply to martylist)
Post #: 3
Page:   [1]
All Forums >> [Scripting Technologies] >> Windows PowerShell >> Script Question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.656