Pipeline variable - scope number exceeded
Hello,I have a script to select the oldest file form $srcdatapath folder:$oldFile = Get-ChildItem -Path $srcDataPath | Sort-Object -Property LastWriteTime | Select-Object -First 1Then I need to select...
View Articleneed help to text a script for Remove-ADGroupMember
hi all,i need to write a script that when executed remove the user that execute it from all the ad group it is member, or from a specified groupplease can u help me text itthankscheers
View ArticleSuggest adding Powershell equivalent cmdlet link in Windows commands doc
I was looking for mountvol Powershell equivalent and did not find it in Windows command doc and that apply to other commands too. I think it is good to have a well known location to start looking for...
View ArticleSuggest script to restart SNMP service forcefully
Hi ALl,I am new to power shell, I have cmdlet to restart the SNMP service forcefully "restart-service snmp -force", could you please suggest script to be saved and executed from power shell to restart...
View ArticleServer 2016 update issue ("Microsoft.Update.Session")
Hello,I am trying to apply all available Windows Updates to fresh installation of Windows Server 2016 with PowerShell.It's a fresh installation from...
View ArticleNull Identity error when trying to get SAM accountname
Hi, I am trying to run real simple script to get the SAMaccountname from a text file. I am a supernoober with PowerShell. Every time I run this command I receive the following error.Get-ADUser : Cannot...
View ArticleIssue setting mailboxpermission based on user input
I'm trying to create a powershell script for our first line support to help them with the account creation process in Office 365. One step of the script is to get a list of shared mailboxes and ask the...
View ArticlePush json string into arraylist convert json element into string instead of...
$t=@() $r= new-object -type PSObject class { [string]$a [string[]]$b } $c =get-adgroupmember -recrisive $team| select SamAccountName $c.b = $c.SamAccountName $c.a="dummy" $t += $c $r | add-member -name...
View ArticleMsft_Volume results: multiple records for 'D:'
Hello, Im getting some strange results for Msft_Volume queryGet-WmiObject -Query "SELECT * FROM Msft_Volume" -Namespace Root/Microsoft/Windows/StorageI see 'D' drive six times! I there any explanation...
View ArticleSet ACL
HelloI have a folder on the server for end-users' archived emails. Of course each user will only be able to access their own folder.The foldernames are the same as the SamUserAccount name (first...
View ArticleCopy Certificate from Contact to User
Hey Guys, i've been struggeling to find a solution for a few days but nothing yet! maybe someone can help me figure this one out :)i have a user and a contact in an AD, both are the same person.the...
View ArticleAUTOMATE SERVER UPTIME PERCENTAGE AND SEND TO E_MAIL
Good afternoon, I am trying to create a power shell script to give me a % of up time on production serversI was able to run the script and it shows good output on the screen but sends nothing to...
View ArticleAzure Az Powershell Module Crashes Powershell/Unresponsive
Apologies if this is not the correct forum, but was only one I could find related as it's powershellCurrently the new Azure Az Module here...
View ArticlePowerShell: Exporting Active Directory Users and their Managers
I need a query to export Active Directory Users and their managers using PowerShell.
View ArticleProblems using Get-TroubleshootingPack
I am trying to use Get-Troubleshooting pack in Windows 2016 to create an answer file to allow me to automate one particular fix.If I do this:$TSPackfolders = Get-ChildItem -Path...
View ArticleUnable to process password variable in powershell because of special characters
Hi Team, I am working on a PS script to install VSTS agents on my Azure VMs through an Azure DevOps Release Pipeline.Here in the below script, I am passing a Service Account Password, which is set by...
View ArticleGet-WinEvent remote successfully retrieves large number of events, then...
Trying to read Windows Event logs via Powershell 5.1 on Windows 10 (7GB memory) to Windows 2016 Server (4GB memory).This pulls a couple of hundred event messages, then fails. When running locally, runs...
View ArticleRun Powershell script as Scheduled task, that uses Excel COM object
What am I missing here.. I have Powershell script that uses the Quest AD cmdlets to get computer information from AD and populate an Excel spreadsheet with the data.The script works fine, so I created...
View ArticlePowershell to search excel returning different row values
Hello,I am having some problems to try to implement this script. I have one big excel with several columns and I would like to search different values returning not only the row and column of that...
View ArticleSQLPS used to work before sql update
I have a few .ps1 files being called from sql jobs that used to work and now i'm getting an error when the SQLPS module tries to load. The error specifically says: "...job step recieved an error at...
View Article