Get contents of a listbox?
I'm working with a listbox and am having the user add or modify it's contents. Problem is I can't get the contents back out of the $listbox object. Is there an appropriate method?
View ArticlePerform action on every user in a domain EXCEPT those in a certain OU
We're having issues with our TSProfilePath attribute, and after a long search it looks like an old user creation script was populating it with bad data. My boss has asked me to wipe that attribute from...
View Articlewhere is it documented that get-content file is equivalent to C:file ?
I discovered today that Get-Content for a file has an alternative syntax. <#c:#> 'abc' >xo<#c:#> Get-Content xo abc<#c:#> $c:xo abc I knew about the variation below before but not...
View ArticlePowershell Modules Not Exporting Variables
I have 2 questions regarding a new module I'm writing which will perform file validations and pass commands to SQL Server which will restore databases. Please answer any part you can and any help is...
View ArticleVisio SaveAsWebObject on Powershell
Hey Guys..im trying to build a simple script to open a Visio Drawing, export to HTML and close..I got one work with the method export, but was exporting without the Crtl function to show shape data and...
View ArticleUnable to Install PowerShell V5 preview on Windows 8.1 X64
Over the weekend, I upgraded my laptop to Windows 8.1 Enterprise (with the 8.1 update). All went well but when I go to install the WMF 5.0 preview, i get :I have .NET 4.5 loaded and here's my...
View ArticleHostnames against serial number in AD
Please help to get all Hostnames against serial number exist in ADThanks in AdvanceManglesh Ealiya
View ArticleLoad external powershell script at runtime?
If I have Powershell Script A as the currently executing script, is it possible to have ScriptA dynamically load/execute script B either from filesytem or webservice? How do you dynamically...
View ArticleEnabling Exchange Shell to return output of more than 1 command.
I have a simple test script as follows :Get-RemoteDomain | select identity, DeliveryReportEnabledGet-TransportConfig | Select Identity, MaxRecipientEnvelopeLimitGet-PopSettings | fl -property...
View ArticleDetermine if service exists?
In Powershell, how do you determine if a windows service exists and stop it?thanks
View ArticleADding bulk users on send on behalf to
I am using this command to add send on behalfGet-mailbox "Sid test 1" | Set-mailbox -Grantsendonbehalfto "Sid Test 2","Sid Test 3".When i check the results it only adds 1 mailbox.Please advise
View ArticleSearch MS Word for Exact Match
I've got a script that opens an MS Word document, then searches through a directory for each image file (.jpg), then does a find and replace using the filename as the search string, and inserts the...
View ArticleDefault PSSession
Hello, ive enabled the PSRemoting on my machine. Is it possible to have default session with limited cmdlets (Property Visibility => private).I know I can create new listener via...
View ArticleRemove all (unknown) printers on Windows Server 2012
Hello, Can you advise me how to remove all printers that are on Windows Server 2012. The script that removes all unknown printer. Thanks for any advice
View ArticleGet-ChildItems, FoldernameFilename.doc
PS C:\> Get-ChildItem -Path `R:\EDI_Development\Documentation\MacessEXP\Scripting\*' -Recurse -Include TestPlan.doc | ForEach-Object { Echo $("C:\job\j scrippt to VB script\New folder" +$_.FullName...
View ArticleGet-ADUser vs DirectorySearcher
I have two script which essentially do the same exact thing, the only difference is the one that uses the Get-ADUser cmdlet takes about 45 secs to run, whereas, the one that uses the DirectorySearcher...
View ArticleBreakpoints set during debugging don't work in Powershell 3.0
Hello I have this kind of problem.When I set breakpoints before starting debugging of a Powershell script, these breakpoints work. While I debug the script I can set new breakpoints but script...
View ArticlePhone number scheme change
I've recently been tasked with changing the format for our phone numbers in AD, and I'd like to not have to do this manually if possible. I was able to update telephone numbers that are common (from a...
View ArticlePowershell and Set-VHD
So I'm currently learning Powershell amongst other things for work. But one thing that has caused me to grind to a stop is the face that set-VHD worked for me no more than a week ago. However the last...
View ArticleCopy files over network
I have to copy files from one share network to another share network. But both the share network on different domains. Is it possible to do such via powershell?$Share 1= //k0z0s1/D$ -- domain --...
View Article