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 ArticleHow 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 ArticleRegister 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 ArticlePoweshell 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 ArticleParse 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 ArticleFormat-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 ArticleIndexOf 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 ArticleNeed 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 ArticleExport 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 ArticleHow 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 ArticleSQL 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 ArticleRPC 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 ArticlePowershell: 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 ArticleList 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 ArticleHow 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 ArticleHow 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 ArticleDetails 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 ArticleScript 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 ArticleThe 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 ArticleProblem 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