Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

Powershell help! Exec-Policy & Domain/Rename Help!

Powershell# Checks to see if the script is being ran in Administrator mode.. If(-NOT([Security.Principal.WindowsPrincipal]...

View Article


How to rename and add the machine to AD in powershell without Restart.

With powershell we can rename a machine and add it to domain with the below commandlets.1. Rename-computer2. Add-Computer -DomainName $domain -Credential $credentialBut problem it the computer need to...

View Article


35-to-1 step reduction

We are about to update our ERP, Made2Manage by Aptean. This involves installing SP6 and then Hotfix 7. Unfortunately there is no unattended install for the service pack. So it involves manually...

View Article

Variables in variables in a variable.

So. I almost cracked this one by myself today, but have hit a wall now. I'm sure someone will tell me where I have gone wrong!Powershell#Specify text files for directories to service & email...

View Article

Folder access list + expanded properties of users.

Hi, I need to get a list of users\groups who have access to a certain folders and the type of the permissions that they have. I have a script for getting the owners of the folder:Text$folders =...

View Article


Getting members of a group that are from a different trusted domain

Hello, does anyone have any simple powershell scripts that would get a list of obectSids from a text file and output its msDS-PrincipalName value and group membership?Or maybe the other way around...

View Article

Script to provide basic AD account information

been searching this for a few hours with little result, basically what I am trying to do is take a text file of user account names and run a search on them in AD to see if the account is still active,...

View Article

Folder Permissions appearing as Special Permissions

Powershell#Create Required FunctionsFunctionSetFolderAcl($FolderName,$GroupName,$Rights,$IsPropagated){Write-Host"Setting up...

View Article


Powershell - 0365 assign License according to UPN

Hi Peepz,I'm trying to compile a script that will assign licenses to users which have been added from the On Premise AD and don't have a License yet. All Normal users should receive a license, but all...

View Article


Filtering users - Get-ADUser

Colleagues,I'm trying to rework on of my scripts so to get all users from a list of OUs exported into a .csv with the OUs name. In order to do this I was reworking a script that exports contact names...

View Article

Move files based on specific criteria

Hi guys,So I have this PowerShell script:Powershell$Header=@"BODY{background-color:white;}BODY{font-family: Arial; font-size: 12pt;}TABLE{border-width: 1px;border-style: solid;border-color:...

View Article

Getting an average between 2 fields in PowerShell output

I'm trying to rap my brain around how to get an average number of users per our RDS session hosts in an individual Session Collection.I can get the list of all users and the session host they are on...

View Article

Powershell Script for AD GroupS

TextImport-Module ActiveDirectory$csvfile = Import-CSV -Path c:\Scripts\createusers.csv -Header @("Firstname","Lastname")foreach ($user in $csvfile){New-ADUser ` -AccountPassword...

View Article


Image may be NSFW.
Clik here to view.

Poweshell command to export all users on AD with tokens?

Hi guys,We're using the following AD module to configure our VPN users with eToken Pass tokens and I was wondering if there's a good PS command to pull the names of all the users and the tokens IDs...

View Article

Output to file

How do I get this script to output to a file.Get-ChildItem c:\temp | Where{$_.LastWriteTime -gt (Get-Date).AddDays(-7)}I have tried the line below but it generates a empty file.Out-File -FilePath...

View Article


PowerShell Bulk Update Website w/ JSON issue

Powershell$data=import-csvC:\scripts\test.csvforeach($linein$data){$post=[pscustomobject]@{EmployeeId=$data.EmployeeNumberTrackingNumber=$data.TrackingNumber}}$post|ConvertTo-Json|Invoke-RestMethod-Met...

View Article

Pull AD attributes script not exporting data

PowershellForEach($Userin(Get-Contentc:\ps\out.csv)){$Filter="displayName -eq ""*$($User.RecipientName)*"""Get-ADUser-Filter$Filter|selectemployeeNumber,cn|Export-CsvC:\ps\tes.csv}I have a CSV file...

View Article


What did you accomplish in PowerShell in January 2016?

And with the blink of an eye, another month has gone by!  Here's your chance to do a little bragging (or humble bragging, it's all good) about what you've accomplished with PowerShell this month?...

View Article

Search Word document for Hyerlinks and change path

i'm not sure where to start on this one.I have multiple word documents in a directory that are hundreds of pages each and the file server that the hyperlinks where pointing to was recently changed.I...

View Article

Organising Powershell Scripts

Hi guys,I took over an environment a year ago where it seems Powershell has been used to achieve alot of functions. These are not documented or organised in any standard fashion.So, is there a tool or...

View Article
Browsing all 15370 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>