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

Need script to generate logs for actions on any file like creating ,...

Hi Tobias,I need a script which running once keeps on generating the readable logs for the actions like   creating , Modifying or deleting the any file in the system.It would be Grateful if you could...

View Article


Add-Printerdriver with INF-Path

Hi,i´m currently writing a powershell script to automate print queues, printers, ports...All works fine, but the following cmdlet not:Add-PrinterDriver -Name "Testprinter" -InfPath...

View Article


Need help on output

I have a script below to gather Driver Name and Version from a conputer list but can't seem to get the output format I wanted in either excel or html format belowDriverNamame                 Computer1...

View Article

NTFS Permissions

How can I set filesystem-permissions (NTFS) ?

View Article

powershell and VM with hyper-V

Hello,I have windows server 2012 installed, I created a vm in order to configure a web server.I would like to create a script using power shell to configure the iis. But I wandering if it s possible to...

View Article


Powershell for Beginners-Tic Tac Toe Game

Hello, beginner Powershell user here. I cannot for the life of me figure out what is wrong with my code. The script asks "Would you like to play? (Y/N)" and when the user enters "Y" it hangs and...

View Article

splitting variables

Hi, I need help for a script to archive logfiles, im trying to compress monthly logs with 7zip.Im "feeding" 7zip executable with a file list from a array stored in a variable, but the list is to big...

View Article

copy file to multiple computers

Hiim trying to copy a file from one computer to multiple servers.I want to use a txt (Srvlist.txt) file containing the servers name.but I get an error that the path cannot be found.I can copy the file...

View Article


Cannot get CPU value to show on a remote computer

When I run a script I have been working on the value for CPU and Path is blank. I have racked my brain trying to figure it out but cannot. Being new to PowerShell its frustrating. What have I done...

View Article


How to link the output from win32_diskdrive and win32_volume

Hi,I am doing some analysis on multiple servers and am looking at ways to link the output from the following 2 lines:Get-WmiObject win32_volume | Select SystemName, name, Label, DriveLetter,...

View Article

Print to a network printer

HelloIwould like toprint to aof arbitrarynetworkprinter notthe defaultprinter.I havethe following scriptDirc:\myFolder\*.Pdf|Foreach-Object{Start-Process-FilePath$_.FullName-VerbPrint}Iwould like...

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

How to eject a USB mass storage by powershell script?

If we indicated driver number, or volume label, how to eject a USB mass storage by powershell script?

View Article


Getting full path for remote shares

I'm having a bit of difficulty with this and don't want to have to resort to dumping to excel and filling in the "\"s. or using ShareEnum and dumping the whole network.I can get a list...

View Article

ByPass UAC on Windows 7 from PowerCLI

Hi All,I just tested my script where I'm changing an IP from a dev system to a target system. I kept getting the following error: Set-VMGuestNetworkInterface "Error occured while configuring the...

View Article


Set quota on C:\ drive for a specific group

Hey guys,First off all, I spent a lot of time researching this on the internet and I haven't found a solution yet so I decided to make an account to finally solve it.The situation: Windows 2008 server,...

View Article

Create a service with instsrv.exe & srvany.exe

Hi,This is my script : $User="Domain\DomainAdminAccount"$Password=Cat"\\x.x.x.x\share\credentials.txt" | ConvertTo-SecureString  Copy-Path"\\x.x.x.x\Instsrv.exe"-Destination"c:\program files...

View Article


Use multiple columns from a CSV in the one command.

Hello all,I would like ot know if i can take 2 columns from 1 CSV file to create a parameter response in a powershell command.For example, I have a CSV file containing Ad user data which is ot be used...

View Article

Share Permissions

(Please visit the site to view this media)HiI've read a post on your site regarding this topic but I don't believe a solution was ever reached. Is there a way to get 2 specific shares and their...

View Article

passing the path as a variable in powershell script

i want to pass the path as a variable to my scriptthe error is cannot find path path does not existmy code$a=read-host$b=read-hostcopy-item $a $b

View Article
Browsing all 10624 articles
Browse latest View live