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

PowerShell - list of security groups with the coresponding users group names

I would need to get the following report for all Security Groups located in one partciular OU ("SecurityOU")Group Name       MemberGroup1              User1Group1              User2Group1...

View Article


How to display otherHomePhone AD attribute in my script

Below is a quick script I need to run on our AD users.  Everything seems to work except the otherHomePhone attribute since its a multivalue attribute.  We currently only have one value in this...

View Article


Register Winscp assembly for SFTP upload

Hi, I am using WinSCP for an upload operation from powershell. I believe, to use the WinSCP assembly I have to register it in the system. So I copied Winscp.dll to C:\ and running the following command...

View Article

Poweshell remote application(.cmd) deployment

Hello all, I am beginner with powershell and struggling to get this around with the help from different sites, My requirement and scenario is I have a windows server 2008(rktdepy) with power shell...

View Article

Parse string not work

Hello,I have this script:cls $logfile_package_ct = "" $file = "c:\Temp\DatabaseDeploy.log" $logfile_package_ct = Get-Content $file $logfile_package_ct if ((($logfile_package_ct | select-string -Pattern...

View Article


Format-Table not displaying a columns data

I am using the powershell command below to read a csv file and match the computer name to the employee name where the last login date is 181 days old. For some reason the Employee_Name column in the...

View Article

IndexOf an item in an array

Hello,I've the following script which pulls info from a list of servers from XML file. I need to get the index of each item in the array.## Get XML configuration file parameters param (...

View Article

Need Help Creating a Batch File

I'm new to the batch file world, and I need help creating a file to do the following:I need to move 3 separate files from the mapped B: drive to the mapped K: drive. My issue is that the file names...

View Article


Export Variables to CSV file

How can you export variables to a CSV file.  I have the following; I just want to append to CSV file.  $totallaptops = [Int]$HistoryStuff.Textbox303 - [Int]$HistoryStuff.Legacy $Encrypt =...

View Article


How to use methods of any object in PowerShell

Hello PowerShell Expert,I want to learn how to use different methods available in any object in PowerShell . I can get the methods easily by using get-member , for ex-   Get-ChildItem |get-Member But ,...

View Article

SQL Stored Procedure to text file

I have a code snippet below that is suppose to execute a stored procedure into a text file. The error i am recieving is "Syntax error in From clause". When i transfer the SQL script to SSMS it runs...

View Article

RPC 0x80010108

$global:ie = New-Object -com "InternetExplorer.Application" $global:ie.Navigate("about:blank") $global:ie.visible = $true When does $global:ie get disconnected from the RPC server because I'm trying to...

View Article

Powershell: Error when trying to set "-HiddenFromAddressListsEnabled" on...

I am trying to hide a few mailboxes from a Global Address List using the -HiddenFromAddressListsEnabled parameter, but each time I attempt to use it, I get an error.I'm new to using Powershell, but I...

View Article


List all processes running as user on entire domain?

Greetings, I am looking for a way to list all processes (for all servers in our domain) running as a specific user. Can anyone shed any light on this?Thanks!

View Article

How to capture execution status : success/failure/warning of powershell...

hi,i'm writing a small tool to collect detail from office 365 using powershell in c#.challenge i'm facing is, after the powershell command run, I want to know whether it was successful or not. If not ,...

View Article


How to pass a -QUERY "SELECT xxxxxxx" to a powershell scriptblock?

C:\>powershell -Command $vmcs = Get-WmiObject -ComputerName HYPERVHOST -Namespace 'root\virtualization' -Query "SELECT * FROM MSVM_ComputerSystem WHERE ElementName like 'guest-hyperv' "; $vmkb =...

View Article

Details of ShouldProcess?

Hi, I have been trying to understand the ShouldProcess pattern and how it changes when using the verbose, debug, whatif, and confirm parameters.  I'm trying to find a pattern to follow.  Here is a...

View Article


Script to pull outlook attachments from outlook folder then print by date or...

I have a user that gets many attachemnts in their email. We would like to pull the attachments out save them by name or date then print them in that order to keep them grouped together when an email...

View Article

The term 'new-object' is not recognized as the name of a cmdlet, function,...

I have a script that runs well the vast majority of the time.  On occasion I get an exception.  I would appreciate any insight as to why it fails on occasion.  I can't understand why the new-object...

View Article

Problem regarding Windows Update

Im using a Windows 8 device and apparently I have windows Update pending but as I switch on or switch off the device it does nothing. Please help.

View Article
Browsing all 21975 articles
Browse latest View live


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