Edit C:\Windows\System32\BestPractices\v1.0\Models\Microsoft\Windows\FileServices\DFSR\DFSR.ps1
ÿþ# # - - - - - - - - - - - - - - - - - - - - - - - - - - - - # X S D S C H E M A D E F I N A T I O N # - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # S C H E M A T R O N R U L E S D E F I N I T I O N # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # I m p o r t - L o c a l i z e d D a t a - B i n d i n g V a r i a b l e _ s y s t e m _ t r a n s l a t i o n s - f i l e n a m e D F S R . p s d 1 # # D F S R g l o b a l s e t t i n g s # # # B P A w i l l u s e t h e b e l o w v a r i a b l e w h e n d e t e r m i n i n g i f t h e v o l u m e i s a l m o s t f u l l # s o w h e n f r e e s p a c e i s l e s s t h a n o r e q u a l t o t h e b e l o w p e r c e n t a g e o f f u l l d i s k # s p a c e t h e n B P A w i l l c o n s i d e r t h a t v o l u m e t o b e a l m o s t f u l l # $ G l o b a l : d i s k S p a c e F u l l T h r e s h o l d P e r c e n t a g e = 1 0 # # B P A w i l l u s e b e l o w n u m b e r t o d e t e r m i n e i f t h e r e a r e h i g h n u m b e r o f c o n f l i c t s # I f a r e p l i c a t e d f o l d e r h a s c o n f l i c t s m o r e t h a n o r e q u a l t o b e l o w n u m b e r t h e n # B P A w i l l d e c l a r e t h a t f o l d e r t o h a v e h i g h n u m b e r o f c o n f l i c t s # $ G l o b a l : n u m b e r O f C o n f l i c t s P e r R e p l i c a t e d F o l d e r = 1 0 0 # # B P A w i l l c h e c k D F S R e v e n t l o g s f o r s t a g i n g c l e a n u p s t a r t e d e v e n t s f o r e a c h r e p l i c a t e d # f o l d e r t h a t h a s o c c u r r e d i n l a s t f e w h o u r s ( a s d e f i n e d b e l o w ) # $ G l o b a l : c h e c k S t a g i n g C l e a n u p I n H o u r s = 2 4 # # F u n c t i o n D e s c r i p t i o n : # # T h i s f u n c t i o n w i l l a d d t h e S e r v e r M a n a g e r m o d u l e s o t h a t R o l e s # c a n b e q u e r i e d # # A r g u m e n t s : # # N o n e # # R e t u r n V a l u e : # # N o n e # f u n c t i o n S e t u p { I m p o r t - M o d u l e S e r v e r M a n a g e r } # # F u n c t i o n D e s c r i p t i o n : # # T h i s f u n c t i o n w i l l r e m o v e t h e S e r v e r M a n a g e r m o d u l e a f t e r t h e R o l e s # h a v e b e e n q u e r i e d # # A r g u m e n t s : # # N o n e # # R e t u r n V a l u e : # # N o n e # f u n c t i o n T e a r D o w n { R e m o v e - M o d u l e S e r v e r M a n a g e r } # # F u n c t i o n D e s c r i p t i o n : # # c h e c k t h e s t a t u s o f s p e c i f e d s e r v i c e # h a v e b e e n q u e r i e d # # A r g u m e n t s : # # $ s e r v i c e N a m e - s e r v i c e n a m e # # R e t u r n V a l u e : # # $ t r u e - i f t h e s e r v i c e i s r u n n i n g # $ f a l s e - o t h e r w i s e # f u n c t i o n C h e c k - S e r v i c e S t a t u s ( $ s e r v i c e N a m e ) { $ s e r v i c e = g e t - s e r v i c e - n a m e $ s e r v i c e N a m e i f ( $ s e r v i c e - n e $ n u l l - a n d ( $ s e r v i c e . S t a t u s - e q [ S y s t e m . S e r v i c e P r o c e s s . S e r v i c e C o n t r o l l e r S t a t u s ] "