Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Export bulk user memberof from csv file

Hi Friends,,,I have below one liner script of power shell, its works fine for one user.. but I need to get all users which are in CSV or txt file ..import-csv .user.csv | Script: $((Get-ADUser "XXXX"...

View Article


Powershell start-process argumentlist

I have an issue with powershell 4.0 where start-process converts my credentials from a type of System.Management.Automation.PSCredential to System.String.  Use the following lines to replicate...

View Article


Clear out old messages in Exchange 2010 journal mailbox after messages are...

# THIS IS THE FIRST COMMAND THAT I RUN IN A SEPARATE .PS1 FILE. THIS SEEMS TO WORK FINE: New-MailboxExportRequest JournalMailbox -FilePath '\\dfsdr.dc.pud\PowershellEmailArchive\Journal.pst' # NEXT I...

View Article

Substring(0,25) Fails when the string is less than 25 characters

@{Name="proxyAddress";Expression={$_.proxyAddresses.substring(0,38) -join "`n"}}This is part of a PS script that searches the AD for a user and returns certain values.Problem was the ProxyAddress field...

View Article

script to get application stats running on multiple windows servers

Hi, I am beginner in powershell and trying to write a script to get the different stats of an application/s running on  windows WAS server. am trying to gather all the stats into one custom object and...

View Article


Image may be NSFW.
Clik here to view.

how to fix this is who in the picture ?

I use this script in server 2008 R2 for Storing Windows Event Viewer Output in a SQL Server table with PowerShell :foreach ($server in Get-Content c:tempservers.txt) { $variable = ( Get-EventLog...

View Article

Compare list of specific users to AD via Powershell

i have a list of 70-80 some odd users that i need to check for on AD if they have accounts or not.one of my co workers suggested i make a PS script to make the process easier than just going in and...

View Article

Power One-Liner Inquiry - How can you "gwmi win32_product" for multiple...

Hi All,I've tried several variations of the following...This pulls just one item out of the three:gwmi win32_product -ComputerName MyServer | where {$_.name -eq "Navisphere CLI"} -or {$_.name -like"EMC...

View Article


Range Operator Question

Hello all,I asked a question yesterday under the title of "Range Operator for first 2 letters of item" which was answered promptly and was much appreciated. I have since encountered another problem and...

View Article


Adding a 2 line streetaddress to user accounts in Active Directory

Hiya All & Happy FridayI am looking for a way to add data into the StreetAddress attribute of user accounts within Active Directory.  The address for one of our locations has two lines to...

View Article

Powershell command for adding permissions in the "winrm configsddl wmi" menu

Hello,I was wondering if there was any powershell command that would be the equivalent of adding a user in the menu brought up by typingwinrm configsddl wmiI want to be able to add Read permission for...

View Article

continuation again from Getting security permiisions and the groups

Is it possible to incorporate a code listed below to list all the users who are a members of a group? EG. If aa_bb_c#def_fgt_gr_rw is a part of foldername\servername. is it possible to extract all the...

View Article

PowerShell Web Access - Prefill Computer Name?

One of the devs asked me if there was some way to prefill the computer name field for the PSWA site (since we use the localhost machine quite often).Is there any way to do this?  He mentioned maybe...

View Article


Where is Win32_Computersystem class on windows 2008 R2?

Hello,This is my problem: PS C:\Windows\system32> get-wmiobject win32-computersystem Get-WmiObject : Invalid queryI know, gwmi -list you get the list but not the class Win32_Computersystem.On 1...

View Article

How to create an collection/array/object/thingy from a bunch of objects for...

This is a follow-up to an earlier post (How to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In...

View Article


Write-Verbose in a remote InlineScript in a workflow

I am working on some complex PowerShell workflows, which use InlineScript, often remoting to other servers (or "remoting" to the local host with alternate credentials).  Debugging is hampered because...

View Article

Most efficient way to consume log files

Hello everyone,I've been absent from the forums for awhile but I'm back at it now...  I have a question about the most efficient way to consume log files.  I read in Powershell in action, by Bruce...

View Article


uninstall program on remote machine -

All,I am trying to uninstall an application on a WYSE 32bit Windows Embedded device.  I am unable to use WIn32_product and have to Win32Reg_AddRemovePrograms.  I can query the device remotely fine with...

View Article

Issue with Pasting to Command Line/PowerShell

Hi,We are unable to paste text from an application other than Command Prompt (CP) or Windows PowerShell (PS) to CP or PS.The issue is only occurring on one of several Windows Server 2008 VMs.The server...

View Article

Windows Forms in PowerShell

Hi Folks;This is the first time I have used Windows Forms in Powershell.  I picked up some boilerplate code at TechNet, and modified it as below, which finally worked:# Get Name of Remote Computer...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>