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

win32_userprofile

Hey gang, I am trying to find all user profiles on a computer and get the count for them. I have figured out the syntax for both, I would like to run them at the same time and have the info displayed...

View Article


Apply correct subnet mask

I am new to scripting and powershell and am neck deep in tutorials and googling examples of code. I would like to see if anyone could point me in the right direction. I have compiled some vb scripts in...

View Article


Script to set WMI Namespace Security - add service account?

HowdyI've been trying to figure out how to get a script running that will set wmi security permissions on 2003, 2003r2, 2008 (x86 & x64), as well as 2008R2.I've searched the net for a long time,...

View Article

Change Windows 7 User Rights

I am trying to write a powershell script that will change the User Rights for a machineFor example...I want to set 'Create permanent shared objects' (SeCreatePermanentPrivilege) to an empty string....

View Article

Image may be NSFW.
Clik here to view.

Disk latency from WMI class in Powershell

Hello All,I've got some issue with getting info about disk latency in powershell. I'm using following:Get-WmiObject -class Win32_PerfFormattedData_PerfDisk_PhysicalDisk -ComputerName machine01 | Select...

View Article


Get-WmiObject Win32_Computersystem | Format-List Name, manufacturer, model,...

Need to extract info using wmi for all laptops on domain.$strFilter = "computer"   $objDomain = New-Object System.DirectoryServices.DirectoryEntry $objSearcher = New-Object...

View Article

Bi-Directional Communication option of the Xerox Printers

How can i disable the di-directional communication option of the Multifunctional Xerox Printers.I wrote this Powershell script, but it doesn't work for Xerox Printers#_$PrintServers = @("PRT01",...

View Article

WMI Citrix License is returning error

When I was using below line in my Script I was getting the error $licensePool= gwmi -class"Citrix_GT_License_Pool"-Namespace"ROOT\CitrixLicensing"-comp"192.168.70.131"-ErrorAction...

View Article


query network speed on all devices in specific OU

Need to query adapter speeds for all devices in specific OU following works for my device but need to report on all devices in...

View Article


Display site and bindings using wmi

HiI want to display IIS sites and their relevant bindings in tabular format. I am connecting to remote machines so due to security reasons I cannot use Get-Website and so have to use WMI. I have the...

View Article

Run the batch file in remote system

I have batch file which is residing in the remote system (C:\RunJob.bat)   Batch file contains code to open notepad.exeRemote system name : RemoteSysLocal system name : MohanSysHow do i run the...

View Article

Add-Type -Path c:\scripts\validateMatches.dll failing.

I can get Add-Type -Path c:\scripts\validateMatches.vb to work with the script below but trying to reference the compiled version  fails. This script just adds a [ValidateMatches] type and is identical...

View Article

Create a log file?

I have a Powershell script I've written that "builds" a Windows 7 PC with all the accounts, apps, users, etc that we need.  Is there a simple way to create a log that lets you know all went okay?  For...

View Article


Getting latest file name from file and test

Normal 0 false false false EN-IE X-NONE X-NONEHello, Wondering if the below scenario is possible  I have a folder that contains flat files and are named in sequence 111,112,113,114 etc  Each day I...

View Article

Change Header Names in Export-CSV Script

Good afternoon, we have a script that runs at x period of time. Its job is to get a set of data from a SQL server then output that data into a csv file for distribution.The script is full operational...

View Article


I'm a bit rusty and need help.

You know the old saying, "You don't use it you lose it?"  Well I find myself in that spot.  I can figure out most of what I need but I'm finding it hard to remember how to parse through a list of items...

View Article

Script to monitor IIS memory consumption and url

I have 2 scripts running to monitor IIS memory consumption using "get-process"  and the IIS web requests using "get-webrequest" at the same time.I would like to try and combine these 2 commandlets to...

View Article


Invoking a powershell command as a variable reference with a parameter list

I'm trying to embed a powershell script into the jenkins CI tool.  The script location is a variable and one of the parameters is a variable.  I having been trying all sort of combinations such...

View Article

How to Find .Net Version Installation

Hi All, I would like to find which .Net Version is installed on a Computer. Could you please help me with a Powershell script on how can i get this Output.

View Article

Sum one column based on another in PowerShell array

I've got a custom object retrieved from a SQL Query which looks like thisThis is basically how I've constructed the object and it works fine but I can't seem to find how to group them.foreach...

View Article
Browsing all 10624 articles
Browse latest View live