renaming file extensions. help
I received lots of files that end in a cbr I need to rename them all so that the end in a .rar extension. is there a short powershell script that I could run to rename anything in my current working...
View Articlestart-job does not give expected result
Good day, I have below scripts and below outputs. But I dont understand the output. It is different than I expected. Can anyone explain it to me? file_search.ps1 $fsw = New-Object...
View ArticleMount-SPContentDatabase name change to wss_content_*****
I run the below script in powershell: Mount-SPContentDatabase -Name "farmOne1_MPALMAM0_content1" -DatabaseServer "MPALMAM0" -WebApplication "http://farmOne1.sharepoint.hp.com" but result display: Id...
View ArticleCompare objects between variables
Hi, I have a $variable witch contain servers, $serv1 Server1 Server2 Server3 Server4 And a second variable $serv2 that contains a smaller list of servers Server3 Server4 So I want to...
View ArticleRepeat command "exponentially" AND in parallel
Hi, my problem seems simple (the concept) and I can't figure out a way to implement it... In a script I would like to run a command 1 time, for example 'Test-Connection 192.168.0.1' 5 seconds later, I...
View ArticleNeed help creating script that sends email when query is true.
What I am trying to do is run a PS query against SCCM 2012 to see when someone requests software and if that query is true, send email to me. Query: $app = Get-WmiObject -Class...
View ArticleO365 PowerShell Add-MsolGroupMember based on Department
I'm trying to manage users in Office 365 using the Get-MsolUser -Department "Human Resources" command which returns a list of users that I want to add to the Security Group "HR" in Office 365. I have...
View ArticleAppend text to exported filename.
Hi, I have this script below. How do I append the subject input text into the filename to be exported (ie. subject_log.csv). Thanks in advance. $subject = read-host 'Enter subject to search for '...
View Articleget-aduser by samaccount name on gcport. mulitple matches
Anyone know how to return all objects? Get-ADUser samaccountname -server "server:3268" Get-ADuser : Multiple objects were found matching the supplied identity. Dan
View ArticleLoop Question
Hello All, I have 2 .csv files. One .csv has a list of computer names. The other list contains user accounts, and SIDs. I need to take each user account, one by one, and check every computer account...
View ArticleGet-EventLog and remote computers
Hello, I am just wondering does anyone manage to get event logs from remote computer with Get-EventLog? Here is what I get: PS Get-EventLog -LogName Application -computer mycomp Get-EventLog : The...
View ArticleCall Remote Invoke-Command and Not Wait?
Good afternoon- I have a script that calls the following command: Invoke-Command -ComputerName $strRemoteServerFQDN -FilePath $strRemotePSCommand -ArgumentList $strJobName Please excuse me if I don't...
View Articlefind all users start menu "startup" folder
I'm writing some scripts that help with all of our post-domain-join server builds (we build a LOT of servers) Part of the script will have to create a shortcut to a batch file that runs BGInfo when...
View ArticleRetrieving multiple properties via multiple Select-Object -ExpandProperty pipes
Hello, This is probably best asked by showing how far I have got. I am trying to write a script to report information in a table relating to Cluster Shared Volumes. My issue however relates to core...
View ArticlePowershell: Multiple WMI queries
Hey, I need to combine these two: Get-WmiObject Win32_Printjob –comp $server | Select Name, Document Get-WmiObject Win32_TcpIpPrinterPort –comp $server | Select HostAddress I tried something that only...
View ArticleSearch AD Forest using powershell
I am trying to find if a user is disabled or not in AD, it seems the search is not happening for entire forest, I am able to find the users from one domain but not others. can someone tell me what is...
View ArticleHow do I use Get-Aduser with the right Filter to list users?
Hi, I've issued the following command, but it produces no output. My goal is to list all Users with a SamAccountName beginning with A* thru F*. Any suggestions? get-aduser-filter'SamAccountName -like...
View ArticleRobocopy failing inside Function!
Hi guys, Currently I'm making a script to copy user data and roaming profiles from a raid array to backup drive. It's going well so far except for the Robocopy part. When the robocopy command is used...
View ArticleGet-Counter error
Hello, i'm trying to use powershell Get-Counter command to find pocesses that ussualy hang on my servers and use all available cpu resource; on windows 7 it works just fine when i try to filter the...
View ArticleSending\receiving data to\from powershell runspace
Hello Everyone, I created separate PS runspace running WPF Form. I'm wondering how can I update the content of RichTextBox control in this runspace from my parent runspace. Is this possible? My code:...
View Article