Automate creation of accounts using powershell from a webbase tool
I'm looking for a way on how I can automate creation of accounts for our users. it is one of the daily task that I do and I wanted to make it more efficient by doing an automation. I already got an...
View ArticleStart-Transcript for all powershell sessions on a machine
Hi,Is it possible to enable something like Start-Transcript for all powershell sessions (Globally for one machine)?I have a windows service that execute powershell script, i would like to record the...
View ArticleRemoving Specific Attribute For List Of Users
I have been scouring the Internet and cannot find a way to remove or clear an AD attribute for only a list of user accounts. The command that I think will do the job is...get-aduser -filter...
View ArticleRemove groups from disabled User and append removal groups to user...
Objective: I am looking at the following objectives via powershell script for active directory disabled user 1. Remove group membership from disabled user, all this users will be in a predefined...
View ArticleGet Stale Computer Records - Need help to improve the script
Hi Experts,First of all, i am beginner of power-shell and as per my understanding i wrote script by doing googling for one of requirement in my company, but i think it can be compact by reducing...
View ArticleQuery SQL Server and run another query on each instance discovered.
Greetings. I'm a DBA and pretty new to PS. What I want to do is determine which SQL instances a query should be ran on based on a query from a specified SQL instance. This instance houses an inventory...
View ArticleDisplay memory used by a given process
From Task Manager I see that a process whose name is "OUTLOOK" uses 83,33 MB of memory.I issued the following command:Get-Process -name "OUTLOOK" |select ProcessName, Path, VirtualMemorySize,...
View ArticleBeginner question on "If" statement
Hello and I hope my question isn't too basic for this forum. I came up with a simple script that copies a standard set of shortcuts from a server file share to the all user's desktop. I only want our...
View ArticleNeed to remove all but 5 newest files, matching name, leave all files that...
Using examples from other sources, I have the following script. It finds the five newest files in Arguement1, matching an string from Arguement2, and deletes the rest. $Zpath = $args[0] ##write-host...
View Articlehelp with set-alias command
Hello, I am just learning Power Shell , and I have a question regarding set-alias that I wish to get your help and expertise.I am trying a very simple set-alias command that I learn from the book...
View ArticleEscaping HTML
Hi All.I am looking to send an email out using PS, the html sample that i want to use has a lot of double quotes, i am thinking of the best way to escape it. Is it possible to do a single escape or do...
View ArticleGet-ADUser - no code runs after that stage
Hi All.I am writing a script to send an email to a user.I have the user login Id but I am going onto AD to get the users email address, my script does a few things and then gets the users email from AD...
View ArticleExporting all GPO permissions into a CSV
Hello,I am trying to export all the permissions from GPO into a CSV for all the GPO's. I have a combination of the function Here and I have tried to manipulate the output. It has worked in a fashion in...
View ArticleACL and Ownership
what modification i need to introduce to the following script in order to get ownership information too:Get-ChildItem "C:\DFSRoots\DFS\Folder_Redirection" -Recurse | ?{ $_.PsIsContainer } | %{ $Path =...
View ArticleAppend Row Error
I have 2 PSO as below, when appending it, I got error. Any other way to do that? Thanks[DBG]: PS C:\Windows\system32>> $a Time : 10:56:01 Symbol : HEXO Price : 2.30 Up% : 9 Volume : 2042998...
View ArticlePassword error was displayed when I tried to install client certificate to...
Hello I made self-hosted RESTFul WCF service application with SSL. The part of the source code referring to the certificate is as follows.C# cf.Credentials.ClientCertificate.SetCertificate(...
View ArticleLabel.Text New line
I have added label text in PS1 form, and it get value but ffor new word show in same line not go to next line, i have tried adding (\n) but its does help in PS1 script. Foreach($lt in $selectd) {...
View ArticleGet MAC address of VM running in cluster
Hi,I have FOC and which have several Hyperv hosts. I want to get the MAC address of a VM located in the FOC.Now to do that i run the following command from the Management Server (which is of course not...
View ArticleHelp with WMI class
Hello,I am new to Power Shell , and I try to learn its syntax and functionalities.I am trying to understand the Get_WmiObject syntax and usage from the Microsoft web site...
View ArticleHow to Bulk AD users update/modify attributes in AD and Exchange Mailboxes
Hi,How to update/modify the AD-Users(Bulk users) in AD as well as Exchange 2013-2016. It had more than 230 users and attributes needs to change. Kindly suggest.1.Display name 2.First name 3.Last name...
View Article